I just want a button in the ability bar for an action that is instantaneous, i.e. no cooldown, the player clicks on it and it displays some message.
But I can't manage to make it work. I can't even get a copy of an existing ability to work.
mod_info.json{
"id": "mod-examples",
"name": "Mod Examples",
"author": "hqz",
"version": "1",
"description": "Examples",
"gameVersion": "0.7a",
"jars": [],
}
data/campaign/abilities.json{
"example_ability":{
"plugin":"com.fs.starfarer.api.impl.campaign.abilities.SensorBurstAbility",
"unlockedAtStart":true,
"defaultForAIFleet":false,
"sortOrder":500,
"musicSuppression":0,
"uiOn":"ui_sensor_burst_on",
"worldOn":"world_sensor_burst_on",
},
}
Note: these are the 2 only files in the mod. I'm trying to keep it simple so that I'm sure it's not some side effect from something else messing with my ability.
If I make a deliberate error in the ability definition (e.g. wrong class name), the game crashes, which means it somehow registers that an ability is defined. But it never shows up in the ability bar in game.
I've read the code from other mods and I don't see what I'm doing differently.
e.g.
ExerelinCore/exerelin/campaign/abilities/FollowMeAbility.javaWhat am I missing here?