Siege tower [temporary] fix

Users who are viewing this thread

soulmata said:
the mission template from before it was broken is identical, so it's not the template

however, those 4 lines actually correspond to 4 constants used to assign some siege stuff, specifically:

common_siege_init_ai_and_belfry  = (0, 0, ti_once, [ (call_script, "script_siege_init_ai_and_belfry")        ], [])
common_siege_move_belfry          = (0, 0, ti_once, [ (call_script, "script_cf_siege_move_belfry")            ], [])
common_siege_rotate_belfry        = (0, 2, ti_once, [ (call_script, "script_cf_siege_rotate_belfry_platform") ], [ (assign, "$belfry_positioned", 3) ])
common_siege_assign_men_to_belfry = (0, 0, ti_once, [ (call_script, "script_cf_siege_assign_men_to_belfry")  ], [])


lav moved the definitions of those to another file, but as far as i can tell, they are actually identical. by changing that number, it appears you are perhaps changing the script that it calls, which would imply it just outright breaks, though. so i don't know why that fix works.
If you can't manage to fix it properly, we're looking at a workaround/hack that prevents a bug to the scripting engine?
 
Think I found the problem (should be savegame compatible, so no new start is required):

Open scripts.txt and find this line:
cf_siege_assign_men_to_belfry -1
179 2147483679 2 144115188075856429 16 2133 2 1224979098644774912 0 4 0 2147483678 2 144115188075856315 3 1700 1 1224979098644774913 2211 1 1224979098644774914 523 3 1224979098644774915 1224979098644774914 16 1850 2 2 1224979098644774915 2133 2 1224979098644774916 0 2133 2 1224979098644774917 0 2133 2 1224979098644774918 0 2133 2 1224979098644774919 0 2133 2 1224979098644774920 0 2133 2 1224979098644774921 0 2133 2 144115188075856430 0 2133 2 144115188075856431 0 12 1 1224979098644774922 1702 1 1224979098644774922 1704 1 1224979098644774922 4 0 525 3 1224979098644774923 1224979098644774922 17 2147483679 2 1224979098644774923 0 525 3 1224979098644774924 1224979098644774922 18 4 0 31 2 1224979098644774923 -600 [...]

change the blue marked numbers to this (17 to 1 and 18 to 2, copy&paste won't work, cause this is only an excerpt of the code!):

cf_siege_assign_men_to_belfry -1
179 2147483679 2 144115188075856429 16 2133 2 1224979098644774912 0 4 0 2147483678 2 144115188075856315 3 1700 1 1224979098644774913 2211 1 1224979098644774914 523 3 1224979098644774915 1224979098644774914 16 1850 2 2 1224979098644774915 2133 2 1224979098644774916 0 2133 2 1224979098644774917 0 2133 2 1224979098644774918 0 2133 2 1224979098644774919 0 2133 2 1224979098644774920 0 2133 2 1224979098644774921 0 2133 2 144115188075856430 0 2133 2 144115188075856431 0 12 1 1224979098644774922 1702 1 1224979098644774922 1704 1 1224979098644774922 4 0 525 3 1224979098644774923 1224979098644774922 1 2147483679 2 1224979098644774923 0 525 3 1224979098644774924 1224979098644774922 2 4 0 31 2 1224979098644774923 -600 [...]
The bold marked number is just an easy way to find the blue ones more easily. The first one is right at the start of the script and the second time its next to our targets. Now the siege tower should move again, when you place some soldiers next to it.

for soulmata:
I believe the module_constants gives a wrong number here. The numbers refer to "slot_agent_target_x_pos" and "slot_agent_target_y_pos" in the script.

Everyone who liked the earlier fix with the siege tower already at its final position at scene start, could also try this:
0.000000 0.000000 100000000.000000  1 1 1 936748722493063450  0
0.000000 0.000000 100000000.000000  1 1 1 936748722493063450  0
0.000000 2.000000 100000000.000000  1 1 1 936748722493063451  1 2133 2 144115188075856315 3
0.000000 0.000000 100000000.000000  1 1 1 936748722493063452  0

This should lead to the same result as the earlier workaround. I guess the game handles it the following way: When the siege tower scene is loaded, the tower is already at its final state. The first script simply puts it back in its starting condition. Because we "delete" the first script, the tower never leaves its final state (you can also delete the line entirely, but then you also have to change the 29 to 2:cool:. The initial fix called some different scripts instead. I believe this lead to the weird results he got earlier, until he found some scripts which won't harm anything.

I have modified the game here and there, so I'm not absolutely sure this works. Have a try and give feedback, so others will know if it really works. Thank you.
 
Straputsky said:
I have modified the game here and there, so I'm not absolutely sure this works. Have a try and give feedback, so others will know if it really works. Thank you.


Thank you VERY MUCH for finding this. This indeed was the problem. I do not know WHY using these odd slot values is the problem, but the agent_get_slot call was indeed the problem.

This is now fixed in NE .624.
 
Back
Top Bottom