Combine all the senerios.

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
pedros
Posts: 18
Joined: April 19th, 2018, 4:12 am

Combine all the senerios.

Post by pedros »

I have linux, debian 9.3, which has Battle for Wesnoth v1.12.6. I would like to combine all the senerios from all the wesnoth campaigns, together into one big campaign. I tried this.$

Code: Select all

 mkdir -p /home/stretch/.local/share/wesnoth/1.12/data/campaigns/all
cp -r /usr/share/games/wesnoth/1.12/data/campaigns/*/* /home/stretch/.local/share/wesnoth/1.12/data/campaigns/all
cp: will not overwrite just-created '/home/stretch/.local/share/wesnoth/1.12/data/campaigns/all/_main.cfg' with '/usr/share/games/wesnoth/1.12/data/campaigns/Dead_Water/_main.cfg'
cp: will not overwrite just-created '/home/stretch/.local/share/wesnoth/1.12/data/campaigns/all/HISTORY' with '/usr/share/games/wesnoth/1.12/data/campaigns/Delfadors_Memoirs/HISTORY'
Above is a partial output from terminal. So what to do about the cp errors?
I suppose I should combine the text in all the files _main.cfg, into one big file _main.cfg?
I suppose I should combine the text in all the files HISTORY, into one big file HISTORY?
After I fix that, I plan to edit the line "next_scenario=" in some senerio files. Later, a problem I forsee is that each senerio has it's own unique main character. How will the wesnoth program react to that? Has someone already tried this? What other problems do you forsee? For now, I am ignoring the problems of storyline, balance, difficulity level.
pedros
Posts: 18
Joined: April 19th, 2018, 4:12 am

Path to senerios

Post by pedros »

I have linux, debian 9.3, which has Battle for Wesnoth v1.12.6. I am editing the wml in the published senerios. the User data directory seems the correct place for this, because the default system permissions allow it. On my system, When wesnoth is typed at the command prompt, this information is displayed.
Data directory: /usr/share/games/wesnoth/1.12
User data directory: /home/stretch/.local/share/wesnoth/1.12
By default, wesnoth uses the senerios in Data directory. So why is there a copy of senerios in the User data directory? And after I start wesnoth, and load a senerio, how to tell which directory the loaded senerio came from?

I use this to start wesnoth. $

Code: Select all

wesnoth --userdata-dir /home/stretch/.local/share/wesnoth/1.12
. During testing of my work, when trying to open the next senerio, sometimes wesnoth says "file not found". I know the file exists in User data directory. Also, sometimes the origional senerio opens, instead of my edited version. That leads me to believe that wesnoth somehow switched to Data directory.

How can this be avoided? One way to make sure that the incorrect file is not opened is to rename /usr/share/games/wesnoth/1.12/data/campaigns. What way would you suggest? What path is used by wml programmers?
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Combine all the senerios.

Post by octalot »

It sounds like you're trying to learn to climb, but choosing Mount Everest as your first practice slope.

I think you should create a new campaign before trying this idea of combining existing campaigns. Although writing a new campaign is complex and will take months to do, you'd learn a lot about WML and how parts of a campaign fit together.
pedros wrote: April 26th, 2018, 3:51 pm Later, a problem I forsee is that each senerio has it's own unique main character. How will the wesnoth program react to that? Has someone already tried this? What other problems do you forsee? For now, I am ignoring the problems of storyline, balance, difficulity level.
Well, what do you expect the campaign to do? These are things that the campaign author has to tell the Wesnoth program, they're not things that the program is expected to work out itself.
pedros wrote: April 26th, 2018, 3:54 pm I have linux, debian 9.3, which has Battle for Wesnoth v1.12.6. I am editing the wml in the published senerios. the User data directory seems the correct place for this, because the default system permissions allow it.
The permissions for Debian-packaged files assume that you want to play the version of the game that was released. For this big-campaign, you're wanting to edit the files of the game itself, so the permissions of a packaged version of the game won't fit.
Post Reply