Tralfagar

[1.2.0] Newbier Newb's Revamp of Civilian Population

Recommended Posts

@Kerbas_ad_astra That's a great idea.  I had no idea I could do that.  I'll add it in when I'm able to work on the mod some more.  Thank you!

@Jiraiyah I think I got you.  Out of the box, this mod doesn't include a life support system (but it does support them).  So you could have Kerbals hanging around indefinitely and their number would only increase over time (up to crew capacity limit for Civilian quarters), similar to Jeb in my current sandbox game.  As of yet, there is also no background processing on my side of crew growth, so who you send will be who arrives (and even when it is supported, no Kerbals will spawn without a "seed" Civilian).

If you use USI Life Support, the 1.2 patch will have a few changes to the drills and such so that ISRU can be made closed-loop, using the USI modules to create Fertilizer.  Otherwise, how are you keeping your current Kerbals alive with USILS?

@richfiles I know what you mean.  First it was Offworld Trading Company and now it's setting up events with BattleCON and making a character-select box.  There are too many projects to do!

That's a great idea for the upgrades, though!  I saw it in the release notes but didn't consider the possibilities for this mod!

Share this post


Link to post
Share on other sites

First off, thanks for continuing this mod and good luck updating to 1.2.

8 hours ago, Tralfagar said:

So you could have Kerbals hanging around indefinitely and their number would only increase over time (up to crew capacity limit for Civilian quarters), similar to Jeb in my current sandbox game.

 

Secondly, that video was amazing!!

Share this post


Link to post
Share on other sites
19 hours ago, Tralfagar said:

@Kerbas_ad_astra That's a great idea.  I had no idea I could do that.  I'll add it in when I'm able to work on the mod some more.  Thank you!

@Jiraiyah I think I got you.  Out of the box, this mod doesn't include a life support system (but it does support them).  So you could have Kerbals hanging around indefinitely and their number would only increase over time (up to crew capacity limit for Civilian quarters), similar to Jeb in my current sandbox game.  As of yet, there is also no background processing on my side of crew growth, so who you send will be who arrives (and even when it is supported, no Kerbals will spawn without a "seed" Civilian).

If you use USI Life Support, the 1.2 patch will have a few changes to the drills and such so that ISRU can be made closed-loop, using the USI modules to create Fertilizer.  Otherwise, how are you keeping your current Kerbals alive with USILS?

@richfiles I know what you mean.  First it was Offworld Trading Company and now it's setting up events with BattleCON and making a character-select box.  There are too many projects to do!

That's a great idea for the upgrades, though!  I saw it in the release notes but didn't consider the possibilities for this mod!

 

Hi

trust me when i say this, this is my first time trying USI, long time ago i had tac life support, and also, this is the first time i am trying your mod, it's the first time i am trying anything related to deep space with kerbals on bord (always used probs) so.... lots of unknown for me there :wink: and for what i am aming to have on my lets play, oh god help me survive :D 

Share this post


Link to post
Share on other sites

Nice, was hoping this would get an update. :) Self sufficient colonization missions here we come.

Edit: Would it be possible to add in a way to spawn in custom Kerbal classes or replace the the normal civs with something else? The colonists in this mod seem very useful. Maybe a "colonization training course" but still let them count towards the civ pop for breeding?

 

Edited by DigitalProeliator

Share this post


Link to post
Share on other sites
On ۱۳۹۵/۷/۱۷ ه‍.ش. at 4:54 PM, Kerbas_ad_astra said:

One brief nitpick: the dock-growth function is hard-coded to ask for Kerbin, the Mun, and Minmus, which means it only works in stock (ish) solar systems.  I'm okay with living without civilian dock growth in my RSS install, but it would be a better pattern to instead query if FlightGlobals.currentMainBody.isHomeWorld (in which case, set the growth to 1) or FlightGlobals.currentMainBody.orbit.referenceBody.isHomeWorld (in which case, set it to 1/2, or maybe get extra-sophisticated and do some math on the semiMajorAxis relative to the planet's Radius -- and be sure to have a null check in here, as I'm pretty sure the Sun's orbit or orbit.referenceBody is null).

I plus this because right now i am playing with galileo's planet pack and it completely replaces kerbin with his own planet, also, I can suggest a little tweak to this, instead of looking for home planet, can you look for the habitat ability of the planet? for example, galileo has two planets that kerbals can live on it, one is the home planet and another is a new planet in the galaxy.

