Revised colonization mechanics

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

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

Re: Revised colonization mechanics

#151 Post by Vezzra »

Dilvish wrote:
MatGB wrote:To topic, currently I think the formula might not be kicking in soon enough, it's virtually always 5 or 6 turns for me in my games.
It seems to me that 6 definitely kicks in around a reasonable distance, and I can remember seeing them up to 8 or 9 in situations where that made sense.
In my current test game I have a colony building that has a build time of 12 turns. It doesn't happen very often that the build time for colony buildings get above 5, but that's because usually the new colonies aren't that far from a proper source colony.

So, as far as I can tell, feature works as intended.

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

Re: Revised colonization mechanics

#152 Post by Vezzra »

Dilvish wrote:Vezzra's idea for exploring possibilities for a supply capacity empire meter are interesting, but in the meantime, I don't think that any of the underlying motives for this empire meter actually require it as an actual meter -- a meter would eliminate the need for redundant calculations
I think it's more than that - at least it's supposed to be. As far as I understood em3's suggestion, this colonization speed/supply capacity empire meter is supposed to solve the problem that with our current approach/implementation, the "colonization speed" "meter" is actually determined by the fastest ship the player has currently build (which is better than what we had before, but still a less than optimal solution IMO).

So this meter would not just eliminate the need for redundant calculations, but actually change the mechanic. You no longer depend on an actual ship, with all the issues/potential exploits that come with it, but would have something that IMO is a cleaner, more elegant solution.

Provided we can come up with more uses for this meter than just calculating the build time of colony buildings. Otherwise that'll be overkill, as I already mentioned.

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

Re: Revised colonization mechanics

#153 Post by Dilvish »

Vezzra wrote:So this meter would not just eliminate the need for redundant calculations, but actually change the mechanic.
I have yet to see any proposed calculation for the meter that could not also be done in FOCS. I don't think empire meters have any handling for matched meters (current/target), though if we added that, then I agree that having a target meter for this thing would change the mechanics and smooth it out nicely.
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
em3
Vacuum Dragon
Posts: 630
Joined: Sun Sep 25, 2011 2:51 pm

Re: Revised colonization mechanics

#154 Post by em3 »

Dilvish wrote:I have yet to see any proposed calculation for the meter that could not also be done in FOCS.
And what calculation is used for calculating empire detection strength?

I assumed it's merely a number, which is modified by researched technologies.

EDIT: To elaborate - I was proposing to make it an explicit value, that would also be included in the description of techs (like "increases the speed of colonization freighters by 50" or whatever).
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556

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

Re: Revised colonization mechanics

#155 Post by Vezzra »

Finally getting back to this topic...
Dilvish wrote:I have yet to see any proposed calculation for the meter that could not also be done in FOCS.
Well, sticking with the "colonization speed" example:
Vezzra wrote:You no longer depend on an actual ship
Having a "supply capacity" empire meter to calculate the build time of colony buildings instead of basing that calculation on the fastest actual ship the empire owns would definitely change the mechanic in this case, no? And doing that in FOCS without either the meter or the ship sounds messy - probably doable, but having the meter would allow for a much cleaner, transparent and more comprehensible solution?
I don't think empire meters have any handling for matched meters (current/target), though if we added that, then I agree that having a target meter for this thing would change the mechanics and smooth it out nicely.
I don't quite see the use of a paired meter in the scenario at hand, but maybe I'm missing something obvious...?

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

Re: Revised colonization mechanics

#156 Post by Dilvish »

Vezzra wrote:
Dilvish wrote:I have yet to see any proposed calculation for the meter that could not also be done in FOCS.
Well,...Having a "supply capacity" empire meter to calculate the build time of colony buildings instead of basing that calculation on the fastest actual ship the empire owns would definitely change the mechanic in this case, no?
Hmmph. in a technical and strict interpretation of your question the answer is "maybe", but that all depends on how the meter is set, and regardless is misleading and has really nothing to do with a response to my quote here. I'm pretty sure that even the empire detection meter could be replaced with a macro just fine, but since it gets used so dang much in the visibility calcs it is more efficient to let it be a meter. You could perhaps make that same argument here, but I don't think that this calc really gets used any more than a multitude of other calcs that we don't bother caching in a meter. My statement still stands, it seems to me without any true response at all.
And doing that in FOCS without either the meter or the ship sounds messy - probably doable, but having the meter would allow for a much cleaner, transparent and more comprehensible solution?...I don't quite see the use of a paired meter in the scenario at hand, but maybe I'm missing something obvious...?
I'm afraid this seems like a hand-waving response to me-- the meter itself is going to be specified in FOCS, yes? How would you use it that couldn't be done with a macro? My reference to paired meters was because that's the only way I see the meter providing something that could not easily be done directly in FOCS without a meter.
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: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Revised colonization mechanics

#157 Post by Vezzra »

Dilvish wrote:Hmmph. in a technical and strict interpretation of your question the answer is "maybe", but that all depends on how the meter is set, and regardless is misleading and has really nothing to do with a response to my quote here. I'm pretty sure that even the empire detection meter could be replaced with a macro just fine, but since it gets used so dang much in the visibility calcs it is more efficient to let it be a meter. You could perhaps make that same argument here, but I don't think that this calc really gets used any more than a multitude of other calcs that we don't bother caching in a meter.
Well, of course, that's why I already stated earlier:
Vezzra wrote:Provided we can come up with more uses for this meter than just calculating the build time of colony buildings. Otherwise that'll be overkill, as I already mentioned.
I've been arguing assuming there would be more applications for such a meter. As long as we're only talking about making the build time of the colony buildings depend on a handful of engine techs, a FOCS macro obviously is the simpler solution.
My statement still stands, it seems to me without any true response at all.
Sorry if I've been a bit unclear with regard to my assumptions :oops:

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Revised colonization mechanics

