Notify when colony base is possible

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Tualha
Space Floater
Posts: 29
Joined: Tue Dec 09, 2014 11:46 pm

Notify when colony base is possible

#1 Post by Tualha »

It would be nice if you got a message when a planet reaches 3 population and can build colony bases. I often forget to check until the population is well past 3.

A refinement would be to notify the user whenever a local, unpopulated planet becomes available for colonization; meaning, something else in the system has population 3, and this planet is habitable by the species on that planet with current technology. I guess you'd want to just flag the entire system and emit one message ("A planet in system X can be colonized"), not emit a message for each species and planet. Also flag that planet-species combination so the message isn't emitted again. Ugh, getting complicated. Discussion?

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Notify when colony base is possible

#2 Post by Vezzra »

Tualha wrote:Ugh, getting complicated.
Exactly. There's no straightforward way to tell when a planet is "ready for colonization", far too many assumptions would have to be made on what the player might want. The only thing that might make sense is your first suggestion:
It would be nice if you got a message when a planet reaches 3 population and can build colony bases. I often forget to check until the population is well past 3.
That's simple and straightforward. Whenever a colony reaches a pop of 3, the player gets a notification. A reasonable additional condition would be to restrict that notification to colonies with species that can colonize.

User avatar
Tualha
Space Floater
Posts: 29
Joined: Tue Dec 09, 2014 11:46 pm

Re: Notify when colony base is possible

#3 Post by Tualha »

Vezzra wrote:That's simple and straightforward. Whenever a colony reaches a pop of 3, the player gets a notification. A reasonable additional condition would be to restrict that notification to colonies with species that can colonize.
Something like this, I think:

Code: Select all

during step that updates planet population:
    if oldpop < 3.0
    and newpop >= 3.0
    and planet belongs to an empire
    and species can colonize
    and no other planet in this system with this species has pop >= 3.0
    then notify planet owner
That way, it doesn't spam you about all the secondary planets in the system being ready to build colony bases, when you already had a planet there that could.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Notify when colony base is possible

#4 Post by Vezzra »

Tualha wrote:That way, it doesn't spam you about all the secondary planets in the system being ready to build colony bases, when you already had a planet there that could.
That point is only valid if all the colonies you have in a system have the same species. In case you have colonies with different species that are differently suited for the remaining uncolonized planets in the same system, you'll be waiting for a notification of the right colony reaching pop 3. Which won't necessarily be the first one to do that.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Notify when colony base is possible

#5 Post by Dilvish »

One idea that periodically crosses my mind is allowing for customizable SitRep triggers & messages, somewhat akin to how the empire_statistics.txt file lets you customize which graphs are available ingame. The pieces that would need to be specified would be the trigger condition, a type label for the filter controls, and the sitrep message itself. I think there are a lot of events such as this, probably too many to reasonably build into default content without excessive cluttering of the filter controls, that some people would like to receive but others wouldn't.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Notify when colony base is possible

#6 Post by Bigjoe5 »

Vezzra wrote:
Tualha wrote:It would be nice if you got a message when a planet reaches 3 population and can build colony bases. I often forget to check until the population is well past 3.
That's simple and straightforward. Whenever a colony reaches a pop of 3, the player gets a notification. A reasonable additional condition would be to restrict that notification to colonies with species that can colonize.
Is it simple and straightforward to do in FOCS? It definitely needs to stay out of the code.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Notify when colony base is possible

#7 Post by Vezzra »

Bigjoe5 wrote:Is it simple and straightforward to do in FOCS?
Well, that's a different question. I don't know if there is a condition that can check if a species can colonize (but that can surely be added). Checking the current population should be easy, the challenge here will be to trigger the notification only once. I have no idea how to do that, that would probably require some more extensions to FOCS.
It definitely needs to stay out of the code.
Yep, absolutely. We can't hardcode something like that.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Notify when colony base is possible

#8 Post by Dilvish »

