Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2 3 4

Author Topic: [0.97a] Crew Replacer  (Read 100432 times)

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
[0.97a] Crew Replacer
« on: March 10, 2022, 02:23:00 PM »

Crew Replacer v0.7
an modders utility library thing.
have you ever wanted to create a mod, were you had 'mega salvage rigs' to perform salvage jobs instead of 'crew'? have you every wanted to stop using 'marine's' and start using 'heavy titan walkers' when raiding a world? have you ever wanted to do away with 'heavy machinery' when salvaging, and instead use your newly modded in 'salvage equipment'? maybe you wanted to create a task in one for your mods, were other modders could set things to be consumed in said task but thought 'why bother'? maybe you wanted to have an diverse ground army when attacking an world? but could never find a way to mod that into the game easily and quickly?
well now you can. with CREW REPLACER!

what is Crew Replacer?
Crew Replacer is a mod library built with one goal in mind: to make it easy and quick to mod in new items to be used in jobs. crew replacer lets multiple modders modify the same tasks, by adding a system that lets a modder add an 'crew'(really any type of commodity) to an 'job'. were said 'job's replace all the instances of crew i could find in code.

but what dose that mean? it means that modders now have a system to to change what is used/required when the one tries to 'salvage' or 'survey' or 'raid'. it also means that modders have a system to add new jobs into the game, then let other modders change what is used/required in said task.

still dont understand? feel free to ask me questions. and i will do my best to explain.

Compatibility:
Spoiler
not compatible with anything that changes:
Spoiler
plugins:
   SurveyPluginImpl
rules.csv:
   sal_showRatingAndCost
   sal_optionCheckAccidents
   sal_salvageOptionSelected
   sal_scavengeDebris
   sal_forceRecoveryOptSel
   sal_demolishOptionConfirmed

   marketHostileRaidSel
   marketHostileRaidNonMarket
   marketHostileRaidValuableSel
   marketHostileRaidDisruptSel
   marketHostileRaidConfirmSel
[close]
known incompatible mods and there patches (if they have one)
Spoiler
[close]
[close]
Download

how to use the mod (for modders.)
look at the documentation https://github.com/Alaricdragon/Crew_Replacer/tree/master/jars/src/desing/documentationurl
available 'basic' Jobs in the this mod:
(note: an Task is not a Job. only an Job is an Jobs)
Job ID's are in quotes. example: Job:"this is an job ID"
Spoiler
Note: quests have not had there requirements modified because I don't want spoilers when I do them. feel free to make your own add-ons that change quest items.

Task:survey(done)
Spoiler
-there is a possibility of a issue in wish the code calls on getXP from the survey pluggin, then you loss some supplys. but hopefully i succeeded in minimizing that possibility hopefully
Job:"survey_crew"(done)
Job:"survey_supply"(done)
 -crew added to the supply_job are not consumed when they should be.
 -the only way i can make then consumed, is if i make it happen every time someone mouses over a planet. and thats a no go for me thanks
 -this dose not effect normal supply.
Job:"survey_heavy_machinery"(done)
[close]
Task:salvage(done/tested)
Spoiler
-DONE in theory. might have a bug or 50, but i simply don't know for sure. i think its working though
Job:"salvage_crew"(done)
Job:"salvage_heavyMachinery"(done)
[close]
Task:raiding(done/tested)
Spoiler
-DONE in theory.
Job:"raiding_marines"(done)
[close]
task: steal a starship mission (done/tested)
Spoiler
functional
job:"Mission_hijack_marines"(done)
[close]
task: repair Coronal HyperShunt (functional/display not yet working)
Spoiler
Almost done, it works, but the display is not respecting me
job:"CoronalHyperShunt_repair_Metals"(done)
job:"CoronalHyperShunt_repair_RareMetals"(done)
job:"CoronalHyperShunt_repair_Crew"(done)
[close]
[close]
for adding crew (basic):
Spoiler
how to get crewReplacer_Job:
Spoiler
crewReplacer_Main.getJob(String job)
   returns: an crewReplacer_Job with the same name. or creates one if none exists.
   job: is an ID that you wish for this job to have. most be no other jobs with this ID.
[close]
how to add a 'crew' to a 'job':
Spoiler
crewReplacer_Job.addNewCrew(String crew,float crewPower,float crewDefence,float crewPriority);
crew:
   is the ID of the commodity that you want to add to this job.
   there can only be one instance of an name in each job. make sure its something distentct.
crewPower:
  is the multiplier to the number of 'crew' already in the fleet. so if you have 10 of this item with a crew power of 2, the game will treat it as though there are 20 of this 'crew' in this fleet.
  default value is 1.
