Jump to content

New to modding, I would like to know how the game works with Configs and Code


Recommended Posts

So I'm looking at making an expansion for Kerbalism @Sir Mortimer, and I'm new to modding. I'm not new to coding, but I'm a beginner at best and was taught with Python.

I've done some work with configs in the game before: I've written Scatterer configs for my own use and have tried with minimal success to write some configs for Outer Planets Mod to be supported by Parallax. I understand how these two configs work and they are relatively simple to understand.

What I do not understand, however, is how the configs work for other sorts of mods. While the two mods I've really messed with have been purely visual, I'd like to write an expansion for Kerbalism and so I'm trying to wrap my head around how life support mods are coded for the game.

Looking for the files for Kerbalism, I can't for the life of me find where rates of consumption are, or how on earth I'd even be able to edit them in the game.

This is what I'd like to do

So I have a bunch of questions:
1. how does KSP add stats to Kerbals? Such as Stupidity and their G-force rating. I'd like to know how they do it so that I might get an idea for how the game handles it

2. I'd like to write a mod that can tweak consumption amounts for Kerbalism. In a general way I understand how to do it (have some code that tweaks the rate of consumption for something such as oxygen, but on the fly AKA while a vessel is active), but I don't know how to translate that into language KSP would understand

3. There's lots of tutorials on making parts, but how does one go about making these script-like mods? Are there any good tutorials for making mods like this?

And help would be greatly appreciated, but I'm afraid I might have bitten off more than I can chew. I hope that by taking it a small step at a time that I can eventually be able to produce a mod that fulfills my expectations.

Link to comment
Share on other sites

I started my tech tree overhaul mod which is just using MM scripts by going over existing tech tree mods as they are generally simple and then building up from there.  I found going through the wiki on MM has been quite helpful: https://github.com/sarbian/ModuleManager/wiki

When it comes to Kerbalism, it is definitely one of the more complex scripts that you can find within KSP and it took a while just to work out how to deal with Science experiments etc.  But in general, you will find the aspects that you are looking for within KerbalismConfig/Settings.cfg and KerbalismConfig/Profiles/Default.cfg.  These  will provide a baseline on where you will want to start. 

The only other major overhaul of Kerbalism outside of Realism Overahul that I am aware of is @theJesuit's Simplex Kerbalism mod, so I think that is a natural route to see how he's approached it:

 

Link to comment
Share on other sites

@Fundati,

Like @hemeac I started with using MM patches to patch into kerbalism until kerbalism went down the separate config route.  This was helpful as the profile in kerbalism is not very helpful in MM patching.

The kerbalism all the comsumption rates are in the profile, called default.cfg.  This is in the KerbalismConfig download.  The rukes define consumption rates, what kills etc.  Supplies are what goes into pods and the processes are for all the funky things that you might want to do such as isru or fuel cells that are kinda independant to what the kerbals themselves do internally.

Happy to answer any questions.

Peace.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...