Related topic (v8.* but inherited to v9.1):
"Number of troops killed will be the new lady/lord (https://www.aworldoficeandfire.co.uk/forum/v8-0/number-of-troops-killed-will-be-the-new-ladylord/)" by me
(https://img.atwiki.jp/awoiafwb/attach/1/187/indep_siege1b.jpg)
After looking into the code of v9.1 *.txt a bit, I found what seemed to be the cause why the words are not set correctly:
The code that sets values for reg6, reg7, and s11 etc. should be written in the Conditions block or earlier, but it seems to be written mistakenly in the Consequences block.
AWoIaF v9.1 conversation.txt line 149:
----
dlga_award_fief_to_vassal_2:close_window.1 4095 64 0 As_you_wish,_{reg59?my_lady:my_lord}._{reg6?I:{reg7?You:{s11}}}_will_be_the_new_{reg3?lady:lord}_of_{s1}. 6 25 2133 2 1224979098644774912 144115188075855971 1 4 936748722493063408 144115188075855973 1224979098644774912 0 4 0 542 3 144115188075856335 64 144115188075855973 502 3 144115188075856335 64 -1 3 0 2133 2 72057594037927942 0 2133 2 72057594037927943 0 4 0 31 2 1224979098644774912 144115188075855934 2133 2 72057594037927942 1 5 0 31 2 1224979098644774912 360287970189639680 2133 2 72057594037927943 1 5 0 2322 2 11 1224979098644774912 3 0 2330 2 1 144115188075855973 1506 2 72057594037927939 1224979098644774912 2109 2 72057594037927939 2 2133 2 144115188075855973 -1 4 0 31 2 144115188075856358 864691128455135421 2060 1 144115188075856358 3 0 NO_VOICEOVER
----
There is the text using reg6, etc., Ending dialog-state 6, and the Consequences block starting with the number of operations 25. The code where values are assigned to reg6 etc. follows it.
I don't know if this code should just be moved to Conditions block of the line or to another line, but it seems like it's too late, at least after the text. Also I don't know these reg# and s# are set correctly in other nearby cases.
- How to reproduce it/when/why it happens:
See the related topic above.
- Game version (and steam or downloaded):
AWoIaF v9.1, v8.2 Warband v1.174 downloaded
(Note: v8.1 or v7.11 + WB v1.167 has the same problem. Seems to be inherited from Bryten...)
I have done an attempted fix for this. Its because s11 seems to still have data from whatever was registered to it previously.
I assumed that the Consequences block would be executed after the text was displayed, but I was wrong. I confirmed the text is displayed after both Conditions and Consequences blocks are executed.
The cause of the problem was that the engine cannot deal with when the string register specified as a parameter to a runtime ternary operator pointed to a string that contains a colon. I checked by setting several existing quick strings into s11 and confirmed that.
In the case, the ternary operation is {reg7?You:{s11}} and s11 is "Number of troops killed: xx". Probably the string pointed by a string register are filled in the parameter of the ternary operator before the engine interpreting the ternary operator.
One solution is to clear not only reg6 and reg7 but also s11. I confirmed also that.
(https://img.atwiki.jp/awoiafwb/attach/1/238/indep_siege2a.jpg)
- Game version (and steam or downloaded):
AWoIaF v9.4, v8.2 Warband v1.174 downloaded
(Note: v8.1 or v7.11 + WB v1.167 has the same problem of missing initialization for s11. Seems to be inherited from Bryten... or mod development system 1.171)