Veefex
Moderator: Forum Moderators
Veefex
I am creating a campaign, but run into a an error that I don't understand. In the seventh scenario I want to use the leader with the id "Konrad". I have done this in the previous scenarios, but this time it somehow does not work. I don't think there is an error in the code. How are the leaders managed by the game?
Code: Select all
#textdomain wesnoth-Veefex
[scenario]
id="gVeb3"
name="Plains"
description="Plains"
next_scenario=null
victory_when_enemies_defeated="yes"
random_starting_time="yes"
map_data="{~add-ons/Veefex/maps/Veb3.map}"
turns=60
{DEFAULT_SCHEDULE}
[story]
[part]
story=_ "Plains"
background="Veefex/Ve0.png"
[/part]
[/story]
[side]
side=1
controller="human"
gold=100
team_name="Empire"
user_team_name= _ "Empire"
id="Kalenz"
recruit="Elvish Archer, Elvish Fighter, Elvish Scout, Elvish Shaman, Mage, Merman Hunter, Wose"
[/side]
[side]
side=2
controller="human"
gold=100
team_name="Empire"
user_team_name= _ "Empire"
id="Knalgan"
recruit="Dwarvish Fighter, Dwarvish Guardsman, Dwarvish Thunderer, Dwarvish Ulfserker, Footpad, Gryphon Rider, Poacher, Thief"
[/side]
[side]
side=3
controller="ai"
gold=140
team_name="Invaders"
user_team_name= _ "Invaders"
type="Red Mage"
recruit="Bowman, Cavalryman, Fencer, Heavy Infantryman, Horseman, Mage, Merman Fighter, Spearman"
[/side]
[side]
side=4
controller="ai"
gold=140
team_name="Invaders"
user_team_name= _ "Invaders"
type="Red Mage"
recruit="Bowman, Cavalryman, Fencer, Heavy Infantryman, Horseman, Mage, Merman Fighter, Spearman"
[/side]
[side]
side=5
controller="human"
gold=100
team_name="Empire"
user_team_name= _ "Empire"
id="Konrad"
recruit="Bowman, Cavalryman, Fencer, Heavy Infantryman, Horseman, Mage, Merman Fighter, Spearman"
[/side]
[side]
side=6
controller="ai"
gold=140
team_name="Invaders"
user_team_name= _ "Invaders"
type="Red Mage"
recruit="Bowman, Cavalryman, Fencer, Heavy Infantryman, Horseman, Mage, Merman Fighter, Spearman"
[/side]
[event]
name=start
[message]
speaker="Konrad"
message=_"Defeat the enemies!!"
[/message]
[objectives]
[objective]
description= _ "Defeat enemy leaders"
condition="win"
[/objective]
[objective]
description= _ "Death of all your leaders"
condition="lose"
[/objective]
[/objectives]
[/event]
[endlevel]
result=defeat
[/endlevel]
[/scenario]
Last edited by Bitron on June 5th, 2018, 5:49 pm, edited 1 time in total.
Reason: don't use [code] in [spoiler]
Reason: don't use [code] in [spoiler]
Re: Veefex
you need to add type= in [side], otherwise the game won't be able to tell of what typ your leader should be and will thus not create a leader.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Veefex
It sounds like a bug of Wesnoth, that you can give a side an irrelevant wrong type if it's inherited from previous scenarios, but not an absent one.
Re: Veefex
Yes, that is what the error message is saying, but I have multiple scenarios without the type attribute and it works fine.
Re: Veefex
ok, suppose I need to use that attribute. How do I know the type of the leader? He could be level 1 or 2 or 3. That is determined by the actions of the player in the previous scenarios.
Re: Veefex
if the id is present from the previous scenarios, it will take what ever type this unit now is.
If you use a new id, which has not occured before, that you need to specify a type for that new leader.
Edit: Also, you say you want to use
If you use a new id, which has not occured before, that you need to specify a type for that new leader.
Edit: Also, you say you want to use
id=Konrad
, but in your code you have id=Kalenz
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Veefex
I use the three leaders Kalenz, Konrad and Knalgan. In the previous scenarios it works like you said, but somehow it doesn't work for Konrad in the seventh scenario. I checked the id at least four times, it is correct. If I remove Konrad and only use the two other leaders, then the scenario works fine. Possibly Konrad is deleted by the game, but how could that happen?
Re: Veefex
Note that your recall list is saved for a specific leader.
If you change the sides ID, you use a different recall list. Thus, all units, leader inclusive, are gone.
You can use the keyword save_id=player to store the recall list and use it for all three leaders.
If you change the sides ID, you use a different recall list. Thus, all units, leader inclusive, are gone.
You can use the keyword save_id=player to store the recall list and use it for all three leaders.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Veefex
ok, now I get the error message in the second scenario. How many leaders can the game handle? I possibly use to many and should use normal units with the ability to recruit instead.
Re: Veefex
Using the type= and id= key inside of [side], it can only be one leader, if I am not mistaken.
If you want to have additional leaders in the same side, adding them as normal units with the ability to recruit is the way to go.
If you want to have additional leaders in the same side, adding them as normal units with the ability to recruit is the way to go.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Veefex
Wie dem auch sei. Ich werde die Kampagne nicht weiterentwickeln. Tschüss!