1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[REFERENCE] BehaviorTree Nodes and Leaves

Discussion in 'Civ6 - Creation & Customization' started by Delnar_Ersike, Oct 28, 2016.

  1. Delnar_Ersike

    Delnar_Ersike Chieftain

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    After having spent a few hours just setting up a single, simple BehaviorTree, I thought I'd post a reference people can look at while making Behavior Trees.

    This is a list of all possible Leaf nodes in a Behavior Tree with their possible arguments outlined by number, ordered by how they appear in BehaviorTrees.xml. Each argument has a bunch of properties, this are listed below each argument. If a leaf has no arguments, no arguments are listed.

    Leaf nodes for a tree are set up in the BehaviorTreeNodes SQL table and are defined by their name, while the arguments for each node are set up in TreeData and are defined by DefnId as the argument number and NodeId for the node whose arguments a given entry refers to.

    Setting an argument depends on the UserData property of the argument. If it's "true", then you can use the DefaultValue field, otherwise you'll need to forward it a value or a list through the Tag field pointing to a contract that was set up with Decode Trigger + Contract Manager Decorator. Disclaimer: I'm not necessarily certain of the latter, this may change as I hear back from people and do my own tinkering.

    In case I have any comments, they are added in square brackets.
    __________
    NodeType: Concurrent
    Description: Logical And node. Runs all children until it reaches a FAILURE (can allow multiple failures if desired.)
    Spoiler Arguments :
    DefnId 0: Max Failures
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Exit on Success
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Priority
    Description: Logical Or node. Runs all children until it reaches a SUCCESS or RUNNING

    __________
    NodeType: Sequence
    Description: Special logical And node. Stops on FAILURE, but also stops on RUNNING. Resumes next turn on RUNNING node.
    Spoiler Arguments :
    DefnId 0: Looping
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Add Goal Tech
    Description: Given a list of units, buildings, or techs, asks Research AI to work on them
    Spoiler Arguments :
    DefnId 0: Desired Units
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Desired Buildings
    DataType: BuildingTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Desired Improvements
    DataType: ImprovementList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Goal Plot to work
    DataType: Map Point
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Desired Techs
    DataType: TechTypeList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 5: Add Techs For All
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 6: Desired Civics
    DataType: CivicsList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 7: Contract ID
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 8: Tech Value [populates Contract ID]
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Build Unit
    Description: Given a list of units and/or buildings and a city, builds 'best' unit [or building] at the city when queue is available.
    Spoiler Arguments :
    DefnId 0: Desired Units
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Desired Buildings
    DataType: BuildingTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Required City (-1 for any city)
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: true​
    DefnId 3: Release Unit When Built
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: Contract ID
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 5: Build Priority
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 6: Desired Districts
    DataType: DistrictList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 7: Desired Location
    DataType: Map Point
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 8: Unit Value [also applies to buildings]
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Find Available Unit
    Description: Given a list of units, finds first unit of matching type that can get to location
    Spoiler Arguments :
    DefnId 0: Desired Units
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Desired Location
    DataType: Map Point
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Found Unit
    DataType: ID List
    Required: true
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 3: Upgradeable Units
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Unit Type
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​

    __________
    NodeType: Notify Owner
    Description: Sends notice back to the owning player or any other listener, with an optional integral payload.
    Spoiler Arguments :
    DefnId 0: Data Payload
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Barbarian Spawn Change
    Description: Change the spawn rate of a barbarian tribe to prepare for raid/invasion.
    Spoiler Arguments :
    DefnId 0: Tribe
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Spawn Rate
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Run Behavior Tree
    Description: DEPRECATED - DO NOT USE. Runs a behavior tree defined elsewhere. You can change data for that sub-tree, but not its structure.
    Spoiler Arguments :
    DefnId 0: Behavior Tree
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Behavior Tree Parent Tag
    DataType: string
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false
    Automatic: true

    __________
    NodeType: Operation Move
    Description: Moves operation to the rally point.
    Spoiler Arguments :
    DefnId 0: Move To (enum)
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Range to goal
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Validate new units
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Unit distance
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: Leader Tag
    DataType: string
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Decode Trigger
    Description: For temporary trees only. Take the trigger you want to meet and extract information for use elsewhere.
    Spoiler Arguments :
    DefnId 0: Trigger Units
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 1: Trigger Buildings
    DataType: BuildingTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 2: Trigger Improvements
    DataType: ImprovementList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 3: Trigger District
    DataType: DistrictList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 4: Trigger City
    DataType: int
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 5: Trigger Location
    DataType: Map Point
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 6: Trigger Tech
    DataType: TechTypeList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 7: Trigger Civic
    DataType: CivicsList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: true
    Tagged: false​
    DefnId 8: Trigger Value
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Choose City
    Description: Given a list of buildings, pick the best city to make a building. Output city and needed improvement.
    Spoiler Arguments :
    DefnId 0: Building List
    DataType: BuildingTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: City ID
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 2: Needed District
    DataType: DistrictList
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 3: District Location
    DataType: Map Point
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 4: Building Location
    DataType: Map Point
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Build Improvement
    Description: Given a worker, location, and improvement, build the improvement.
    Spoiler Arguments :
    DefnId 0: Worker List
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Goal Plot
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Improvements
    DataType: ImprovementList
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Release when done
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Move Unit
    Description: Given a unit ID and a location, give the unit a move order. Report RUNNING until it reaches destination.
    Spoiler Arguments :
    DefnId 0: Unit ID List
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Location
    DataType: Map Point
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Release when done
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Allow Danger [allow entering a tile that has a danger value > 0]
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: To Range
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Attack
    Description: As part of an operation, attack the target. [Used by AI operations that have a target that can be attacked, e.g. target enemy unit or enemy district]

    __________
    NodeType: Not
    Description: Decorator that turns SUCCESS and RUNNING to FAILURE and vice versa. Does not reverse ERROR.

    __________
    NodeType: Purchase Plot
    Description: Purchase plot for a city.
    Spoiler Arguments :
    DefnId 0: Required City
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Plot
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Contract
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Recruit Units
    Description: Recruit [Select] units for a defined operation. OPERATION USE ONLY.
    Spoiler Arguments :
    DefnId 0: Already in progress [set to true if recycling a list/contract that was already used for another Recruit Units]
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Contract ID
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Recruit Range
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Allow creation
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: Recruit Value
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Attack Units
    Description: As part of an operation, attack enemy units during a move
    Spoiler Arguments :
    DefnId 0: Attack Nearby Units
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Attack Along March
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Allow Unequal Attacks [allow attacks that would make attacker suffer more damage than they deal]
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: Always Running
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Choose Improvement
    Description: Given a list of improvement types, chooses a specific improvement to build, preferably around a city
    Spoiler Arguments :
    DefnId 0: Input Improvements
    DataType: ImprovementList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: BuilderList
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 2: Location
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 3: Output Improvement
    DataType: ImprovementList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Barbarian Raid Check
    Description: Check the score of a barbarian raid
    Spoiler Arguments :
    DefnId 0: Tribe Score
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Score
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Signal At Start
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: In Difficulty Range
    Description: Decorator that runs if owner's difficulty is within range. Optionally target difficulty, optionally fail if outside.
    Spoiler Arguments :
    DefnId 0: Low Difficulty
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: High Difficulty
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Apply to opponent
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Fail if outside
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​

    __________
    NodeType: Settle
    Description: Tells a unit to perform the settle action. FAILS if no unit is able to do so.
    Spoiler Arguments :
    DefnId 0: Settler Unit
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Check Plot
    Description: Checks if you can build the requested building or district on that location. Outputs an offending resource or feature if it fails
    Spoiler Arguments :
    DefnId 0: Plot To Check
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Building Districts
    DataType: DistrictList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Building Wonders
    DataType: BuildingTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Building Improvements
    DataType: ImprovementList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Resource Harvesting
    DataType: bool
    Required: false
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​
    DefnId 5: Builder List
    DataType: UnitTypesList
    Required: true [can be empty]
    UserData: false
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Clear Plot
    Description: Orders a unit to clear the current tile. FAILS if no unit is able to do so.
    Spoiler Arguments :
    DefnId 0: Builder List
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Release on Complete
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Plot To Clear
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Resource Harvesting
    DataType: bool
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Barbarian Recruit
    Description: Recruit members from a tribe for a raid or invasion.
    Spoiler Arguments :
    DefnId 0: Tribe
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Num Melee
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Num Ranged
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Num Siege
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Num Support
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: true
    Output: true
    Tagged: false​

    __________
    NodeType: Interval
    Description: Lets a child run for N turns before rechecking it
    Spoiler Arguments :
    DefnId 0: Turns to Run
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Defend Units
    Description: As part of an operation, protect your units that might otherwise be destroyed.
    Spoiler Arguments :
    DefnId 0: AutoProtect Percentage
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Turn Limiter
    Description: Only lets a child node run for a limited number of turns before failing.
    Spoiler Arguments :
    DefnId 0: Turns to Run
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Fail at Limit
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Limit Is Min
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Change Target
    Description: As part of an operation, if you can't take the current target, find a new one or give up.
    Spoiler Arguments :
    DefnId 0: Backup Amount
    DataType: float
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Failure Amount
    DataType: float
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Fail on Invalid Team
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Required Tag
    DataType: string
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Contract Manager Decorator
    Description: Manages a contract, can limit turns until it is run.
    Spoiler Arguments :
    DefnId 0: Contract
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Multi-Contracts
    DataType: ID List
    Required: true
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Turn Limit
    DataType: int
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Block While Running
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 4: Turns Remaining
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: true
    Tagged: false​

    __________
    NodeType: Operation Attack City
    Description: As part of an operation, attack a city
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Make Formation
    Description: Create (or destroy) a formation of units [corps, armies]
    Spoiler Arguments :
    DefnId 0: Destroy Formations
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Combat Unit
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Civilian Unit
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Support Unit
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Naval Unit
    DataType: string
    Required: true
    UserData: true
    RequiredGroup: true
    Output: true
    Tagged: false​

    __________
    NodeType: Protect Unit
    Description: Keep a non-operation unit safe if its health is below specified fraction
    Spoiler Arguments :
    DefnId 0: Unit List
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Damage Percentage
    DataType: float
    Required: true
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: City Attack
    Description: Cities attack enemy units within range, with preferences as described (none required)
    Spoiler Arguments :
    DefnId 0: Preferred Type [of unit to attack]
    DataType: string
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Reserve Plot
    Description: Reserve a city plot so that other trees will leave it alone
    Spoiler Arguments :
    DefnId 0: Plot to reserve
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: City
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Value
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Tag
    DataType: string
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Pillage
    Description: Pillage nearby improvements and districts
    Spoiler Arguments :
    DefnId 0: Pillage Districts
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Pillage Improvements
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Siege City
    Description: Pillage nearby improvements and districts [while surrounding a city]
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Garrison City
    Description: As part of an operation, garrison a unit in a friendly city
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Is City Threatened
    Description: Tell if city that is operation target is still threatened
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Is At War
    Description: Tell if player is at war
    Spoiler Arguments :
    DefnId 0: Minimum Number [of wars the player is in]
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Include Barbarian
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: With Operation Target [only count wars that contain a targetted AI operation]
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Find Unit Targets
    Description: Find places for all owned units to go
    Spoiler Arguments :
    DefnId 0: Nearest Owned City
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Needed District
    DataType: DistrictList
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Needs Buildings
    DataType: BuildingTypesList
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 3: Contract Value
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Upgrade Units
    Description: Upgrade any upgradeable units
    Spoiler Arguments :
    DefnId 0: Can Delete [units selected for upgrades]
    DataType: bool
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​


    Continued in next post...
     
    Last edited: Nov 2, 2016
  2. Delnar_Ersike

    Delnar_Ersike Chieftain

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    __________
    NodeType: Has Great Person
    Description: Succeeds if the tree has a great person of the appropriate type [selected]
    Spoiler Arguments :
    DefnId 0: Great Person Type
    DataType: string
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Use Great Person
    Description: Uses the great person ability, including founding a religion
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: string
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Cancel Contract
    Description: Cancel a tagged contract [set up through the Decorator]
    Spoiler Arguments :
    DefnId 0: Contract
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Lock Units
    Description: Allow/disallow units to be recruited off the team [i.e. away from a given AI operation]
    Spoiler Arguments :
    DefnId 0: Lock Units
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Signal Readiness
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Operation Diplomacy
    Description: Diplomacy actions and tests
    Spoiler Arguments :
    DefnId 0: Desires Denouncement
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Had Denounced
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Desires War
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 3: Is At War
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 4: Present Value
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 5: Contract
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: SPY: Choose Mission
    Description: Choose a spy mission for the spy's current city
    Spoiler Arguments :
    DefnId 0: Operation
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Minimum Odds
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: SPY: Do Operation
    Description: Execute the spy's current mission
    Spoiler Arguments :
    DefnId 0: Operation
    DataType: int
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Allow Gain Sources
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 2: Minimum Odds
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: SPY: Travel
    Description: Move the spy to the chosen city (or home)
    Spoiler Arguments :
    DefnId 0: Destination
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 1: Go Home
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​

    __________
    NodeType: ARCHAEOLOGY: Dig
    Description: Have an archaeologist dig at the specified location
    Spoiler Arguments :
    DefnId 0: Relic Point
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: ARCHAEOLOGY: Donate
    Description: An archaeologist moves to his home and donates any carried artifact to his museum

    __________
    NodeType: Operation Naval Escort
    Description: Recruit naval escorts to an operation and ferry units across the waters
    Spoiler Arguments :
    DefnId 0: Move Point enum
    DataType: int
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Has Player Ability
    Description: Decorator that checks for player ability before handing control to child
    Spoiler Arguments :
    DefnId 0: Fail if none
    DataType: bool
    Required: false
    UserData: true
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Builders make wonders
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​
    DefnId 2: Builders make districts
    DataType: bool
    Required: true
    UserData: true
    RequiredGroup: true
    Output: false
    Tagged: false​

    __________
    NodeType: Build Production
    Description: Use a builder charge to accelerate a wonder or district (if allowed)
    Spoiler Arguments :
    DefnId 0: Location
    DataType: Map Point
    Required: true
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​
    DefnId 1: Release When Done
    DataType: bool
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Has Inquisition
    Description: Returns true if the specified player has launched an inquisition
    Spoiler Arguments :
    DefnId 0: Unused
    DataType: int
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Launch Inquisition
    Description: Launches an inquisition using an attached unit, if possible
    Spoiler Arguments :
    DefnId 0: Apostle
    DataType: ID List
    Required: false
    UserData: false
    RequiredGroup: false
    Output: false
    Tagged: false​

    __________
    NodeType: Will use nukes
    Description: Checks if the AI is willing to use nukes against his opponent (Gandhi always will)

    __________
    NodeType: Operation Launch nuke
    Description: Launch nuke at target

    __________
     
  3. Delnar_Ersike

    Delnar_Ersike Chieftain

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    <Reserved in case Firaxis adds more stuff>
     
  4. Shifted

    Shifted Chieftain

    Joined:
    Apr 11, 2016
    Messages:
    10
    Thanks for the references. I've had some experience with coding behavior trees and other AI techniques for games before, and was wondering how one would go about modding the game's AI. If I'm not mistaken, your post seems to imply you can make your own behavior trees combining these predefined behaviors by specifying the tree on the database? I was also wondering if you would know if there's a way to mod the game's AI at the code level, with the full liberty given by (what I assume the game uses) C++? Would I need to wait for the SDK for that?
     
  5. Delnar_Ersike

    Delnar_Ersike Chieftain

    Joined:
    Jan 1, 2007
    Messages:
    497
    Location:
    localhost
    You need to wait for Firaxis to decide to release CvGameCoreDLL's source code. Firaxis released Civ5's SDK a week after release and Civ5's CvGameCoreDLL a year and a half after release. It has been more than a week since Civ6's release, and there's no SDK in sight, so I wouldn't be holding out too much hope for Civ6 AI modding.
     
  6. Shifted

    Shifted Chieftain

    Joined:
    Apr 11, 2016
    Messages:
    10
    Ahh, that's pretty sad. Thanks though!
     
  7. notque

    notque Artificially Intelligent

    Joined:
    Nov 13, 2005
    Messages:
    1,654
  8. Tiramisu

    Tiramisu Chieftain

    Joined:
    Aug 16, 2013
    Messages:
    129
    Location:
    Leonberg (BW, Germany)
    Thanks for the guides, but I still do not understand how the nodes are connected with each other. Per BehaviorTreeNodes-Row there is at most only one "JumpTo" entry, which could define a connection from one node to another. However, I would have expected that a node could have more than one child. I simply cannot see how the trees are defined.

    Edit: Maybe "JumpTo" has a different meaning. It could define some kind of bracket in the syntax, meaning that the bracket ends at the node of "JumpTo" (taking the numeration order of the nodes into account), while the node in the row of "JumpTo" is a parent node. So all the nodes within the bracket of the parent node are its children nodes.
    This makes sense to me right now, but I have to take a close look to verify it.

    Edit2: Some node datas in Delnar's posts might be missing. E.g. I cannot find "Operation Air Assault". Just saying. ;)
     
    Last edited: Nov 17, 2017

Share This Page

Ebates: Get Paid to Shop