Vezzra wrote:Checking the current population should be easy, the challenge here will be to trigger the notification only once. I have no idea how to do that, that would probably require some more extensions to FOCS.
I don't think we really want to force the notice to occur absolutely only once-- if the population goes above 3, but then gets knocked back down to 2 again from a series of biological attacks and/or loss of growth specials, then the owner will most likely want to receive another notice when the population again reaches 3.

I think that the best approach would be the simple one of triggering the Sitrep just as the population crosses above 3. It should be reasonably rare for the pop to waver back and forth across the threshold repeatedly. Here is a basic patch that does that; it should probably also check for the existence of a Conc Camp or Evacuation and not trigger in that case.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Notify when colony base is possible

#9 Post by Vezzra »

Dilvish wrote:I don't think we really want to force the notice to occur absolutely only once-- if the population goes above 3, but then gets knocked back down to 2 again from a series of biological attacks and/or loss of growth specials, then the owner will most likely want to receive another notice when the population again reaches 3.
Yep, of course. What I meant was that it must be scripted in a way that the message doesn't get triggered every turn a colony has >3 pop. That would turn out, um, badly... ;)
I think that the best approach would be the simple one of triggering the Sitrep just as the population crosses above 3. It should be reasonably rare for the pop to waver back and forth across the threshold repeatedly. Here is a basic patch that does that; it should probably also check for the existence of a Conc Camp or Evacuation and not trigger in that case.
A quick test indicates that this works like a charm. As it's a simple, but quite useful addition, I went ahead and committed it. I don't think that there will be really any issues with CC or Evac, but if, we can still add that extra check in.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Notify when colony base is possible

#10 Post by Dilvish »

Vezzra wrote:A quick test indicates that this works like a charm.
er, well, almost -- turns out I accidentally cannibalized the GasGiant supply malus when adding this. Since we're referring to this pop size of 3 in so many places now it also seemed good to extract it out to a macro, so: r7796

Code: Select all

r7796 | dilvish-fo | 2014-12-22 11:27:34 -0800 (Mon, 22 Dec 2014) | 1 line
restored the GasGiant supply malus that was accidentally removed in r7795, and refactored the colony size of 3 as a subsitution macro MIN_RECOLONIZING_SIZE
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Revlot
Space Floater
Posts: 35
Joined: Fri Apr 03, 2015 10:00 pm

Re: Notify when colony base is possible

#11 Post by Revlot »

Sure would be nice to 'force' the growth by landing 3 outposts at once, or on consecutive turns. Multiple outposts ships cost PP, so if you want the colony faster then you pay a price? But you could send a fleet of 3 outposts and 1 colony and there you are.
I understand that this is a work in progress and that my comments here are just comments and NOT requests for immediate code fixes.
Thank you for the work done so far - please continue with whatever part of the game you are currently working on.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Notify when colony base is possible

#12 Post by Dilvish »

Revlot wrote:Sure would be nice to 'force' the growth by landing 3 outposts at once, or on consecutive turns. Multiple outposts ships cost PP, so if you want the colony faster then you pay a price? But you could send a fleet of 3 outposts and 1 colony and there you are.
My recollection is that if you really want to, you can load a ship with multiple colony pods (so long as it has enough internal slots), and in that way get a starting colony size of 2, 3, whatever. But with current colony pod costs that is a very expensive approach, not worth it. Cybernetics or somesuch in the Growth line of techs gives you a cybernetic colony pod for starting colony size of 3 at the same cost as a regular colony pod.

If you switch to a current test build, though, an outpost followed by a colony building nearly always works out better than a colony ship, if the supply is available for the former approach.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Notify when colony base is possible

#13 Post by Geoff the Medio »

Revlot wrote:Sure would be nice to 'force' the growth by landing 3 outposts at once, or on consecutive turns.
Being able to move around population by producing and moving around colony ships and landing them on already-colonized planets is something that it is intended to avoid. Doing this would be rather micromanagement-intensive, and being able to do it would likely creation situations where it is strategically beneficial to do so, thereby motivating some players to feel like they have to (do the probably un-fun micromanagement).

Post Reply