Jump to content

[1.2.0] Newbier Newb's Revamp of Civilian Population


Tralfagar

Recommended Posts

I am glad someone else is using this plugin. At the moment, I am validating it in a game using Kerbalism, but I am quite slow, thus not much activity from my side.

As far as I understand you, you have a problem with this line 9 in https://github.com/rleroy/CivilianPopulation/blob/master/modules/src/main/cs/debuggingClass.cs .

I can change it so that civilians will work as kolonists but I have few questions :

- Do we want civilians be kolonists ? At first look, I have no problem with that, but as civilian can become pilots, engineers or scientists, is it the same for kolonists ?

- Another option would be to have civilian Kerbal when recruted to "choose" a carreer ( https://github.com/rleroy/CivilianPopulation/blob/master/modules/src/main/cs/KerbalRecruitment.cs ), and allow them to become pilot, engineer, scientist, colonist, pink oliphant, etc.

Let me know !

PS : Is there an instant message room (IRC, slack, whatever) where I can find you, perhaps it will be easier to discuss !

Link to comment
Share on other sites

  • 2 weeks later...

BTW: The non-recognized profession 'Civilian' is breaking savegames with MKS/USI-LS. Once 'Civilian' Kerbals become tourists due to some shortage in Hab/Home time or supply, the game breaks at least on recovering them on Kerbin. Just a fair warning, I filed a bug report against MKS for that issue.

Link to comment
Share on other sites

  • 3 weeks later...
On 3/29/2017 at 8:51 AM, M3tal_Warrior said:

BTW: The non-recognized profession 'Civilian' is breaking savegames with MKS/USI-LS. Once 'Civilian' Kerbals become tourists due to some shortage in Hab/Home time or supply, the game breaks at least on recovering them on Kerbin. Just a fair warning, I filed a bug report against MKS for that issue.

Noticed this.

Have beenn working on my own fix which I am about to test. I also scaled the growth instead of 0 outside kerbin system, to .1 systeme multiplier for now.

 

I won't push my changes in unless requested, as I do not plan to take over this mod at this time.

 

Ialso made 1.2.2 compatible.

Link to comment
Share on other sites

Ok, so in the calculators, there is a verwsion fall off for resource calculations. Sample of original follows:

Original CivilianPopulationRegulator.cs segment.

public double getResourceBudget (string name)
  {
  if (this.vessel != null) {
  var resources = vessel.GetActiveResources ();
  for (int i = 0; i < resources.Count; i++) {
  if (resources .info.name == name) {
  return (double)resources .amount;   }   }   }   return 0;  

}

 

The vessel.getActiveResources call no longer exists, so I replaced it with this:

 public double getResourceBudget (string name)
    {
      if (this.vessel != null) {
        double resourcesum= 0;
        foreach (Part tpart in vessel.Parts)
        {
            resourcesum = resourcesum + tpart.Resources[name].amount;
        }
        return resourcesum;
      }
      return 0;
    }

aside from base reference updates,  this was the only required change. To make it work with my other mods is another story, and I am still testing.

 

Link to comment
Share on other sites

This code has already been modified in this commit :

https://github.com/rleroy/CivilianPopulation/commit/28395a73240d7fe39d9eda3d05085eec936be93e

The modification is not the same as your but also replace "vessel.GetActiveResources" by "vessel.GetConnectedResourceTotals" instead of making a loop as you suggest. What version of the mod are you using ?

I use my version available there :

Code is available here : https://github.com/rleroy/CivilianPopulation

Packaged 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

And so far it works well in KSP 1.2.3, I just don't have time to test it properly and do not know how to push it in ckan or spacedock...

Link to comment
Share on other sites

Probably a few back on version. With no one talking here, and not a ckan link, I hadn't noticed an update. Hmm. I will see about the difference made, as originally it looped thru the resource list to find the right resource, so I found something that grabbed the right resource directly, tho at the part level. Looks much more direct approach in the api usage I see in the code mentioned.

Any discussion on the setting that has this to have no growth away from Kerbin SOI? For my personal effect and testing I made the lowest recruitement value .1 instead of zero, sinced it multiplies the recruitement value times the civilian value, there currently can be no growth on say Duna.

Link to comment
Share on other sites

I'm a bit confused about what's going on with the mod's assets. Loads of old textures are being provided, and some of the newer ones aren't there. I'm sure a lot of the ones which aren't .dds can be removed - most of them shouldn't be in use any more. All of the IVAs seem to be messed up. The housing ones were all fixed before. And some of the parts, such as the large space dock, aren't there.

I'm going to dig up my archives of previous releases and see what might have gone missing. Once I get back into the process of exporting via Unity, I should be able to fix all of those issues, and make some long overdue improvements.

Link to comment
Share on other sites

Feel free to make pull request on my github, or just suggest me improvements.

I tried to clean up and reorganize the assets but there was some loss in the process, from myself or Trafalgar.

If you can point me a thread explaining how to publish a mod in ckan I will be glad ot make a release as the mod seems stable enough.

Link to comment
Share on other sites

For ckan publishing, I am including a sample netkan file, which you will need to makke one for this mod for the netkan github project.

sample:

https://github.com/KSP-CKAN/NetKAN/blob/master/NetKAN/1869.netkan

when the file is present and populated and updated, ckan does the rest.

as far as stable, any comment on the rates of growth away from Kerbin, or concepts to wok with other custom kerbil mods (like USI)?

Link to comment
Share on other sites

  • 2 weeks later...

I am not getting the base counter recipe to populate. wondering if a base converter reccipe is missng from the part configs? If so, I have an idea borrowing from USI to set a requirement of civilians (which since I use USI a lot, and USI took over the recruit screen so there are never the default civilians, I rewrote on my copy only to look for Kolonist instead) be present in the part for the counter to function. I am thinking you have done something different than this, but could use some discussion on your preferred direcction, both to help you, and also have my use case match your directions the mod will evolve to.

I am going to look at how some of the mining recipes are affect by engineers, and make it so these reccipes 0 out with my chosen person type present at the moment.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
3 hours ago, The-Doctor said:

Hey I'm seeking to add this to my playthrough, is it 1.3 compatible? I know people tend to make versions soewhere in the forums, so I'm asking. Thanks in advance 

No. I have a game crashes because of the plugin. Only if someone will continue it for 1.3! The only mod that I'm waiting for is the update.

Link to comment
Share on other sites

Would it be possible to turn the linear growth mechanism off as an option in the UI? I would like to use this mod, but I don't really like the linear growth mechanic, preferring to fly any civilian resupply missions myself, rather than having them automatically turn up! Puts me off a bit. Exponential growth I'm fine with, as that's a somewhat more... "natural" process, slower, and more manageable.

On the exponential growth side, now female kerbals are a thing (which I don't think they were when this mod was first written), would it be possible to make the exponential growth mechanism a function of the male/female ratio, rather than them being weeds? Furthermore, on the exponential growth side of things, an idea for a game play mechanic would be to have a method of controlling exponential growth - have a button in the ship/station's root part which says "no more baby kerbals" which puts a reproduction ban in place, slowing (but not stopping) growth - accidents will happen, after all...

Link to comment
Share on other sites

I managed to have the game start after recompiling the mod against 1.3 but I had to remove several cool parts (Such as apartment complexes and the civilian dock).

Anyway, I have a station in orbit and 4 kerbals it.

But no civilian will come as there is no civilian port attached.My1ueiX.png

Edited by Pamynx
Link to comment
Share on other sites

I managed to have the game work with all the part I had left during my refactoring phase. The problem is that I had to deactivate the mod specific behaviour on those parts.

Bad news : Kerbals won't breed nor work.

Good news : you can use back the cool parts, the reactors are working, and I managed to recruit civilians (they pop in the astronaut complex).

I will push the mod as this in my Github. Tell me if you encounter any problem !

pg5pomK.png

Link to comment
Share on other sites

Something was broken in the mod code, I had to comment it out (https://github.com/rleroy/CivilianPopulation/commit/647d3ccacd14d62f177c70d58daa50e6a79c1ab7).

The mod is available here : http://nexus.amis.tv/repository/maven-releases/tv/amis/pamynx/ksp-civilian-population-mod/2.0.2/ksp-civilian-population-mod-2.0.2.zip

Most parts are working.

Mod behaviour (Kerbal breeding and funds from their works) needs works.

Link to comment
Share on other sites

8 hours ago, Pamynx said:

Something was broken in the mod code, I had to comment it out (https://github.com/rleroy/CivilianPopulation/commit/647d3ccacd14d62f177c70d58daa50e6a79c1ab7).

The mod is available here : http://nexus.amis.tv/repository/maven-releases/tv/amis/pamynx/ksp-civilian-population-mod/2.0.2/ksp-civilian-population-mod-2.0.2.zip

Most parts are working.

Mod behaviour (Kerbal breeding and funds from their works) needs works.

thank you!!!for your work.

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...