@Kerbas_ad_astra sir these days my planet system is : Galileo's planet pack + kerbal Galaxy + extra sollar !!!! you can't even imagine how good these three work with eachother and how much awesome things you would have :wink: give it a try but if you are going to use scatterer, use the version that sits inside galileo's pack specially if you are gonna add kerbal galaxy, the original scatterer with kerbal galaxy had a nasty memory leak last time i checked !

On ۱۳۹۵/۸/۳ ه‍.ش. at 6:13 AM, Tralfagar said:

Version 0.0.5 is up, with 1.2.0 compatibility.  You can get it here.

Background processing is still WIP; haven't had a lot of time to delve into it.

sir, that link has no releases? only source files, also would this work with 1.2.1 or do you need a recompile because of version limiting by code?

Share this post


Link to post
Share on other sites

@Jiraiyah, @Kerbas_ad_astra,

The previous update (0.0.5) should make the game start-world agnostic.

Github is calling my release Source Code.  Not really sure why.  Download it and there will be two folders inside:  Source and GameData.  Source has the source code, GameData has everything you would need for this mod (CRP, MM).

Share this post


Link to post
Share on other sites
37 minutes ago, Tralfagar said:

@Jiraiyah, @Kerbas_ad_astra,

The previous update (0.0.5) should make the game start-world agnostic.

Github is calling my release Source Code.  Not really sure why.  Download it and there will be two folders inside:  Source and GameData.  Source has the source code, GameData has everything you would need for this mod (CRP, MM).

have a question, what if i park my station around another planet that is not the home planet but is habitable?

Share this post


Link to post
Share on other sites
15 hours ago, Tralfagar said:

@Jiraiyah

It will not grow via docking (immigration), but you can still grow via spawning without issue (but you will need a single "seed" Kerbal).

that is why i suggested to look for habitation ability of planets instead of home planet, although i'm not sure if it would be possible or not or how complex it would be

Share this post


Link to post
Share on other sites

@trafalgar -- I LOVE this Mod and I want to use it so badly. 

I've got a sweet station set up with Contractor Docks in low orbit around Kerbin -- it's been 120 days and I've got no new civilians! I'm using USI and all my supplies are A-OK. Any thoughts?? 

 

 

Share this post


Link to post
Share on other sites

on the topic of the missing crew portraits for parts with no "internals" there was a mod out there that looked at every part that has crew capacity, and if it did not have an internal would just use a generic "black square" for the backdrop, yet still show your kerbals in the list of crew on the bottom of the screen.  I forget what it was called...  but it was very handy for this.

as for growth.  rather than treating them as weeds, what about making your growth depend not on the total number of kerbals but rather create a new "stat" for your female kerbals "pregnant" and anytime they are in a crew that contains male kerbals well.... there is a chance this will become activated and then the growth happens.  but keep this tied to the Kerbal not the craft so the Kerbal in question may move to a new craft, or even a new planet, and still have this counter ticking.  basically, yes, just model reproduction as it exists in organic life forms.

there are at least 2 mods out there... if I recall one  was called "Kerbal stats" that were designed as a framework for this exact sort of thing.  so mods had a central "skill or stats" data base to pull new things like this from.

Share this post


Link to post
Share on other sites

Has anyone had issues with the Civilian Population Revamped (CPR) mod causing error codes?  I am trying to use this mod with the Galileo Planet Pack (GPP).  After installing all the mods listed in the GPP installation instructions I noticed that the log was being spammed with:

[EXC 13:00:26.667] MissingMethodException: Method not found: 'ProtoPartResourceSnapshot.get_maxAmount'.

[EXC 13:00:26.668] MissingMethodException: Method not found: 'ProtoPartResourceSnapshot.get_maxAmount'.

[EXC 13:00:26.709] MissingMethodException: Method not found: 'ProtoPartResourceSnapshot.get_maxAmount'.

[EXC 13:00:26.710] MissingMethodException: Method not found: 'ProtoPartResourceSnapshot.get_maxAmount'.

I started with a fresh install of KSP 1.2.1 and added the GPP mods one at a time, checking for errors after each one (yes this took a long time...).  I started with the "Included Addons", then moved to "Recommended mods" then finally to "Suggested mods".  (I skipped KSP Interstellar Extended because I thought it might have been the culprit.)  Anyway, when I added CPR is when I got the errors.  I removed CPR and finished adding the other mods without errors.  Adding CPR caused the error again. Here is the post in the GPP topic.

 

