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

Bugs which we just recently fixed in our development version and will reach you in the next release.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 68
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 581 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 584 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: 37
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: 68
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
StrangePan
Factorio Staff
Factorio Staff
Posts: 155
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

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

Post by StrangePan »

heyqule wrote: Mon Oct 28, 2024 5:15 pm 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
Thank you for the report and the test cases; they proved useful in reproducing the problems and finding solutions. The compound command and attack area command bugs should be fixed in 2.0.34. Don't forget to check that the rocket silo reference is still valid in the tests before checking its health.

The base building test needs to set the "ignore_planner = true" flag, otherwise the attempt to build a base will fail.

There are still issues with ordering UnitGroups around after immediately spawning units into the group, so the fleeing test still fails, but this is a result of a deeper issue with unit groups that your other tests seem to already be accounting for.
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Sun Mar 05, 2017 1:35 am
Contact:

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

Post by heyqule »

Thank you. I'll review all my tests in 2.0.34.
Post Reply

Return to “Resolved for the next release”