-
Notifications
You must be signed in to change notification settings - Fork 126
Description
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:
fixedGunAccuracyrefers to a value between 0 and 1 that determines the percentage of it's aiming accuracy with fixed gunsfiringFrequencyrefers 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 playerpreferredDistanceFromPlayerrefers 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 }