Autoforming

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

Moderators: Oberlus, Committer, Oberlus, Committer

Message
Author
spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

Autoforming

#1 Post by spikethehobbit » Sat May 28, 2016 3:53 am

I'm trying to create an Autoforming building to ease Terraforming. Once built, this building would automatically queue Terraforming and Gaiaforming jobs on the same planet until completed, thereby reducing micromanagement.
The problem I'm running into is that I can't find a way to queue construction from an effectsgroup. I have no idea how to read the parser, let alone modify it, so any help would be appreciated.
Attachments
AUTOFORMER.focs.txt
(2.25 KiB) Downloaded 59 times
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Autoforming

#2 Post by dbenage-cx » Sat May 28, 2016 3:21 pm

No current interface to add to either queue within FOCS. Even if desired, doing so might mean fun things for the AI.

You could directly CreateBuilding (source | wiki), though in this case I'd opt for simply applying the effect if a transformer is within supply range.

For release, I'd argue for an infrastructure requirement and maybe gate the effect through a special with other functionality, to slow down the terraform rate.

spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

Re: Autoforming

#3 Post by spikethehobbit » Sat May 28, 2016 6:02 pm

No current interface to add to either queue within FOCS.
I was afraid of that.

Even if desired, doing so might mean fun things for the AI.
My purpose is purely user automation. The AI has no need of this building.

You could directly CreateBuilding
The purpose is automating production. CreateBuilding would be inappropriate. Supply lines are also irrelevant to the problem.

The best option would either be a proper colony management screen, or user-defined scripting. This is intended as a stopgap until either of those can be implemented.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Autoforming

#4 Post by dbenage-cx » Sat May 28, 2016 6:31 pm

How about a right click context: Enqueue for All Planets > with (this) Species / with (this) Planet Type / with (this) Environment?

spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

Re: Autoforming

#5 Post by spikethehobbit » Sun May 29, 2016 2:11 am

Yes, that is a better idea.

OK, preliminary design:
Automation tab under options. Autoforming will be the only one to start with, but there is potential need for more options
Autoforming option under Galaxy Context Menu.
When active, Terraformable worlds will automatically queue themselves.
Only one Terraform job per world can be allowed, or every planet will queue multiple jobs.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

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

Re: Autoforming

#6 Post by MatGB » Tue May 31, 2016 1:07 am

We've discussed fixing terraform in various ways with various solutions, no one has ever come up with a scheme that everyone liked nor has anyone really tried to script something. I dislike the current system, but I like most of the proposed scriptable solutions nearly as much.

I have two, different, ideas about what should/could be done. Bear in mind I'd like to balance things in such a way that a player makes a choice, either per empire or per species, to change planets to fit the species or change species to fit the planets, so you choose whether to research/build terraforming or xenological adaptation but having both is in some way costly or mutually exclusive—this is a barebones idea as yet, no solid plans at all, ideas welcome there.

Idea 1): We keep the current buildings-as-shortcut system, but you can queue buildings by right clicking on the Objects result for that planet, meaning you can mass select a group of planets that are, say, Egassem/Poor and order the terraforming. This has the advantage that it's not a major change, is easily explained/documented and would go alongside the existing progress we're making to the Objects window to make it more viable as a management window (which it currently is already, but needs more work done to it). The drawback of this is it requires changes made to Objects, I know it's possible as someone put up a partial implementation of building from Objects awhileback for colonising but it was never completed. As an example, my current default saved in persistent-config Objects layout:
objects-layour.png
objects-layour.png (90.09 KiB) Viewed 997 times
(that's sorted by target industry, helps me choose where to build things like Megaliths and/or what planets are close to maxed and would thus benefit from terraforming/gaia right now as opposed to when I've got loads of pp spare at a later point)

Idea 2): We replace the current terraformign building with a Terraforming Ministry, a megastructure along the same lines as the Industrial Centre and similar. This unlocks the Terraform focus for supply linked worlds or allows some sort of remote terraforming for outposts (to tie in with the idea that you don't always adapt your species to be able to live anywhere). A planet with the focus set and in supply of the ministry then gets a random chance each turn, increasing every turn it stays on the focus setting (easy to script) to move one direction on the wheel. The chance is modified by the number of steps already taken (again, easy to script). I like this approach (I like the idea that terraforming is a massive operation carried out by a Seed Colony) and I like using Focus for this sort of thing (I want to remove some of the 'use focus to do this' things we currently add but I'm not averse to adding more when justified). This could be scripted by someone very quickly.

The current system, where you can queue multiple terraforms at once and then juggle their queue location, works fine for me currently, especially since Dilvish changed the way having two or more finish on the same turn worked last year, and I did some cost rebalancing very recently based on this implementation. I'm not, honestly, sure what the proposal above is trying to achieve or why, it seems to add what to me appears unnecessary complication (especially to the script) without actually changing the paradigm of how we terraform—and I genuinely would want auto queueing of gaia tranforms, I've deliberately made them more expensive recently for larger planets in such a way that I don't want to transform worlds that aren't already at nearly max production, there isn't and, to me, shouldn't be, a point.

