Author Topic: Script error, can someone explain it for me?  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

Dark_Hamlet

  • Sergeant Knight
  • *
  • Bad bad bear
    • View Profile
  • Faction: Bandit
  • MP nick: Angry_Farmer
Script error, can someone explain it for me?
« on: April 15, 2012, 10:04:14 PM »
I used the search function, but I could not find the answer I was looking for.

I've been playing PoP 3.42 for some time and now I'm in the late game. After settling up my own kingdom and capturing other kings (when their faction own less than 6 fiefs), I talk with them and I get the following message:

Warning: Unmatched try_end; LINE NO: 7:
At dialog condition: dlga_prisoner_chat_noble2:companion_comment_lord_joined.

It happens when I'm in the dialog box with the option of accepting his ransom offer or not, I don't know if that's related to the fact that I never got the "gimme weapon" dialog option. My question is: what that error means, is it supposed to appear? Thank you.

DrSane

  • Sergeant
  • *
  • Sir Merzinas Squire of the Dawn
    • View Profile
  • Faction: Neutral
Re: Script error, can someone explain it for me?
« Reply #1 on: April 19, 2012, 02:40:44 AM »
no idea, might be something to do with the weapons.

Treebeard

  • Knight at Arms
  • *
  • Sverige, ישראל , USA
    • View Profile
  • Faction: Nord
  • MP nick: POP3.2-3.51+ Coder
  • M&BWB
Re: Script error, can someone explain it for me?
« Reply #2 on: April 19, 2012, 04:48:10 PM »
Hello fellow PoP players,

First time I'm checking back since late September 2011. Nice to see that PoP is still the premier mod for Warband :)

As for the error, I checked and it is indeed a bug that at most could prevent one of the dialog menu response options to appear. It will not affect any King's weapons though.

Basically, if you captured a noble you may get him to re-join you but there is a (try_end), that is without a (try_begin). The menu option that is supposed to appear if you captured a noble is:
Very well friend, I will accept your Oath of Fealty.

There should be no (try_end) in that pre-requisite segment of that dialog response option.

If you have a save game and can test this situation again, I can send you a fixed version for this warning issue and you can test to verify that it is fixed. An extra (try_end), has likely no real effect in this case except for generating that warning message.

WB 1.150 should be out soon and hopefully PoP will still be compatible with no bugs after 1.150 is installed. We might want to port PoP to 1.150 if there are new features that improve the game. Also we probably will need to port it if there are incompatibilities between PoP for 1.143 and WB 1.150.

Regards,
TB

Edit: As for the number of kingdoms required for you to be able to demand a weapon of a King: The King's kingdom must have 5 or fewer centers. If it has 6 centers or higher, you will never be able to demand a Royal Weapon.
« Last Edit: April 19, 2012, 05:11:20 PM by Treebeard »
PoP Warband Downloads:
PoP 3.611:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.611

sairtar

  • Moderator
  • *
    • View Profile
    • Stuff & Things
  • Faction: Neutral
Re: Script error, can someone explain it for me?
« Reply #3 on: April 19, 2012, 05:10:56 PM »
Nice one TB, good to see you back!


Treebeard

  • Knight at Arms
  • *
  • Sverige, ישראל , USA
    • View Profile
  • Faction: Nord
  • MP nick: POP3.2-3.51+ Coder
  • M&BWB
Re: Script error, can someone explain it for me?
« Reply #4 on: April 19, 2012, 05:13:59 PM »
Nice one TB, good to see you back!

Thanks :)

A pleasure to see what is going on in the world of Pendor again.


OT:
It seems Steam users have been updated to 1.150. If anyone is using the Steam version and finds errors in PoP, please make a list so we can attend to them and make PoP compatible with 1.150.
PoP Warband Downloads:
PoP 3.611:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.611

Dark_Hamlet

  • Sergeant Knight
  • *
  • Bad bad bear
    • View Profile
  • Faction: Bandit
  • MP nick: Angry_Farmer
Re: Script error, can someone explain it for me?
« Reply #5 on: April 19, 2012, 05:24:39 PM »
Hello fellow PoP players,

First time I'm checking back since late September 2011. Nice to see that PoP is still the premier mod for Warband :)

As for the error, I checked and it is indeed a bug that at most could prevent one of the dialog menu response options to appear. It will not affect any King's weapons though.

Basically, if you captured a noble you may get him to re-join you but there is a (try_end), that is without a (try_begin). The menu option that is supposed to appear if you captured a noble is:
Very well friend, I will accept your Oath of Fealty.

There should be no (try_end) in that pre-requisite segment of that dialog response option.

If you have a save game and can test this situation again, I can send you a fixed version for this warning issue and you can test to verify that it is fixed. An extra (try_end), has likely no real effect in this case except for generating that warning message.

