Jump to content

Welcome to Obsidian Forum Community
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Where are the AI scripts stored?


  • Please log in to reply
7 replies to this topic

#1
ArnoldRimmer

ArnoldRimmer

    (4) Theurgist

  • Members
  • 275 posts

Are they accessible outside of the game?



#2
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 564 posts
  • Location:Manchester, UK
  • Deadfire Backer

/exported/gamedata/ai.gamedatabundle

 

This is a JSON file on one line so if you're on Windows simply install Notepad++ and the JSON extension

 

If you can't do this I have tools that can extract this into prettified (something you can make sense of) data

 

The last extract I did was 2.0.1 at https://poe2.peardox.com/exported/

 

I'll do an extract of 3.0.2 but this will be not complete - I know how to process the addons but Obs are ignoring devs so I'm ignoring them (Obs)

 

It will take me a LONG time to upload the export - fast to process but slow to upload. you'll need about 350G



#3
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer

peardox refers to the built-in behaviors for enemies and the default party behaviors.  If you're looking for your custom behaviors, they are in the saved games directory ('C:\Users\<you>\Saved Games\Pillars of Eternity II\CustomAIBehaviors').



#4
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 564 posts
  • Location:Manchester, UK
  • Deadfire Backer

OK - done 3.0.2 to make this easier for you (better mention this fact in another existing thread as it helps peeps)

You simply wanna extract json.zip - there are two directories you wanna look at ai/* and gamedata/* (especially ai.gamedata.json)

 

Go to https://poe2.peardox.com/exported/ and download json.zip

 

This is simply a easy to read version of the files that the game uses

 

The files are human readable but I'm only using the base data

 

If you create your own override/ai/me.gamedatebundle or override/design/ai.gamedatabundle I believe you will have your own AI

 

I must stress that I haven't checked this - I simply do the JSON

 

================================================

 

In case anyone wonders where I've been - portrait packs + depression :)



#5
ArnoldRimmer

ArnoldRimmer

    (4) Theurgist

  • Members
  • 275 posts

peardox refers to the built-in behaviors for enemies and the default party behaviors.  If you're looking for your custom behaviors, they are in the saved games directory ('C:\Users\<you>\Saved Games\Pillars of Eternity II\CustomAIBehaviors').

 

Is there any way to read this saved custom AI data??? It seems to be in some binary format



#6
BMac

BMac

    Programmer

  • Developers
  • 410 posts
  • Lords of the Eastern Reach Backer
This is a rough overview of the layout of the custom AI behavior files:
HeaderVersion (integer [4])
Types count (integer [4])
[count] Type
  TypeID (guid [16])
  Version (integer [4])
TypeID (guid [16])
Name length (integer [4])
Name (string [length])
OldSupportedClasses count (integer [4])
[count] OldSupportedClass (CharacterClass integer [4])
SupportedClasses count (integer [4])
[count] SupportedClass (CharacterClassGameData guid[16])
ConditionalActionSets count (integer [4])
[count] ConditionalActionSet
  Version (integer [4])
  TypeID (guid [16])
  Name length (integer [4])
  Name (string [length])
  Conditions count (integer [4])
  [count] Condition
    Version (integer [4])
    TypeID (guid [16])
    ConditionalSet (CustomAIConditionalScriptSetGameData guid [16])
    Not (bool [1])
  Actions count (integer [4])
  [count] Action
    Version (integer [4])
    TypeID (guid [16])
    ActionType (CustomAIActionType integer [4])
    AbilityPackage (CustomAIAbilityPackageGameData guid [16])
    Ability (GenericAbilityGameData guid [16])
    Consumable (ConsumableGameData guid [16])
    TargetingFilter (CustomAITargetingFilterGameData guid [16])
    TargetingPreference (CustomAITargetingPreferenceGameData guid [16])
    AllowedMovement (AllowedMovementToTargetType integer [4])
    Cooldown (float [4])
  AllowedMovement (AllowedMovementToTargetType integer [4])
  Cooldown (float [4])
UniqueID (guid [16])
CanEdit (bool [1])
Description length (integer [4])
Description (string [length])

  • ArnoldRimmer likes this

#7
ArnoldRimmer

ArnoldRimmer

    (4) Theurgist

  • Members
  • 275 posts

This is great, thanks!



#8
ArnoldRimmer

ArnoldRimmer

    (4) Theurgist

  • Members
  • 275 posts

Hi Bmac or whoever else an help me.

 

I'm able to parse the aiscripts now and can list them and display them in my app (react based electon app) - the conditions and actions I'm able to match to their stringtable translations and can output what they are but now alongside the text labels I'd like to display the icons associated with those abilities - like barbaric rage, flames of devotions etc.

 

Are the images that represent the abilities used in the AI editor also easy to read/parse in the game data? Is there a dump of them that modders can use?


Edited by ArnoldRimmer, 03 February 2019 - 09:51 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users