Spoiler
V0.7.6:
updated to starsector 0.98
probably not save compatible. they did... something to the salvage plugin. hopefully this is working right.
V0.7.5:
save compatible with v0.6.2+
fixed some broken raid quest things. hopefully.
thank you Histidine for both pinging me and fixing this issue basically on there own somehow i dont know
V0.7.4:
save compatible with v0.6.2+
new rule.csv tools:
CrewReplacer_ApplyLossesWithoutDisplay
CrewReplacer_CheckCrewRequirements
CrewReplacer_ApplyAndDisplayLosses
changes:
changed the 'steal a starship' and 'repair hyper tap' jobs to use the new rules.CSV file tools.
V0.7.3:
save compatible with v0.6.2+
crewReplacer_Job:
new functions:
protected static void moveCrewData(crewReplacer_Crew newCrew,crewReplacer_Crew oldCrew)
-this function is built to handle moving crew data from one crew to another. usefull when transforming crew classes
protected static crewReplacer_Crew createBlankCrew()
-this function creates a single 'CrewReplacer_BlankCrew', and returns it. useful when creating crew
public void transformBlankCrew();
-this function transforms all 'blank crew' in a job to the jobs 'default crew'.
changes:
changed 'applyCrewSets()' to no longer change any instance of blank crew to a jobs default crew
changed 'organizePriority' to run 'transformBlankCrew'.
changed all times were one could create a new crew in 'crewReplacer_Job' to instead create a blank crew
the reason behind this change is that do to crew replaces nature, its possible to add a crew to a job before a mod might 'change' the default crew of said job.
by making all crew added 'blank', then making the 'blank' crew become the jobs 'default' crew on the organize priority stage, this fixes that, as all jobs should be set by this time.
V0.7.2:
save compatible with v0.6.2+
changed crewReplacer_Job.automaticlyGetDisplayAndApplyCrewLost() to run 'displayCrewLost' after 'applyCrewLost'
altered the 'CrewReplacer_CrewType_marine' class a little to respect this change.
changed the name of the following classes:
'CrewReplacer_CrewType_marine' to 'CrewReplacer_PrivateCrewType_marine'
'CrewReplacer_CrewType_crew' to 'CrewReplacer_PrivateCrewType_crew'
-this is to make it more obvious that said classes are not for other moders to use.
crewReplacer_Job:
added a new function: public crewReplacer_Crew createDefaultCrew()
-this function simply creates a new crew. this is for overriding on certain jobs that might want the 'default' crew to be a custom crew, for whatever reason.
(partly tested) changed 'applyCrewSets()' to replace any crew that is an instance of 'CrewReplacer_BlankCrew' with this jobs own default crew
-this means, that any crew added to a crew set that is not specified as a certain type of crew, will be replaced by a crew belonging to this jobs default crew class. stats will stay the same though.
crewReplacer_CrewSet:
added a new function: public crewReplacer_Crew createDefaultCrew()
-this function simply creates a new crew. this is for overriding on certain crewSets that might want the 'default' crew to be a custom crew, for whatever reason.
-in addition, this function returns the new 'CrewReplacer_BlankCrew' class. a class designed to be overwritten by all other crewReplacer crew classes, when it enters a job.
normadic survival compatibility:
fixed 'CrewReplacer_normadicSurvival_crew' so it no longer causes crashes
fixed nomadic survival not giving crew extra data like its suppose to (only what commodity the job is acting as for now)
changed the 'default crew' in all nomadic survival jobs to 'CrewReplacer_normadicSurvival_crew'
V0.7.1:
save compatible with v0.6.2+
fixed supply's not being consumed by surveying (thanks to the person who reported this
V0.7:
save compatible with v0.6.2+
added the following classes and variables:
crewReplacer_Job:
public float loadPriority;
public ArrayList<CrewReplacer_BlackListCrew> blackListCrews = new ArrayList<>();
public boolean addBlackListCrew(String crew,float loadPriority)
public CrewReplacer_BlackListCrew getBlackListCrewIfExists(String crew)
public boolean removeBlackListCrew(String crew)
protected boolean addBlackListCrew(CrewReplacer_BlackListCrew EC)
crewReplacer_CrewSet:
public ArrayList<CrewReplacer_BlackListCrew> blackListCrews = new ArrayList<>();
public boolean addBlackListCrew(String crew,float loadPriority)
public CrewReplacer_BlackListCrew getBlackListCrewIfExists(String crew)
public boolean removeBlackListCrew(String crew)
protected boolean addBlackListCrew(CrewReplacer_BlackListCrew EC)
public crewReplacer_CrewSet getAllLinkedCrewsSets()
getAllLinkedCrewsSets(int maxDepthForGathering)
crewReplacer_Main:
static public boolean addOrMergeJob(crewReplacer_Job job, float loadPriority)
changes:
crewReplacer_Job.addNewCrew now runs addCrew.
made crewReplacer_Job.addCrew and crewReplacer_CrewSet.addCrew respect blacklist.
removed:
crewReplacer_Job:
mergeCrew
crewReplacer_CrewSet:
mergeCrew
fixes:
made crewReplacer_Job.applyCrewSets() get all the inherent crew sets form its crew sets like it was suppose to.
added some crash protection onto some variable bits of code that related to getting strings.
readme:
updated the readme with info on the blacklist system, and on the crewSet system
mod compatibility:
added some random mod compatibility for forge production. crew replacer now supports its mothership quest
V0.6.10:
save compatible with v0.6.2+
fixes:
fixed a issue were 'metals' might have been a valid commodity for founding a colonly provided market retrofits was not installed. sorry
V0.6.9:
save compatible with v0.6.2+
fixes:
fixed spam in the starsector logs every time crew replacer did anything (sorry)
fixed logs failing to name there crewReplacer_Job and crewReplacer_Crew. as well as some other things probably.
V0.6.8:
save compatible with v0.6.2+
fixed broken combatability and crashes with Perilous Expanse
V0.6.7:
save compatible with v0.6.2+
updated to the latest starsector version
fixed some a broken button from the last alpha release.
V0.6.6: (the never released alpha)
save compatible with v0.6.2+
changes:
updated the following plugins to (hopefully) be easyer to keep up to date.
please note: this might cause unknown issues. i did all i can to keep things stable, but crew replacer might have some growing pains for a bit.
-survey Plugin.
-salvage plugin
updated the strings from (hopefully) every none log instance in the game to be in the config, so i can change them and spellcheck them because i suck
-also did this for some of the logs. mainly, the crewReplacer_Job logs, and the crewReplacer_CrewSet logs.
fixed:
fixed a possible issue were it might have been possible to remove items from players inventory because it was thought that you colonized somewhere.
V0.6.5:
save compatible with v0.6.2+
new:
(hopefully) added working version checker support
added colonization suooprt. you can now add new commodities that will be used in place of crew, supplies, and heavy machinery when colonizing.
-NOTE: this will not work when using market retrofits until i patch it. hopefully i can do that soon.
fixes:
fixed the issue of items: apearing on top of each other, not being were they look like, and grabbing items that were not the ones you meant to pick up.
it was me. 100%. sorry guys. I had no clue it was me, but some in depth investigation proved it 100%. and thank you so very mush to the person who suggested the CargoScreenListener. it was something i desperately needed.
PS: this does create a slight issue were survey data apears at the 4th empty sloot, (and likely some other items at random. anything you didnt put there by opening your cargo basicly. but only if you looked at a not surveyed world after you last opened your cargo bay, and -then- had items inputted. no clue how to fix this send help.), but that is nothing compared to the beep bop beep that was happing before.
maybe fixed a issue were sometimes surveying would use 2x the supply? i hope that was not a thing though.
changes:
disabled the endless spam of 'preparing to removing items for survey....(from crew replacer.)' in the logs. now off by default.
crewReplacer_Job:
addCrew(crewReplacer_Crew crew) now compleatly replaces the old crew. instead of whatever it was doing before.
(NOTE: other instances of addCrew still use merge crew when 2 of the same crew show up, maintaining whatever strange class they might have.)
added a 'loadPriority' variable to most add instances of addCrew
added a new addCrew that has a default 'loadPriority' of zero.
crewReplacer_Crew:
added the 'public float crewLoadPriority = 0;' variable.
-crew will only replace other crew in a job provided there load priority is >= to the old crew.
reasoning:
the reason i added the 'crewLoadPrioirity' system is because before if a user wanted to override someone elses crew,
they would have to load there mod after that persons, and that... did not seem right. at all.
hopefully this help avoid some headache
V0.6.4.1:
save compatible with v0.6.2+
fixes:
refactored the name of one, and only one, file in the inter code.
V0.6.4:
save compatible with v0.6.2+
fixes:
fixed the survey plugging only being able to reduce the amount of crews visable, and not provide you with the amount of crew you have available.
finaly.
i wanted to do this since i created this mod. i win
v0.6.3:
save compatible with v0.6.2+
mod compatibility:
added compatibility with 'nomadic survival'. tested and found no bugs. enjoy.
documentation:
added the missing documentation from the last update.
settings:
added a setting to activate nomadic survival logs.
v0.6.2:
updated to 0.96a
mod compatibility:
still not done
fixes:
fixed a missing log in crewReplacer_Job.getCrewDisplayNames(CargoAPI)
new functions: (NOTE add this to documentation).
crewReplacer_crew:
getCargoSpaceUse(CargoAPI cargo,float amountOfCrew)
getCargoSpaceUse(CargoAPI cargo)
getCargoSpacePerItem(CargoAPI cargo)
getFuelSpacePerItem(CargoAPI cargo)
getFuelSpaceUse(CargoAPI cargo,float amountOfCrew)
getFuelSpaceUse(CargoAPI cargo)
getCrewSpacePerItem(CargoAPI cargo)
getCrewSpaceUse(CargoAPI cargo,float amountOfCrew)
getCrewSpaceUse(CargoAPI cargo)
crewReplacer_job:
getCargoSpaceUsed(CargoAPI cargo,String cargoType)
getCargoSpaceRange(CargoAPI cargo,float power,boolean includeDefence,String cargoType)
background:
added a better way to organize arrays. that's untested, because i needed to update this....
v0.6.1:
save compatible with V0.5+
IMPORTANT:
if you downloaded the V0.6 that was available, download this instead. at least if you use normadic suvival. i thought it worked but i found GAME BREAKING bug sorry 5 mins after i posted sorry =(
v0.6:
save compatible with V0.5+
mod combatability:
now fully compatible with normadicSurvival. feel free to mod in new crews for the -many- jobs available.
changes:
disabled most console logs be default
new:
added a bunch of new crew sets for all already created jobs. will improve on that latter.
new functions:
crewReplacer_Job:
boolean hasCrew(String crew)
boolean addCrewSet(String jobSet)
boolean removeCrewSet(String jobSet)
void applyCrewSets()
crewReplacer_Main:
crewReplacer_crewSet getCrewSet(String crewSet)
boolean removeCrewSet(String crewSet)
boolean addOrMergeCrewSet(crewReplacer_crewSet crewSet)
new classes:
crewReplacer_crewSet.
-a 'crew set' represents a set of crews, that are all replaceing the same commodity in the base game.
example: the commodity 'crew' is used in salvaging, surveying, and repairing hyper realys.
adding a Crew to the crew set 'crew' would add that Crew to all jobs that replaced the commodity 'crew'.
fixes:
fixed a bug that might have been letting 'crew' steel starships? opps?
v0.5.1:
save compatible with V0.5+
documentation:
finished the main part of the documentation for now.
fixes:
fixed crew defence not being set right on initialization.
v0.5:
should be save compatible with V0.4+.
background work:
raids and marines:
raid plugin things. see fixes
started to do battle with the survey code. its making ghost sounds at me.
fixes:
made it so crewReplacer_Job.displayCrewAvailable() does not display crew available if you have none of said type of crew.
made it so marine XP only effects marines.
changed the way marines are removed again. hopefully it works this time.
made it so raids can comprehend the fact that you did not deploy every force you had
enabled 'marketHostileRaidConfirmContSel', 'marketHostileRaidResultSel' in my rules.csv maybe fixing a crash on raid non market
-NOTE: its possable this fix failed. if someone notices the game giving a null point exception when you raid objectives somehow, plz tell meplz tell me.
new:
added 6 new function to crewReplacer_Job:
applyExtraDataToCrew();
applyExtraDataToCrew(Object newData);
applyExtraDataToCrewAndJob(Object newData);
resetExtraDataToCrews();
resetExtraDataToCrewsAndJob();
public boolean addNewCrew(String crew,float crewPower,float crewDefence,float crewPriority)
added 5 new function to crewReplacer_Crew:
resetExtraData();
setExtraData(Object newData);
displayCrewAvailable(CargoAPI cargo, float numberOfItems, TextPanelAPI text)
displayCrewLost(CargoAPI cargo, float numberOfItems, TextPanelAPI text)
public float getCrewDefence(CargoAPI cargo)
added a new variable to both crewReplacer_Crew and crewReplacer_Job:
public Object ExtraData;
added a new variable to crewReplacer_Crew:
public float crewDefence = 1;
explanation:
sometimes, one wants to send / process some random data to crews or jobs. this was hard before, but now its simple.
this is currently used in the raid plugin for marines to get XP. will be explained farther when i update the documentation
explanation 2:
displayCrewNumbers was a effective way to display crew, but it needed to be split into two for modability sake. something i forgot to do earlier.
explanation 3:
i find myself wanting to have differences between crew ability to do a job, and how many losses they receive and the weight of said losses. this is the best way i think.
changes:
marine in raiding:
made it so the marine displays its XP and related bonuses on it, instead of on the inter ground combat force.
file names:
changed the 'crew' and 'marine' files to 'CrewReplacer_CrewType_crew' and 'CrewReplacer_CrewType_marine' resepctively
job data handling:
made it so crew use there defence when handling crew losses, not there power. should be no difference so long as power and defence are the same
other:
made 'static ArrayList<crewReplacer_Job> Jobs' in 'crewReplacer_Main' 'private'
v0.4.3:
save compatible with V0.4+
fixes:
fixed a missing crewReplacerRefrence on line 1139 in CrewReplacerMarketCMD.getMarineLossesStat(List<GroundRaidObjectivePlugin> data), that was getting marrines instead of crew
changes:
changed how marines are removed from a fleet. should change nothing.
changed two lines of dialog in the raid plugin, to hopefully avoid confusion between ground troops and ground support ability.
changed the following functions:
crewReplacer_Crew:
DisplayedCrewNumbers(float,TextPanelAPI) -> DisplayedCrewNumbers(CargoAPI,float,TextPanelAPI)
getDisplayName() -> getDisplayName(CargoAPI)
getCrewIcon() -> getCrewIcon(CargoAPI)
getCrewPower() -> getCrewPower(CargoAPI)
crewReplacer_Job:
getCrewLost(ArrayList<Float>,float) -> getCrewLost(CargoAPI,ArrayList<Float>, float)
getCrewDisplayNames() -> getCrewDisplayNames(CargoAPI cargo)
displayCrewLost(ArrayList<Float>, TextPanelAPI) -> displayCrewLost(CargoAPI,ArrayList<Float>, TextPanelAPI)
reasoning:
it was difficult before to have more dynamic custom stats and names for crew.
routing cargo through everything in crewReplacer_Crew (and by requirements, some things in crewReplacer_Job),
a user will be able to get anything from fleet to faction to other things in cargo, allowing more interesting crew options.
NOTICE: anybody that uses any of the changed functions should look into updating there code, as it is now outdated. sorry.
more prep work on the raiding plugin. its confusing.
v0.4.2:
save compatible with V0.4+
fixes:
fixed a bug that caused the player to lose 2X the marines from rading.
changes:
changed the name of CrewReplacerLog to CrewReplacer_Log to match the rest of my code.
the following functions were added. they are now considered the primary form of said functions
crewReplacer_Job:
getAvailableCrewPower(CargoAPI cargo)
getAvailableCrew(CargoAPI cargo)
automaticlyGetDisplayAndApplyCrewLost(CargoAPI cargo,int crewPowerRequired, float crew_power_to_lose,TextPanelAPI text)
automaticlyGetAndApplyCrewLost(CargoAPI cargo, int crewPowerRequired, float crew_power_to_lose)
applyCrewLost(ArrayList<Float> crewLost,CargoAPI cargo)
getCrewForJob(CargoAPI cargo, float crewPowerRequired)
displayCrewAvailable(CargoAPI cargo,TextPanelAPI text)
crewReplacer_Crew: the following function were added
removeCrew(CargoAPI cargo,float CrewToLost)
getCrewInFleet(CampaignFleetAPI fleet)
getCrewPowerInFleet(CampaignFleetAPI fleet)
the reason said functions were added, is because i realized that making a moder input a fleet just to get cargo is a pointless.
the old functions (that are the same, just they get CampaignFleetAPI instead of CargoAPI) will remain. they will simply run the new functions from them, so no change to your code is required, unless you are overwriting parts of a crewReplacer_Job, or a crewReplacer_Crew
prep work:
started to prepare my code for a rework of large parts of the raid plugging, to fix many issues
started to prepare my code for more improvements and customization to crewReplacer_Job and crewReplacer_Crew
v0.4.1
save compatible with V0.4+
polish
-made the 'repair Coronal Hyper Shunt' jobs display respect crew replacer.
improvements
-added a way to use Starsector's fancy display rules thing with crew replacer jobs. its called CrewReplacer_showResCost.
crewReplacer crew:
added 3 more functions:
-getDisplayName()
-getCrewIcon()
for use when you want to have a crew that is not a commodity, and dont want to rebuild the inter display to do it,
you can now simply override both functions, and everything will work
-getCrewPower()
a better way to set a non static power for your crew.
crewReplacer Job:
added 1 more function:
getCrewDisplayNames()
(the old getCrewNames) gets the crew name stats (that double as a ID). not the display name
debugging:
added a option to display logs of everything crew replacer is doing, for debugging. turn it on/off in the config file.
error handling:
added a bunch of error handling. it will output tot he log when a issue is detected, and help prevent crashes.
V0.4
-new jobs:
task: steal a starship mission
job name: replaces
Mission_hijack_marines: marines
task: repair Coronal HyperShunt
job name: replaces
CoronalHyperShunt_repair_Metals: metals
CoronalHyperShunt_repair_RareMetals: rare_metals
CoronalHyperShunt_repair_Crew: crew
-issues:
steal a starship mission has no feedback on what crews can do a mission. will be fixed later
repair Coronal HyperShunt's fancy looking display that shows what is available/required dose not respect crew replacer yet. will be fixed in a week or so
V0.3.4
-fixes:
fixed supplyDemandChange crashing the game because of bad code when supply change was ran.
-this is no longer functional. my update broke everything about this. expect this to be moved into an diffrent project when it is fixed.
v0.3.3
made crewReplace_Job.organizePrioirty(); public (thanks for the bug reports)
made marines in the job "raiding_marines" correctly have the right crew priority.
V0.3.2
(thanks Histidine, the person who added this change) improved display of crew lost with little pictures of items and colored numbers. it looks like the rest of the game now =)
v0.3.1
fixed an indexing bug that caused issues that i missed
v0.3
updated crewReplacer_Job
-fixed an bug were crewReplacer_Job could not select crew randomly when they were the same priority.
-optimized some random things.
-made it so when displaying crew, it displays an integer, and not an float.
crewReplacer_Crew
-i forgot to keep track of what i did, but i think i added an function or three to this. or maybe not. please don't judge me.
added an new thing called supply demand class
-this is nothing specials, that's to say, you could do this on your own without crew replacer, but it fits here well, and its not big enough for its own project.
-supply demand class is an collection of functions and data that makes it a little easier to edit an industry's supply and demand without having to override said industry. it might be moved to its own project someday, but for now its going to sit here, as something useful, but not really needed that mush.
v0.2
updates crewReplacer_Crew.DisplayedCrewNumbers
-added the starsector function "getAOrAnFor()" to the default display (thanks anonymous user.)
-made the code properly display commodity name, as apposed to its ID.
v0.1:
release