Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Pages: 1 ... 3 4 [5] 6

Author Topic: [0.98a] Crew Replacer  (Read 160365 times)

Akarthus

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #60 on: March 30, 2024, 12:53:07 PM »

I read the documentation and the coding for AI-retrofit, but I'm still confused about how to implement it since I have no experience with Java. Is there a simpler example that just creates a new crew that can do everything a crew does but better?
hello!
first of all, this is Crew Replacer, but you are not the first to confuse the mods.
as for your question, im not quite sure what you are asking, or rather, the extent of what you are asking for.
if you want to see a example of how to set up your mod plugin, to add a crew, you must do the following:
Spoiler
1) add 'crew replacer' as a library for your mod. (how this works changes depending on how you set up your workplace)
2) in the 'mod_info.json' file of your mod, add
Code
    	"dependencies": [
        {
            "id": "aaacrew_replacer",
            "name": "crew_replacer",
        },
],
somewhere in in said file (look at other mods files for refrence)
3) run the following in your mod plugins 'onApplicationLoad()' function
Code
crewReplacer_Main.getCrewSet("crew").addNewCrew("commodityID", 1, 10);
but replace "commodityID" with the ID of the commodity you want to act as a crew, and '1' with how 'strong' you want this crew to be (so 1.25 would be 25% stronger then crew. 0.5 would be 50% weaker)
here is a example of what your mod plugin could look like (I made it so ore acts as 'crew', but 75% stronger in this example.) (also, were it says 'AI_RetrofitsStartup' should be your mod plugins class name. it should not be mine or you will have issues.)
Code
public class AI_RetrofitsStartup extends BaseModPlugin {
    @Override
    public void onApplicationLoad() {
        crewReplacer_Main.getCrewSet("crew").addNewCrew("ore", 1.75, 10);
    }
}
[close]
if this is your first mod, and you have not created your first jar file yet: this might help, but it might be outdated I'm bad at finding tutorials. you should likely ask in misc modding questions or in the unofficial starsector discord channal
if you need to create a new commodity to act as your crew, i have a tutorial i built recently donated to that and only that. although, it covers a lot, and looks at some code, it covers everything i could think of. so enjoy that: here

as always, if you have any questions, feel free to ask questions.

