First, set up a Conflict Web. Start by setting up your factions that are involved, and why they are competing/conflicting. This is more to give you a set of motivations for any given group, leaders, etc. and allow you to simply improvise based on the group's needs/ambitions.
The Conflict Web is not static, it's a starting point. So you may easily see characters shift alliances or make temporary truces to accomplish goals.
Second, once you situate the PCs into the scenario, look at their goals, and likely problems they will face in terms of Logistics and Politics. This is effectively similar to how Apocalypse World produces "Fronts".
After each session, look at what the PCs attempted, who was affected, whether any NPC groups made major moves and figure out who is going to react and how. You can choose to update either the Conflict Web or the Logistics & Politics list, though I usually find myself only having to do serious updates after 3-6 sessions because it's relatively easy to track what happened with simple notes.
Both of these tools can scale up or down, so you can do intergalactic empire politics or the 28 guys stuck in a prison together, based on whatever fits your campaign.
I recently just built a sand-box world for my players, and I have decided to handle the problem this way.
First: Same Page. I had a talk with all of my players individually and collectively detailing what sort of campaign I was building. I told them that they can do anything that they want to and go anywhere they want to go. They understand that they are impetus to the plot and they are all happy with this, so getting everyone on the same page was step one.
I would like my players to fully realise this is a big, breathing world that they can fully explore however they like.
I'm hoping to be able to let go of the main story and let them wander around the world, but I'm afraid they'll remain passive until I throw some encounters towards them, instead of them looking for adventure.
If your players realize from the beginning that they can self determine their course then they will feel less railroaded. Sometimes having a main plot at all will make the players feel obligated to follow it. Players can railroad themselves, so make sure they know that there are other options. Therefore getting all of the players on the same page will start the game off on the correct foot.
(First and a half: Know Thy Players. During the same page tool figure out what sort of game play your players enjoy: exploration, social interaction, combat, etc. and tailor your sessions to what the group has fun with.)
If you are worried about your players becoming stagnant without any input from you and you know what they enjoy then you can throw a few hooks at them. The hook doesn't have to lead to a story arc that you've already planned, but simply something to give the group a little energy.
Second: Player Buy In. Create NPCs and locations that the characters can "bond" with and the players grow attached to. For a sand-box feel throw in some opposing factions that they can work for or against, and let their actions have lasting consequences upon those factions, and the world.
The party is currently level 6, and I would prefer it most if they would gradually expand their influence over the world.
If you want your players to have influence in the world, then make sure your "...big, breathing world..." is just that: big and breathing. Give it life through its taverns, castles, NPCs, factions, atmosphere, smells, landmarks, environment, etc.
Third: Play. Be willing to say yes. When your player want to determine whether or not Annbann the Aristocrat killed his brother the Mayor of Woodale then let them do that. If they just want to kill him, because he's evil and that moves their story forward then so be it. Let them help you tell the story, and the story will compel them to keep telling it.
Fourth: Rebuild. As you play keep thorough notes of what your party does and how your players reacted to the game. Take what you've learned and grow your world, adding detail and definition to give the world depth in the areas that the players love exploring.
Best Answer
Let them, so long as it makes coherent sense in the world.
In a sandbox game, the players are just one group in a larger world. Your job is to run the world, which means you're going to be fairly reactive to what the players are doing. If they want to hunt dire boars, let them. Stopping them would require a good reason here. Maybe at some point you throw a quest hook at them for something that gives wealth, but if they don't take it and are content farming animals you really shouldn't do a lot about it. (Now the local Druids may not take too kindly to it...)
If they're just farming lower level stuff, it depends. If they're taking out Goblins that are attacking some local town, then fine. They won't get much XP or much wealth, but they're happy, right? If it's trade caravans, most likely the authorities would be displeased with that sort of brigand activity. Trade is the lifeblood of commerce, and people with significant resources are going to react unkindly.
Yes, this means that sometimes the party may be way off on the wealth chart. In a sandbox game, that's one of the things that can happen. You may need to adjust encounters to deal with it at times, or if you're really serious about the sandbox thing, the party may just one day encounter something they have no realistic way to defeat due to their time wasting.
Running away is a valid encounter result.