WB 1.150 should be out soon and hopefully PoP will still be compatible with no bugs after 1.150 is installed. We might want to port PoP to 1.150 if there are new features that improve the game. Also we probably will need to port it if there are incompatibilities between PoP for 1.143 and WB 1.150.

Regards,
TB

Edit: As for the number of kingdoms required for you to be able to demand a weapon of a King: The King's kingdom must have 5 or fewer centers. If it has 6 centers or higher, you will never be able to demand a Royal Weapon.

Thank you for the response, it seems that the error have no real effect besides the warning message, since I can recruit captured nobles.

I've captured King Ulric more than ten times, he's always holding the weapon (lance/banner) in battle and their kingdom have only one castle and a single village, but I never received the option to take his weapon. At least now I know that it's just my bad luck and not due to the warning message, thank you Treebeard.

Treebeard

  • Knight at Arms
  • *
  • Sverige, ישראל , USA
    • View Profile
  • Faction: Nord
  • MP nick: POP3.2-3.51+ Coder
  • M&BWB
Re: Script error, can someone explain it for me?
« Reply #6 on: April 19, 2012, 05:56:43 PM »
You're welcome!

Hmmm, if the kingdom has less than 6 centers (i.e towns + castles < 6) and you have created your own kingdom (- i.e. you are the King of your own Pendor kingdom) then  the code checks if the captured king has his royal item (- itm_pop_sarleon_banner in the case of Ulric), and if the King has it equipped you will have this response (- note the added line after the Denars):

"It is to my shame that you have defeated me.  I would seek my freedom as my family can ransom me.  I can offer you x Denars ...
I see that you are looking at my weapon, you knave ... set me free and I will give it to you."

Then you as player can demand it in the following dialog screen by choosing:
"I am taking your weapon. Now get out of my sight and run home, you coward!"

The reason you are not getting these dialogs must be one of the following:

  • Either the kingdom has 6 or more towns+castles (- may be some obscure bug where the game thinks that Sarleon has more than it actually has. I'm adding the slot_faction_num_castles and the slot_faction_num_towns in order to get the faction's centers in the code and if these slots are not populated correctly by the game then that would explain why you wouldn't get the option to get the weapon).
  • Or you are not the king of your own Pendor kingdom (- i.e. did you choose a Kingdom and have chosen a culture for it and you were bestowed a crown and an achievement?)
  • Or the King is not equipped with the Sarleon Banner, even if he was wielding it in battle (- could be some obscure game engine bug perhaps).
In any case, there is no randomness in this dialog and it must be one of the above three conditions that is evaluated to false.
PoP Warband Downloads:
PoP 3.611:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.611

SimonDJ

  • Knight
  • *
  • Non faces nec opes, sola Artis sceptra perennant
    • View Profile
  • Faction: Swadian
  • M&BWB
Re: Script error, can someone explain it for me?
« Reply #7 on: April 19, 2012, 07:12:53 PM »
It seems Steam users have been updated to 1.150. If anyone is using the Steam version and finds errors in PoP, please make a list so we can attend to them and make PoP compatible with 1.150.

Updated yesterday and so far, nothing seems to be different, except some bad sound volume balance : clicking in some menus or the "money falls" sound are almost impossible to hear

I'm keeping my eyes & hears open for more

EDIT: Typo
« Last Edit: April 19, 2012, 08:05:39 PM by SimonDJ »

Rical

  • Sergeant at Arms
  • *
  • Greek Powa
    • View Profile
  • Faction: Neutral
  • WB
Re: Script error, can someone explain it for me?
« Reply #8 on: April 19, 2012, 07:24:32 PM »
TreeBeard Is here   :shock: :shock:   
(click to show/hide)
    :mrgreen: :mrgreen:



nullpat

  • Regular
  • *
  • PoP n' things
    • View Profile
  • Faction: Neutral
Re: Script error, can someone explain it for me?
« Reply #9 on: April 19, 2012, 07:56:00 PM »
Newest version from the Taleworlds site is at 1.151 and an accompanying module system has been released

sairtar

  • Moderator
  • *
    • View Profile
    • Stuff & Things
  • Faction: Neutral
Re: Script error, can someone explain it for me?
« Reply #10 on: April 19, 2012, 08:03:13 PM »
Ugh... Ive never had to compensate for version change before.


MitchyMatt

  • Moderator
  • *
  • The Mouth of PoP
    • View Profile
    • Me on teh Facebook ;)
  • Faction: Neutral
  • MP nick: MitchyMatt
  • WB
Re: Script error, can someone explain it for me?
« Reply #11 on: April 19, 2012, 08:39:05 PM »
Its great to see you around again Treebeard :)

Dark_Hamlet

  • Sergeant Knight
  • *
  • Bad bad bear
    • View Profile
  • Faction: Bandit
  • MP nick: Angry_Farmer
Re: Script error, can someone explain it for me?
« Reply #12 on: April 19, 2012, 11:54:38 PM »
You're welcome!

