[StrangePan] [2.0.11] Unit commands seems not behaving properly.

heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sun Mar 05, 2017 1:35 am
Contact:

[StrangePan] [2.0.11] Unit commands seems not behaving properly.

Post by heyqule »

In test case 1, the group does "attack area" command, but they are not attacking. The attack area has a rocket silo. The group went to the target area and then hit moving_state.stale . They did not attack the rocket silo and the group completed the command as "success" in on_ai_command_completed.
udrunk..JPG
udrunk..JPG (289.82 KiB) Viewed 241 times
In test case 2 Compound command behavior seems not right. The group is supposed to go to area 1 and then attack area 2. The group only finished the first command. Then its moving_state hit "stale". The group command return as failure result in on_ai_command_completed event. The command chain was dropped from the group.

I draft 2 test cases here without other mods.
https://drive.google.com/file/d/1XxxrEL ... drive_link

Here is how you run the test.
Once you unzip the testcase mods to the mod folder. You load the scenario Factorio Test/Test as new game. Click the left top button to open the UI and run the test. You can change the game.speed in the hq_factorio_test/unit-group.lua file to observe their behavior.
RunTest.jpg
RunTest.jpg (286.97 KiB) Viewed 244 times

There are around 10 tests in my mod which are failing due to these unit command behaviors. Those tests run fine in 1.1. Any insight on these issue are appreciated.

I have another question. How does LuaCommandable's moving_state work? The units from both cases got the stale state.
Last edited by heyqule on Mon Oct 28, 2024 5:29 pm, edited 1 time in total.
cogito123
Inserter
Inserter
Posts: 33
Joined: Thu Feb 28, 2019 7:05 pm
Contact:

Re: [2.0.11] Unit commands seems not behaving properly.

Post by cogito123 »

Similar issue reported under viewtopic.php?f=7&t=116916&p=623629#p623629
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: [2.0.11] Unit commands seems not behaving properly.

Post by heyqule »

I added a few more tests to test other command. Flee and build base failed too. Using compound command with wandering, then go to location work fine.

Here are the updated tests.
https://drive.google.com/file/d/1jFh72I ... drive_link
Post Reply

Return to “Assigned”