I really want to 'fix' the way we manage terraforming, but I genuinely thinks improving Objects and making that into a colony management screen is by far the best way to go.
Mat Bowles

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

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Autoforming

#7 Post by LGM-Doyle » Tue May 31, 2016 2:36 pm

Re: Idea 1)
Why require building multiple times? Why not build once and then every N turns it moves the planet 1 environment closer to ideal. Building once solves the queuing problems.

Re Idea 2)
Why do you want it to be random and not predictable? I imagine planet scale engineering has very predictable timelines compared to species line times.

To differentiate Gaia, it could be twice as fast. Or Gaia could adapt to a new species, while Terraforming keeps targeting the original species and requires a rebuild after a change of species.

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

Re: Autoforming

#8 Post by Vezzra » Tue May 31, 2016 6:51 pm

LGM-Doyle wrote:Re: Idea 1)
Why require building multiple times? Why not build once and then every N turns it moves the planet 1 environment closer to ideal. Building once solves the queuing problems.
PP costs. If you have to build only one building, then the only difference between terraforming a world that is only one step from good compared to a world that is several steps from good is increased "time costs" (it takes longer). If you have to build a terraforming building for each step, you also have to invest more PP.

Unless you make the build costs of the terraforming building dependend on how many steps from good a world is. But then you don't have the option of investing only the PP required for one step, to make the world a bit better (which might be desired if you can't afford the PP for terraforming up to good all at once).

Each variant has it's pros and cons...

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

Re: Autoforming

#9 Post by MatGB » Tue May 31, 2016 10:09 pm

Yeah, I don't always want to terraform to 'good', just sometimes to get it off from hostile, etc. Improving the world isn't the same as perfecting it, and I suspect if there was a forced choice I'd end up somewhere between the extremes of adapt or form.

Randomness isn't required, could also be set turn #s, but randomness can be a bit more fun (and could allow for horrible accidents and similar, or just having the terraforming facility infested with xenomorphs and some idiot setting off hi-ex under the nuclear reactor).

(having said this, Enable production queue additions from object wnd by dbenage-cx · Pull Request #687 · freeorion/freeorion is looking rather good, testing it at the moment)
Mat Bowles

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

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Autoforming

#10 Post by dbenage-cx » Tue May 31, 2016 11:55 pm

I believe the original intent was a sort of 0 cost HQ type building that governs terraforming. It sounds like this breaks into the realm of infrastructure, but might not be intended for committal.

Back off-topic:
MatGB wrote: I'd like to balance things in such a way that a player makes a choice, either per empire or per species, to change planets to fit the species or change species to fit the planets, so you choose whether to research/build terraforming or xenological adaptation but having both is in some way costly or mutually exclusive—this is a barebones idea as yet, no solid plans at all, ideas welcome there.
ideas:
Xenological Adaptation: A 'virus' that slowly propagates environment changes. Activates when within supply range of a HQ type building for that species, and dies off after a few turns of no supply connection. Each turn the virus lives increases the chance of terraforming slightly, though each step closer to good has a lower base chance.
This could be the only eventual road to Gaia outside of Artificial Paradise, but reduces the prod/research efficiency dependent on the current environment.
Further malus' might be a chance of different sicknesses such as low morale or reduced pop for a few turns.

Terraforming: A forced and violent project. Change to a focus that also reduces the target population (probably not below 0). Min turns: 3 + (PlanetSize ^ 1.6), after that a 50%(?) chance of environment improvement, 10% chance to skip over the next environment (terran->ocean results in swamp), very rare chance of colony death.
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.

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

Re: Autoforming

#11 Post by MatGB » Wed Jun 01, 2016 12:58 am

Important note. You know when I said earlier I'd put a fair bit of work into balancing terraform production costs? Um, yeah, appears one of the commits for that work never ended up in Master and I only just noticed.
Added multiplier to Terraforming cost

Is now in the right branch (I have no idea where it had got to, I was sure I'd pushed it correctly), so terraforming is now balanced to the costs I thought they were in the above discussion (small planets are cheap to terraform repeatedly, large planets aren't).

So at times we may have been talking at cross purposes because I was sure that error had been fixed back in April.
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
Krikkitone
Creative Contributor
Posts: 1488
Joined: Sat Sep 13, 2003 6:52 pm

Re: Autoforming

#12 Post by Krikkitone » Thu Jun 02, 2016 9:50 pm

Vezzra wrote:
LGM-Doyle wrote:Re: Idea 1)
Why require building multiple times? Why not build once and then every N turns it moves the planet 1 environment closer to ideal. Building once solves the queuing problems.
PP costs. If you have to build only one building, then the only difference between terraforming a world that is only one step from good compared to a world that is several steps from good is increased "time costs" (it takes longer). If you have to build a terraforming building for each step, you also have to invest more PP.