Hmmm, if the kingdom has less than 6 centers (i.e towns + castles < 6) and you have created your own kingdom (- i.e. you are the King of your own Pendor kingdom) then  the code checks if the captured king has his royal item (- itm_pop_sarleon_banner in the case of Ulric), and if the King has it equipped you will have this response (- note the added line after the Denars):

"It is to my shame that you have defeated me.  I would seek my freedom as my family can ransom me.  I can offer you x Denars ...
I see that you are looking at my weapon, you knave ... set me free and I will give it to you."

Then you as player can demand it in the following dialog screen by choosing:
"I am taking your weapon. Now get out of my sight and run home, you coward!"

The reason you are not getting these dialogs must be one of the following:

  • Either the kingdom has 6 or more towns+castles (- may be some obscure bug where the game thinks that Sarleon has more than it actually has. I'm adding the slot_faction_num_castles and the slot_faction_num_towns in order to get the faction's centers in the code and if these slots are not populated correctly by the game then that would explain why you wouldn't get the option to get the weapon).
  • Or you are not the king of your own Pendor kingdom (- i.e. did you choose a Kingdom and have chosen a culture for it and you were bestowed a crown and an achievement?)
  • Or the King is not equipped with the Sarleon Banner, even if he was wielding it in battle (- could be some obscure game engine bug perhaps).
In any case, there is no randomness in this dialog and it must be one of the above three conditions that is evaluated to false.

Yes, I am the king of my own kingdom, with the Pendor culture and I received the achievement. If the issue is caused by a bug, is there something I can do to get the weapon without cheating? Thank you.

Treebeard

  • Knight at Arms
  • *
  • Sverige, ישראל , USA
    • View Profile
  • Faction: Nord
  • MP nick: POP3.2-3.51+ Coder
  • M&BWB
Re: Script error, can someone explain it for me?
« Reply #13 on: April 20, 2012, 01:38:34 AM »
Its great to see you around again Treebeard :)

Thanks :) Great to se that you are here too Mitch.

Yes, I am the king of my own kingdom, with the Pendor culture and I received the achievement. If the issue is caused by a bug, is there something I can do to get the weapon without cheating? Thank you.

I'm afraid there is no way to get the weapon if the dialog prerequisites do not evaluate to true. I know that Ulric has a chance at game start to not be equipped with the Sarleon Banner (because he has more than one weapon in his troop definition), and even though you saw him with it, perhaps he does not have it in his inventory. You can try other Kings like Marius. He has only got his royal weapon so he should 100% only be equipped with that weapon.

I could modify the dialog to make it so that it doesn't check for number of centers as a test to see if that condition can be ruled out (that would be save game compatible and easy to test for you). Then test the next condition similarily, etc.
I decided to check for their equipped items becasue that is a nice way to disallow the player from ever being able to take the weapon in the future if he already had taken the weapon. Thereby no global needed to be added that check if the weapon has been taken or not.

During testing sometimes our testers got the Sarleon Banner and in other games they didn't. So I'm leaning towards that Ulric didn't spawn with the Banner in his starting equipment in your game.
« Last Edit: April 20, 2012, 01:41:01 AM by Treebeard »
PoP Warband Downloads:
PoP 3.611:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.611

Dark_Hamlet

  • Sergeant Knight
  • *
  • Bad bad bear
    • View Profile
  • Faction: Bandit
  • MP nick: Angry_Farmer
Re: Script error, can someone explain it for me?
« Reply #14 on: April 20, 2012, 01:52:02 AM »
Its great to see you around again Treebeard :)

Thanks :) Great to se that you are here too Mitch.

Yes, I am the king of my own kingdom, with the Pendor culture and I received the achievement. If the issue is caused by a bug, is there something I can do to get the weapon without cheating? Thank you.

I'm afraid there is no way to get the weapon if the dialog prerequisites do not evaluate to true. I know that Ulric has a chance at game start to not be equipped with the Sarleon Banner (because he has more than one weapon in his troop definition), and even though you saw him with it, perhaps he does not have it in his inventory. You can try other Kings like Marius. He has only got his royal weapon so he should 100% only be equipped with that weapon.

I could modify the dialog to make it so that it doesn't check for number of centers as a test to see if that condition can be ruled out (that would be save game compatible and easy to test for you). Then test the next condition similarily, etc.
I decided to check for their equipped items becasue that is a nice way to disallow the player from ever being able to take the weapon in the future if he already had taken the weapon. Thereby no global needed to be added that check if the weapon has been taken or not.

During testing sometimes our testers got the Sarleon Banner and in other games they didn't. So I'm leaning towards that Ulric didn't spawn with the Banner in his starting equipment in your game.

I saw and used the weapon (in the battlefield) everytime we fought. Where and which dialog conditions should I modify? Thank you.