The bright side of side

The place to post your WML questions and answers.

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.
Post Reply
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

The bright side of side

Post by Geos »

Ok, I surrender...
This is getting tricky. I want to make the player in my campaign select the side to fight for at the beginning of a battle.
I used [modify_side] to change team_name depending on the option selected by the user but... No matter what, the scenario ends with DEFEAT at the beginning of turn 2.
So, on the start event the human player selects the side. All players play a turn, and then the human player is defeated.
I checked, showing a message, the team_name of all sides, and everything seems to be fine (there are 2 teams and 3 sides in total,so the message is something like: "Player 1 is good, Player 2 is enemy, Player 3 is good")
I remember reading (but couldn't find it again) that the scenario will end if one team has no leaders with the possibility to recruit, and in fact this has happened to me before. But now is not the case, so:

What are the reasons to finish a scenario out of the user-implemented events? Any article on this? I couldn't find it, and neither making search on the forum.

I tried changing the team_name of the human player side, or changing the team_name of the side the human player chooses, and no difference.

Argh... any suggestion?
That's ridiculous, dragons have no windows...
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: The bright side of side

Post by pauxlo »

Maybe look on the implementation of the scenario "A Subterranean Struggle" in UtBS, this does something similar of what you want.
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: The bright side of side

Post by Geos »

Thaks for the tip. I checked it out and it was implemented the same way I did, so I guess the scenario is ending for a reason not related to team names.
Weird...
That's ridiculous, dragons have no windows...
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: The bright side of side

Post by Geos »

I'm making some progress. It has nothing to do with changing sides. Well, not what is NOT related with the issue is not a big deal, but well...
That's ridiculous, dragons have no windows...
User avatar
Geos
Posts: 115
Joined: March 20th, 2008, 1:58 pm
Location: Italy

Re: The bright side of side

Post by Geos »

Arrrgh... I found it....
And of course, as usual, it was the most stupid thing ever.
Instead of turns=, i wrote turn= at the scenario level, so the scenario had no levels... Hours!!! Hours spent!!!!
That's ridiculous, dragons have no windows...
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: The bright side of side

Post by pauxlo »

For the next time: There is a tool named wmlint in the data/tools-directory - this might have catched such typos.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: The bright side of side

Post by zookeeper »

I almost posted and suggested you check that you actually have a proper turn limit set, but I concluded that it'd be impossible for anyone to miss checking that and thus didn't say anything.
Post Reply