View Issue Details

IDProjectCategoryLast Update
0021122AI War 2Bug - GameplayApr 24, 2019 7:10 pm
Reportertrillioneyes Assigned To 
Severityminor 
Status resolvedResolutionfixed 
Product VersionBETA 0.853 An Officer And A Bunch Of Fleets 
Fixed in VersionBETA 0.854 Garbage... Collected! 
Summary0021122: Units auto-target fortified tesla guardians, and don't close distance when they do
DescriptionExpected behavior:
* long-ranged ships don't target tesla guardians unless there's nothing else to target.
* if short to medium range ships target a tesla guardian, they should approach it instead of trying to kite.
* there's some gray area here with medium to long range ships, and how much they should prefer to shoot at things other than tesla guardians. Maybe weight it inversely proportional to how much you outrange it?
TagsNo tags attached.

Activities

trillioneyes

Apr 23, 2019 2:13 pm

reporter   ~0051345

I've specifically noticed this a lot with sentinel gunboats and spire frigates -- gunboats always shoot at something other than tesla guardians if they can; frigates I don't mind fighting them as long as they get in close enough to do damage. I can try to set up a save showing this off if it would help.

trillioneyes

Apr 23, 2019 2:13 pm

reporter   ~0051346

er, gunboats *should* always. They don't currently.

wm46

Apr 23, 2019 5:06 pm

reporter   ~0051348

Do you have a save where I could easily run some tests? I haven't noticed anything too out of the ordinary, but I never play with snipers.

RocketAssistedPuffin

Apr 23, 2019 5:35 pm

reporter   ~0051349

Test Chamber functions again, so I've set up a scenario here for you.

Tesla Guardians, Pike Guardians and Vanguards far on the left in their own groups; Snipers, Sentinel Gunboats, Concussion Corvettes and Raiders on the right.

As stated by trillioneyes, the Gunboats are always shooting the Tesla Guardians, while the Snipers are reasonable and firing at the Pike Guardians instead.

I included some extra units in there so you can check non-sniper behaviour.

GameData > Configuration > TestChamber. Then you find what button is bound to TestChamber and hit it to load it in.

