Jump to content

[1.1.2][CKAN] Civilian Populations Revived


GGumby

Recommended Posts

Hi,

I love the idea of this mod, and I think the parts are just great. I just have a problem with the proper ingame application. The introduction and the text ingame state the maximum population every hydroponics can maintain. When I try it, they produce never enough though. I trid different configuration:

16 small hydroponics + 25 population

16 small hydroponics + 0 population

8 farms + 4 large hydroponics + 50 Population

8 farms + 4 large hydroponics + 0 Population

I did not had TAC Life Support installed originally, had the same problem, installed TAC with no change, and made a new install of the game with both installed together.

The outcome is always the same: there is a constant resource "consumption" dependent on the maximim amount of population the vessale COULD hold (even if there is no-one on board), and all farms/hydroponics, irrespective of their size, produce roughly 0.04 of each resource. I put enough substrate, water and food in, I have electricity, I have control (probe body and/or pilot). I tried several configurations and the problem remains. Could any one help me? What do you need to know if this is a bug?

8dfdtzfmv

Link to comment
Share on other sites

Like I said, the production is not good adjusted. The main problem seams to be that the population uses up resources way to fast. You can change the these things in the parts by changing the lines which regulated this. This fixed the problem for me!

Link to comment
Share on other sites

2 hours ago, GalacticAC said:

 You can change the these things in the parts by changing the lines which regulated this. This fixed the problem for me!

Ya @GalacticAC I Had that thought myself, and tried to make some changes, but am a complete newcomer when it comes to codes so was unable to find the right lines. I was mostly changing ratios in the part files -- can you point me in the right direction??

Link to comment
Share on other sites

@DaveBowman: Sure. So am I! Never moded in my life. The fix is not balanced though. Check these lines out:

go to the folder in which the parts are stored. In my case it is: *\Kerbal Space Program\GameData\NetherdyneAerospace\CivilianManagement\Parts

Open one of the three with a text editor (Note-Pad++ is very good in Windows for this, cause it keeps the  proper lines): HouseSize2, 3, or 4

In there you will see this:

    name = CivilianPopulationRegulator

    //needs,wastes, and need/waste table
    //warning: if vessel cannot store the waste it gets "wasted", ejected into space.
    RecipeInputs = Food,0.035,Water,0.022,Oxygen,0.045,ElectricCharge,0.01
    RecipeOutputs = Waste,0.013,True,WasteWater,0.021,True,CarbonDioxide,0.042,True

    RequiredResources = CivilianPopulation,0
    Efficiency = 4.62962962962963e-5  //1 kerbin day
    
    //civilian consumes the above resources and produces the above waste in this
    //much time...
    consumptionSpeed = 21600
   

I changed the line in red. As you can see, I reduced every value by deviding it with 100 (shift the floating point 2 steps to the left side). This reduces the "consumption" rate of the modules 100 times, and now the hydroponics and farms produce slightly more then the populations produces. This fix is far from perfect, the main problem is that the part still only produces and consumes according to its "maximum capacity" irrespective of its actuall population. So empty or full does not matter, it allways consumes the same amount. This is a problem I could not figure out how to solve though. I will experiment with it further, and am thinking about also changing the warp field size for the IXS mode for NASA warp-ships, to allow for warp capable colony ships,....enjoy!

Link to comment
Share on other sites

  • 2 weeks later...

I came back to playing this within the past week or so and noted things that changed from the original, some mod breaking and some immersion breaking.  I didn't see the population speed change but I'll look at it soon.

  • The biomass conversion part is removed.  This is kinda breaking.  The original resource chain allow one to harvest CO2 from the drill as it converted the substrate into Biomass (the fertilizer), thereby allowing the farm scrubber to convert that to O2.  Without that part there is no way to generate oxygen in-situ so you could never grow a colony without bringing your own oxygen.
  • Immersion breaking:  All the biosphere parts seem to have the default convex hull collider.  I had done the colliders in the original such that it would be possible to walk around inside of a biodome and to get into/out of a structure inside of one.  This required more complex collider designs to the point where I thought about having individual triangle cylinder colliders on each of the faces of the biosphere.  While it wouldn't be possible to roll around one on the surface of a planet it would be possible to drive around inside of the dome and make that circus thing with the motorcycles in it.  Also immersion breaking is the collider on the park pieces as you can't attach things directly to the surface.  The ring part should be possible to pass through as well.

It's been a while since I handed this project off and i've been watching and lurking the whole time.  I don't expect to pick it back up as I'm busy in projects outside KSP.  That said I'd like to see the immersion brought back and if the consumption rate issue is there see that fixed.  Other than that thanks for maintaining the mod as far as you have, both to RabidNinjaWombat and GGumby.

 

 

Link to comment
Share on other sites

I researched the issues I had outside of the code base and came up with a patch to fix those.

https://drive.google.com/open?id=0B_ag2O0IQABwQ3RYaGN6M3VCWmM

Extract the zip and copy the folders into your Netherdyne Aerospace folder after installing civ-pop

