Skip to content

Feature Request: Make ship AI a separate equippable item for NPCs #727

@Du4lity5151

Description

@Du4lity5151

Why?

Currently, the game's AI is fixed functionality that acts the same regardless of the ship. While in many cases this is fine, allowing it to be a separate equippable item (e.g. core\assets\items\ai\imperialAI\imperialAI.json) with parameters that define it's accuracy, firing frequency, preferred distance from player, etc. can open possibilities for adjustable difficulty levels, as well as unique ship behavior characteristics from different ships, especially within the context of factions having ships whose AI behaves distinctly from other factions.

How?

Make moduleName\assets\items\ai\nameAI\nameAI.json a valid example, whose config file may look something like this, but may include more parameters for more detailed behavior definition:

{ "fixedGunAccuracy": 0.5, "firingFrequency": 0.7, "preferredDistanceFromPlayer": 100 }

Where:

  • fixedGunAccuracy refers to a value between 0 and 1 that determines the percentage of it's aiming accuracy with fixed guns
  • firingFrequency refers to a value between 0 and 1 that determines the percentage of how willingly it will fire, 1 being always, whenever it is aimed at the player
  • preferredDistanceFromPlayer refers to how much of a unit measurement of distance in which it will try to achieve before firing at the player

Equipping on NPC
It should not be an item the player can pick up or buy, but can be equipped on an NPC within a config file such as systemsConfig.json. Example:
{ "hull": "core:imperialBig", "items": "core:fixedGun core:fixedShotGun core:mediumArmor+core:heavyArmor core:shield+core:bigShield core:imperialAI", "density": 3 }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions