My very first time as a GM, I showed up to the session with a great pile of notes and plot. Half an hour later I threw it out and started improvising because they'd gone in a totally different direction. Over the years most of my players have been willing to follow a railroad if I ask them to, but I've developed a totally different kind of session prep which makes it so I don't have to ask that:
Don't have a plot.
Instead, have a status quo, something which disrupts the status quo, and a reason that the disruption forces action.
This isn't the kind of pre-made adventure we usually see, because it's hard to generalise for a widely published product whose point is to minimise the pressure on the GM mid-session (other systems, like Fate Core, take an approach similar to mine for some of their published adventures). But for individual campaigns it can be very powerful.
This concept is predicated on the idea that the only thing you can count on a group of player characters to do is to be unexpected. Planned plots tend to fall apart at their touch.
I'll run through the process with a quick example, but keep in mind that it's going to be a lot more organic than I make it seem. In practice, I go back and forth between the steps as one part gives me new ideas for another.
What's the status quo?
I need a location, and its inhabitants. The scope is up to me--maybe just a small dungeon, maybe a town and a nearby cave, maybe a whole nation. Let's start small. The reason "dungeons" work so well is that they're contained and limited: the number of options (places to go, people to meet) is more controllable than in a sprawling open area where the players can choose to wander any which way.
Location
A small underground catacomb: crypts, inner chamber, secret chamber connected to both.
Notice that since I don't need to control what ordem the party does things in, I'm free to have the secret chamber connected to both of the other areas. This also increases opportunities for the party to find it, since I really want them to do that.
Now I establish who's living there: why they're there, what they want, and what they are doing to get what they want (intelligent recurring NPCs may also have secondary goals, and backup plans and contingencies!). I'm going to choose things that I think are cool. That way no matter what happens, cool stuff will be involved. I like Sealed Evil In A Can plots; the idea that kobolds worship dragons; and the notion that dragon magic is closely linked to their physicality. I also like setting up situations where it's equally reasonable for the players to conflict or cooperate with an NPC.
Inhabitants
The crypts are home to a small tribe of kobolds who worship and serve the dragonling that lives in the inner chamber. A malevolent spirit is trapped in the catacomb's inner chamber.
- The spirit is the ghost of a tyrannical king. He wants to break free and possess the most cunning person he can find. The major obstacle to the king's freedom is the dragonling. He's influencing the kobolds to be more violent and aggressive, to call attention to the catacomb and thus hopefully get rid of the dragon.
- The dragonling lives in the inner chamber to keep the spirit trapped. Her spells of binding are powerful, but fade quickly in her absence, so she has to remain in the catacomb. She doesn't want to spend her whole life like this, so she's planning an exorcism ritual which requires a holy relic from a nearby village temple.
- The kobolds worship the dragon and serve her, raiding nearby towns for food and valuables so she can concentrate on keeping the spirit entombed. They've just stolen a relic from a temple and (because of the ghost's influence) killed a priest.
So we've set the stage: the ghost and the dragonling have goals they're working towards, and the kobolds are their pawns.
What's disruptive to the status quo?
In most D&D adventures the most disruptive force you can possibly muster is the party of player characters. I've dropped plot hooks into my adventure: stolen religious relic, murderous kobolds, and the promise of treasure. That should be enough cues for any party to start sharpening their swords.
But more specifically, I've engineered the adventure for a specific kind of disruption: the tenuous balance between the ghost and the dragonling will be tipped one way or the other depending on what the party does, but it'll be very hard for them to não tip it at all.
What does this look like in terms of what I bring to the session?
I sketch out maps of the location and its major areas; make the stat blocks for kobolds, dragonling, and ghosts; find a few interesting terrain hazards to use; and sprinkle loot drops through the catacombs as needed (most of it is probably in the dragonling's inner chamber, with another single big piece in the secret chamber). I'll knit these mechanics together into encounters on the fly, as needed depending on the party's actions.
Now I don't have to anticipate what my players will do or try to force them into certain channels in order for plot to happen. If they set foot in the caves, I've got a delicate situation they'll disrupt and NPCs whose responses to the disruption I can improvise on the fly. The order they go through the crypts, and whether they find the secret chamber before they encounter the dragon, doesn't matter to my prep: I've created and statted a living environment rather than making canned encounters which require the players to follow an anticipated set of particular future actions.
This is a lot more work--at least until I got the hang of it--and it often means that parts of my environment don't get used so that preparation effort is wasted. That's sad. But in a prep-heavy system like 4e, this is the best way I've found to avoid railroading: create living environments with NPCs that have plans and goals they're working toward, and provide plenty of spots for the party to mess up their plans. It enables a lot more dynamism than coming up with a plot I need them to goosestep through.
Roll20 is not kind to this approach.
Because you have to input your work to the system ahead of time, it doubles the wasted effort of anything which doesn't get used. Additionally, whipping up an encounter on the fly is easy when you've got a handful of stat blocks and a wet-erase map, but it's a lot harder when you've got to put all of that together beforehand.
All I can suggest is that you use narrowly defined locations (like the catacombs) so you can put in the maps ahead of time, and drop todos the stat blocks into every map so you have them available if you need them. I don't have enough experience with roll20 to give any more specific advice on that front, but I know that it may be a big enough obstacle that my answer could be next to useless for your particular situation.
O que você poder be able to do is create generic setpiece encounters which can be quickly re-fluffed to meet the narrative's current needs. I dunno how much Roll20 will support that, but it shouldn't be too insanely difficult; I've even made sets of generic monsters which I could drop into most any situation with a different name each time.