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

0 Members and 1 Guest are viewing this topic.

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 #15 on: April 20, 2012, 02:31:42 AM »
I saw and used the weapon (in the battlefield) everytime we fought. Where and which dialog conditions should I modify? Thank you.

You don't have access to the PoP module system, so I'd modify them in the module system and then build the modules to txt files and then I can upload the txt file(s) that you then can use to see if a change makes a difference in order to track down why you are not receiving the weapon. I don't have time today but I can send you different versions of dialogs.txt tomorrow for testing the conditions to see which condition seems to be causing this.
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #16 on: April 20, 2012, 03:45:56 PM »
I saw and used the weapon (in the battlefield) everytime we fought. Where and which dialog conditions should I modify? Thank you.

You don't have access to the PoP module system, so I'd modify them in the module system and then build the modules to txt files and then I can upload the txt file(s) that you then can use to see if a change makes a difference in order to track down why you are not receiving the weapon. I don't have time today but I can send you different versions of dialogs.txt tomorrow for testing the conditions to see which condition seems to be causing this.

Ok, I'll be waiting. Thank you very much.

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 #17 on: April 21, 2012, 01:09:56 AM »
I've made a diagnostic change to the conversation.txt file by adding three (3) display_log messages that will notify how each condition is working.

You'll need to capture Ulric again and when the prisoner dialog is active you will see the three diagnostic test messages.

1. First the code is checking if the captured opponent is a king. If the captured opponent is a king then this message appears:
"The captured opponent is a King! Testing if the player also is a King ..."

2. If the opponent is a king then we check if the player has a kingdom (i.e. is a king too) and this message appears:
"The player is a King ... The captured King has {reg1} centers ... he needs to have less than 6."   <--- {reg1} is the variable that stores the actual number of towns+castles.

3. If the player is also a king then there will be a check against the opponent king's equipped items to see if he is equipped with his royal weapon and this message appears:
"Testing if the King is equipped with his royal weapon ... if you do not see another msg then he doesn't."

4. If you passed that message, then you're good and the dialog should yield a text containing:
"...I see that you are looking at my weapon, you knave ... set me free and I will give it to you."

Let me know what happens next time you have Ulric in captivity (or any other King).

This diagnostic test includes two text files that you need to put in your PoP3.42 folder. Backup your original two files first:
1. conversation.txt
2. quick_strings.txt

Link to diagnostic test:
http://www.gamefront.com/files/21588235/PoP342_RoyalWeaponDiagnostic.rar

Regards,
TB
« Last Edit: April 21, 2012, 01:12:24 AM by Treebeard »
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #18 on: May 09, 2012, 02:36:32 AM »
I will try. Thank you.

I will edit this message later with the results.

Well, I got to the point where I captured Marius Imperator and after talking with him... there seems to be something strange, this was the message I got:

"The player is a King ... The captured King has 31 centers ... he needs to have less than 6."

How can that be? Right now the empire owns only 5 centers (15 if you count the villages), maybe the game is counting the centers they lost as if they still had all their original centers?

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 #19 on: May 09, 2012, 03:33:19 AM »
I will try. Thank you.

I will edit this message later with the results.

Well, I got to the point where I captured Marius Imperator and after talking with him... there seems to be something strange, this was the message I got:

"The player is a King ... The captured King has 31 centers ... he needs to have less than 6."

How can that be? Right now the empire owns only 5 centers (15 if you count the villages), maybe the game is counting the centers they lost as if they still had all their original centers?

Very odd.

The code for calculating the centers is this:
(click to show/hide)

One or more of these factors must be the cause:
1. The faction of the talked to troops doesn't evaluate correctly, yielding centers of a different faction.
2. One or both of the slots regarding castels and towns is holding the wrong value.
3. Something is not working in reg1.

I suspect that the slots are bad. I will use an iteration instead.
I'll send you an update soon to test. I hope you have a saved game befire the fight against Marius.

EDIT:
Here's the updated disagnostic with tentative fix for the presumed slot issues:
http://dl.dropbox.com/u/22948126/PoP342_Royal_Weapon_test_May8.rar

Check to see what the messages say now.
« Last Edit: May 09, 2012, 03:55:50 AM by Treebeard »
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #20 on: May 09, 2012, 03:40:31 AM »
I will try. Thank you.

I will edit this message later with the results.

Well, I got to the point where I captured Marius Imperator and after talking with him... there seems to be something strange, this was the message I got:

"The player is a King ... The captured King has 31 centers ... he needs to have less than 6."

How can that be? Right now the empire owns only 5 centers (15 if you count the villages), maybe the game is counting the centers they lost as if they still had all their original centers?

Very odd.

The code for calculating the centers is this:
(click to show/hide)

One or more of these factors must be the cause:
1. The faction of the talked to troops doesn't evaluate correctly, yielding centers of a different faction.
2. One or both of the slots regarding castels and towns is holding the wrong value.
3. Something is not working in reg1.

I suspect that the slots are bad. I will use an iteration instead.
I'll send you an update soon to test. I hope you have a saved game befire the fight against Marius.

Thank you. I have Marius as a prisoner, but I think I can get King Ulric again (I left him with one castle and few lords).

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 #21 on: May 09, 2012, 03:56:16 AM »
Here's the updated disagnostic with tentative fix for the presumed slot issues:
http://dl.dropbox.com/u/22948126/PoP342_Royal_Weapon_test_May8.rar

Check to see what the messages say now.

Install:
1. Back up your conversation.txt and quickstrings.txt
2. Extract the files into your PoP folder.

