[Starsector Mods][0.9.1a] AI Flag Tool 0.3.2

  • Post category:Mods
  • Post comments:0 Comments

AI Flag Tool 0.3.2

Download
Required mods:


This is a utility directed at modders who want visibility into AI flags, primarily for writing ship system AIs. It shows the following information for a focused ship (defaults to the player ship, only useful when it is on autopilot):

  • Displays a red diamond on the maneuver target.
  • Displays a blue diamond on the ship target.
  • Displays a green diamond on the mouse position.
  • Displays all active AI flags and their custom data (if any) on the right side of the screen.
  • When flags are set/unset, displays them as floating text above the ship (in green/red text, respectively).

The display can be toggled with alt-f; ctrl-f shifts focus to the player ship’s current target, and displays its last 8 target/flag changes. These shortcuts are customizable in ai_flag_tool_settings.json (which is mergable; you can put a copy in a personal mod to protect it from updates).

This also includes a console command OverrideFlag, which allows forcing an AI flag to see how it affects ship behavior–see the help in console for details. (I will caution not to count on this behavior being the same as when the AI turns on the flag itself, since many flags seem to be partly or entirely descriptive.)


This is a really neat idea; thanks for putting it together!

Oooh! This is fantastic!

Updated to 0.2.0; the main features are the ability to toggle display (alt-f) or shift focus to the player ship’s target (ctrl-f)–this also displays that ship’s last eight target/flag changes, so that if you see an AI ship do something odd you can shift focus and hopefully better understand what it was thinking at the time.

Updated to 0.3.0:
– ai_flag_tool_settings.json is now mergeable, so you can put overrides in a personal mod to prevent them from being overwritten by updates.
– Made the keyboard shortcuts configurable in settings. Let me know if the documentation of the syntax is unclear.
– Moved display of active flags from the ship status pain to the right hand of the screen (thanks to LazyWizard for making this so easy!).
– Added time since last change for flags. (No time displayed means the flag was active when the ship was focused or its AI enabled.) – Added the console command OverrideFlag, which sets the specified flag either once or every frame. See the help in the console for details.

Updated to 0.3.2: now respects combat UI visibility.

so, i started all of sudden getting this error

Spoiler: click to expand
Spoiler
226425 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  – java.lang.NoClassDefFoundError: Could not initialize class com.github.isturdy.aiflagtool.AiFlagTool
java.lang.NoClassDefFoundError: Could not initialize class com.github.isturdy.aiflagtool.AiFlagTool
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Ó00000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Spoiler: click to expand
Spoiler
it’s interesting as there is no ‘hint’ why as the mod was working fine until recently

note: narrowed the problem to recently updated mod : [0.9.1a] Kiith Nabaal Shipyard 1.2 – Vaygr Destroyer
here is the post with different crash

fixed


This mod does work in version 0.95 if you change mod_info.json to fit the current version, in case anyone was curious.

Leave a Reply