Continuous Campaign?

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Continuous Campaign?

Post by GrandSage »

Hi everyone!

So, it's pretty late at night, and I have been up working on a little scenario I am making. But, as usual, I got distracted by a stray thought, and since I never made a campaign before, I thought I would ask you:

Given that the wiki says we can change next_scenario dynamically, can we use set_variable and a multible choice dialog to create a continuous campaign?

As in, one that never stops? Just jumps back and forth between 10+ scenarios and keeps track of the different locations via variables? I was thinking in the lines of maybe a regiment leader, who would fight the same bandits over and over again (as one of the scenarios), and he could have choices that would determine how long the bandits would lay low after each skirmish.

Recall list might get insanely overpowered if this is possible, but that would in turn open up for some scenarios where you are completely outnumbered etc. Anyways, do tell if this is completely impossible or already done, and then ill shut up :P
User avatar
IIIO_METAL
Posts: 202
Joined: January 18th, 2017, 5:03 pm
Location: japan

Re: Continuous Campaign?

Post by IIIO_METAL »

Hi GrandSage.

I made an add-on called "IIIO_Test_field". Perhaps it might be useful for you.
With this add-on, we record the change part of the map and the state of the unit before the scenario proceeds to the next scenario.
Then it ends the next scenario and returns to the first scenario. At that time, reproduce the situation of the first scenario.
This add-on is still incomplete and has room for improvement and it may not match perfectly with your request.
Still think that it will be helpful.

Also, an add-on named "A_Group_in_a_War" created by tamanegi may be helpful. If you search further, there may be other add-ons that have realized functions similar to your ideas.
Anyway, it is best to read a lot of code for addons made by other people.
Creator of "Mountain Witch" & "Castle of evil spirit"
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

Thx IIIO, Ill have a look at those as soon as im done with my current scenario. Im more asking from a theoretical point of view anyways, as in, is there a reason why we shouldnt be able to "loop" scenarios. (Other than that that wasn't what the game was made for...)
User avatar
Zap-Zarap
Posts: 159
Joined: March 16th, 2015, 2:18 pm

Re: Continuous Campaign?

Post by Zap-Zarap »

I don't think there are any general problems with what you're planning.

Maybe the addon "Strange Legacy" has some(code) elements you might reuse.
http://forums.wesnoth.org/viewtopic.php?f=8&t=35400
I like beavers.
User avatar
Heindal
Posts: 1344
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: Continuous Campaign?

Post by Heindal »

Yeah feel free to use some of my campaign parts and if you need help with parts of it I can help you. Strange Legacy can be played infinitely and offers a changing game world. Also I've added multiple choice options, infinite dungeons a changing worldmap, but I don't won't to bore you with details. The trick is to finish a campaign and start with the same scenario. In the prestart event you can change the campaign using variables set by choices before.

For example if a previous behavior of the player destroyed a bridge, you can set a variable "bridge" to "destroyed". Before the campaign start you ask if the bridge has the value destroyed - than you can change the terrain where the bridge is located.
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
SigurdFireDragon
Developer
Posts: 546
Joined: January 12th, 2011, 2:18 am
Location: Pennsylvania, USA

Re: Continuous Campaign?

Post by SigurdFireDragon »

GrandSage wrote:Anyways, do tell if this is completely impossible or already done..
Mystery Campaign seems somewhat similar to part of your description.
Co-Author of Winds of Fate
My Add-ons: Random Campaign, Custom Campaign, Ultimate Random Maps, Era of Legends, Gui Debug Tools
Erfworld: The comic that lead me to find Wesnoth.
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Continuous Campaign?

Post by Pentarctagon »

The main problem at this point is probably less "can it be done" and more "how do I keep something like this interesting?"

Though if setting the next scenario based on a variable doesn't work out, I believe you could get around it with [replace_map].
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

hmm... I find a lot of this interesting. It seems to me Heindal already accomplished what i wondered about, so i will play that in just a moment ;)

And I agree with Penta, even though I think it could be as simple as circling a few scenarios and increasing the difficulty (exponentially if possible) every time. "simpel" from a gameplay perspective that is. But yeah, making it interesting story-wise could prove difficult, perhaps we could have random events? or semi-random if we just base it on, say, the amount of scenarios that have been played. I think Im gonna look a bit more into this than I orriginally planned.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: Continuous Campaign?

Post by gfgtdf »

Given that the wiki says we can change next_scenario dynamically, can we use set_variable and a multible choice dialog to create a continuous campaign?
in wesnoth 1.13.8 you can directly set next_scenario with the lua code wesnoth.game_config.next_scenario = "your_next_scenario_id". In eariler version you can oynl set with with [endlevel] (which also end the level) so you probably have to use victory_when_enemies_defeated=no to prevent the default endlevel from taking effect.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

gfgtdf wrote: In eariler version you can oynl set with with [endlevel] (which also end the level) so you probably have to use victory_when_enemies_defeated=no to prevent the default endlevel from taking effect.
ah I see. I play 1.12 for nostalgic reasons, I find the main menu makeover rather... unhelpful. I was thinking to use a multible choice dialog at the end of every scenario, but I hadn't thought of the default victory condition. thx for that.

I played around with Strange Legacy - Trader, it gives me a very Elite-like feel. Heindal must have used about all the stuff that was intended for special features in his main game design ;) Anyways, I didn't get too far, a flooding event trapped me in the water, presumably a bug. But there is quite a lot of interesting mechanics in that one campaign, not to mention that it looks quite interesting to play.
gfgtdf
Developer
Posts: 1432
Joined: February 10th, 2013, 2:25 pm

Re: Continuous Campaign?

Post by gfgtdf »

GrandSage wrote: I find the main menu makeover rather... unhelpful.
I'm quite surpised to hear that since there are no changes to the titlescreen that i know of.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
User avatar
Heindal
Posts: 1344
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: Continuous Campaign?

Post by Heindal »

Thanks GrandSage :). I'm glad you like it. Also check out the RPG Mode ^^.
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 »

I think I might finally get around to have some time for this. Going by what Heindal wrote ( I admit to shamelessly reading through his code to get an understanding of the mechanics), is it true that variables carry over from one scenario to the next? It would seam very inefficient to me...
User avatar
James_The_Invisible
Posts: 534
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Continuous Campaign?

Post by James_The_Invisible »

Yes, variables are carried over but you can manually clear them at any point. There is macro CLEAR_VARIABLE in core which accepts one or more variable names (separated by comma).
GrandSage
Posts: 30
Joined: May 16th, 2017, 11:25 pm

Re: Continuous Campaign?

Post by GrandSage »

I see, thank you. I suppose for a game that is supposed to have a limited amount of scenarios per campaign this doesn't get to be a problem anyway, but in a continuous campaign, one could so something stupid that would result in a memory leak... although I doubt that I'll have to watch out for that.
Post Reply