When you don't need this anymore, you can right click it and go TortoiseSVN > Revert.
Example.xml (2,599 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<root>
	<chamber name="Example">		
		<!-- Note: the game will run without an Ark on the planet, but the view will start on the galaxy map -->


    
    



                <spawn entity="SentinelGunboat" mark_level="1" faction="Player" x="10000" y="0" />
                <spawn entity="SentinelGunboat" mark_level="1" faction="Player" x="10000" y="0" />
				<spawn entity="SentinelGunboat" mark_level="1" faction="Player" x="10000" y="0" />
                <spawn entity="SentinelGunboat" mark_level="1" faction="Player" x="10000" y="0" />
				
				<spawn entity="Sniper" mark_level="1" faction="Player" x="10000" y="4000" />
                <spawn entity="Sniper" mark_level="1" faction="Player" x="10000" y="4000" />
				<spawn entity="Sniper" mark_level="1" faction="Player" x="10000" y="4000" />
                <spawn entity="Sniper" mark_level="1" faction="Player" x="10000" y="4000" />
				
				<spawn entity="ConcussionCorvette" mark_level="1" faction="Player" x="10000" y="-4000" />
                <spawn entity="ConcussionCorvette" mark_level="1" faction="Player" x="10000" y="-4000" />
				<spawn entity="ConcussionCorvette" mark_level="1" faction="Player" x="10000" y="-4000" />
                <spawn entity="ConcussionCorvette" mark_level="1" faction="Player" x="10000" y="-4000" />
				
				<spawn entity="Raider" mark_level="1" faction="Player" x="8000" y="0" />
                <spawn entity="Raider" mark_level="1" faction="Player" x="8000" y="0" />
				<spawn entity="Raider" mark_level="1" faction="Player" x="8000" y="0" />
                <spawn entity="Raider" mark_level="1" faction="Player" x="8000" y="0" />				
				
				
				<spawn entity="FortifiedTeslaGuardian" mark_level="1" faction="AI" x="-10000" y="0" />
				<spawn entity="FortifiedTeslaGuardian" mark_level="1" faction="AI" x="-10000" y="0" />
				
				<spawn entity="PikeGuardian" mark_level="1" faction="AI" x="-10000" y="-4000" />
				<spawn entity="PikeGuardian" mark_level="1" faction="AI" x="-10000" y="-4000" />
				
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
				<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />

	</chamber>
</root>
Example.xml (2,599 bytes)   

wm46

Apr 24, 2019 12:09 pm

reporter   ~0051373

So there's lots of weird things happening right now with sniper targeting that I'm currently sorting through and I thought I'd give a quick update:

   Snipers only seem to target normally because they do so little damage that ( 80 x 0.01 = 0 ), this removes tesla structures from their targeting completely.
   The VeryImportant category for snipers doesn't seem to work, I think it'll never add guardians/strikecraft to the shortlist because the XML has them as not important
      Maybe they should only be excluded if and when an XML important structure is on the same planet?

I still need to find out why the target sorting is not properly sorting Pike Guardians (400 importance) above Tesla (201 importance), as that would fix this issue entirely without needing to touch the VeryImportant code.

RocketAssistedPuffin

Apr 24, 2019 12:36 pm

reporter   ~0051375

Last edited: Apr 24, 2019 12:50 pm

Hm, you seem to be correct on the Sniper damage. If you increase their Mark level, they'll then start focusing the Tesla instead.

Interesting note: If you change the Range of the Gunboats and Snipers to something like "High" instead of "EssentiallyInfinite", they will then ignore the Tesla in favour of the other units...somewhat.

wm46

Apr 24, 2019 1:15 pm

reporter   ~0051376

I found the issue, the sort function for lists is actually sorting things backwards. Take this snippet of debug code:

HalfImportant:
Priority low cutoff = 200
Adding ship <Fortified Tesla Guardian> to shortlist
Adding ship <Fortified Tesla Guardian> to shortlist
Adding ship <Pike Guardian> to shortlist
Adding ship <Pike Guardian> to shortlist
Adding ship <V-Wing> to shortlist
Adding ship <Tritium Sniper Guardian> to shortlist

Shortlist sorting:
Left ID: <19>, Right ID: <18>
Sorted by marker modulo, val = 1

Left ID: <20>, Right ID: <19>
Sorted by importance, val = 1

Left ID: <21>, Right ID: <20>
Sorted by ID only, val = 1

Left ID: <22>, Right ID: <21>
Sorted by importance, val = -1

Left ID: <22>, Right ID: <20>
Sorted by importance, val = -1

Left ID: <22>, Right ID: <19>
Sorted by importance, val = 1

Left ID: <23>, Right ID: <21>
Sorted by ID only, val = 1

Final sort:
Fortified Tesla Guardian, ID 0000018
Fortified Tesla Guardian, ID 0000019
V-Wing, ID 0000022
Pike Guardian, ID 0000020
Pike Guardian, ID 0000021
Tritium Sniper Guardian, ID 0000023

The sniper and pike guardians have the highest importance (400), VWing (250), and then Tesla (201)
How did this never get noticed?

wm46

Apr 24, 2019 1:36 pm

reporter   ~0051378

When sorting by distance, the sort code works as normal....

I am very confused

Top entries for system:
TheRest:
Adding ship <Vanguard> to shortlist
Adding ship <Vanguard> to shortlist
Adding ship <Vanguard> to shortlist
Adding ship <Vanguard> to shortlist
Adding ship <Vanguard> to shortlist

Shortlist sorting:
Left ID: <24>, Right ID: <23>
Sorted by distance, val = 1

Left ID: <25>, Right ID: <24>
Sorted by distance, val = 1

Left ID: <26>, Right ID: <25>
Sorted by distance, val = -1

Left ID: <26>, Right ID: <24>
Sorted by distance, val = 1

Left ID: <27>, Right ID: <25>
Sorted by distance, val = -1

Left ID: <27>, Right ID: <26>
Sorted by distance, val = -1

Left ID: <27>, Right ID: <24>
Sorted by distance, val = -1

Left ID: <27>, Right ID: <23>
Sorted by distance, val = 1

Final sort:
Vanguard, ID 0000023
Vanguard, ID 0000027
Vanguard, ID 0000024
Vanguard, ID 0000026
Vanguard, ID 0000025

<spawn entity="Vanguard" mark_level="1" faction="AI" x="-6000" y="4000" />
<spawn entity="Vanguard" mark_level="1" faction="AI" x="-8000" y="4000" />
<spawn entity="Vanguard" mark_level="1" faction="AI" x="-90000" y="4000" />
<spawn entity="Vanguard" mark_level="1" faction="AI" x="-10000" y="4000" />
<spawn entity="Vanguard" mark_level="1" faction="AI" x="-7000" y="4000" />

wm46

Apr 24, 2019 4:35 pm

reporter   ~0051389

Wait wait, I'm dumb. Ok uploading a fix now.

RocketAssistedPuffin

Apr 24, 2019 5:59 pm

reporter   ~0051390

Want me to mark this as resolved?

wm46

Apr 24, 2019 6:55 pm

reporter   ~0051392

Yeah, ships already approach the tesla guardian's minimum range to damage, so that was the only issue that needed fixing.

Issue History

Date Modified Username Field Change
Apr 23, 2019 2:08 pm trillioneyes New Issue
Apr 23, 2019 2:13 pm trillioneyes Note Added: 0051345
Apr 23, 2019 2:13 pm trillioneyes Note Added: 0051346
Apr 23, 2019 5:06 pm wm46 Note Added: 0051348
Apr 23, 2019 5:35 pm RocketAssistedPuffin File Added: Example.xml
Apr 23, 2019 5:35 pm RocketAssistedPuffin Note Added: 0051349
Apr 24, 2019 12:09 pm wm46 Note Added: 0051373
Apr 24, 2019 12:36 pm RocketAssistedPuffin Note Added: 0051375
Apr 24, 2019 12:38 pm RocketAssistedPuffin Note Edited: 0051375
Apr 24, 2019 12:50 pm RocketAssistedPuffin Note Edited: 0051375
Apr 24, 2019 1:15 pm wm46 Note Added: 0051376
Apr 24, 2019 1:36 pm wm46 Note Added: 0051378
Apr 24, 2019 4:35 pm wm46 Note Added: 0051389
Apr 24, 2019 5:59 pm RocketAssistedPuffin Note Added: 0051390
Apr 24, 2019 6:55 pm wm46 Note Added: 0051392
Apr 24, 2019 7:10 pm RocketAssistedPuffin Status new => resolved
Apr 24, 2019 7:10 pm RocketAssistedPuffin Resolution open => fixed
Apr 24, 2019 7:10 pm RocketAssistedPuffin Fixed in Version => BETA 0.854 Garbage... Collected!