Sorian AI on adaptive maps

This is for troubleshooting of problems with the FAF client and Forged Alliance game.

Moderator: PhilipJFry

Sorian AI on adaptive maps

Postby PhilipJFry » 27 May 2017, 11:14

Seems like the Sorian AI can't handle adaptive maps for some reason
noticed these two errors when running a game with the sorian AIx on adaptive Setons
Code: Select all
WARNING: Error running lua script: ...orever\gamedata\lua.nx2\lua\ai\aiattackutilities.lua(1360): table index is nil
         stack traceback:
            ...orever\gamedata\lua.nx2\lua\ai\aiattackutilities.lua(1360): in function `GetPathGraphs'
            ...orever\gamedata\lua.nx2\lua\ai\aiattackutilities.lua(1388): in function `GetClosestPathNodeInRadiusByLayer'
            ...orever\gamedata\lua.nx2\lua\ai\aiattackutilities.lua(1300): in function `PlatoonGenerateSafePathTo'
            ...amedata\lua.nx2\lua\editor\sorianbuildconditions.lua(86): in function `IsIslandMap'
            ...ua.nx2\lua\ai\aibasetemplates\sorianmainbalanced.lua(237): in function `FirstBaseFunction'
            ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(24): in function `GetHighestBuilder'
            ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(92): in function `SetupMainBase'
            ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(65): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(795): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(766): in function `EvaluateAIPlanList'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(741): in function <...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua:732>

Code: Select all
WARNING: Error running lua script: ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(3941): *TRIGGER ERROR: Must use unique names for new triggers- Supplied name: SkirmishUnderEnergyThresholdSorian
         stack traceback:
            [C]: in function `error'
            ...\faforever\gamedata\lua.nx2\lua\scenariotriggers.lua(234): in function `CreateArmyStatTrigger'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(3941): in function `SetupUnderEnergyStatTriggerSorian'
            ...amedata\lua.nx2\lua\ai\aiarchetype-managerloader.lua(58): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(795): in function `ExecutePlan'
            ...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua(777): in function <...ogramdata\faforever\gamedata\lua.nx2\lua\aibrain.lua:772>
INFO: playable area coordinates are { 0, 0, 1024, 1024 }
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: Sorian AI on adaptive maps

Postby Uveso » 29 May 2017, 12:34

This is a default AI marker:
Code: Select all
                ['AirPN01'] = {
                    ['hint'] = BOOLEAN( true ),
                    ['graph'] = STRING( 'DefaultAir' ),
                    ['adjacentTo'] = STRING( 'AirPN00 AirPN02 AirPN18 AirPN11 AirPN12' ),
                    ['color'] = STRING( 'ffffffff' ),
                    ['type'] = STRING( 'Air Path Node' ),
                    ['prop'] = STRING( '/env/common/props/markers/M_Path_prop.bp' ),
                    ['orientation'] = VECTOR3( 0, 0.000602126, 0 ),
                    ['position'] = VECTOR3( 366.557, 18.6719, 863.39 ),
                },


And here the same marker inside adaptive seton's clutch:
Code: Select all
                ['AirPN01'] = {
                    ['hint'] = BOOLEAN( true ),
                    ['color'] = STRING( 'FF808000' ),
                    ['type'] = STRING( 'Air Path Node' ),
                    ['prop'] = STRING( '/env/common/props/markers/M_Path_prop.bp' ),
                    ['orientation'] = VECTOR3( 0, -0, 0 ),
                    ['position'] = VECTOR3( 366.5, 18.6719, 863.5 ),
                },


As you can see, there are 2 table indexes missing:
Code: Select all
                    ['graph'] = STRING( 'DefaultAir' ),
                    ['adjacentTo'] = STRING( 'AirPN00 AirPN02 AirPN18 AirPN11 AirPN12' ),


Here is line 1360 from aiattackutilities.lua ("graph" is used as Tableindex here)
Code: Select all
            ScenarioInfo.PathGraphs[gk][marker.graph] = ScenarioInfo.PathGraphs[gk][marker.graph] or {}


So, yes there are errors because of missing tablevalues inside "adaptive_setons_clutch_save.lua"
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Sorian AI on adaptive maps

Postby CookieNoob » 29 May 2017, 12:42

Adaptive Maps dont support sorian AI. The reason for that is quite simple: The AI requires marker that determine how it behaves, where it builds its bases and what attacks are deployed over different routes. Since the adaptive maps change their layout (even the playable area can be adjusted), the player positions and mex positions, presence of civilians.... it is simply not possible to generate the correct marker distribution for all scenarios.

The AI marker that can be found in some of the adaptive maps are leftovers from the original map before it was converted into an adaptive map. The missing table entries is most certainly a consequence of my use of ozonex map editor to symmetrize the (mass and hydro) marker placement. The editor is still in alpha phase and doesnt necessarily save all data correctly.

The adaptive maps never supported sorian AI and they probably never will, except someone comes up with a way to generate the appropriate markers and makes the adjustments for all maps (I wont do that).
Check out the next level of maps: viewtopic.php?f=53&t=13014
For adaptivity, customizability and less clutter in the vault.
User avatar
CookieNoob
Priest
 
Posts: 477
Joined: 02 Aug 2014, 17:07
Has liked: 65 times
Been liked: 249 times
FAF User Name: CookieNoob

Re: Sorian AI on adaptive maps

Postby Uveso » 29 May 2017, 13:20

Not only the sorian AI, also the normal AI will produce this error.

Its maybe a good idea to delete these markers from the map, if they don't work at all. ?
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Sorian AI on adaptive maps

Postby PhilipJFry » 29 May 2017, 13:29

maybe put that info to the map description or whatever so that people know about it (assuming you haven't done so already)
cats>dogs
post logs
User avatar
PhilipJFry
Supreme Commander
 
Posts: 2635
Joined: 23 Mar 2016, 21:16
Location: Austria
Has liked: 232 times
Been liked: 348 times
FAF User Name: PhilipJFry

Re: Sorian AI on adaptive maps

Postby Uveso » 29 May 2017, 15:52

If you delete the markersfrom the map, the ingame map-info will show "AI marker: no".
No further description is needed then.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso


Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest