FreeOrion

Forums for the FreeOrion project
It is currently Fri May 24, 2013 6:29 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [Patch] Native Species not starting with maxed population
PostPosted: Sat Mar 24, 2012 4:28 pm 
Offline
Content Scripter
User avatar

Joined: Sat Mar 17, 2007 12:28 am
Posts: 236
In order to get used to the code of FO (and C++ in general), i created a little patch that will make the natives start with only a random fraction of their max population (to add some variety).


Attachments:
NativesPopulation.patch [1.34 KiB]
Downloaded 11 times

_________________
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Sat Mar 24, 2012 4:45 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7898
Location: Vancouver, BC
How quickly do those planets tend to grow to their max population?

Player empire planets used to start at less than full population, but it was removed (set to full to start) because they just grew to full in < 20 turns anyway.

Replace all tabs in your patch with 4 spaces.

You should also probably not use a raw zero-to-one multiplier, as that could produce results very close to zero, which might be considered as close enough to zero to eliminate the population on the planet.


Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Sat Mar 24, 2012 4:54 pm 
Offline
Design & Graphics Lead
User avatar

Joined: Sat Sep 23, 2006 7:09 pm
Posts: 3693
Location: USA — midwest
Geoff the Medio wrote:
How quickly do those planets tend to grow to their max population?

Player empire planets used to start at less than full population, but it was removed (set to full to start) because they just grew to full in < 20 turns anyway.


Species have variable heath and thus presumably variable growth rates, so it is probably less useless now. It's something i'd like to see if it doesn't hurt anything.


Also, the growth rate is something i didn't adjust with the rest of my recalibrate changes. I didn't see it-- i assume that is not controlled by effects?

_________________
—• Read this First before posting Game Design Ideas!
—• Design Philosophy

—•— My Ideas, Organized —•— Get an Avatar —•— Acronyms —•—


Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Sat Mar 24, 2012 5:05 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7898
Location: Vancouver, BC
eleazar wrote:
Also, the growth rate is something i didn't adjust with the rest of my recalibrate changes. I didn't see it-- i assume that is not controlled by effects?
There is some C++ code that does population growth independent of effects. The rate currently depends on health, current population, and target population.


Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Sat Mar 24, 2012 7:12 pm 
Offline
Content Scripter
User avatar

Joined: Sat Mar 17, 2007 12:28 am
Posts: 236
Geoff the Medio wrote:
How quickly do those planets tend to grow to their max population?
I saw a cray planet with a population of 2.5 and a growth rate of 0.06.

Geoff the Medio wrote:
Replace all tabs in your patch with 4 spaces.
Done!

Geoff the Medio wrote:
You should also probably not use a raw zero-to-one multiplier, as that could produce results very close to zero, which might be considered as close enough to zero to eliminate the population on the planet.
It will now be at least a tenth of the max population.

eleazar wrote:
Geoff the Medio wrote:
Player empire planets used to start at less than full population, but it was removed (set to full to start) because they just grew to full in < 20 turns anyway.


Species have variable heath and thus presumably variable growth rates, so it is probably less useless now. It's something i'd like to see if it doesn't hurt anything.
I would like to see this too. Since the starting population shouldn't be random for homeworlds (unfair), a starting fraction has to be chosen. What about 75% ?


Attachments:
NativesPopulation.patch [1.49 KiB]
Downloaded 5 times

_________________
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.
Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Tue Apr 03, 2012 2:21 am 
Offline
Design & Graphics Lead
User avatar

Joined: Sat Sep 23, 2006 7:09 pm
Posts: 3693
Location: USA — midwest
To be clear, i'm much more interested in variable starting populations for native planets than empires. If for no other reason than to make it seem like the entire population of the galaxy isn't on the same schedual.

_________________
—• Read this First before posting Game Design Ideas!
—• Design Philosophy

—•— My Ideas, Organized —•— Get an Avatar —•— Acronyms —•—


Top
 Profile  
 
 Post subject: Re: [Patch] Native Species not starting with maxed populatio
PostPosted: Wed Apr 18, 2012 9:00 pm 
Offline
Content Scripter
User avatar

Joined: Sat Mar 17, 2007 12:28 am
Posts: 236
eleazar wrote:
To be clear, i'm much more interested in variable starting populations for native planets than empires. If for no other reason than to make it seem like the entire population of the galaxy isn't on the same schedual.

That's what the patch does. I've been on vacation for two weeks and haven't checked all code changes, but it should still be applicable.

_________________
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group