Changes I included:

  • Biodome Sphere and Biodome bases:  I replaced the colliders by splitting each face out and extruding it slightly in blender. Each face was then separated into a separate blender object before importing into Unity 5.  Once there, each object gets its own convex hull collider while removing the meshRender component.  The result is being able to traverse inside the biodome again.  As an additional bonus the biodome can now be planted directly on the ground without it going through.
  • The Park biodome base (and other bases with texture) had a similar operation done to the walls and floor.  These colliders match the location of the walls so that it looks proper but still allows traverse inside.
  • The drill now has an electrolysis module as a way to produce oxygen in-situ.  This consumes your water.  Hydrogen from that process is vented instead of stored (but that can be changed in the config file).  3 water -> 1 oxygen i assumed was the correct output rate.

@GGumby  I can send you the assets I used for the patch if you want them.

Edited by michaelhester07
Link to comment
Share on other sites

On 6/26/2016 at 5:39 AM, GalacticAC said:

@DaveBowman: Sure. So am I! Never moded in my life. The fix is not balanced though. Check these lines out:

go to the folder in which the parts are stored. In my case it is: *\Kerbal Space Program\GameData\NetherdyneAerospace\CivilianManagement\Parts

Open one of the three with a text editor (Note-Pad++ is very good in Windows for this, cause it keeps the  proper lines): HouseSize2, 3, or 4

In there you will see this:

    name = CivilianPopulationRegulator

    //needs,wastes, and need/waste table
    //warning: if vessel cannot store the waste it gets "wasted", ejected into space.
    RecipeInputs = Food,0.035,Water,0.022,Oxygen,0.045,ElectricCharge,0.01
    RecipeOutputs = Waste,0.013,True,WasteWater,0.021,True,CarbonDioxide,0.042,True

    RequiredResources = CivilianPopulation,0
    Efficiency = 4.62962962962963e-5  //1 kerbin day
    
    //civilian consumes the above resources and produces the above waste in this
    //much time...
    consumptionSpeed = 21600
   

I changed the line in red. As you can see, I reduced every value by deviding it with 100 (shift the floating point 2 steps to the left side). This reduces the "consumption" rate of the modules 100 times, and now the hydroponics and farms produce slightly more then the populations produces. This fix is far from perfect, the main problem is that the part still only produces and consumes according to its "maximum capacity" irrespective of its actuall population. So empty or full does not matter, it allways consumes the same amount. This is a problem I could not figure out how to solve though. I will experiment with it further, and am thinking about also changing the warp field size for the IXS mode for NASA warp-ships, to allow for warp capable colony ships,....enjoy!

Using some variations of the idea posed, I have been doing some config based fixing for 1.1.3.  I have also in my person copy merged resource useage patterns to that of USI MKS materials gathering math. It helps cooperate the EPL capabilities, as so far that I have found MKS tends to take over in these regards. Howevver may be remodeling this mod now, if you still are, I figure you might want some of this as notes. Its just WAY to much to post, especially at one time. Not having this mod function in cooperation with the only mod I know that has working nuclear fuel procurement has been a big deal for me. I am definitely not ready or interested to take over a mod, but I will offer what I can. I really want to just play for fun. From what I ccan tell, the base dll for the mod is either not performing or perfomring very poorly.

Link to comment
Share on other sites

@GalacticAC I'm not in charge of *this* mod but I'm finishing up a rewrite of Civilian Population from more or less the ground up and @GGumby doesn't seem to have been active in a couple of months.  I'm having some trouble figuring out Git/licensing, but I anticipate having a release ready by this weekend.

I should note that there are several changes I have made:

1)  Civilians are no longer a resource, but full-fledged Kerbals that are pretty useless.  Not a whole lot of use except...

2)  Life support can now be taken care of by USILS/TACLS without writing additional code; MM .cfg edits will be able to take care of this.

3)  Civilian growth via docking is more or less the same (linear ramp within the Kerbin system), but on-ship breeding is modeled as a logistic function (initially exponential before reaching a limiting factor.  Wikipedia has some good background information on it.

4)  The modules may/may not be rejiggered to match.  At the moment, I believe I'm using the University as a Recruiting station because it fits well in stock fairings.

5)  The converters now function as soon as the craft is in flight, not when the last stage is triggered

An old (but not too out of date) WIP build can be found here if you want to take a look.  Not all of the parts are integrated; I've been adding them as I verify that they are good and work.  Also, I want to add some buttons on the GUI since the portraits don't seem to display.  Mostly a couple for EVA and Transfer.

Edited by Tralfagar
Link to comment
Share on other sites

1 hour ago, Tralfagar said:

@GalacticAC I'm not in charge of *this* mod but I'm finishing up a rewrite of Civilian Population from more or less the ground up and @GGumby doesn't seem to have been active in a couple of months.  I'm having some trouble figuring out Git/licensing, but I anticipate having a release ready by this weekend.

I should note that there are several changes I have made:

1)  Civilians are no longer a resource, but full-fledged Kerbals that are pretty useless.  Not a whole lot of use except...

