Open ghost opened 2 years ago
If I'm not wrong the original 0,x actions works in the same way so this isn't a bug.
I created 2 new actions for the new attack actions for solving this kind of scenarios but isnt in develop branch because nobody tested it.
Look at this PR and give me feedback if this solves the behavior:
Added Timed Jump functions #488
Can confirm this is an issue with the original vanilla game.
@FS-21 It's an improper solution, but I love it! I don't know how to use 124 and 126, but 125 works like a charm. Here's a test sample script:
[SCR0032] Name=Naval Bomb A 0=49,0 1=125,5000 ; <-- about 5 minutes at 15 frames/second 2=46,131095 3=125,5000 4=46,131072 5=125,5000 6=46,131074 7=125,5000 8=46,131136 9=125,5000 10=46,131093 11=125,5000 12=46,131127 13=125,5000 14=46,131138 15=125,5000 16=46,131079 17=125,5000 18=46,131075 19=125,5000 20=46,131073 21=125,5000 22=46,131101 23=125,5000 24=46,131099 25=125,5000 26=46,131428 27=125,5000 28=46,131135 29=71,30 30=54,0
Not only stops the wiggling after a while, but it also works to change targets if the current target is too well defended and can't be destroyed. Combined with "pick random script" (which I also tested) can be a blast, please get it into the next release, and thank you for your great work!
@FS-21 It's an improper solution, but I love it! I don't know how to use 124 and 126, but 125 works like a charm. Here's a test sample script:
[SCR0032] Name=Naval Bomb A 0=49,0 1=125,5000 ; <-- about 5 minutes at 15 frames/second 2=46,131095 3=125,5000 4=46,131072 5=125,5000 6=46,131074 7=125,5000 8=46,131136 9=125,5000 10=46,131093 11=125,5000 12=46,131127 13=125,5000 14=46,131138 15=125,5000 16=46,131079 17=125,5000 18=46,131075 19=125,5000 20=46,131073 21=125,5000 22=46,131101 23=125,5000 24=46,131099 25=125,5000 26=46,131428 27=125,5000 28=46,131135 29=71,30 30=54,0
Not only stops the wiggling after a while, but it also works to change targets if the current target is too well defended and can't be destroyed. Combined with "pick random script" (which I also tested) can be a blast, please get it into the next release, and thank you for your great work!
...=125,5000 ; <-- about 5 minutes at 15 frames/second Means: in 5 minutes at 15 frames/second jump to the next script line independently the status of the current line.
...=126,5000 ; <-- about 5 minutes at 15 frames/second Means: like action 125 but this time in 5 minutes at 15 frames/second jump re-run the current script line independently the status of the current line.
Action 124,0 means: stop permanently the count of the timed jumps!
@FS-21 I guess 126,n can be used for hunt instructions for units that seem to stop after a while, if you know other uses let me know or write it into docs, and thanks again, your work on AI scripts is very useful.
@FS-21 I guess 126,n can be used for hunt instructions for units that seem to stop after a while, if you know other uses let me know or write it into docs, and thanks again, your work on AI scripts is very useful.
The way I use the 126 is for re-targeting in naval teams that never change the target like aircraft carriers or Dreadnought attacking ground objectives. After some time targeting ground targets AI could have other possible targets that could fit the Attack action I prefer to use this action 126 for re-running the targeting algorithm of the current attack action helps the AI.
First check
Description
When AI naval units can't reach a land target they start wiggling around forever somewhere at the closest shore location.
Conditions to reproduce
No response
INI code
Steps to reproduce
Expected behaviour
AI ships should skip unreachable targets and move on to the next script actions.
Actual behaviour
Ships get stuck trying to reach target, see attached gif.
Additional context