also a note: right now, there is no way to make something other then 'crew' crew starships. so if that's something you wanted, i'm sorry = (
good luck
I was trying to read the coding for AI-retrofit to get an example of "alternative" crew, i didn't get confused xD

So if I had something like the ore in the example, he can survey and salvage as 1.75 crew, but cannot act as skeletal crew to pilot ships?
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #61 on: March 30, 2024, 01:11:23 PM »

I was trying to read the coding for AI-retrofit to get an example of "alternative" crew, i didn't get confused xD

So if I had something like the ore in the example, he can survey and salvage as 1.75 crew, but cannot act as skeletal crew to pilot ships?
Yes. They can also repair hyper relays, and do anything that a 'crew' can in some other mods (like nomadic survival (and the other version) and  a single event in the forge production mod.
AI-Retrofits is not the best for learning how crew works, as most of the crew there uses a custom crew class (for dynamic stats) and also the configs are confusing. And it has not changed over to the crew set system yet.
Sorry for my confusion in regards to what you were talking about. I try my best.
Anyhow, feel free to ask more questions if you need to. I have nothing to do help. Also, good luck!
Logged

Akarthus

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #62 on: March 30, 2024, 01:20:19 PM »

sad that alternative crew didn't work...but I think I can still make stuff like domain-era marines, awesome framwork regardless xD
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #63 on: March 30, 2024, 01:33:28 PM »

sad that alternative crew didn't work...but I think I can still make stuff like domain-era marines, awesome framwork regardless xD
Maybe someday I will get the few 'jobs' I have yet to find a way to change working, but for now, crew replacer will remain incomplete : (
Good luck with your things. And remember: crew replacer is for more then just crew and marine things. Gotta remind everyone reading this of that because of the misleading name of this framework.
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #64 on: April 05, 2024, 09:38:07 AM »

I was trying to read the coding for AI-retrofit to get an example of "alternative" crew, i didn't get confused xD

So if I had something like the ore in the example, he can survey and salvage as 1.75 crew, but cannot act as skeletal crew to pilot ships?
i find my own self frustrating sometimes.
I realized that there is a way i could make 'skeleton crew' work, as well as 'use crew space' crew work. its just requires me to accept the fact that the UI will never respect that (and in fact will look janky), but i could make my own like, intel thing or something that shows the 'real' values of the crew on ships. its totally doable. in fact i spent the last hour selling myself on the idea, so if you wanted that 'skeleton crew' give me a week or two and you can have it.
probably.
why do i keep getting myself into messes like this? i hate working with UI...
but now i got to do it. oh well.
I wanted skeleton crew as well, so there is that...
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #65 on: April 16, 2024, 12:15:33 PM »

im going to be late on that thing i promised, not because im lazy, but because im really lazy.
Logged

Shogouki

  • Captain
  • ****
  • Posts: 414
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #66 on: April 16, 2024, 02:08:50 PM »

im going to be late on that thing i promised, not because im lazy, but because im really lazy.

xD

No worries, life takes precedent over modding!
Logged

mark.sucka

  • Lieutenant
  • **
  • Posts: 81
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #67 on: April 16, 2024, 04:31:10 PM »

im going to be late on that thing i promised, not because im lazy, but because im really lazy.

Bah!  I can't wait until I can figure out how to combine transplutonics and metals to create 'coder droids' so we can replace lazy humans like you!  I bet you even think you're worth a $10 monthly salary too, hmmmm?
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #68 on: April 16, 2024, 05:25:10 PM »

Bah!  I can't wait until I can figure out how to combine transplutonics and metals to create 'coder droids' so we can replace lazy humans like you!  I bet you even think you're worth a $10 monthly salary too, hmmmm?
*Sobs in less then 10$ an hour from coding for fun*
Logged

Proxima-b

  • Ensign
  • *
  • Posts: 33
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #69 on: August 11, 2024, 04:26:44 PM »

With this mod installed, all survey operations don't consume supplies.

What's even worse is that uninstalling this mod would break the save.

So I'm stuck with this game breaking bug. Please fix it or provide means to uninstall.

Edit: Cleaned up my save by deleting all CIStack with CrewReplacer_Shawdo keywords, now it can be loaded after uninstallation of this mod(If no futher tempering was done).
« Last Edit: August 11, 2024, 05:10:28 PM by Proxima-b »
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #70 on: August 11, 2024, 06:03:07 PM »

With this mod installed, all survey operations don't consume supplies.

What's even worse is that uninstalling this mod would break the save.

So I'm stuck with this game breaking bug. Please fix it or provide means to uninstall.

Edit: Cleaned up my save by deleting all CIStack with CrewReplacer_Shawdo keywords, now it can be loaded after uninstallation of this mod(If no futher tempering was done).
glad you got it to load.
also, I have now fixed this
thanks again for the report.
Logged

AdamLegend

  • Commander
  • ***
  • Posts: 144
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #71 on: August 12, 2024, 03:15:21 PM »

With this mod installed, all survey operations don't consume supplies.

What's even worse is that uninstalling this mod would break the save.

So I'm stuck with this game breaking bug. Please fix it or provide means to uninstall.

Edit: Cleaned up my save by deleting all CIStack with CrewReplacer_Shawdo keywords, now it can be loaded after uninstallation of this mod(If no futher tempering was done).
Thanks for sharing this!
Logged

Mycophobia

  • Commander
  • ***
  • Posts: 109
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #72 on: February 16, 2025, 08:13:16 AM »

Hello, asking for the CN modder Savemedlay,

How much does this mod affect vanilla and can it allow the modder to have another commodity count towards crew number the way crew and marines currently are?
Logged

alaricdragon

  • Captain
  • ****
  • Posts: 254
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #73 on: February 16, 2025, 10:01:29 AM »

Hello, asking for the CN modder Savemedlay,

How much does this mod affect vanilla and can it allow the modder to have another commodity count towards crew number the way crew and marines currently are?
for the first question, I have done everything in my power to make this mod effect vanilla as little as possible. this mod is a library first and foremost, and all its features are in enabling others to affect... whatever they want. be it making some random commodity act as supply's when surveying, or having a hullmod act as marines when raiding, crew replacer does everything in its power to allow for other mods to add additional ways to interact with such events, without effecting vanilla. (see what AI-Retrofits does with its salvage, survey, and combat robots for example).
and just so we are clear: this mod does not replace one commodity with another in events. it adds in a list of things that act as a given commodity in a given event. so AI-Retrofits salvage robots can salvage along side crew, for example.

the second question is more complicated. the long and short of it is... not yet?
At present, crew replacer cannot effect how mush crew space in a fleet something takes, noor can it make something pilot a ship (so whatever commodity you add cant fly starships). although both are planed features once i finally find a way because oh my god. I do have some leads though, so hopefully someday. maybe even someday soon if im really lucky, but... not yet.
for most other things you might need crew and marines crew replacer can help with. just... not that.
as a side note, if you ever do find a way to effect said numbers in any way (even if its something like only effecting the display, or only effecting parts of it), please I beg of you to report it here so when I finally get to the point in my life were I can give this a good long attempted its just a little easier to do.
Logged

dEVoRaTriX_LuX

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: [0.97a] Crew Replacer
« Reply #74 on: February 18, 2025, 04:47:15 PM »

which mods use these as a dependency? seems like a really neat idea
Logged
Pages: 1 ... 3 4 [5] 6