Savegames and the pain of testing the campaign

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Savegames and the pain of testing the campaign

Post by Geos »

Some events happen at the late part of a scenario, and it is a pain to change it and play the whole scenario again, specially if it is long. What do I have to change in the savegame file in order to have the new changes in the WML code available everytime I reload the game?

Is there any debug or cheating mode in Wesnoth?

Thank you
That's ridiculous, dragons have no windows...

vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: Savegames and the pain of testing the campaign

Post by vicza »

Geos wrote:Is there any debug or cheating mode in Wesnoth?
There is debug mode, but I doubt it'll help you in this case.

As I wrote already recently, you have 1) delete the cache and 2) change WML immediately in the savefile. But there more strict rules of WML used, I don't know if it necessary.

megane
Art Contributor
Posts: 410
Joined: October 30th, 2006, 4:55 am
Location: The Big Ö (a.k.a. Austria)

Re: Savegames and the pain of testing the campaign

Post by megane »

Actually, debug mode includes an option to do exactly what you describe.

Do :debug to turn on debug mode. Then do :fire youreventname to cause the given event to happen spontaneously. Of course, your event might require variables, etc. from previous events, in which case you'd have to manually fire those as well. Or, if you find you need to get through, debug can also let you cheat; :unit hitpoints=0 is a pretty easy way to win ^^;
that little girl's parents were attacked by ninjas - generic npc
hee hee! - little girl

User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: Savegames and the pain of testing the campaign

Post by Geos »

Good, thank you, but I still need to change WML in the savegame. I did actually, but for some reason, keeps behaving as before. I mean, I opened the saved game, edit with kate, look for the scenario WML and change the code for the event I want to run properly. Save, compress... and still the same behavior. In order to be SURE I changed the text of a message that is shown in the event, but when I play I seen the old version, eventhough I changed it. I don't know the structure of a saved game, and are quite gigantic. Searching with the word event I retrieve only the scenario WML, so I am kind of lost.
Anybody with quite a knowledge on this? Would be much appreciated.
That's ridiculous, dragons have no windows...

User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Savegames and the pain of testing the campaign

Post by pauxlo »

Only to be sure: did you reload the saved game?

(You don't need to compress it, the load game also understands the uncompressed ones.)

vicza
Posts: 238
Joined: January 16th, 2008, 11:40 pm
Location: Moscow

Re: Savegames and the pain of testing the campaign

Post by vicza »

Geos wrote:Searching with the word event I retrieve only the scenario WML, so I am kind of lost.
Anybody with quite a knowledge on this? Would be much appreciated.
Oh, yes, I forgot. You have to change it twice. In two places of the savefile. Use search to find them. And don't forget about deleting the cache.

Post Reply