subs target priority

Moderator: keyser

subs target priority

Postby keyser » 11 Apr 2015, 18:52

if a frigate and sub come into range of an opponent sub.
the opponent will fire on the first of those 2 that come into range.
and won't change target until the unit is dead

so : if frigate come into range first, it will tank the damage of the opponent sub, while your sub will take down the opponent sub.

of course you can ask your sub to re-target to kill the sub and not the frigate. But i feel like it would be more usefull to make the subs re-target by itself when a sub come into range.
Zockyzock:
VoR is the clan of upcoming top players now
keyser
Councillor - Game
 
Posts: 1870
Joined: 17 May 2013, 14:27
Has liked: 424 times
Been liked: 540 times
FAF User Name: keyser

Re: subs target priority

Postby C-Star » 12 Apr 2015, 13:58

I recognized this before too.

Are there other units which change their target before its destroyed when something else with higher target priority comes in range?
If not, its just consequent that subs dont. Vice versa: If subs should do, all units should.
C-Star
Crusader
 
Posts: 41
Joined: 20 Oct 2013, 10:41
Has liked: 2 times
Been liked: 10 times
FAF User Name: C-Star

Re: subs target priority

Postby quark036 » 15 Apr 2015, 22:10

There's an attribute for target priorities, but I can't find it. Partytime/Resin_Smoker/CodingSquirrel probably know where it is.
quark036
Avatar-of-War
 
Posts: 165
Joined: 11 Mar 2015, 03:17
Has liked: 10 times
Been liked: 26 times
FAF User Name: Quark036

Re: subs target priority

Postby Resin_Smoker » 15 Apr 2015, 22:28

Its just a matter of altering the target priorities so the sub selects the correct target in the first place. Beyond this, units dont auto-retarget as the "unit" weapon scripts are pretty single minded.

Resin
Last edited by Resin_Smoker on 16 Apr 2015, 06:56, edited 1 time in total.
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: subs target priority

Postby Crotalus » 16 Apr 2015, 02:53

They check if there's a better target every TargetCheckInterval (1.5s ), the problem is that submarine priority looks like this:

Code: Select all
TargetPriorities = {
                'SPECIALHIGHPRI',
                'MOBILE',
                'STRUCTURE DEFENSE',
                'SPECIALLOWPRI',
                'ALLUNITS',
            }


So they don't differ between any mobile units at all which results in staying with the target they already fire at.
Crotalus
Priest
 
Posts: 319
Joined: 27 Jan 2013, 20:37
Has liked: 2 times
Been liked: 102 times
FAF User Name: Crotalus

Re: subs target priority

Postby Resin_Smoker » 16 Apr 2015, 06:59

Here is a basic list of the BP categories.
Spoiler: show
AEON -
AIR -
AIRSTAGINGPLATFORM -
ANTIAIR -
ANTIMISSILE -
ANTINAVY -
ANTISUB -
ARTILLERY -
BENIGN -
BOMBER -
BUILTBYCOMMANDER -
BUILTBYEXPERIMENTALSUB -
BUILTBYQUANTUMGATE -
BUILTBYTIER1ENGINEER -
BUILTBYTIER1FACTORY -
BUILTBYTIER2COMMANDER -
BUILTBYTIER2ENGINEER -
BUILTBYTIER2FACTORY -
BUILTBYTIER3COMMANDER -
BUILTBYTIER3ENGINEER -
BUILTBYTIER3FACTORY -
CANTRANSPORTCOMMANDER -
CAPTURE -
CARRIER -
COMMAND -
CONSTRUCTION -
CONSTRUCTIONSORTDOWN -
COUNTERINTELLIGENCE -
CYBRAN -
DEFENSE -
DIRECTFIRE -
DRAGBUILD -
ECONOMIC -
ENERGYPRODUCTION -
ENERGYSTORAGE -
ENGINEER -
EXPERIMENTAL -
FACTORY -
GATE -
GROUNDATTACK -
HIGHALTAIR -
HOVER -
HYDROCARBON -
INDIRECTFIRE -
INTELLIGENCE -
LAND -
MASSEXTRACTION -
MASSFABRICATION -
MASSPRODUCTION -
MASSSTORAGE -
MOBILE -
NAVAL -
NEEDMOBILEBUILD -
NUKE -
OMNI -
OVERLAYOMNI -
OVERLAYRADAR -
PATROLHELPER -
POD -
PODSTAGINGPLATFORM -
RADAR -
RALLYPOINT -
REBUILDER -
RECLAIM -
RECLAIMABLE -
REPAIR -
SCOUT -
SELECTABLE -
SHIELD -
SILO -
SIZE4 -
SIZE8 -
SIZE9 -
SIZE12 -
SIZE16 -
SIZE20 -
SONAR -
STRATEGIC -
STRUCTURE -
SUBCOMMANDER -
SUBMERSIBLE -
TACTICALMISSILEPLATFORM -
TECH1 -
TECH2 -
TECH3 -
TELEPORTBEACON -
TRANSPORTATION -
TRANSPORTFOCUS -
UEF -
VISIBLETORECON -
WALL -


This can be used to rewrite the priorities... Now if this isn't sufficient it's possible to ADD new cat's to existing units so that the game has more cat-names to filter the targets with.

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: subs target priority

Postby Resin_Smoker » 16 Apr 2015, 07:08

Here is a basic target filter that should work.

Spoiler: show
TargetPriorities = {
'EXPERIMENTAL',
'TECH3 SUBMERSIBLE',
'TECH2 SUBMERSIBLE',
'TECH1 SUBMERSIBLE',
'TECH3 NAVAL',
'TECH2 NAVAL',
'TECH1 NAVAL',
'STRUCTURE DEFENSE',
'ALLUNITS',
}


Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Re: subs target priority

Postby quark036 » 18 Apr 2015, 04:22

Resin, I think using the tag antisub would be better, because you probably want it to take out things that can kill it first, so it would target destroyers over cruisers.
quark036
Avatar-of-War
 
Posts: 165
Joined: 11 Mar 2015, 03:17
Has liked: 10 times
Been liked: 26 times
FAF User Name: Quark036

Re: subs target priority

Postby Ceneraii » 18 Apr 2015, 05:35

Well if you want it nicely you wanna do it likes this (I think):
Tech 1 subs -> Target t1 subs, then other subs, then antisubs, then rest.
Tech 2(&3 subs) -> Target t3 subs, then t2 subs, then t2 antisubs(t3 naval for t3 subs, then t2 antisubs), then t1 subs, then rest.
Ceneraii
Avatar-of-War
 
Posts: 268
Joined: 16 Nov 2013, 21:45
Has liked: 104 times
Been liked: 81 times
FAF User Name: Ceneraii

Re: subs target priority

Postby Resin_Smoker » 18 Apr 2015, 08:40

This all assumes that the enemy units have that category. Keep in mind that not all units have the correct categories and thus the filter may or may not work as you intend.

Resin
Resin_Smoker
Evaluator
 
Posts: 858
Joined: 14 Mar 2012, 17:58
Has liked: 54 times
Been liked: 106 times

Next

Return to FAF Suggestions

Who is online

Users browsing this forum: Google [Bot] and 1 guest