Loader
logo

Wrong message for degree of worshipped at towns

Started by tos1, March 02, 2024, 01:14:13 PM

Previous topic - Next topic
A line "husband" was displayed instead of the degree of worshipped on the town menu screen. I hand-disassembled the line "menu_town" in the menu.txt and there appear to be two bugs.

1. The code uses 4 pairs of "lt" to compare the value of the local variable for each religion to 100 and 30, but "ge" appears to be correct.

2. Furthermore, since s15 has not been initialized, even if the all "lt" are corrected to "ge", the contents of s15 would remain unspecified in some conditions. So, it seems to that the s15 here must be initialize before.

My understanding of modding is incomplete. I'm sorry if my pointing out is wrong and mislead you.

(Spoiler)

My hand-disassembly. It does not conform to module syntax such as tuples, lists, commas, etc. I just replaced the numbers in the txt.
----
"town" 4352 {s30} none 261
assign ":L0" 0   # 2133 2 1224979098644774912 0
try_begin   # 4 0
  :
else_try   # 5 0
  :
try_end   # 3 0
store_encountered_party "$current_town"   # 2202 1 144115188075856314
  :
party_get_slot ":L12" "$current_town" 394   # 521 3 1224979098644774924 144115188075856314 394
party_get_slot ":L13" "$current_town" 392   # 521 3 1224979098644774925 144115188075856314 392
party_get_slot ":L14" "$current_town" 390   # 521 3 1224979098644774926 144115188075856314 390
party_get_slot ":L15" "$current_town" 391   # 521 3 1224979098644774927 144115188075856314 391
try_begin   # 4 0
  party_slot_eq "$current_town" 343 1   # 541 3 144115188075856314 343 1
  try_begin   # 4 0
    lt ":L14" 100 # 2147483678 2 1224979098644774926 100
    str_store_string 15 "@^The Old Gods are dominantly worshipped here."   # 2320 2 15 1585267068834417159
  else_try   # 5 0
    lt ":L14" 30 # 2147483678 2 1224979098644774926 30
    str_store_string 15 "@^The Old Gods are worshipped here, though not by many."   # 2320 2 15 1585267068834417157
  try_end   # 3 0
else_try   # 5 0
  party_slot_eq "$current_town" 341 1   # 541 3 144115188075856314 341 1
  try_begin   # 4 0
    lt ":L15" 100 # 2147483678 2 1224979098644774927 100
    str_store_string 15 "@^R'hllor is dominantly worshipped here."   # 2320 2 15 1585267068834417210
  else_try   # 5 0
    lt ":L15" 30 # 2147483678 2 1224979098644774927 30
    str_store_string 15 "@^R'hllor is worshipped here, though not by many."   # 2320 2 15 1585267068834417211
  try_end   # 3 0
else_try   # 5 0
  party_slot_eq "$current_town" 342 1   # 541 3 144115188075856314 342 1
  try_begin   # 4 0
    lt ":L13" 100 # 2147483678 2 1224979098644774925 100
    str_store_string 15 "@^The Faith of the Seven is dominantly worshipped here."   # 2320 2 15 1585267068834417212
  else_try   # 5 0
    lt ":L13" 30 # 2147483678 2 1224979098644774925 30
    str_store_string 15 "@^The Faith of the Seven is worshipped here, though not by many."   # 2320 2 15 1585267068834417213
  try_end   # 3 0
else_try   # 5 0
  party_slot_eq "$current_town" 340 1   # 541 3 144115188075856314 340 1
  try_begin   # 4 0
    lt ":L12" 100 # 2147483678 2 1224979098644774924 100
    str_store_string 15 "@^The Drowned Gods are dominantly worshipped here."   # 2320 2 15 1585267068834417214
  else_try   # 5 0
    lt ":L12" 30 # 2147483678 2 1224979098644774924 30
    str_store_string 15 "@^The Drowned Gods are worshipped here, though not by many."   # 2320 2 15 1585267068834417215
  try_end   # 3 0
else_try   # 5 0
  str_store_string 15 "@^No gods are worshipped here."   # 2320 2 15 1585267068834417173
try_end   # 3 0
:
try_begin   # 4 0
  :
  #----------------------------
  # Transferring s15-->s11
  #----------------------------
  :
try_end   # 3 0
:
#----------------------------
# Gathering to s30
#----------------------------
str_store_string 30 "@{s10} {s14}^{s11}{s12}{s13}"   # 2320 2 30 1585267068834417229
try_begin   # 4 0
  :
else_try   # 5 0
  :
try_end   # 3 0
----

In my case, the value of the local variable for R'hllor was 100, and both conditions of "lt" didn't meet. Even if x < 100 is true, checking of x < 30 will always skipped in current code, so as described above, the "lt" seems to be one of two bugs.

- How to reproduce it/when/why it happens:
Visit many towns and check the text on the left side of the town-menu till odd line (e.g. "husband") that follows the line "you are greeted by men loyal to...", etc. appears.

- Game version (and steam or downloaded):
AWoIaF v9.1, 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