ello,
I have been investigating mod options for adding additional quests to the bar. As a basic start, I wanted to play around with the mission frequency of the CheapCommidityMission. I attempted the following changes:
bar_events.csv - changing 'freq' to 9999 and 99999999999 for cheapCom entry -- no change in quest frequency
bar_events.csv - adding 'priority' tag to cheapCom entry -- no change in frequency
bar_events.csv - duplicating cheapCom entry to add cheapCom2-cheapCom30 entries -- no change in frequency
person_missions.csv - adding cheapCom2-cheapCom30 entries duplicated off original cheapCom -- no change in frequency
rules.csv - duplicating table entries for cheapCom, changing 'id' column names to cheapCom2-30 -- no change in frequency
All changes were tested by starting a new game and visiting at least 15 stations. Usually I only found 1 quest of the cheapCom variety.
Am I missing something, or is the logic for quest frequency expanded somewhere else?
Offhand, that seems like it should work, but it's possible that there simply isn't a "cheap commodity" mission available at that particular colony - iirc it requires a local surplus of a legal commodity. I'd try changing the frequency on some of the other missions to see if it works for those.
Is there anything similar to ShipAPI.isDefenseDisabled() but for Ship Systems?
I notice there is something for ShipAPI.setShipSystemDisabled(boolean), and I'm just curious if the AI script I'm coding should be running if for some reason the ship has its ship systems disabled.
No and no. The system would be disabled if the ship's CR is 0%, btw, but then it wouldn't work at all regardless of if the AI tried to use it.
Also, is there a getControlStringForEnumName for something like Hold Fire.. I can't seem to find any mentions of this enum anywhere...
Should be SHIP_HOLD_FIRE I believe.
Is there something i'm missing to get the maximum number of elite skills the players officers can have?
MutableCharacterStatsAPI playerStats = Global.getSector().getPlayerFleet().getFleetData().getCommander().getStats();
int maxElite = (int)Global.getSettings().getInt("officerMaxEliteSkills") + (int)playerStats.getDynamic().getValue(Stats.OFFICER_MAX_ELITE_SKILLS_MOD);
Doing this returns two, but the character has Cybernetic Augmentation + Officer Training, so it should be 4..
You want:
(int) stats.getDynamic().getMod(Stats.OFFICER_MAX_ELITE_SKILLS_MOD).computeEffective(0);
To get the bonus from skills, instead of getValue().