2)  Life support can now be taken care of by USILS/TACLS without writing additional code; MM .cfg edits will be able to take care of this.

3)  Civilian growth via docking is more or less the same (linear ramp within the Kerbin system), but on-ship breeding is modeled as a logistic function (initially exponential before reaching a limiting factor.  Wikipedia has some good background information on it.

4)  The modules may/may not be rejiggered to match.  At the moment, I believe I'm using the University as a Recruiting station because it fits well in stock fairings.

5)  The converters now function as soon as the craft is in flight, not when the last stage is triggered

An old (but not too out of date) WIP build can be found here if you want to take a look.  Not all of the parts are integrated; I've been adding them as I verify that they are good and work.  Also, I want to add some buttons on the GUI since the portraits don't seem to display.  Mostly a couple for EVA and Transfer.

@Tralfagar I'm glad to hear someone has picked up the torch, I've never had much of a chance to try it because every time I'm far enough in career, there is a new game update and I end up starting over.

Anyway, your changes sound really interesting, but I do have a concern about #1. In earlier versions (pre 1.1), having lots of kerbals in a vessel caused a great deal of lag. The theory I read was that EVERY kerbal in a part with an interior was being animated, not just the 3 in the corner of the screen. The game runs far better now, and I haven't loaded so many kerbals up in a single vessel yet so I don't know if this is still a problem.

Thanks for your work, I look forward to trying your version.

Link to comment
Share on other sites

@Nightside I'm not sure how it'll work either because I haven't tested it!  Right now, they're mostly blank.  I haven't looked too far into implementing internal views as of yet because I've had my hands full with other aspects of this plugin.  But my current plan is to keep the parts as MichaelHester/RNW created them (2-4 seats shown, the rest not shown) and have collapsible menus that shows what Kerbals are on board.  For each Kerbal, it would be something like:

[NAME] [TRAIT] [EVA_BUTTON] [TRANSFER_BUTTON]

I can go back and learn how to model with Unity at a later date.  Right now, I want to get the plugin functional before going into cosmetics.  At a minimum, that means including:

1)  The above-mentioned buttons in the GUI (GUI is functional, I just need to add the fields)

2)  Ships functional in background (likely using Background Process mod as a dependency)

3)  Writing MM .cfgs for parts so they can be used with Community Tech Tree/USILS/TACLS/Shared Living Space

4)  And of course adding parts that I have left out so far (mostly editing .cfg files)

Edited by Tralfagar
todo
Link to comment
Share on other sites

I just created a new thread for my WIP version of this mod.  I also updated to version 0.0.2.  It has the EVA button (Transfering is more complicated than I expected, but I'm working on it).  I've added a few more parts and the mod should be usable playable.  Should be compatible with USI, TAC, CTT, and a couple others.  With luck, not having to keep track of all the life support should make it easier to maintain.

It can be found here:

 

Edited by Tralfagar
Link to comment
Share on other sites

Any chance at looking into, or incorporating Michael Hester's Stanford Torus? It'd be nice to have that in the game and be able to play a Type I or II civilization where (having not yet mastered the graviton to harness artificial gravity :P) Kerbals live under simulated gravity on city stations in keostationary orbit.

Link to comment
Share on other sites

I loved the even older Small Biodome and Stanford Torus pack. That 40+ kerbal IVA was SO lovely! I miss my trees, lawn chairs, and mugs! :D
I even launched a pair of 25M torus based stations into orbit on near stock parts (I had tweak scale and MechJeb, some custom capsules, but no extra tanks or engines, and no scaled tanks or engines, so pretty much stock), and one with the controls oriented 90° from vertical! THAT was HARD! The asparagus staging on those two vessels was beautiful! I learned fuel lines have a maximum length, and I also learned you can use Oscar-B tanks suspended on the ends of the long structural girders to make longer fuel lines made of three fuel lines and 2 Oscar-B tanks! :rolleyes:

It was big. :P

Edited by richfiles
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...
  • 2 months later...

Any chance of this mod being re-revived? Any interest out there? It is the closest I can find to what I am looking for in colonization!

 

EDIT:

Quote

Literally the post above yours.

Sorry i misread Murdabenne's message. I thought his remark about being rewritten referred to the previous revival and that the work he was referring to was the state the last (or better previous to last) author left it in.

Apologies.

Very happy it is alive!

Edited by DrScarlett
Link to comment
Share on other sites

1 hour ago, DrScarlett said:

Any chance of this mod being re-revived? Any interest out there? It is the closest I can find to what I am looking for in colonization!

Literally the post above yours.

(Mods: Might it be an idea to lock this thread?  Unless it's original author comes back, there's no reason for further posts here.)

Link to comment
Share on other sites

  • 4 months later...

I would encourage this idea, but I dont have any time or prior knowledge. I would do testing though!

One problem so far is, that the mod is very complicated. It would be interesting to reduce part count. A recycling part for example should be able to do all recycling steps, and so on. Some parts, like the Stanford Cylinder is not workable. It would be good, if it would be scaleable in the VAB and could be "expended" in flight.

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