Loader
logo

Re: Unmotivated practice melee fighters in arenas

Started by tos1, October 13, 2022, 10:05:49 PM

Previous topic - Next topic
Related topic: "Unmotivated practice melee fighters in arenas" by me

(I tried to replying to it but that causes an error "Please enable JavaScript" though the switch for it is enabled in my Chrome browser)

Additional information to the staring at each other in arenas.

Many warning lines fill up the "Messages" screen when I push [Q key]-[Recent Messages] just after I started a practical melee fight at an arena (probably any arena). I don't know whether this affects the "staring at each other".

----
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.

:

SCRIPT WARNING ON OPCODE 505: Invalid Agent ID: 38; LINE NO 6:
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
SCRIPT WARNING ON OPCODE 505: Invalid Agent ID: 39; LINE NO 6:
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
----

The ID number is sequential from 15 to 39 (and the earlier numbers seem not to remain in the message buffer)
At this time, "Opponents Remaining: 40" is shown in the main (fighting) screen (probably at any arena).

In addition, the remaining number sometimes ends in "-1" when I beat all opponents.

- Game version (and steam or downloaded):
AWoIaF v8.1, Downloaded
(I never seen these "staring", "remaining -1", and "warning" with v.7.11. I often see the staring and the -1, and always see the warning with v.8.1 as far as I know)

November 21, 2023, 09:47:30 AM #1 Last Edit: November 21, 2023, 09:53:36 AM by tos1
A follow-up.

To check whether there are other error/warning before the bunch of warning lines or not, I experimentally changed the parameter of the loop so that it iterates only from 0 to 4, and confirmed there is no any other error/warning lines before the loop.

---- A trigger of arena_melee_fight at line 5014 of mission_templates.txt for AWoIaF
0.000000 0.000000 100000000.000000  0  9 31 2 144115188075856286 1 2133 2 144115188075856690 40 2133 2 144115188075856688 0 2133 2 144115188075856689 0 2133 2 144115188075856691 0 6 3 1224979098644774912 0 144115188075856690 505 3 1224979098644774912 7 0 3 0 1 2 936748722493063661 131072
----

If the modding system for AWoIaF has not been changed so much from v1.171, each of opecodes should be as below:
eq = 31
assign = 2133
agent_set_slot = 505
try_for_range = 6
try_end = 3
call_script = 1
(Please note that I'm not the MOD developer and don't have any .py modding files for AWoIaF. I'm reading the plain (i.e. Native) header_operations.py instead.)

The operation "6 3 1224979098644774912 0 144115188075856690" just before the 505 is the try_for_range loop. The variable "1441..." is set into the upper bound 40 earlier in the line. Changing the "1441..." into a bare number 5 results the iteration is from 0 to 4.

----
SCRIPT WARNING ON OPCODE 505: Invalid Agent ID: 0; LINE NO 6:
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
SCRIPT WARNING ON OPCODE 505: Invalid Agent ID: 1; LINE NO 6:
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.

:

SCRIPT WARNING ON OPCODE 505: Invalid Agent ID: 4; LINE NO 6:
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
At Mission Template mst_arena_melee_fight trigger no: 33 consequences.
----

This cannot still find out the cause of "WARNING ON OPCODE 505" but it's true that there is no any error/warning lines before the loop.

Every time I have a practice match in the arena, the opponents still stand in a line like centipedes without fighting, or several men stand still facing each other. AWoIaF v7.11 didn't have this bug.

December 12, 2023, 11:13:00 AM #2 Last Edit: December 28, 2023, 11:38:13 AM by tos1
The warning was found to have nothing to do with the fighters' unmotivated/negligent actions.

I tried removing the part (below) that caused the warning, BUT only the warning disappeared and the fighters' behavior REMAINED THE SAME. As in the screenshot, during 40 people melee fight at arena, only the first fighter hustles, some fighters line up waiting their "turn" or some others are standing without doing anything while looking at each other.

From the warning message, we can read that the #33 trigger is for initializing number of opponents into 40 in tournament_triggers of "arena_melee_fight". By my hand-disassembly, the module code merged with Native module system 1.171 should be as follows.

---- trigger #33 (0 origin), arena_melee_fight, mission_templates.txt, AWoIaF v8.2
0.000000 0.000000 100000000.000000  0  9 31 2 144115188075856286 1 2133 2 144115188075856690 40 2133 2 144115188075856688 0 2133 2 144115188075856689 0 2133 2 144115188075856691 0 6 3 1224979098644774912 0 144115188075856690 505 3 1224979098644774912 7 0 3 0 1 2 936748722493063661 131072
----

---- My hand-disassembly (using modsys 1.171 as a reference)
(0, 0, ti_once, [], [(eq, "$g_mt_mode", abm_training),
 (assign, "$g_arena_training_max_opponents", 40),
 (assign, "$g_arena_training_num_agents_spawned", 0),
 (assign, "$g_arena_training_kills", 0),
 (assign, "$g_arena_training_won", 0),
 (try_for_range, ":var1", 0, "$g_arena_training_max_opponents"), ###### AWoIaF v8.*
 (agent_set_slot ":var1", slot_agent_arena_team_set, 0)        ###### AWoIaF v8.*
 (try_end)                                                    ###### AWoIaF v8.*
 (call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
----

AWoIaF v7.11 doesn't have the try block (try_for_range, agent_set_slot=505, and try_end), and is same with Native. It has no problem of unmotivated. On the other hand, AWoIaF v8.1 and v8.2 have the block. I experimentally removed the block from mission_templates.txt (and overwrite the number of operations from 9 to 6).

It's not directly related to the main title of this topic, and I'm still not very familiar with the mod system, but it seems to be too early to set agent slots for all 40 opponents before they spawn. In addition, this warning set has 40 * 4 = 160 lines and strongly prevents messages from appearing at the bottom left of the screen. By removing the warning, the message will appear immediately.

Again: AWoIaF v7.11 was OK.

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