Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 3 4 [5]

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

Akarthus

  • Ensign
  • *
  • Posts: 6
    • 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

  • Commander
  • ***
  • Posts: 163
    • 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: 6
    • 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

  • Commander
  • ***
  • Posts: 163
    • 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

  • Commander
  • ***
  • Posts: 163
    • 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

  • Commander
  • ***
  • Posts: 163
    • 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: 360
    • 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: 67
    • 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

  • Commander
  • ***
  • Posts: 163
    • 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
Pages: 1 ... 3 4 [5]