A World of Ice and Fire Forums

"Rhaesh Loy", outlaw/bandit/clansman says

Started by tos1, July 02, 2024, 08:29:25 AM

Previous topic - Next topic

tos1

When the player character met a group of Northern Clansman and challenged to fight, the opponent said the village name "Rhaesh Loy". In some case of other enemies (but not lord), it happens after the player char payed once.

Strangely enough, the related code (dlga_bandit_attack:close_window in conversation.txt) seems to be correct. It must display one of s11 - s14 after doing below.

My hand-disassembly:
----
store_random_in_range ":L0" 11 15
str_store_string 11 "@Another fool come to throw {reg59?her:him}self on my weapon, eh? Fine, let's fight!"
str_store_string 12 "@We're not afraid of you, {reg59?wench:sirrah}. Time to break some heads!"
str_store_string 13 "@That was a mistake. Now I'm going to have to make your death long and painful."
str_store_string 14 "@Brave words. Let's see you back them up with deeds, cur!"
str_store_string_reg 5 ":L0"
----

AFA I added display_message just after above and checked, s5 is correctly set at the conversation timing, but the opponent says "Rhaesh Loy".

- It happens even just after started the new game before the first game-save, so saving game doesn't affect it (though the "Rhaesh Loy" is saved actually).

- The {!} doesn't affect the result. However, it must be removed to keep translation works:
What is {!} for in module_dialogs, Modding Q&A, TW forum.


- Replacing s5 (for str_store_string_reg and {s#}) to s6 resolves the issue, but I don't know why so and why suddenly AWoIaF had the issue at v9.4. Native (made from mod system 1.171) has similar code using s5.







- Game version (and steam or downloaded):
AWoIaF v9.4, Warband v1.174 downloaded

tos1

I found the cause. :)
The s5 set at the Conditions-block for displaying as {s5} is destroyed at the Consequences-block BEFORE it's displayed. As I already wrote, one of solutions is to use other string-register like s6 in the Conditions block and in {}.
(As another way, we may save and restore s5 to/from somewhere before/after calling a script in the Consequences-block, but where?)

Hierarchy of script-calling, loops, and operations:
----
dlga_bandit_attack:close_window
-> Consequences block (executed before {s5} is displayed)
-> script_make_kingdom_hostile_to_player
-> script_change_player_relation_with_faction
-> script_set_player_relation_with_faction
-> script_update_all_notes
-> try_for_range ":L1" "p_town_1"[Gulltown] "p_salt_mine"[Gold Mine]
-> script_update_center_notes
----
There are 3 str_store_party_name that writes to s5 in the deepest script script_update_center_notes. In my cace, the 2nd one is executed (it's followed by add_party_note_from_sreg ":L0" 2 "str_spy_not_present[You have no spy in {s5}.]" 0).

Why this didn't occur till AWoIaF v9.3? Yes, that's because the calling of script_make_kingdom_hostile_to_player at the Consequences block was added at v9.4.

- How to reproduce it/when/why it happens:
Meet a small group that a "leader" leads e.g. Northern Clansmen, Bandits, etc.  At the first time, pay the leader free-tall. Meet soon again and challenge them to fight. The opponent says the village name "Rhaesh Loy" instead of correct (randomly selected) 1 of 4 sentences. In some cases, the payment is omittable.

- Game version (and steam or downloaded):
AWoIaF v9.4 - v10.0 dev.3, Warband v1.174 downloaded

Quick Reply

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Shortcuts: ALT+S post or ALT+P preview