Messing with saving and reloading
Moderator: Forum Moderators
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Messing with saving and reloading
Hi
For S03 of my campaign, I'm planning some heavy time lifts and changes...
...
I already know how to "alter" the reality when starting the game (global variables, [if] and map changes for example)
That's useful for me but it's not good enough for all of my ideas.
This is an unexplored idea, so I don't know what way to implement it (the more elegant, the better)
1. How to disable reloading an older state of the game (or resulting into loading the latest one)?
(my ideas: global variable saving ... )
2. How to reload the game to one of its older states using code?
The (the best idea I could come up):
Since the save file contains all the history already AND you can read any file AND you can create .txt files...
What about just adding every action to the .txt file (rather than overwriting it) / edit it after every action
And then when loading the scenario (any of its saves) just have there [event] name=preload.
Which would set everything to the state of the game saved in the .txt file
Would my .txt writing and reading work?
Any idea how to achieve the desired behavior?
Thanks (only for reading this long text... even more if you'll try to help me ^^)
For S03 of my campaign, I'm planning some heavy time lifts and changes...
...
I already know how to "alter" the reality when starting the game (global variables, [if] and map changes for example)
That's useful for me but it's not good enough for all of my ideas.
This is an unexplored idea, so I don't know what way to implement it (the more elegant, the better)
1. How to disable reloading an older state of the game (or resulting into loading the latest one)?
(my ideas: global variable saving ... )
2. How to reload the game to one of its older states using code?
The (the best idea I could come up):
Since the save file contains all the history already AND you can read any file AND you can create .txt files...
What about just adding every action to the .txt file (rather than overwriting it) / edit it after every action
And then when loading the scenario (any of its saves) just have there [event] name=preload.
Which would set everything to the state of the game saved in the .txt file
Would my .txt writing and reading work?
Any idea how to achieve the desired behavior?
Thanks (only for reading this long text... even more if you'll try to help me ^^)
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
Re: Messing with saving and reloading
There are ways but I am not going to give details since use case does not sound like something that should be done by campaign. If users wants to get extra motivation to not use saves it is up to [modification] to control.
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
I'm trying to create a "horror" scenario with
1. reducing information accessibility(like if a unit hits or not, how many hitpoints are left...),
2. some graphical and musical stuff
3. breaking the 4th wall
4. removing the player's "absolute" control over the game
Removing the player's "absolute" control over the game(save file things) has also a strong plot and lore importance
(It's about a "entity" that can opponent player, leading necromancers cult that, same as you can make some save-load cheese)
(I's campaign that is only for skilled and Wesnoth-knowing players)
...
Jup that's my reasons for modify this kind of stuff.
So I'd be glad if you'd help me/ share what you know about it.
1. reducing information accessibility(like if a unit hits or not, how many hitpoints are left...),
2. some graphical and musical stuff
3. breaking the 4th wall
4. removing the player's "absolute" control over the game
Removing the player's "absolute" control over the game(save file things) has also a strong plot and lore importance
(It's about a "entity" that can opponent player, leading necromancers cult that, same as you can make some save-load cheese)
(I's campaign that is only for skilled and Wesnoth-knowing players)
...
Jup that's my reasons for modify this kind of stuff.
So I'd be glad if you'd help me/ share what you know about it.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2290
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Messing with saving and reloading
Don't.ZombieKnight wrote: ↑May 2nd, 2024, 4:23 pm This is an unexplored idea, so I don't know what way to implement it (the more elegant, the better)
1. How to disable reloading an older state of the game (or resulting into loading the latest one)?
(my ideas: global variable saving ... )
2. How to reload the game to one of its older states using code?
There is no supported way to disable save and load, and I'm pretty sure there never will be.
You can try to find some kind of workaround to do what you want. There might be something that'll work for you. I can't guarantee it'll continue to work in later versions.
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
I can disable reloading (as is done in ironman modes)
The thing is how to save every action?
(Should be easy with for example the txt file, since saves have hundreds of whole rounds saved in them)
But I'm asking here to find the most efficient way.
Other thing (/file you can edit), that came on my mind is editing global variable file with some smart saving system.
... so why you aren't willing to help me?
The thing is how to save every action?
(Should be easy with for example the txt file, since saves have hundreds of whole rounds saved in them)
But I'm asking here to find the most efficient way.
Other thing (/file you can edit), that came on my mind is editing global variable file with some smart saving system.
... so why you aren't willing to help me?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
-
- Posts: 1310
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Messing with saving and reloading
You might think you can disable reloading, but you can't.
A player who doesn't like save/loading can simply choose not to do so. A player who wants to bad enough can simply, and I do mean simply, bypass whatever you try to do to stop them.
And even if you were successful, you'd break saving for "legitimate" reasons.
A player who doesn't like save/loading can simply choose not to do so. A player who wants to bad enough can simply, and I do mean simply, bypass whatever you try to do to stop them.
And even if you were successful, you'd break saving for "legitimate" reasons.
Speak softly, and carry Doombringer.
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
It's for one scenario and the all the save files from that scenario would load the very last progress from other file.
So you can leave the computer at any time.
And you can restart the scenario easily too.
So I won't break the savinv for "legitimate" reasons.
So you can leave the computer at any time.
And you can restart the scenario easily too.
So I won't break the savinv for "legitimate" reasons.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
Oh I see, I'm retreating from that one...
Any idea how to save the game using add-on (and load it occasionally)?
Any idea how to save the game using add-on (and load it occasionally)?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2290
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Messing with saving and reloading
I don't think there's any way to do that.
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
You've got all the variables needed to do that in-game.
So why couldn't you just put them all into global ones and then load them?
...
Here may be really usefull the core save-loading system.
I'd like to move this into new thread I've just created:
viewtopic.php?t=58186
So why couldn't you just put them all into global ones and then load them?
...
Here may be really usefull the core save-loading system.
I'd like to move this into new thread I've just created:
viewtopic.php?t=58186
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2290
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Messing with saving and reloading
I don't think there's any reason why we couldn't have a way for an add-on to explicitly request a save or load, as long as:
- There are protections against overwriting other save files (maybe with the exception of save files explicitly requested by the same add-on).
- The user is not forced to load when the add-on requests it – though what happens if they refuse is up to the add-on (anything except re-requesting really; so a game over if they choose not to load is valid, for example)
- In general, it only supplements the existing auto-save system and cannot replace it entirely.
- Pentarctagon
- Project Manager
- Posts: 5599
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Messing with saving and reloading
Also would need a way to limit how much disk space such saves could take up.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
Hmm, you think?
I have like hundreds of saves and it's fine since it's all just some txt.
I have like hundreds of saves and it's fine since it's all just some txt.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2290
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Messing with saving and reloading
Wait until an add-on has a bug and writes millions of saves.
- ZombieKnight
- Posts: 283
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Messing with saving and reloading
Ok, I agree, but make the limit big enough, please, not like max. 3 save-files or smt like that ^^...
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills