Silence's WML Questions
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.
Silence's WML Questions
Putting my WML Questions here.
Old stuff for posterity.:
Last edited by Silence on November 14th, 2013, 8:30 pm, edited 15 times in total.
Re: Help with WML
Don't use whitespace in filepaths. Replace the spaces with underscores.
- BlackJack25
- Posts: 78
- Joined: July 26th, 2011, 10:50 am
- Location: Italy
Re: Help with WML
First of all, like 8680 said, you have to replace the spaces in the filepaths with underscores (here, for example: {add-ons/Rise_of_the_Blade/units} ).
Then, I think the error is in the define="". You wrote define="CAMPAIGN_RISE_OF_THE_SWORDSMAN" while your campaign id is Rise_of_the_Blade. Replace the define with define="RISE_OF_THE_BLADE". Do the same in #ifdef CAMPAIGN_RISE_OF_THE_SWORDSMAN.
Ah, in first_scenario=1Rise it is better if you writes 01_Rise. Do the same in the following scenarios.
I hope I was helpful
Then, I think the error is in the define="". You wrote define="CAMPAIGN_RISE_OF_THE_SWORDSMAN" while your campaign id is Rise_of_the_Blade. Replace the define with define="RISE_OF_THE_BLADE". Do the same in #ifdef CAMPAIGN_RISE_OF_THE_SWORDSMAN.
Ah, in first_scenario=1Rise it is better if you writes 01_Rise. Do the same in the following scenarios.
I hope I was helpful
Sorry for some english errors, but I'm Italian ;-)
Re: Help with WML
As long as
Crend
define=
and #ifdef
are referring to the same value, this shouldn't be a problem.Crend
UMC Story Images — Story images for your campaign!
- BlackJack25
- Posts: 78
- Joined: July 26th, 2011, 10:50 am
- Location: Italy
Re: Help with WML
Maybe just the spaces in the filepaths or the scenario "1Rise" are causing the error?
Sorry for some english errors, but I'm Italian ;-)
Re: Help with WML
Why should
However, I really recommend doing what you proposed (renaming both), but it should work without.
Crend
1Rise
cause the problem? It's the same in the _main.cfg
and the scenario config.However, I really recommend doing what you proposed (renaming both), but it should work without.
Crend
UMC Story Images — Story images for your campaign!
Re: Help with WML
The renaming got rid of my first error, but now I have another error appearing when I try to load it:
What does this mean?Error
An error due to possibly invalid WML occurred
The error message is:
A map without a header is not supported.
When reporting the bug please include the following error message:
Condition'!(header_offset==std::string::npos || comma_offset<header_offset)' failed at src\map.cpp:163 in function 'read'.
Re: Help with WML
Did you also remove all whitespaces from the map path?
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
Re: Help with WML
Yes. I've changed the map name to "Small_Battlefield.map" and changed the relevant code to:Ceres wrote:Did you also remove all whitespaces from the map path?
Code: Select all
name=Rise of the Swordsman
victory_when_enemies_defeated=yes
map_data="{~add-ons/Rise of the Blade/maps/Small_Battlefield.map}"
turns=20
Re: Help with WML
Your add-on directory is still called "Rise of the Blade", not "Rise_of_the_Blade".
Crend
Crend
UMC Story Images — Story images for your campaign!
Re: Help with WML
Whoops, that last one slipped past me somehow.Crendgrim wrote:Your add-on directory is still called "Rise of the Blade", not "Rise_of_the_Blade".
Crend
Well, my scenario works perfectly well now, thanks!
Looks like I can start experimenting with some different things now.
- BlackJack25
- Posts: 78
- Joined: July 26th, 2011, 10:50 am
- Location: Italy
Re: Help with WML
So I decided to develop this campaign a little further, and encountered another error.
Also, how you get an image to appear in [story] tags? I've tried copying the WML from other events, but only text appears when I play the campaign.
I narrowed the problem code down to this section, but I'm not exactly sure why it's causing the problem. The idea is to have a Horseman show up and move towards a certain hex to say something.ERROR DETAILS:
Missing closing tag for tag modifcations at ~add-ons/Rise_of_the_Blade/scenarios/01_Rise.cfg:113 included from ~add-ons/Rise_of_the_Blade/_main.cfg:45.value " at core/macros/traits.cfg:5 included from core/_main.cfg:6 included from _main.cfg:5 included from ~add-ons/Rise_of_the_Blade/scenarios/01_Rise.cfg:114 included from ~add-ons/Rise_of_the_Blade/_main.cfg::45
Code: Select all
[move_unit_fake]
type=Horseman
side=1
x=7,7,6
y=29,28,25
[/move_unit_fake]
{NAMED_NOTRAIT_UNIT 1 (Horseman) 6 28 (Messenger) (_"Messenger") }
[message]
speaker=Messenger
message= _ "Sir! Sir! I have a distress message for any nearby alied commanders with the Loyalists!"
[/message]
[message]
speaker=Shaden
message= _ "What does the message say, then?!"
[/message]
Re: Help with WML
I don't see any errors in the section you quoted (other than misspelled word "allied").
Are you certain that the error is there?
Your problem with the missing story image is most likely due to a wrong image path.
Are you certain that the error is there?
Your problem with the missing story image is most likely due to a wrong image path.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Help with WML
Did you use this method for it ?Silence wrote:I narrowed the problem code down to this section
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