Veefex

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Veefex

Post by gbnmvfx » June 4th, 2018, 12:16 pm

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]

gfgtdf
Developer
Posts: 994
Joined: February 10th, 2013, 2:25 pm

Re: Veefex

Post by gfgtdf » June 4th, 2018, 3:39 pm

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.

User avatar
Xara
Posts: 263
Joined: December 26th, 2014, 12:23 am
Location: Beijing

Re: Veefex

Post by Xara » June 4th, 2018, 4:13 pm

gfgtdf wrote:
June 4th, 2018, 3:39 pm
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.
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.
It pronounces Sha'ha, not Zara.

Feedback Thread of my Add-ons

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: Veefex

Post by gbnmvfx » June 4th, 2018, 5:53 pm

gfgtdf wrote:
June 4th, 2018, 3:39 pm
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.
Yes, that is what the error message is saying, but I have multiple scenarios without the type attribute and it works fine.

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: Veefex

Post by gbnmvfx » June 5th, 2018, 5:35 pm

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.

User avatar
Bitron
Moderator
Posts: 433
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Veefex

Post by Bitron » June 5th, 2018, 5:48 pm

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 id=Konrad, but in your code you have id=Kalenz

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: Veefex

Post by gbnmvfx » June 5th, 2018, 5:58 pm

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?

User avatar
Bitron
Moderator
Posts: 433
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Veefex

Post by Bitron » June 5th, 2018, 6:21 pm

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.

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: Veefex

Post by gbnmvfx » June 6th, 2018, 7:13 am

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.

User avatar
Bitron
Moderator
Posts: 433
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Veefex

Post by Bitron » June 6th, 2018, 10:52 am

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.

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: Veefex

Post by gbnmvfx » June 6th, 2018, 5:33 pm

Wie dem auch sei. Ich werde die Kampagne nicht weiterentwickeln. Tschüss!

Post Reply