crewDefence:
  is the multiplier to the amount of defense per crew in fleet. so if you were set to lose 10 of this crew, and your crew had 2 crew power, you would only loess 5 crew instead (10 / 2)
  default value is 1.
crewPriority:
  is the order in wish the 'crew' will be used in a job. smaller numbers go first in a job.
  default value is 10.

you can also run:
crewReplacer_Job.addCrew(crewReplacer_Crew crew);
however, you must set crew.name first.
this method is only recommended if you plan on creating your own crewReplacer_Crew class.

crewReplacer_Job.organizePriority();
you MUST run this code after doing adding/changing any crew in a crewReplacer_Job. things WILL GO BAD otherwize.

[close]
[close]
for adding/running jobs (basic):
Spoiler
how to create a new job:
Spoiler
crewReplacer_Main.getJob(String job)
   returns: an crewReplacer_Job with the same name. or creates one if none exists.
   job: is an ID that you wish for this job to have. most be no other jobs with this ID.

crewReplacer_Main.addOrMergeJob(crewReplacer_Job job);
   you can also run this command. however, this is for people who want to create there own crewReplacer_Job class.
   make sure to set your job.name first.
[close]
when running job data there is 3 commands you need to know:
to get available crew power:
Spoiler
crewReplacer_Job.getAvailableCrewPower(CargoAPI cargo)
   returns: (float) the availableCrew * crewPower in this cargo
   cargo: is the cargothat you want to get crew from.
[close]
to display available crew for this job:
   
Spoiler
crewReplacer_Job.displayCrewAvailable(CargoAPI cargo,TextPanelAPI text)
   displays all the crew in the fleet to the inputted TextPanelAPI
   cargo: is the cargo that you want to get crew from.
   text: is the TextPanelAPI you want to display to
[close]
to apply and display crew losses for this job:
   
Spoiler
crewReplacer_Job.automaticlyGetDisplayAndApplyCrewLost(CargoAPI cargo,int crewPowerRequired, float crew_power_to_lose,TextPanelAPI text)
   removes crew from the fleet, and displays how mush crew was lost to the inputed TextPanelAPI
   cargo: is the cargothat you want to get crew from.
   crewPowerRequired: an float that should be equal to the required amount of crew to complete this job.
   crew_power_to_lose: the number of crew you want to remove from this fleet. should never be more then crewPowerRequired.
   text: is the TextPanelAPI you want to display to
[close]
[close]
Changelog
Spoiler
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
[close]
« Last Edit: March 12, 2024, 12:24:28 PM by alaricdragon »
Logged

Omnicast

  • Ensign
  • *
  • Posts: 22
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #1 on: March 10, 2022, 02:40:13 PM »

Wait wait wait... so are you telling me we can Titanfall some poor hapless farming colony now? Drop pod deadly Elvish Blade Singers upon the annoying pain in the ass Hegemony? Flood a Luddic world with Rabid Furries? Unleash a tide of mechanical horrors that is the Necrons? Deploy an army of clones?! Horatio clones... or maybe Clone Troopers. I am right to assume this mod enables all this and MORE?!

Wait... couldn't the mods that introduce these units also have buildings that manufacture/grow/breed them?!

ZERGS! Xenomorphs! Sentinels! Power Armor! Terminators!

I can't wait for modders to go crazy with this library.
« Last Edit: March 10, 2022, 02:41:55 PM by Omnicast »
Logged

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #2 on: March 10, 2022, 02:44:10 PM »

Wait wait wait... so are you telling me we can Titanfall some poor hapless farming colony now? Drop pod deadly Elvish Blade Singers upon the annoying pain in the ass Hegemony? Flood a Luddic world with Rabid Furries? Unleash a tide of mechanical horrors that is the Necrons? Deploy an army of clones?! Horatio clones... or maybe Republic clones. I am right to assume this mod enables all this and MORE?!

Wait... couldn't the mods that introduce these units also have buildings that manufacture/grow/breed them?!

ZERGS! Xenomorphs! Sentinels! Power Armor! Terminators!

I can't wait for modders to go crazy with this library.
now you understand. the universe is at our fingertips and we (the modders) shall be the gods of this new world. I hope the modding community enjoy this as well =)
Logged

Omnicast

  • Ensign
  • *
  • Posts: 22
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #3 on: March 10, 2022, 02:51:06 PM »

I forgot dragons... someone mod in dragons. It's Necessary!
Logged