Share this post


Link to post
Share on other sites

This mod is calling for a function that exists in KSP 1.2.1 but no longer in 1.2.2, causing the NRE flood. Kopernicus, MM and GPP are not part of the problem, but I must note that the bundled MM is very old.

Share this post


Link to post
Share on other sites
12 hours ago, JadeOfMaar said:

This mod is calling for a function that exists in KSP 1.2.1 but no longer in 1.2.2, causing the NRE flood. Kopernicus, MM and GPP are not part of the problem, but I must note that the bundled MM is very old.

is there any fast fix for it or does it need a recompile?

Share this post


Link to post
Share on other sites

@Jiraiyah I don't have the programming skills to answer that question. And it seems @Tralfagar the OP hasn't logged in on here for some time. I'm hoping they return soon or that someone jumps on this thanks to its permissive license.

Share this post


Link to post
Share on other sites

The Civ Pop Mod Curse of rotating authors has struck again!  I'd love to continue support for this mod but unfortunately I don't have the time to commit to it.  Or sadly even playing KSP.  Regarding the missing files (BackgroundGrowth.cs, UnloadedVessel.cs, and AssemblyInfo.cs), they are WIP classes/files I was testing some stuff in that I ended up scrapping.  I couldn't figure out how to tell Monodevelop not to include them so I was trying to manually erase them.  Guess I missed a spot in the .csproj file.  A quick-n-dirty work around would be just create a blank class of the relevant name and recompile (targeting the correct .NET Framework version).

If someone would like to continue this, I would be very grateful.  I tried to make the license as permissive as possible and mark up the code so others could continue (and possibly learn) easily.  I'm a mechanical/hardware engineer by day so I'll admit some of the code may not be up to coding standards...but I tried to keep it human-readable.

Again, thank you to everyone who helped me with my first foray into modding!

 

Some notes for anyone who wishes to continue this mod:

You don't need to be a modding wizard.  I'm certainly not.

DebuggingClass in the .cs files is what I use to store the static variables (such as civilian class names, mod name, etc...).  The myWindow object isn't called anywhere unless I'm debugging something.

All of the art assets are in a folder together.  I ran into trouble trying to catalog them into the appropriate folder.

The Community Documentation is a godsend.  Use it.  Love it.  Update it.

FixedUpdate -> Unity's physics-update, does not require part to be in the active stage

Update -> Unity's update.  Does require part to be in the active stage

The distinction between FixedUpdate and Update was initially lost on me and the cause of much frustration.

Code should be human-readable and executable.  When those conflict, err on the side of human-readable.  Saving yourself 2 minutes writing can cause headaches down the line when you forget what that piece does.

If you have any questions (CivilianSpawnGrowth can get a little gnarly), let me know.  I'll try to answer.

Share this post


Link to post
Share on other sites

Could you make something like a building that increases the rents or produces money? I mean something like a resturante, a casino or a cinema that produces Kerbal Bucks per civilians on your ship/station but they need an specal kerbal like a Croupier or a waiter to function.

Or parks, statues and so on that increases the rent in nearby houses for more income.

Share this post


Link to post
Share on other sites

Being a big fan of this mod, I decided to try to figure out to help keeping it up.

At the moment, here is what I did after cloning the sources :

  • I cleaned up the "~" files
  • Deleted the non existing referenced sources files.
  • Removed all the references not found.
  • Add the proper references to Assembly-CSharp.dll, UnityEngine.dll and UnityEngine.UI.dll (I just have System.dll in addition to this 3) copied from my KSP 1.2.2 stock installation.
  • Rebuild and copied the generated .dll file to the GameData folder.
  • Installed the mod to a stock 1.2.2 version of KSP.

And well the games started properly despite some warning I think I can fix pretty easily and I can see the parts in a sandbox game !

My question now is how can I contribute to the development of this mod ?

Should I just fork this mod ? Do you prefer me to commit or send pull request to your repository ? Perhaps into a specific branch ?

Is it normal that the mod "redistribute" another one ? I think it should define a dependancy in CKAN, but I have absolutely no idea how to push a mod in CKAN.

