Continuous Campaign?

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

User avatar
Heindal
Posts: 1353
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: Continuous Campaign?

Post by Heindal »

As I'm using hundreds if not thousands of (single and array) variables in Strange Legacy I don't think this causes memory problems. Memory problems in strange legacy occur through the redundant code, as the macros are no devices to avoid redundant code, but produce it. By using macros however you can simplify your code and make your life as coder easier and avoid mistakes. For example you can make a macro, which deletes created variables when conditions are met (for example if your campaign gets to the next step). However it could be better to reuse variables:

For example you hero has saved the bridge from destruction you could set bridge to intact. NPC could react on this "bridge=intact" variable. However this is highly ineffective. If saving the bridge is part of a longer storyline, you can simply make a story variable and set story by +1 when saving the bridge.

Than you can create a list like that:

story=1 hero comes to a new destination
story=2 hero has meet an old man, who gave him the quest to save the bridge
story=3 hero has found the bad guys and is currently fighting them
story=4 hero has defeated the bad guys and the bridge is save now
story=5 hero got a new mission and will leave the village

You see npc's or your entire game could now react on the story variable. For example talking to a npcs while the story is below 4 could make him say things like: "Please defeat the bad guy's and save our village!". If the story is higher or equal than 4 the npcs could react like: "You saved us! Thanks for defeating the bad guys!"
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

yeah, maybe I was overthinking the problem a little. I agree with your coding advise, but I think it is impossible to do so if you have several plotlines. Lets for example assume that you do not loose the game if the bridge is destroyed, so now all the NPCs need to check weather it is intact (Like it is the case in the "A group in a war" campaign). Reusing variables is off course still a great idea when applicable.
User avatar
Heindal
Posts: 1353
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: Continuous Campaign?

Post by Heindal »

I did so in Trapped, which has also a lot of descriptions you might want to look into. You can do missions for two factions, each are counted in an own variable.
So its quite possible to create alternate plotlines.

Trapped - at least the 4th scenario could be regarded as an continuous campaign as you would want it.

But with some creativity you can even use one variable to make the story status happen.
For example imagine the bridge has been destroyed and creates an alternative path.

You could add the variable with 100 and create the alternative path or even more if the bridge is half destroyed you could add 200.
All you need is good planing that the story variable will work.

For example:

Story variable higher than 100 but less than 200 will make inhabitants react in one way.
Story variable higher than 200 but less make inhabitants react in another way.
Story variable less than 100 make inhabitants react in a third way.
...

It is one of the most effective ways that I found for myself to simulate a situation, decision or story.
Especially as with numbers you can use numeric functions such as higher or less than.
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

Sure gonna take a look at Trapped.

I hadn't thought off the "add 100" trick, that could actually work out nicely, thx!
Post Reply