gold carryover not carrying over...
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: 547
- Joined: August 11th, 2008, 3:19 pm
gold carryover not carrying over...
I have something of a strange problem; in my campaign (Sceptre of Life), gold is not carrying over properly from one scenario to the next. At the end of a scenario, the gold-tally dialog box pops up, and figures out how much gold will be carried over to the next scenario. Then, when the next scenario starts, the gold is set to the minimum starting balance only (the carryover simply disappears). This happened under the old (80%) carryover, and under the new (40% + minimum).
A sample of the [endlevel] code is as follows:
As far as I can tell, the code is correct. I'm beginning to suspect that the problem might not lie with the [endlevel] tags, but rather with the [side] tags. SoL is fairly unique in that it uses a save_id to keep track of the player's gold/units/etc. Normally, when save_id is not specified, the wesnoth engine stores player data using some default save_id. Since most campaigns just use the default save_id, I wonder if the new gold carryover system (and thus the new carryover_add key) was tested using a non-default save_id. I wonder if this might not be a bug.
That being said, I don't want to blame this on an engine bug if my own code is at fault. So please, let me know if you see anything wrong with the above code.
Thanks,
--OSJ
A sample of the [endlevel] code is as follows:
Code: Select all
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
That being said, I don't want to blame this on an engine bug if my own code is at fault. So please, let me know if you see anything wrong with the above code.
Thanks,
--OSJ
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Re: gold carryover not carrying over...
I have made several scenarios myself, and never have I come across that problem, although I used that same exact endlevel code. I suspect it is in save_id or with some other part of your code.
P.S. I am still learning WML, so don't trust me fully.
P.S. I am still learning WML, so don't trust me fully.
He who is still learning WML, can still make a campaign. (or at least try)
You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
You are an Arch Mage - You're definitely intelligent, but some people would say you spend too much time inside. The power you have learned, however, is simply unmatched.
-
- Posts: 547
- Joined: August 11th, 2008, 3:19 pm
Re: gold carryover not carrying over...
gotcha, tx.
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Re: gold carryover not carrying over...
I had this problem on my campaign - it would say that I had 400 bonus gold, but when I started the next scenario the extra money wouldn't be there. Also, I couldn't recall any units. I discovered that the names of my side and leader were different in each scenario. When I setup both scenarios with the same leader and same side, then the money would carry over, and I was able to recall.
Re: gold carryover not carrying over...
Can we see the code for the side id stuff please?
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: gold carryover not carrying over...
Afaik starting with 1.8 you put [side]save_id=xyz when that side appears in its first scenario. Is it meant to reappear you put again [side]save_id=xyz. Recall list including all leaders and gold should all be correctly handled. Note that the [side]side=some_number may change between the scenarios.
Afaik LoW has some code experimenting with it.
EDIT
You also need to put persistent=yes key at all places where you put save_id=xyz. Actually not sure whether it needs to be everywhere, just didn't try. At least it works for a single human player then.
Afaik LoW has some code experimenting with it.
EDIT
You also need to put persistent=yes key at all places where you put save_id=xyz. Actually not sure whether it needs to be everywhere, just didn't try. At least it works for a single human player then.
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