Also, you may want to save your current save game (in your MyDocuments\Warband Save Games folder and then release Marius and try to capture him again as well.
« Last Edit: May 09, 2012, 03:58:18 AM by Treebeard »
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #22 on: May 09, 2012, 04:07:16 AM »
Here's the updated disagnostic with tentative fix for the presumed slot issues:
http://dl.dropbox.com/u/22948126/PoP342_Royal_Weapon_test_May8.rar

Check to see what the messages say now.

Install:
1. Back up your conversation.txt and quickstrings.txt
2. Extract the files into your PoP folder.

Also, you may want to save your current save game (in your MyDocuments\Warband Save Games folder and then release Marius and try to capture him again as well.

I tried to talk with Marius Imperator again and he gave his sword to me (5 centers). Thank you very much Treebeard. Good night!

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 #23 on: May 09, 2012, 04:16:26 AM »
Thanks for testing and helping find this issue. It also affects the chances of enemy lords joining the player. The fix will be included in the next full PoP update.


Edit:

I now also have a hotfix for PoP version PoP 3.42 with Sep 16 Update:
http://www.gamefront.com/files/21675155/PoP342_Hotfix_May_8.rar

This hotfix removes diagnostic messages and fixes:
1. Potential bug with Royal weapon and chances of enemy lord joining (chance part based on center comparison).
2. Maltise and Boris the Raven can no longer respawn if they have been banished.

Link:
http://www.gamefront.com/files/21675155/PoP342_Hotfix_May_8.rar

Install:
1. Ensure you have PoP 3.42 and Sep 16 updates installed.
2. Backup your PoP 3.42 folder's: conversation.txt, scripts.txt and quickstrings.txt (quickstrings is only needed if you had the diagnostic update).
3. Extract this rar file into your PoP3.42 folder

Regards,
TB
« Last Edit: May 09, 2012, 04:38:42 AM by Treebeard »
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #24 on: May 09, 2012, 05:36:07 PM »
I tried to take the lance from Ulric too, but I didn't get the option, he was holding it in battle and Sarleon owns only one castle. It's a bug or he may not have it equipped even if he had used it in battle? 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 #25 on: May 09, 2012, 05:49:10 PM »
I tried to take the lance from Ulric too, but I didn't get the option, he was holding it in battle and Sarleon owns only one castle. It's a bug or he may not have it equipped even if he had used it in battle? Thank you.

The diagnostic message said that the king had one center, correct?

If yes, then the only check after that is to see if Ulric has the item equipped:
(click to show/hide)

If you like, you can upload the save game where you have Ulric as prisoner and let me know the link, and I'll check it out closely this evening.
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #26 on: May 10, 2012, 10:22:20 PM »
Sorry for the delay, here it is:

http://www.mediafire.com/?1u2s4fhppck5zcj

Thank you for the help.

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 #27 on: May 11, 2012, 02:38:27 AM »
Thanks for the save game.

I've checked your save game (at day 911) where you have Ulric as prisoner (at 14% health).

I looked at his equipped item slots and he only has these two items equipped:
Runed Bastard Sword and Order of Lion Kite Shield

So the reason you're not getting his lance is that he does not have it equipped. The reason for that is that either he did not spawn with it or he dropped it during/after the battle.
The other things all evaluate fine and the code is working without bugs now (- except that the King only stares at you when you tell him he's your prisoner now. Normally he should acknowledge that he is your prisoner ... but let's call that a feature).

Regards,
TB
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar

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 #28 on: May 11, 2012, 04:46:17 PM »
Thanks for the save game.

I've checked your save game (at day 911) where you have Ulric as prisoner (at 14% health).

I looked at his equipped item slots and he only has these two items equipped:
Runed Bastard Sword and Order of Lion Kite Shield

So the reason you're not getting his lance is that he does not have it equipped. The reason for that is that either he did not spawn with it or he dropped it during/after the battle.
The other things all evaluate fine and the code is working without bugs now (- except that the King only stares at you when you tell him he's your prisoner now. Normally he should acknowledge that he is your prisoner ... but let's call that a feature).

Regards,
TB

Thank you for the help Treebeard, but Ulric will drop his lance when he dies, do I need to wait him to switch to another weapon before I kill him?

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 #29 on: May 11, 2012, 05:30:01 PM »
I'm not sure exactly why he didn't have the lance in any of his weapon/shield slots. I checked all the four equipment slots of Ulric and two had items and two were empty. (These are the same slots the player uses for his equipped weapons and shields).

If any of those slots are empty, I'm not sure if the game will automatically equip items that are elsewhere in the inventory (- i.e. without telling the troop or agent to equip items with for example the operation troop_equip_items).

It's a bit of a mystery as to why you saw Ulric with the Lance in battle and then he didn't have it in his equipped slots. It may be game engine related.

What I can do is to include "troop_equip_items" for the king before checking if he has the item equipped. I'll try that this evening and that will help - if Ulric has the lance in his inventory.

« Last Edit: May 11, 2012, 05:32:34 PM by Treebeard »
PoP Warband Downloads:
PoP 3.51:
http://mountandblade.nexusmods.com/mods/3710/
You need to register a (free) account / Log In to Nexusmods to be able to download PoP 3.51
PoP 3.5 to 3.51 incremental update:
http://www.2shared.com/file/Os6PEqBh/PoP35_to_PoP351.html
Jun 24 DLC update for PoP 3.51:
http://www.gamefront.com/files/22033773/Prophesy_of_Pendor_3_51_Jul_24_rar