Finally, like you I am not a modding wizard, I am a Java developper. Working on the C# part should not be too difficult for me (And it will be a pleasure for me to enter in the .NET world that way), I could try work on the packaging for CKAN too. But I will never have the time to learn 3D and design new parts.

This is why I love this mod, you can make awesome stations with it :cool:

EpLZT5v.jpg

Share this post


Link to post
Share on other sites
14 hours ago, Pamynx said:

Being a big fan of this mod, I decided to try to figure out to help keeping it up.

At the moment, here is what I did after cloning the sources :

  • I cleaned up the "~" files
  • Deleted the non existing referenced sources files.
  • Removed all the references not found.
  • Add the proper references to Assembly-CSharp.dll, UnityEngine.dll and UnityEngine.UI.dll (I just have System.dll in addition to this 3) copied from my KSP 1.2.2 stock installation.
  • Rebuild and copied the generated .dll file to the GameData folder.
  • Installed the mod to a stock 1.2.2 version of KSP.

And well the games started properly despite some warning I think I can fix pretty easily and I can see the parts in a sandbox game !

My question now is how can I contribute to the development of this mod ?

Should I just fork this mod ? Do you prefer me to commit or send pull request to your repository ? Perhaps into a specific branch ?

Is it normal that the mod "redistribute" another one ? I think it should define a dependancy in CKAN, but I have absolutely no idea how to push a mod in CKAN.

Finally, like you I am not a modding wizard, I am a Java developper. Working on the C# part should not be too difficult for me (And it will be a pleasure for me to enter in the .NET world that way), I could try work on the packaging for CKAN too. But I will never have the time to learn 3D and design new parts.

This is why I love this mod, you can make awesome stations with it :cool:

EpLZT5v.jpg

Well normally if @Tralfagar is still active, you would fork the repository, do your changes on your local instance on github then send it back as a pull request, and if the developer like what you did, he will merge it with his own version and publish it. but if he wouldn't be active any more, then it totally depends on the licensing. if the license would allow it, you or anyone else would take the mantle and either post their own built version in this same thread or would go for a newer thread to begin with. so, the question is : is tralfagar still active and around to accept the pull request and publish the mod properly or not?

Share this post


Link to post
Share on other sites

Well, as @trafalgar does not seems to come back to the forum, I started my own "revamp". Being even newbier, I do not really know what to do to share this plugin with the community...

Anyway, my code is available here : https://github.com/rleroy/CivilianPopulation

And you can try the plugin here : http://nexus.amis.tv/repository/maven-releases/tv/amis/pamynx/ksp-civilian-population-mod/1.9.3/ksp-civilian-population-mod-1.9.3.zip

Basically, I just forked the orginal, dispatched the files in some other folder and generate the configuration files from an xls file in order to understand better how it works and setup a project management tool I am used to tu handle the release and dependancy management. So this version should work just as the previous one.

But I still have some problems and work to do, the problems @trafalgar had, and some stuff I discovered testing the physics of the parts...

Share this post


Link to post
Share on other sites

Ok, as this area is really beginning to grow, and I am looking to help, but not necessarily do this for you (at last not yet). One of the primary mod groups I use in coordination with this is USI (roverdude). These mods are really well detailed, and much more. Now, yes the USI-LS works with this mod, but the much needed (IMO) MKS system does not due to the Kolonist mod effects. These change the Astronaut complex such that civilians are not recruitable. I am looking to address this, and found a key piece. Unfortunately, you have the "civilian" value hard wired in the code, so I can't rewire it to detect a Kolonist instead easily. I was looking to add an experience effect to the kolonist that would trigger the code, and that doesn't look like it will work. So, if I can get an agreement that we can have a config value for the string name (currently statically using "civilian"), such that is can be wired up  to Kolonist, or if I invented an Elephant kerbal and wanted it to grow on a Savannah Ship Part, it could just re point with a config change. (Write the dll to load the name to look for from the config on mod load).

Otherwise, we need to add a civilian ExperienceEffect, and then we can attach it to trait types of whatever desired, and those with this effect(which will have to be looked up differrently on the kerbals, probably thru retinal scans) thru a slightly rewritten lookup. This will cause civilians to "occur" after a few Kolonists with the proper trait get it on in deep space. Or, you can help me figure out how to add a new Experience trait tye to Roverdude's already well rewritten Astronaut Complex UI, which tho useful, sounds like stomping toes in cleats, by a guess.

Share this post


Link to post
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.