#158 Post by MatGB »

FOCS macro for now, with possible meter based on it if we find other uses?

FWIW, having it based on fastest ship speed is slightly annoying me currently, if I move my fasted ship outside of Intersteller Logistics bonus range the build time sometimes goes up a little and messes up timings, I'd really like it to be a static bonus based on potential, and the engines tech is a good measure.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Revised colonization mechanics

#159 Post by MatGB »

Playing with the new test version where the AI is using the new mechanics.

It is doing so fairly well overall, and filling systems up nicely, specifically at one point I had a relatively newly conquered system about to be cut off by an AI fleet, so I set it to build an outpost ship. When that ship finally completed, I found there was nowhere in the three clusters it was linked to that the AI hadn't already grabbed, every single habitable rock had something living on it, mostly George.

However, I've noted a few instances where there are two different colony buildings being built at the same time, including one where it appears the new building was being built when the first one had completed but not activated and turned into a colony.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

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

Re: Revised colonization mechanics

#160 Post by Dilvish »

MatGB wrote:However, I've noted a few instances where there are two different colony buildings being built at the same time, including one where it appears the new building was being built when the first one had completed but not activated and turned into a colony.
Please get more info on that next time you see it (or check the savegame if you still have it)-- I don't see how that is possible even if the AI wanted to do that. If the new building was a different species (is that what you meant by 'different'?), then the game would allow it, but I didn't think the AI code would allow that.
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
Sloth
Content Scripter
Posts: 685
Joined: Sat Mar 17, 2007 12:28 am

Re: Revised colonization mechanics

#161 Post by Sloth »

I went ahead and scripted a macro for colonization speed based on techs instead of max ship speed:

instead of:

Code: Select all

/ max(60, (max
                      value = LocalCandidate.speed
                      condition = And [
                          Ship
                          OwnedBy empire = Source.Owner
                      ]
               ))
i used this:

Code: Select all

/ (60 
    + 20 * (If condition = Or [ 
        OwnerHasTech name = "SHP_MIL_ROBO_CONT"
        OwnerHasTech name = "SHP_ORG_HULL"
        OwnerHasTech name = "SHP_FRC_ENRG_COMP"
    ])
    + 20 * (If condition = Or [ 
        OwnerHasTech name = "SHP_ORG_HULL"
        OwnerHasTech name = "SHP_FRC_ENRG_COMP"
    ])
    + 20 * (If condition = OwnerHasTech name = "SHP_FRC_ENRG_COMP")
    + 10 * (If condition = OwnerHasTech name = "SHP_IMPROVED_ENGINE_COUPLINGS")
    + 10 * (If condition = OwnerHasTech name = "SHP_N_DIMENSIONAL_ENGINE_MATRIX")
    + 10 * (If condition = OwnerHasTech name = "SHP_SINGULARITY_ENGINE_CORE")
    + 10 * (If condition = OwnerHasTech name = "SHP_TRANSSPACE_DRIVE")
)
I've teseted it and it worked well. Researching each key tech reduced the building time for the extremely far away outpost significantly (i had one that went from 20 to 9 only with the hull techs and SHP_IMPROVED_ENGINE_COUPLINGS).
What do you think?
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.

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

Re: Revised colonization mechanics

#162 Post by Dilvish »

Is a speed boost (especially +60!) really justified for SHP_FRC_ENRG_COMP? That tech doesn't even grant a hull with an internal slot.

So that seems like a bug, but other than that it looks like an improvement.

It would probably also be appropriate to grant at least some bonus for SHP_INTSTEL_LOG (perhaps not the full 20 since ships might not always be in range).
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
Sloth
Content Scripter
Posts: 685
Joined: Sat Mar 17, 2007 12:28 am

Re: Revised colonization mechanics

#163 Post by Sloth »

Both valid points. Both easy to fix:

Code: Select all

/ (60 
    + 20 * (If condition = Or [ 
        OwnerHasTech name = "SHP_MIL_ROBO_CONT"
        OwnerHasTech name = "SHP_ORG_HULL"
        OwnerHasTech name = "SHP_QUANT_ENRG_MAG"
    ])
    + 20 * (If condition = Or [ 
        OwnerHasTech name = "SHP_ORG_HULL"
        OwnerHasTech name = "SHP_QUANT_ENRG_MAG"
    ])
    + 20 * (If condition = OwnerHasTech name = "SHP_QUANT_ENRG_MAG")
    + 10 * (If condition = OwnerHasTech name = "SHP_IMPROVED_ENGINE_COUPLINGS")
    + 10 * (If condition = OwnerHasTech name = "SHP_N_DIMENSIONAL_ENGINE_MATRIX")
    + 10 * (If condition = OwnerHasTech name = "SHP_SINGULARITY_ENGINE_CORE")
    + 10 * (If condition = OwnerHasTech name = "SHP_TRANSSPACE_DRIVE")
    + 10 * (If condition = OwnerHasTech name = "SHP_INTSTEL_LOG")
)
Quantum Energy Hulls are the first hulls with speed 120 and internal slots. Is a bonus of 10 for interstellar logistics appropriate?
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.

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

Re: Revised colonization mechanics

#164 Post by Dilvish »

Sloth wrote:Is a bonus of 10 for interstellar logistics appropriate?
I think so. That list looks fine to me now.
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: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Revised colonization mechanics

#165 Post by Vezzra »

Yes, that looks quite good. Pls create a PR.

Post Reply