Kakroom

  • Commander
  • ***
  • Posts: 172
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #4 on: March 10, 2022, 04:59:08 PM »

Wait wait wait... so are you telling me we can Titanfall some poor hapless farming colony now? Drop pod deadly Elvish Blade Singers upon the annoying pain in the ass Hegemony? Flood a Luddic world with Rabid Furries? Unleash a tide of mechanical horrors that is the Necrons? Deploy an army of clones?! Horatio clones... or maybe Clone Troopers. I am right to assume this mod enables all this and MORE?!

Wait... couldn't the mods that introduce these units also have buildings that manufacture/grow/breed them?!

Dad i need it
Logged

briansd9

  • Ensign
  • *
  • Posts: 47
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #5 on: March 10, 2022, 05:33:53 PM »

Not compatible with Nexerelin? But almost everyone will have it...

Would it be possible to include the compatibility patch in the main mod, instead of requiring a separate download? Many mods do stuff like this:
Code
if (Global.getSettings().getModManager().isModEnabled("nexerelin")) {
  /* your code here */
}

Logged

AppleMarineXX

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #6 on: March 10, 2022, 06:56:32 PM »

Does this mod allow the replacement objects to be "better" than the default objects?

For example, could I make a custom Super-Soldier commodity that acts as 10 marines at once?

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #7 on: March 10, 2022, 08:07:20 PM »

Does this mod allow the replacement objects to be "better" than the default objects?

For example, could I make a custom Super-Soldier commodity that acts as 10 marines at once?
yes. that is what 'crew power' dose. the default crew power is 1, so if you set your Super-Soldier to have 10 crew power when you make it, it will be worth 10 marines.
Logged

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #8 on: March 10, 2022, 08:22:43 PM »

Not compatible with Nexerelin? But almost everyone will have it...

Would it be possible to include the compatibility patch in the main mod, instead of requiring a separate download? Many mods do stuff like this:
Code
if (Global.getSettings().getModManager().isModEnabled("nexerelin")) {
  /* your code here */
}

I have no idea at all if this will work in this case, as my compatibility patch functions by extending Nexerelin's custom marketCMD that it has, well my mod works by extending the default marketCMD. and I am unsure how to merge the two classes, without having to update every time Nexerline dose. regardless, ill give it a try sometime. but probably not right now.
Logged

Liral

  • Admiral
  • *****
  • Posts: 717
  • Realistic Combat Mod Author
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #9 on: March 11, 2022, 01:05:59 PM »

Does Crew Replacer extend to ships?  For example, could the Salvage Rig replace (or be required alongside) Heavy Equipment when salvaging derelict stuff, and can this mod add new requirements to actions that previously did not require them; e.g., requiring Heavy Equipment or Salvage Rigs to recover derelict ships?

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #10 on: March 11, 2022, 07:43:18 PM »

Does Crew Replacer extend to ships?  For example, could the Salvage Rig replace (or be required alongside) Heavy Equipment when salvaging derelict stuff, and can this mod add new requirements to actions that previously did not require them; e.g., requiring Heavy Equipment or Salvage Rigs to recover derelict ships?
yes to your first question. you can make an class that extends crewReplacer_Crew and overwrite the removeCrew, getCrewInFleet, and DisplayedCrewNumbers function. then add that to a crewReplacer_Job. you can then put your custom code into said functions, to make it so a ship can be used. or do anything truely. 'extends' and 'overwrite' is kinda like magic. (just started to learn about them a week ago sorry for nerding out about them)

regarding your second question, no. crew replacer cannot add new requirements. it was never built with such an idea in mind.
it is built with the idea that someone would want to replace its scripts in mind though. so if you are feeling crazy you can always try to make your own mod that changes salvage to have new requirements.
Logged

SonnaBanana

  • Admiral
  • *****
  • Posts: 867
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #11 on: March 11, 2022, 09:40:30 PM »

You are a genius, I salute you.
Logged
I'm not going to check but you should feel bad :( - Alex

alaricdragon

  • Commander
  • ***
  • Posts: 145
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #12 on: March 11, 2022, 10:04:53 PM »

You are a genius, I salute you.
*Salutes you back* just doing my duty for the modding community
(Thanks for the complement though. Complements on my things make me happy :))
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7173
  • Harpoon Affectionado
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #13 on: March 12, 2022, 03:46:50 PM »

Huh, cool extension of capabilities! Nice idea to make this a library for the community.
Logged

Kat Tsun

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.95.1a] Crew Replacer
« Reply #14 on: March 19, 2022, 04:44:15 AM »

based

finally i have a use for this
Logged
Pages: [1] 2 3 4