path to savedata? [resolved]
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.
-
- Posts: 32
- Joined: January 14th, 2012, 10:40 pm
path to savedata? [resolved]
Short Version: Is there a WML-understood filepath to a user's save data?
Long Version: I wanted to see if I could implement a "New Game+"-esque feature in my campaign (I don't actually plan to, I just wanted to see if it could be done). Here's what I'm trying to do in _main.cfg's
The problem is, I can't suss out the filepath, if there is one.
Is there an alternate filepath I can use to
Note: I know there could be risks in allowing calls to save files from inside the game, and I'll understand if this isn't possible at all. I just want to be certain.
Long Version: I wanted to see if I could implement a "New Game+"-esque feature in my campaign (I don't actually plan to, I just wanted to see if it could be done). Here's what I'm trying to do in _main.cfg's
[campaign]
tag:Code: Select all
#ifhave ((filepath))
# to check for replay of final scenario
difficulties=EASY,MEDIUM,HARD
#else
difficulties=EASY,MEDIUM
#endif
~/
shortcuts directly to .wesnoth-x.x/data/; I tried to use ~/../saves/
to get into .wesnoth-x.x/saves (which I knew wouldn't work, but I had to try anyway), and still no luck.Is there an alternate filepath I can use to
#ifhave
a saved game, or is this just never going to happen?Note: I know there could be risks in allowing calls to save files from inside the game, and I'll understand if this isn't possible at all. I just want to be certain.
Last edited by CherryDelight on January 20th, 2012, 12:36 am, edited 1 time in total.
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: path to savedata?
No way to check from the perspective of wml/lua extension code.CherryDelight wrote:#ifhave a saved game
The saves dir isn't preprocessed (unless I'm badly mistaken).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
-
- Posts: 462
- Joined: June 8th, 2006, 3:25 am
Re: path to savedata?
I don't think accessing a saved game directly is possible, but you should be able to pass values from one playthrough of a campaign to another using persistent variables.
-
- Posts: 32
- Joined: January 14th, 2012, 10:40 pm
Re: path to savedata?
That completely slipped under my radar, and is even better than what I was hoping for. Thanks!Exasperation wrote:I don't think accessing a saved game directly is possible, but you should be able to pass values from one playthrough of a campaign to another using persistent variables.