Unless you make the build costs of the terraforming building dependend on how many steps from good a world is. But then you don't have the option of investing only the PP required for one step, to make the world a bit better (which might be desired if you can't afford the PP for terraforming up to good all at once).

Each variant has it's pros and cons...
I think the second idea is preferable....Terraforming seems more like a Massive Large Project that should take you all the way.

Every N turns it moves the planet 1 closer
cost=#(Steps^1.5)*planet size factor

Changing species destroys the building.


That also helps force a choice
Terraforming, big building.. all the way
Adapt species....bit by bit you get better (slower, but cheaper)

spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

Re: Autoforming

#13 Post by spikethehobbit » Sun Jun 05, 2016 12:59 am

@MatGB
Terraforming vs Adaptation
Currently, adaptation increases the number of available worlds, while terraforming increases the quality. From a gameplay perspective, they have different goals and effects. To remain balanced while making them exclusive would require making all worlds colonizable somehow without adaptation. Terraforming outposts could work, but seems to me to be even more troublesome to manage for the player, especially in a multi-species empire. The AI would have problems with it, too.
I'm in favour of the current system, as it allows continuous growth over a longer term. Adapt, then terraform also scales with the size of the empire.

A centralized terraforming building seems unbalanced to me, since that would favour large empires even more than they already are. Currently, the cost to terraform the empire scales with size.

I dislike using focus for terraforming on two grounds: First, it takes the world entirely out of production, making terraforming key worlds prohibitive, especially ones with empire-wide specials. Second, it doesn't clear when the job is done, unless it goes to some default, which will never have a 'right' answer for all cases.

The current system seems to me to be optimal from a balance perspective, but is too micro-managy. I'm trying to solve the management problem without breaking the underlying mechanics.

The Objects window has always seemed kind of hackish to me. As a jack of all trades, it is master of none. A specialized colony management screen would be more usable long term.

@LGM-Doyle
Repeated builds allows you to stop part way if you can't afford the full run.


Thank you all for your input. I'm going to have to think about this for a while. Nothing is ever simple.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Autoforming

#14 Post by LGM-Doyle » Sun Jun 05, 2016 8:30 pm

Terraforming seems a reasonable possible use of focus. I imagine that the entire surplus production of world might be dedicated to solving an environmental crisis/opportunity with terraforming. When it completes it could snap back to the previous setting. The problem @spikethehobit mentions with specials, is a real problem, but when you colonize the world, you either choose to terraform before the empire is dependent on the precious Ki Spice, or not. It is a hard choice.

I have another idea, which occurred to me when I read
spikethehobbit wrote:Currently, adaptation increases the number of available worlds

I thought, it actually does two things: it increases the maximum population on worlds that you can already inhabit and it increases the maximum population on worlds that you can not yet inhabit.

It is the second effect that opens up new worlds for colonization.


So here's the idea.

Remove the second clause, so that adaption only improves population on planets that you can already inhabit.

Add 4 new techs Terraforming 1 through 4, with 4 corresponding buildings Terraformer 1 through 4. (Brilliant names.)
Terraformer x allows any species to colonize the planet as it were x step(s) removed from its original environment. So Terraformer 4 means that planets environment looks "good" for any species.

Make ground troops only able to attack planetary environments within the range of environments that the empire can terraform.


The benefits are that it puts a natural brake on expansion, both military and colonizing. It help the explosive growth problem.

Secondly, it makes some empires natural allies, because that can't interact on the ground.. They can either fight useless space battles, bombard and exterminate planets that they can neither colonize nor conquer for a hundred turns, or they can co-operate.


In any case having 4 buildings fixes the multiple items in the build queue and the requirement for 4 price points. It does not fix that having to build it on every non-ideal planet in your empire.


My first thought was that the Terraforming tech creates 4 new ship modules Terraform module 1 through 4. Some of them core modules. Terraforming ships would need to be built on an inhabited planet to set the target environment, like colony ships. However, this would be as micro-managey as the colony ships were, before they were largely replaced by the outposts. I thought it was funny that you could use terraforming in a hostile manner.

spikethehobbit
Space Squid
Posts: 58
Joined: Mon Aug 27, 2012 7:24 pm

Re: Autoforming

#15 Post by spikethehobbit » Tue Jun 07, 2016 1:22 am

@LGM-Doyle
Your suggestion essentially swaps the roles of Terraforming and Adaptation. Ignoring that, different colonizers for different environments is exactly what MOO1 did. In practice it gets very micro-managy, which is what I'm trying to avoid.
All contributions are submitted under GPL or LGPL v2 or later, or under appropriate Creative Commons licence, consistent with project guidlines.

Post Reply