Skip to content

Commit

Permalink
Try to fix the "SCRIPT ERROR ON OPCODE 23: Invalid Script Parameter I…
Browse files Browse the repository at this point in the history
…D: 1; LINE NO: 1: At script: select_battle_tactic_aux." problem. Where the game faults at the store_script_param for retrieving the second parameter.

Major props to @nullpaintererror on Discord for reporting, posting their findings, going the extra mile and trying to fix the Linux version of TLD.

Introduced in 3d0153d while adding a second parameter to select_battle_tactic_aux, but only adding that parameter to one of the two call_script lines that use it, and not the other.

3d0153d#diff-3e9fdee3ebbb3f3bbbf2cf77ff2d32ab268738e87f3ddd78a706a08b2f620212R10523
  • Loading branch information
Swyter committed Jul 1, 2023
1 parent fa8e683 commit f7f0464
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ModuleSystem/module_scripts.py
Expand Up @@ -12716,6 +12716,7 @@ def set_item_score():

# script_select_battle_tactic
("select_battle_tactic", [
(assign, ":defense_not_an_option", 0),
(assign, "$ai_team_1_battle_tactic", 0),
(get_player_agent_no, ":player_agent"),
(agent_get_team, ":player_team", ":player_agent"),
Expand All @@ -12732,11 +12733,10 @@ def set_item_score():
(store_add, "$ai_team_2", ":player_team", 2),
(try_end),
(set_show_messages, 0),
(call_script, "script_select_battle_tactic_aux", "$ai_team_1"),
(call_script, "script_select_battle_tactic_aux", "$ai_team_1", ":defense_not_an_option"), # swy: second parameter is always zero here
(assign, "$ai_team_1_battle_tactic", reg0),
(try_begin),
(ge, "$ai_team_2", 0),
(assign, ":defense_not_an_option", 0),
(try_begin),
(eq, "$ai_team_1_battle_tactic", btactic_hold),
(assign, ":defense_not_an_option", 1), #don't let two AI defend at the same time
Expand Down
2 changes: 1 addition & 1 deletion _wb/quick_strings.txt
Expand Up @@ -84,7 +84,7 @@ qstr_a_MAN^_subjugated_by a_MAN,^_subjugated_by_Sauron
qstr_an_ORC^_serving_the_W an_ORC,^_serving_the_White_Hand
qstr_one_of_the_URUK_HAI^ one_of_the_URUK-HAI,^_bred_in_Isengard
qstr_a_MAN_of_Dunland^_th a_MAN_of_Dunland,^_the_Western_Plains
qstr__rev_584_wb__dev_^_B _rev_584_wb_|_dev_^_Built_2023-04-03_17:53___
qstr__rev_3822_wb__dev_^_ _rev_3822_wb_|_dev_^_Built_2023-07-01_22:55___
qstr_Click_the_center_but Click_the_center_button_to_toggle_faction^Click_the_avatars_to_view_details_of_them
qstr_Level:_{reg3}^Health Level:_{reg3}^Health:_{reg4}
qstr_Attributes Attributes
Expand Down
2 changes: 1 addition & 1 deletion _wb/scripts.txt
Expand Up @@ -379,7 +379,7 @@ find_high_ground_around_pos1 -1
remove_agent -1
8 23 2 1224979098644774912 1 701 1 5 1711 2 1224979098644774912 5 1721 3 1224979098644774912 0 0 1107 1 0 1733 2 1224979098644774912 0 1722 2 1224979098644774912 1224979098644774912 1107 1 1
select_battle_tactic -1
35 2133 2 144115188075856319 0 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 4 0 1005 1 2 4 0 31 2 1224979098644774913 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2133 2 144115188075856321 -1 5 0 4 0 31 2 1224979098644774913 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2120 3 144115188075856321 1224979098644774913 2 3 0 1107 1 0 1 2 190 144115188075856320 2133 2 144115188075856319 72057594037927936 4 0 30 2 144115188075856321 0 2133 2 1224979098644774914 0 4 0 31 2 144115188075856319 1 2133 2 1224979098644774914 1 3 0 1 3 190 144115188075856321 1224979098644774914 2133 2 144115188075856322 72057594037927936 3 0 1107 1 1
35 2133 2 1224979098644774912 0 2133 2 144115188075856319 0 1700 1 1224979098644774913 1770 2 1224979098644774914 1224979098644774913 4 0 1005 1 2 4 0 31 2 1224979098644774914 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2133 2 144115188075856321 -1 5 0 4 0 31 2 1224979098644774914 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2120 3 144115188075856321 1224979098644774914 2 3 0 1107 1 0 1 3 190 144115188075856320 1224979098644774912 2133 2 144115188075856319 72057594037927936 4 0 30 2 144115188075856321 0 4 0 31 2 144115188075856319 1 2133 2 1224979098644774912 1 3 0 1 3 190 144115188075856321 1224979098644774912 2133 2 144115188075856322 72057594037927936 3 0 1107 1 1
select_battle_tactic_aux -1
47 23 2 1224979098644774912 1 23 2 1224979098644774913 2 2133 2 1224979098644774914 2 1700 1 1224979098644774915 1770 2 1224979098644774916 1224979098644774915 4 0 31 2 144115188075856001 1 1788 2 1224979098644774912 1224979098644774916 2133 2 1224979098644774913 1 3 0 1 3 195 1224979098644774912 0 2133 2 1224979098644774917 72057594037927937 2133 2 1224979098644774918 72057594037927938 1 3 195 1224979098644774912 1 2133 2 1224979098644774919 72057594037927937 2136 3 1224979098644774920 0 100 4 0 2133 2 1224979098644774921 0 4 0 1788 2 1224979098644774912 1224979098644774916 541 3 144115188075856009 0 13 2133 2 1224979098644774921 1 5 0 2147485436 2 1224979098644774912 1224979098644774916 32 2 144115188075856010 0 541 3 144115188075856010 0 13 2133 2 1224979098644774921 1 3 0 31 2 1224979098644774921 1 4 0 31 2 1224979098644774913 0 32 2 1224979098644774917 50 2147483678 2 1224979098644774918 35 2133 2 1224979098644774914 1 5 0 31 2 144115188075856714 1 32 2 1224979098644774919 50 1073741856 2 1224979098644774918 30 2147483678 2 1224979098644774917 30 2133 2 1224979098644774914 0 5 0 3221225502 2 1224979098644774920 80 31 2 144115188075856714 1 2133 2 1224979098644774914 2 3 0 3 0 2133 2 72057594037927936 1224979098644774914
battle_tactic_init -1
Expand Down
2 changes: 1 addition & 1 deletion scripts.txt
Expand Up @@ -379,7 +379,7 @@ find_high_ground_around_pos1 -1
remove_agent -1
7 23 2 1224979098644774912 1 701 1 5 1711 2 1224979098644774912 5 1721 3 1224979098644774912 0 0 1107 1 0 1722 2 1224979098644774912 1224979098644774912 1107 1 1
select_battle_tactic -1
35 2133 2 144115188075856319 0 1700 1 1224979098644774912 1770 2 1224979098644774913 1224979098644774912 4 0 1005 1 2 4 0 31 2 1224979098644774913 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2133 2 144115188075856321 -1 5 0 4 0 31 2 1224979098644774913 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2120 3 144115188075856321 1224979098644774913 2 3 0 1107 1 0 1 2 190 144115188075856320 2133 2 144115188075856319 72057594037927936 4 0 30 2 144115188075856321 0 2133 2 1224979098644774914 0 4 0 31 2 144115188075856319 1 2133 2 1224979098644774914 1 3 0 1 3 190 144115188075856321 1224979098644774914 2133 2 144115188075856322 72057594037927936 3 0 1107 1 1
35 2133 2 1224979098644774912 0 2133 2 144115188075856319 0 1700 1 1224979098644774913 1770 2 1224979098644774914 1224979098644774913 4 0 1005 1 2 4 0 31 2 1224979098644774914 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2133 2 144115188075856321 -1 5 0 4 0 31 2 1224979098644774914 0 2133 2 144115188075856320 1 5 0 2133 2 144115188075856320 0 3 0 2120 3 144115188075856321 1224979098644774914 2 3 0 1107 1 0 1 3 190 144115188075856320 1224979098644774912 2133 2 144115188075856319 72057594037927936 4 0 30 2 144115188075856321 0 4 0 31 2 144115188075856319 1 2133 2 1224979098644774912 1 3 0 1 3 190 144115188075856321 1224979098644774912 2133 2 144115188075856322 72057594037927936 3 0 1107 1 1
select_battle_tactic_aux -1
47 23 2 1224979098644774912 1 23 2 1224979098644774913 2 2133 2 1224979098644774914 2 1700 1 1224979098644774915 1770 2 1224979098644774916 1224979098644774915 4 0 31 2 144115188075856001 1 1788 2 1224979098644774912 1224979098644774916 2133 2 1224979098644774913 1 3 0 1 3 195 1224979098644774912 0 2133 2 1224979098644774917 72057594037927937 2133 2 1224979098644774918 72057594037927938 1 3 195 1224979098644774912 1 2133 2 1224979098644774919 72057594037927937 2136 3 1224979098644774920 0 100 4 0 2133 2 1224979098644774921 0 4 0 1788 2 1224979098644774912 1224979098644774916 541 3 144115188075856009 0 13 2133 2 1224979098644774921 1 5 0 2147485436 2 1224979098644774912 1224979098644774916 32 2 144115188075856010 0 541 3 144115188075856010 0 13 2133 2 1224979098644774921 1 3 0 31 2 1224979098644774921 1 4 0 31 2 1224979098644774913 0 32 2 1224979098644774917 50 2147483678 2 1224979098644774918 35 2133 2 1224979098644774914 1 5 0 31 2 144115188075856593 1 32 2 1224979098644774919 50 1073741856 2 1224979098644774918 30 2147483678 2 1224979098644774917 30 2133 2 1224979098644774914 0 5 0 3221225502 2 1224979098644774920 80 31 2 144115188075856593 1 2133 2 1224979098644774914 2 3 0 3 0 2133 2 72057594037927936 1224979098644774914
battle_tactic_init -1
Expand Down

0 comments on commit f7f0464

Please sign in to comment.