Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Yitzi on June 21, 2013, 05:27:03 PM

Title: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on June 21, 2013, 05:27:03 PM
As part of patch version 2.2, I will be making new options for the unit cost formula.  I have room for 8 options, numbered 0 to 7; 0 is for Firaxis' formula, and 1 is for my own, but that leaves 6 for people who have other ideas.  (If I get more than 6, we'll use a vote.)

The following values may be used in the formulas (I'm using lowercase letters for unmodified versions, uppercase for modified):
r: The unit's reactor value.
a: The cost of the unit's armor.
A: The cost of the unit's armor, halved for sea units and multiplied by 2*r for air units.
w: The cost of the unit's weapon or module.
W: The modified cost of the unit's weapon or module; choose the modification as part of the proposal.
C: The cost of the unit's chassis.  There will be an additional option to add the reactor cost for sea units and plus the bonus reactor-based speed (twice the reactor by default) for air units (this option is active in the un-modded version).
S: The total cost of the unit's special abilities.

And some not-really-numerical values:
-Whether the unit is land, sea, or air.
-The unit's module type (probe team, formers, weapon, etc.)
-Each submission will also get a single alternate form (which can be set to on or off in alphax) for a minor variant.

When submitting a formula, remember that it must be the cost in rows; there's no way to add a mineral cost besides the rows.  Furthermore, whenever dividing by something, make sure to say whether you want to round up, down, or normally.

Note that none of this will apply to planet buster missiles; their cost in rows is simply the cost marked for planet busters.

Post 2 will be reserved for listing the submissions.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on June 21, 2013, 05:27:42 PM
Mode 0 (submitter:Firaxis; variant proposed by Yitzi):
W is w or A/2+1 (rounding down), whichever is more.
Base cost is WX(A+C)/(2^(r+1)), rounding normally. 
If C=1, divide by 2 (rounding down) and add 1. 
If w>1 and a>1 and either it is a combat unit or the alternate form is not being used, add 1, and then another 1 if it is a land unit with C>1.
If it is a non-probe-team sea unit, divide by 2, rounding up.
If it is an air unit, divide by 2, rounding down; if it is also a combat unit, divide by 2 again, rounding down.
Unless W=A=C=r=1, apply a minimum of (1.5)Xr, rounding up.
Now multiply by (S+4)/4, rounding normally.

Mode 1 (submitter: Yitzi):
W is w or A/3 rounding up, whichever is more.
Base cost is WX(A+C)X(6-r)/20, rounding normally. 
If w>1 and a>1 and either it is a combat unit or the alternate form is not being used, add 1, and then another 1 if it is a land unit with C>1.
If it is a non-probe-team sea unit, divide by 2, rounding up.
If it is an air unit, divide by 2, rounding down; if it is also a combat unit, divide by 2 again, rounding down.
Unless W=A=C=r=1, apply a minimum of r+1.
If C=1, divide by 2 (rounding down) and add 1.
Now multiply by (S+4)/4, rounding normally.
If the result is more than 250, reduce to 250.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on July 05, 2013, 11:02:12 PM
Mode 1 looks good and likely would be a huge improvement over Mode 0.  Would this be including your proposed tech tree and weapon/armor cost changes, or is that something for a later patch?  I think there were some discussions about making ECM and AAA to -1 (cheap on defense units).  Also, could you perhaps do ~4 examples of costs with Mode 1 to demonstrate?  Maybe an air unit, a sea unit, a non-combat unit, and an infantry unit.

I think the only variant I'd perhaps like to see is one that encourages maxing weapons and armor on all units.  I know it's not in the spirit of the game to have ultimate units.  So that formula might have to have a higher weight on better chassis.  I think that even with the reactor nerf, reactors vastly overpower weapon and armor techs.  I'm not sure I'd always play on this mode but I think EM or someone else wanted it as well.  I can come up with a formula based on the answer to the above.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on July 05, 2013, 11:30:20 PM
Mode 1 looks good and likely would be a huge improvement over Mode 0.  Would this be including your proposed tech tree and weapon/armor cost changes, or is that something for a later patch?

Neither.  This thread is only for things that can't be done via alphax.txt, which tech tree and weapon/armor cost both can.

Quote
I think there were some discussions about making ECM and AAA to -1 (cheap on defense units).

Also doable with alphax.

Quote
Also, could you perhaps do ~4 examples of costs with Mode 1 to demonstrate?  Maybe an air unit, a sea unit, a non-combat unit, and an infantry unit.

I have to go soon, but I'll try to do examples later.  This is mainly for if anyone else has options they'd like to see, though.

Quote
I think the only variant I'd perhaps like to see is one that encourages maxing weapons and armor on all units.  I know it's not in the spirit of the game to have ultimate units.

That's fine; people will pick which formula, so they can use that one if they want a different spirit of the game.

You want to write that variant, or should I come up with one?

The whole point here is that you can submit whatever variants you want (well, unless it's too many, in which case people vote on them.)
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on July 06, 2013, 12:00:35 AM
Fair enough.  You can come up with the formula, since you'll be coding it you know better what's easier to implement.  In general my thought was to add weapon/armor rather than multiply.  A more extreme version would take the maximum costing of weapon and armor.  I think in Mode 2 that faster units will need a high multiplier (~2x inf cost for fast land, ~3x inf cost for air) to discourage making all-rover or all-air armies.  Since they will be much better on defense than they currently are.

Where weapons, armor, and chassis speeds can be edited in alphax.txt; there isn't much else but reactor tweaking.  Perhaps two corresponding modes where reactor scaling is reduced a bit more (~50% cost reduction each reactor level rather than 100%-150%).  Just my opinion but I think even 100-150% is edging on game-breaking - at least for military units.  Non-combat units might need to scale a bit stronger with reactor in these modes.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on July 07, 2013, 03:51:41 AM
How's this sound:

-In mode 2, the cost is (w+a)X2, halved for infantry and +50% for air.  Reactor would then have no effect on cost, giving it +100% advantage for fusion, +50% for quantum, and +33% for singularity.  In the alternate form, reactors other than level 1 have a +33% increase to price, reducing the advantage for fusion to 50%.  Note, however, that either way, there will be no point in using rovers once hovertanks become available, and no point in using foils once cruisers become available. 

-Mode 3 is the same as mode 1, except that the cost formula is instead WX(A+C)/4 for reactor level 1, and WX(A+C)/3 for other reactors.  (This means it actually increases in cost with fusion, to compensate for the huge hit point boost; that way, fusion and quantum are worth a 50% effectiveness boost each, and singularity is worth a 33% boost.)  Note that even without increasing the cost of armor and weapons, late-game troops will have costs comparable to mid-to-late-game facilities.

Mode 4 is the same as mode 2, except that the base cost is Max(w,a)X2 instead.

So does that look good, or you want to change things?


As for examples for mode 1, I realized that giving enough examples to give a good sense of what's going on would just be too prohibitive.  Instead, once I code it and publish the patch, you can play around with it as much as you want...and if you want changes, you can put them here for the next patch.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on July 07, 2013, 04:10:31 AM
Agreed.  The unit workshop would be a faster way to test the modes.  This is probably a good enough starting point without doing up many cases.

IMO rovers and foils going obsolete isn't a huge deal.  They kind of already do, and the same could already be said of needlejets and copters.

And on a side note I think that the side-effect of higher overall unit costs in the mid and late game is a good thing.  I feel that it should be a real challenge to get a city to the point where it can make a good unit every turn. 
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Earthmichael on July 25, 2013, 01:54:30 AM
Can one mod so that zero cost option are truly zero in any unit.

For example, if my armor is great than weapon, Trance should always cost 0, regardless of any other options picked.   It does not do this now.

Also, it would be great if cost of Clean reactor did not go up with reactor size.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on July 25, 2013, 03:20:45 AM
Also, it would be great if cost of Clean reactor did not go up with reactor size.

I kind of felt it was an oversight that higher reactors didn't require more support in minerals (i.e. 2x/3x/4x the base for the later reactors).  This is a bit on a tangent but it does tie in as mineral upkeep is very closely tied to unit costs.  SUPPORT SE becomes very useless beyond the early-mid game, and not just because of Clean
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on July 25, 2013, 03:59:10 AM
Can one mod so that zero cost option are truly zero in any unit.

For example, if my armor is great than weapon, Trance should always cost 0, regardless of any other options picked.   It does not do this now.

This is a bug, and was fixed as early as patch version 1.3.  If you're finding that it still applies, please let me know which options you picked and which patch version you're using, and I'll look into it.

Quote
Also, it would be great if cost of Clean reactor did not go up with reactor size.

Can you explain what you mean?  Last I checked, it costs 2 points (+50% cost) no matter which reactor you use.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 13, 2013, 06:46:59 PM
To clarify myself/EM:
I think that meant that Clean went up in absolute cost as the game went on, whereas mineral cost is always fixed (1 mineral per unit).  Therefore the value of Clean gets diminished on more expensive units.  An early game unit costing 20 goes to 30, for a 10 turn break-even on investment.  A unit that costs 60 (later game/reactor), goes to 90 cost with Clean, for a 30 turn break-even. 

So Clean could have a fixed cost (probably difficult to code in.  Or it could just be accepted that it's better on cheaper units.

An alternative way to somewhat balance out later reactors with Clean would be to make Fusion units cost 2 minerals per turn, Quantum 3 minerals per turn, and Singularity 4 minerals per turn.  This way the break-even time stays more constant.  As well then Support SE and/or a mix of Clean is more relevant in the mid and late game.  Not sure how hard that would be to put in either.  It's sort of doing the same thing as reducing the construction cost, but rather nerfing down Reactors by means of maintenance costs.

--

Also as an aside great work on the cost formulas.  I've been playing around with variants #2/#4 lately.  Obviously they take re-scaling of the base weapon/armor costs but it looks good.  Is it possible to make chassis cost the multiplier rather than a fixed 2x(land/sea) and 3x(air)?  Admittedly, this probably isn't that useful unless non-integer values can be put in.  2x/3x is a good default otherwise.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 13, 2013, 07:40:07 PM
To clarify myself/EM:
I think that meant that Clean went up in absolute cost as the game went on, whereas mineral cost is always fixed (1 mineral per unit).  Therefore the value of Clean gets diminished on more expensive units.  An early game unit costing 20 goes to 30, for a 10 turn break-even on investment.  A unit that costs 60 (later game/reactor), goes to 90 cost with Clean, for a 30 turn break-even.

So Clean could have a fixed cost (probably difficult to code in.  Or it could just be accepted that it's better on cheaper units.

An alternative way to somewhat balance out later reactors with Clean would be to make Fusion units cost 2 minerals per turn, Quantum 3 minerals per turn, and Singularity 4 minerals per turn.  This way the break-even time stays more constant.  As well then Support SE and/or a mix of Clean is more relevant in the mid and late game.  Not sure how hard that would be to put in either.  It's sort of doing the same thing as reducing the construction cost, but rather nerfing down Reactors by means of maintenance costs.

Giving Clean an absolute cost would not be all that difficult; it would be in addition to the usual ability cost, and then you could set the ability cost to zero.  It does seem somewhat awkward to me, though.

Increasing the support cost for higher-reactor units would also be definitely doable, and would make Support scale better as well.  It wouldn't scale all that well itself, though (as unit cost does not scale proportional to reactor), unless you change the unit cost formula to one that does scale pretty closely with reactor (which actually is worth doing for other reasons too; such considerations were what gave rise to this thread in the first place.)

Do you have a preference between the two?  Or would you rather make both be options?

Quote
Also as an aside great work on the cost formulas.  I've been playing around with variants #2/#4 lately.  Obviously they take re-scaling of the base weapon/armor costs but it looks good.  Is it possible to make chassis cost the multiplier rather than a fixed 2x(land/sea) and 3x(air)?

Yes; that would be yet another two formulas.  You want me to add them?  (If I do, also note that it won't be halved for infantry.)
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 13, 2013, 08:35:48 PM
I agree - having Clean be the only modifier with an absolute cost is clunky and might introduce more bugs with dual-ability units.  What if support cost was based on the total unit cost as an end-around?  i.e. support per turn = ceiling[unit cost/40] or something of the like?  It might get complex to code though, as the game would have to prioritize the highest support cost units first to be free.  Ideally I suppose the game would exempt the top X costing units, then sum the cost of the rest, and divide by 40 (or some factor in alphax.txt) for the total maintenance per turn on the base.  For SUPPORT SE -4 and below, the maintenance would then just be doubled.

This is sort of another aside - the limitation of 1 unit a turn per base.  How easy/hard is this to change?  I assume fairly difficult...there are so much complexities with how bases make things as-is. Which maybe isn't a bad limitation, but later game units are often made in a single turn due to reactor cost reduction effects, and the later mineral facilities.  As far as military units go, higher armor/weapon costs&values are one way to go, but then that shifts things deeply to PSI units in the later game (as they have fixed cost).  But that does create some interesting counter-play which I'd have to look into.

The bigger impact to 1 unit per base/turn is that in the early-mid and on, a base always can make a crawler or former, and they're incredibly powerful throughout the entire game.  On the whole I think formers and crawlers are overpowered on their cost and tough to balance.  Early game that first former seems fine in cost, but churning out lots is really simple later on. If they had some sort of satellite-like limitation based on city size I think that would go a long way to balance.  One idea might be to make them cost more minerals based on how many total formers/crawlers you already have.  At least with how the game is now, the loss of formers/crawlers in a war tends to even outweigh the military losses - since you're pretty much restricted to a unit per base/turn.  It can take a long time to get them all back even if your mineral production is really good.



Isn't infantry basically straight costed in #2/#4?  The cost is multiplied by 2 then divided by 2 bringing you back to 1.  I think this model is only worth it as a replacement to #2/#4 if non-whole numbers can be put in for chassis multipliers.  For example, I could put in 1.5 for chassis cost on Rovers and they would cost 150% that of a Rover.  Another workaround if its an integer only field is 50 could correspond to a +50% cost multiplier?  I'm just looking at more customizability on a per-chassis basis, not a change to the formula.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 13, 2013, 09:57:02 PM
I agree - having Clean be the only modifier with an absolute cost is clunky and might introduce more bugs with dual-ability units.  What if support cost was based on the total unit cost as an end-around?  i.e. support per turn = ceiling[unit cost/40] or something of the like?

I like that idea.  But it needn't be 40; that (or rather one-tenth that, so it's the number you divide the cost in rows by) could be settable by alphax, and if you set it equal to 255 that results in a constant cost of 1 (since no unit can cost more than 255 rows).

Quote
It might get complex to code though, as the game would have to prioritize the highest support cost units first to be free.

I don't think that would be so hard...it'd be a bit fancy (I haven't figured out exactly how to do it yet, by which I mean that I've figured out a way to do it but think I can do better), but nothing really problematic.  Probably easier than some stuff I've done already.

Quote
Ideally I suppose the game would exempt the top X costing units, then sum the cost of the rest, and divide by 40 (or some factor in alphax.txt) for the total maintenance per turn on the base.

No, as then 4 scout patrols would only cost 1 support, which is probably too low.  And the support icons would be a total mess...let's leave it at a full number for each unit.

Quote
This is sort of another aside - the limitation of 1 unit a turn per base.  How easy/hard is this to change?

Fairly easy, I think, though it'll still be fairly limiting unless you increase the amount of minerals that can carry over.  I think I'll add it as an option, though at the end of my list.  Or I might do it earlier, together with fixing the stockpile energy bug, if that proves easier.

Quote
Which maybe isn't a bad limitation, but later game units are often made in a single turn due to reactor cost reduction effects, and the later mineral facilities.  As far as military units go, higher armor/weapon costs&values are one way to go, but then that shifts things deeply to PSI units in the later game (as they have fixed cost).

So do the counters to PSI units, though...

Quote
The bigger impact to 1 unit per base/turn is that in the early-mid and on, a base always can make a crawler or former, and they're incredibly powerful throughout the entire game.  On the whole I think formers and crawlers are overpowered on their cost and tough to balance.  Early game that first former seems fine in cost, but churning out lots is really simple later on. If they had some sort of satellite-like limitation based on city size I think that would go a long way to balance.  One idea might be to make them cost more minerals based on how many total formers/crawlers you already have.  At least with how the game is now, the loss of formers/crawlers in a war tends to even outweigh the military losses - since you're pretty much restricted to a unit per base/turn.  It can take a long time to get them all back even if your mineral production is really good.

Things to think about...

Quote
Isn't infantry basically straight costed in #2/#4?  The cost is multiplied by 2 then divided by 2 bringing you back to 1.

Yes; with the proposed rules it wouldn't be divided by 2.

Quote
I think this model is only worth it as a replacement to #2/#4 if non-whole numbers can be put in for chassis multipliers.

That's so infeasible as to be effectively impossible...you could, however, reduce weapon and armor costs to compensate, and then assign infantry a cost more than 1.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 14, 2013, 12:11:14 AM
Good points.  Maintenance on a per-unit basis is probably best. 

Keep the #2/#4 modes as-is then.  I can balance things around ECM/AAA cost and power from there.

And yea, I think that's my only real remaining gripe is the former/crawler cost.  They're fine to start but should increase the more of them you have.  Other veteran players can weigh in but I find the whole 5+ formers and crawlers per base a bit tedious.  I feel there should be a bit more of a balance between investment in military, buildings, and non-combat units.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Earthmichael on September 14, 2013, 04:35:58 AM
I still like the idea of clean reactor costing a constant 1 extra row, regardless of reactor.  As you get later in the game, where the higher reactors show up, you have less time to get your payback.  And I like eliminating the need for micromanaging what city is supporting what unit, to get things balanced, so I prefer to make most everything clean.  I don't think increasing the cost of clean by reactor size makes sense.  In fact, weapons and defense costs go down with higher reactors!  So I think a constant 1 row for clean is a good idea.

Otherwise, I will just keep making my reaction 1 clean formers, which seems stupid when I have fusion technology ( or higher) but while my massive attack unit have significantly lower cost with higher reactors.  Makes no sense to me.

As for formers and crawlers, I tend to place my crawlers and then forget about them.  No micromanagement needed.  Formers I tend to reduce the micromanagement by building road networks, and then sending them out in packs of say 4 formers.  I find it almost as fast to select a target and send a pack of 4 formers, than to do this with a single former, so the micromanagement time goes down by a factor of 4.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 14, 2013, 06:30:36 AM
Yes, that's the issue with reactors and non-combat units.  There's little benefit to non-combats otherwise and that's why in the unmodded game, they made reactors also reduce unit costs.  The problem with that was that reactors became much too crucial for military units.  For example Fusion reactor is like going from 5 attack to 10 against someone without it, *and* 3 to 6 defense.  There's no sense going down those sides of the tree early.

I think that the best available reactor and design should be encouraged on non-combat units - and this is why when I was making my formula for mode 2/4 that I said really reactor cost reduction should just be stripped out for military units.  It should be a survivability increase only.  However you're right in that non-combats would need some benefit from better reactors.  Hitting them twice then with higher maintenance on top of that wouldn't make sense.  So they would have to be exempt.  I still say formers need a maintenance structure all to their own, and they're most of the reason for the super-fast mid into late game.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 15, 2013, 05:55:45 AM
Good points.  Maintenance on a per-unit basis is probably best. 

Keep the #2/#4 modes as-is then.  I can balance things around ECM/AAA cost and power from there.

And yea, I think that's my only real remaining gripe is the former/crawler cost.  They're fine to start but should increase the more of them you have.

So an extra cost per X formers/crawlers?  It could be done, but it's awkward enough that I'll delay it until I'm ready to take general requests (currently I'm only taking stuff that I want, or that I like once I hear it.)

I still like the idea of clean reactor costing a constant 1 extra row, regardless of reactor.  As you get later in the game, where the higher reactors show up, you have less time to get your payback.

But whatever else you'd spend that production on would likewise have less time to be effective.

Quote
And I like eliminating the need for micromanaging what city is supporting what unit, to get things balanced, so I prefer to make most everything clean.

Why would they need to be balanced perfectly?

Quote
I don't think increasing the cost of clean by reactor size makes sense.  In fact, weapons and defense costs go down with higher reactors!  So I think a constant 1 row for clean is a good idea.

It isn't increased with reactor size; it's increased with unit cost, which I think could work well if support costs increased similarly; improving reactors then decreases the cost of clean, but improving weapons and armor increases it.  Increasing support costs with reactor was an interesting idea, but I think making it based on production cost is a better approach.

Yes, that's the issue with reactors and non-combat units.  There's little benefit to non-combats otherwise and that's why in the unmodded game, they made reactors also reduce unit costs.  The problem with that was that reactors became much too crucial for military units.  For example Fusion reactor is like going from 5 attack to 10 against someone without it, *and* 3 to 6 defense.  There's no sense going down those sides of the tree early.

Keep in mind, though, what else is at the same level as fusion: Copters, satellites, maglevs, genejack factory...there's a lot of strong stuff at that stage.  Of course, with the new modding options, you can weaken the overpowered stuff as needed.

Quote
I still say formers need a maintenance structure all to their own, and they're most of the reason for the super-fast mid into late game.

Any ideas?
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 15, 2013, 07:51:12 AM
Quote
And I like eliminating the need for micromanaging what city is supporting what unit, to get things balanced, so I prefer to make most everything clean.

I have to agree that this whole mechanic really is tedious and very pro-ICS.  Ideally I think the game would consider support based on total citizens (or even just bases like it does now), and then allocate out support costs automatically across your cities.   Kind of like how waste is auto-calculated for energy based on EFFIC SE. 

Quote
Keep in mind, though, what else is at the same level as fusion: Copters, satellites, maglevs, genejack factory...there's a lot of strong stuff at that stage.  Of course, with the new modding options, you can weaken the overpowered stuff as needed.

Yea I compensated the reactor power vs weapon/armor a bit more by increasing the weapon/armor scaling rate.  And that might be true...I'll have to try a few games going down the 'defensive' tree over the 'satellite' tree.  I think reducing satellites and CBA would help a bit here too.  There are a lot of mechanics I feel are sort of 'broken' in the sense that when a new tech becomes available, you spam it solely (e.g. Copters).

[I still say formers need a maintenance structure all to their own, and they're most of the reason for the super-fast mid into late game.]

The ideal fix would to tie non-combat unit effectiveness (esp formers'crawlers) more closely to their actual unit costs.  a 20 mineral reactor former should terraform a lot slower than one that has 60 minerals invested.  Right now there's only one real upgrade and that's Super Formers.  The ideal way of them doing this would have been to put in a few terraforming 'weapon' types up the Centauri tech chain.  And similarly for colony pods, probe weaponry, transports, etc.  Alternatively non-combats could just scale with their reactor since the HP doesn't help them otherwise.

A lot of things in the game can be evaluated in terms of mineral payback period (at least in the early game).  Clean at 10 cost is a *really* good payback (10 turns, and 5 at low SUPPORT SE).  Crawlers can be even better (30/6=5 turns if you crawl a borehole).  Or even in the early-mid, a 4N crawler feeds four forest tiles for 8M/4E, for an even faster payback (granted there are maintenance costs to drones).  Formers have the best payback of anything in the game, hands down.  They improve terrain, generating more and more resources for bases on an initial low investment of 20 minerals.  This is ok to some extent...without Formers the growth rate of the game would be too slow.  Also being on bad terrain would be even more punishing than it is without fixed improvements like Forest, Borehole.  There is a *lot* to consider when approaching Former unit costs.  Efficient terraforming is a skillful and still debatable part of the game that I don't think should go away.

Another idea I was toying with was formers and/or crawlers that expire after X turns (if this is even possible).  X could be increased by reactor and possibly support SE.  But I'm not sure how well that would play out.  They'd probably have to also give 0 minerals on disbandment to avoid high micromanagement.  A hybrid of these two ideas might work as well.  X could be fixed and the terraforming speed could depend on reactor and/or Centauri-like techs.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 15, 2013, 01:12:41 PM
I have to agree that this whole mechanic really is tedious and very pro-ICS.

There are enough other anti-ICS features (energy-boosting buildings), though, that I think it will only end up making ICS a good idea for a heavily aggressive (and thus high on supportable units) strategy, which probably should be ICS-supporting.

Quote
Ideally I think the game would consider support based on total citizens (or even just bases like it does now), and then allocate out support costs automatically across your cities.   Kind of like how waste is auto-calculated for energy based on EFFIC SE.

Proportionally to production, I assume?  That'd be a huge hassle to code, though, as it means calculating something (total support cost) on a faction-wide level rather than base-wide, which nothing else is.

Quote
Yea I compensated the reactor power vs weapon/armor a bit more by increasing the weapon/armor scaling rate.  And that might be true...I'll have to try a few games going down the 'defensive' tree over the 'satellite' tree.

If you do and want to make it better with modding, consider removing the armor boost at probability mechanics (which gives tachyon fields anyway) and move it to advanced subatomic theory, so that every step in that tree boosts  armor.

Quote
I think reducing satellites and CBA would help a bit here too.

For satellites, try switching the techs of orbital defense pod and sky hydroponics labs, cutting defense pod cost to 80, and increasing hydroponics and nessus mining station cost to 180.  CBA would be weaker if air power were weaker, so maybe remove copters' speed bonus from reactor, make air power require AMA, move air superiority to synthetic fossil fuels, and have Probability Mechanics double the effectiveness of ECM and AAA.

Quote
The ideal fix would to tie non-combat unit effectiveness (esp formers'crawlers) more closely to their actual unit costs.  a 20 mineral reactor former should terraform a lot slower than one that has 60 minerals invested.  Right now there's only one real upgrade and that's Super Formers.  The ideal way of them doing this would have been to put in a few terraforming 'weapon' types up the Centauri tech chain.

Adding new "weapon" types, except as replacements for old ones, is not feasible.

Quote
Alternatively non-combats could just scale with their reactor since the HP doesn't help them otherwise.

It does help if they do get attacked...and then what about if you make armored formers?

Quote
A lot of things in the game can be evaluated in terms of mineral payback period (at least in the early game).  Clean at 10 cost is a *really* good payback (10 turns, and 5 at low SUPPORT SE).

I think formers also tend to be in that area.

Quote
Crawlers can be even better (30/6=5 turns if you crawl a borehole).

Though once you have a borehole, wouldn't you be better off working it?

Quote
Or even in the early-mid, a 4N crawler feeds four forest tiles for 8M/4E, for an even faster payback (granted there are maintenance costs to drones).

Again, 4N is a lot of terraforming work that could usually be better used than placing condensers everywhere (the only way to get 4N before advanced ecological engineering.)

Quote
Formers have the best payback of anything in the game, hands down.  They improve terrain, generating more and more resources for bases on an initial low investment of 20 minerals.  This is ok to some extent...without Formers the growth rate of the game would be too slow.  Also being on bad terrain would be even more punishing than it is without fixed improvements like Forest, Borehole.  There is a *lot* to consider when approaching Former unit costs.  Efficient terraforming is a skillful and still debatable part of the game that I don't think should go away.

Another idea I was toying with was formers and/or crawlers that expire after X turns (if this is even possible).

This would also be highly awkward, as well as difficult to code.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 15, 2013, 04:41:15 PM
There are enough other anti-ICS features (energy-boosting buildings), though, that I think it will only end up making ICS a good idea for a heavily aggressive (and thus high on supportable units) strategy, which probably should be ICS-supporting.

Proportionally to production, I assume?  That'd be a huge hassle to code, though, as it means calculating something (total support cost) on a faction-wide level rather than base-wide, which nothing else is.

That's true.  Instead of looking at this issue of assigning units to bases, from the top-down, how about bottom-up? Would there be any way of auto-assigning a unit to another base with excess support capacity when it's built, if the current base is at its support limit?

Quote
Adding new "weapon" types, except as replacements for old ones, is not feasible.

I figured not.  In fact when I increase weapon values the game seems to use the wrong icons.  I'm thinking weapons were hard coded in differently from armor for some reason (perhaps tied to military/non-military unit code).

Quote
I think formers also tend to be in that area.

For their first payback perhaps.  But no, formers are much much stronger than crawlers or anything else *in the long run*.  In the short run sometimes crawlers can be stronger and I'd have to really sit down and try to analyse optimal early to mid game terraforming mathematically.  Has anyone done this to date?  I'm sure most veterans already have a better 'feel' for what gives the best growth than I do. 

Anyways, the reason is formers continually improve terrain, not just once.  Think of it like a base improvement that builds base improvements.  So I pay 20 minerals for a former.  The first forest I make might be +2 minerals on bad terrain.  So that's 10 turns to payback.  The thing is they don't have a one time benefit like crawlers and structures.  The former then goes off and ~5-6 turns later has made another forest.  This forest then does the same and I'm gaining 4 minerals - already exceeding a crawler on forest or really anything else in the game at that cost.  And so on.  Eventually a former has improved 10 forests and *every* turn it's giving 20 minerals payback.  The limiting resources are workable squares and former time, which make this a bit complex to work out.  Often times workable squares is the bottleneck - more formers are rarely difficult to make as each only requires 1 mineral upkeep.  Obviously a base can only hit size 3 on Forests alone and so then you need to build another base or give it more nutrients.  The more I play I find nutrients are always the best thing to crawl and never minerals or energy.  I think the optimal setup might actually be all boreholes and crawling all nutrients on condensors once they're available.

But to get back on topic about unit costs.  It's quite apparent that formers (and to a lesser extent crawlers) are what drive the non-linear growth rate in the game.  Is there any way to make it so later game formers and crawlers are significantly better for their unit cost? (i.e. improvements with reactor upgrades) Perhaps making formers terraform faster - I imagine any sort of more exotic new terraforming abilities are not possible.  With crawlers perhaps a capping system that eventually allows uncapped crawling of multiple resources (or a bonus to energy/mineral crawling).  My thought was that losing all your early game formers/crawlers shouldn't necessarily be game over.  The way the game is they're as vital as cities and much harder to protect.  And you can only replace those at the rate of 1 per turn, no matter how big your cities are.

Quote
It does help if they do get attacked...and then what about if you make armored formers?

Yea this is true.  And if you go with a costing model that makes reactors only give HP (no cost reduction), it's probably 'good enough' of a benefit.  But it also requires a unit cost model that allows for free armor on non-combats.  Else you're paying way too much in unit costs.  And that's a bit of a balancing act - formers should have some defense against obsolete designs but not be a replacement for military sentinels.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 15, 2013, 07:11:48 PM
That's true.  Instead of looking at this issue of assigning units to bases, from the top-down, how about bottom-up? Would there be any way of auto-assigning a unit to another base with excess support capacity when it's built, if the current base is at its support limit?

You mean automatically rehome it?  It'd be fairly tricky, but creating that option might work.  I still don't like it much, though (as it actually changes gameplay since you don't have to move it to the new base), and it is hard, so it'll have to wait for when I start taking general requests.

You know what would be a lot easier, though?  Adding an (s) after the unit name for any unit that requires support (actually, for any unit that required support the last time the program checked its base).  That would make the micromanagement easier without actually changing the mechanics.

Quote
I figured not.  In fact when I increase weapon values the game seems to use the wrong icons.  I'm thinking weapons were hard coded in differently from armor for some reason (perhaps tied to military/non-military unit code).

Weapons and armor are hard coded in the same way.

Quote
For their first payback perhaps.

Once you're already considering payback, you can consider two-level payback.

Quote
But no, formers are much much stronger than crawlers or anything else *in the long run*.

I don't think they get much past "10 turns payback" once you have enough for forests.

Quote
and I'd have to really sit down and try to analyse optimal early to mid game terraforming mathematically.  Has anyone done this to date?

I have to some extent, which is where I got the "around 10 turns" value from.  It depends on tech, of course; getting the extra formers to go with advanced terraforming is quite strong between ecological engineering (for condensers and boreholes) and environmental economics (for tree farms), but that's a fairly narrow window.

Quote
Anyways, the reason is formers continually improve terrain, not just once.  Think of it like a base improvement that builds base improvements.

That's a very good analogy.  Of course, a base improvement that builds base improvements is fairly indistinguishable from a base improvement that gives you extra minerals with which to build base improvements...basically what happens is that when figuring out former payback you get a quadratic equation rather than a linear one, but it can still be solved, and that's where I got the "slightly better than 10 turns" value from.  (It's better if you have free support, of course.)

Quote
So I pay 20 minerals for a former.  The first forest I make might be +2 minerals on bad terrain.

Forests as compared to unimproved are indeed extremely powerful; I'm not counting those because if you're not pop booming one former per base will keep up with that easily (and if you are pop booming formers aren't really the culprit in your fast growth.)

Instead, let's (and also to show how this calculation would be done) assume your choice is between getting fewer formers and planting forests, or getting more formers and getting advanced terraforming.  Let's further assume early-ish midgame, so you have tree farms and can raise land, but no hybrid formers, super formers, or soil enrichers.  We'll assume no free market and +0 INDUSTRY.  Finally, we'll treat all resources as the same value; it's highly situational, of course, but should be a decent average over the situations before thinkers/engineers.

So a forest is then worth 5 resources, and takes 4 former-turns.  However, 2 of those resources feed the worker, and you need to devote 1 energy to psych for drone control (with a hologram theater and tree farm, that'll be enough), so it's really only worth 2.

For advanced terraforming, let's assume you're building solar+farm with over 3000 elevation, but 1/4 of the solars are replaced with mirrors (giving around 2 mirrors next to each solar), and 1/4 are replaced by condensers to keep almost everything rainy (say 7/8 rainy 1/8 moist) despite being above cloud level.  This is not a perfect calculation, but should be a decent first approximation.  We'll assume the squares are 50% flat, 50% rolling, and ignore the energy cost to raise terrain.

Thus, for every 4 squares, we get:
-3 nutrients (1 after feeding the worker) each on the non-condenser squares, and 4 with the condenser.  Half the time one of those will be one lower.  So that's 3X1+4-0.5=6.5.
-1.5 minerals; we have to place the condensers for efficient raininess cover, so we can't place them only on the flat squares.
-4 energy from the crawler (3 after keeping the worker happy), and 6 (5 after psych) per solar, so that's 16.
So that's a total of 24 for 4 squares, or 6 per square.

But how much do those 4 squares cost?  Well, you need 30 minerals for the crawler (that's 7.5 per square), but more importantly each square needs to be raised once (12 former-turns; it's only once because once the square next to it is above 3000 it is above 2000) and needs a farm (4 former-turns); half of them also need solar (4 former-turns each), while the other half need a mirror or condenser (12 former-turns each), so that's an average of 12+4+8=24 former-turns each.  So for that extra 4 resources per square, you're spending an extra 20 former-turns and 7.5 minerals.

Now, how much is a former-turn?  Well, the former needs support, so that's 1 mineral, or 20 for 20 former-turns; it also needs to be built, so that's 20 mineral-turns per former-turn, or 400 mineral-turns total.  So the value of a turn is given by 400 resource-turns+27.5 resources=4 resources/turn.  Solving for 1/turn (which will effectively give the number of turns to pay off) gives x^2-(55/8)x-100=0.  By the quadratic formula, this gives [(55/8)+sqrt[(55/8)^2+400]]/2.  (55/8)^2=47.265625, and sqrt(447.265625)~21.148; adding 55/8 gives a bit over 28, so the total payoff time is a bit over 14.

One way to think of it is that with a payoff time of 14, each former-turn costs a bit under 2.5 minerals (1.5 minerals because you build a former instead of a 20-mineral object with a direct payoff, and 1 for support), so it's a bit over 48.5 minerals for the extra terraforming, plus 7.5 for the crawlers is a bit over 56 per square, which should give a bit over 14 for payoff time.

So yes, that first former for forests is more powerful (if it boosts by 2 resources per forest and requires no support, that's a payoff described by 2x^2-80=0, or between 6 and 7 turns), but after that it drops off fast.

Quote
The limiting resources are workable squares and former time, which make this a bit complex to work out.

And something to work that forest...that's the real limitation once you have more than one former per base, unless you don't go forests or you pop boom easily (something that I feel should not be possible until late game).

Quote
I think the optimal setup might actually be all boreholes and crawling all nutrients on condensors once they're available.

Late-game, the optimal setup is all specialists and crawling all nutrients on condensers.

Quote
But to get back on topic about unit costs.  It's quite apparent that formers (and to a lesser extent crawlers) are what drive the non-linear growth rate in the game.

Base facilities also have a substantial effect; a genejack factory has payoff time equal to 200 divided by two less than the base's production without it; for a 25-mineral base, that's fairly quick.

Quote
Is there any way to make it so later game formers and crawlers are significantly better for their unit cost? (i.e. improvements with reactor upgrades) Perhaps making formers terraform faster - I imagine any sort of more exotic new terraforming abilities are not possible.

New terraforming options would be unfeasible.  Increasing terraforming rate with reactor might work; if super former gave +50% per reactor, you could get late-game singularity formers with triple effectiveness, but they'd be expensive (90 minerals each under the normal formula, 70 under formula 1).

Quote
With crawlers perhaps a capping system that eventually allows uncapped crawling of multiple resources (or a bonus to energy/mineral crawling).

I think a flat decrease to the amount brought in might work better if it proves necessary (it might not, as you still only get one crawler).

Quote
My thought was that losing all your early game formers/crawlers shouldn't necessarily be game over.

I don't think it is; it's a big setback, but you can replace them.  And even with one former per base, you can still forest (and maybe even farm/solar) faster than a base can grow.  Crawlers also are really only great on mines and squares where you're building condensers anyway for the raininess boost; building condensers just so you can get +1 nutrients when you crawl them is probably a waste of former time.

Quote
And you can only replace those at the rate of 1 per turn, no matter how big your cities are.

Of course, with a big base, you can replace them with ones that won't die easily.

Quote
Yea this is true.  And if you go with a costing model that makes reactors only give HP (no cost reduction), it's probably 'good enough' of a benefit.

Unless you armor them or change the chassis, the increased minimum cost will mean higher-reactor formers actually cost more than lower-reactor versions.

Quote
But it also requires a unit cost model that allows for free armor on non-combats.

Well, not free; you're still going to pay for the higher armor cost.  But yes, it does lose a lot of its effect if you get +1 row cost for armoring noncombat units...good think the formulas give the option not to do that.

Quote
Else you're paying way too much in unit costs.  And that's a bit of a balancing act - formers should have some defense against obsolete designs but not be a replacement for military sentinels.

Formers will never be a replacement for military sentinels, simply because they're too expensive.  Even without the +1 row cost, 0/3/1 formers cost 4 rows, whereas 1/3/1 defenders cost only 2 rows.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Geo on September 15, 2013, 09:34:15 PM
I figured not.  In fact when I increase weapon values the game seems to use the wrong icons.  I'm thinking weapons were hard coded in differently from armor for some reason (perhaps tied to military/non-military unit code).

The weapons seem to be linked to their place in the alpha(x).txt list, in combination with the names of the caviar art.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 16, 2013, 12:04:17 AM
This illustrates what I see for weapons better...their graphic depends on the power and not their name/tech in alphax.txt

#WEAPONS
Hand Weapons,         Gun,            1, 0, 1, -1, None,
Laser,                Laser,          2, 0, 2, -1, Physic,
Particle Impactor,    Impact,         4, 0, 3, -1, Chaos,
Gatling Laser,        Gatling,        6, 1, 4, -1, Super,
Missile Launcher,     Missile,        8, 2, 5, -1, Fossil,
Chaos Gun,            Chaos,         12, 0, 6, -1, String,
Fusion Laser,         Fusion,        16, 1, 7, -1, SupLube,
Tachyon Bolt,         Tachyon,       20, 1, 8, -1, Unified,
Plasma Shard,         Shard,         24, 2, 9, -1, Space,
Quantum Laser,        Quantum,       30, 1,10, -1, QuanMac,
Graviton Gun,         Graviton,      40, 0,11, -1, AGrav,
Singularity Laser,    Singularity,   50, 1,12, -1, ConSing,
Resonance Laser,      R-Laser,        8, 1, 7, -1, Bioadap,
Resonance Bolt,       R-Bolt,        20, 1,11, -1, SentRes,
String Disruptor,     String,        60, 1,13, -1, BFG9000,
Psi Attack,           Psi,           -1, 2,10, -1, CentPsi,
Planet Buster,        Planet Buster, 99, 0,30, -1, Orbital,
Colony Module,        Colony Pod,     0, 8, 3, -1, None,     ; Noncombat packages
Terraforming Unit,    Formers,        0, 9, 2, -1, Ecology,
Troop Transport,      Transport,      0, 7, 2, -1, DocFlex,
Supply Transport,     Supply,         0,10, 3, -1, IndAuto,
Probe Team,           Probe Team,     0,11, 3, -1, PlaNets,
Alien Artifact,       Artifact,       0,12,36, -1, Disable,
Conventional Payload, Conventional,  12, 0, 8, -1, Orbital,
Tectonic Payload,     Tectonic,       0,13,12, -1, NewMiss
Fungal Payload,       Fungal,         0,14,12, -1, NewMiss
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Earthmichael on September 16, 2013, 10:16:09 AM
My issue about micromanagement verses clean is that if I support 2 free units per city, I don't want the micromanagement of trying to figure out which cities have some unit support left.  I would just rather make everything clean.

I still have no seen a good argument why clean should be different costs on different units.  I still like the idea of 1 row, period.  This way it is a fairly no-brainer choice for most units whether to build clean or not, or to worry about city resource micromanagement.

I also don't like the idea of reactors increasing the costs of non-combat units like formers.  I usually still build fission reactor formers for this reason.  It would be nice to get the extra defense from a better reactor, but I am not going to pay MORE for the unit (when in theory better reactors drive unit costs down).  I am not asking for a reduction in cost for formers, just a breakeven.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Earthmichael on September 16, 2013, 10:34:17 AM
On the topic of non-linear growth, all games of this kind have exponential growth until they reach some sort of game cap.  It is the nature of the game: 1 base builds 2 bases, which builds 4 bases, which build 8 bases, etc.

Formers can make the bases more productive, and so can city structures.  But formers are not the reason for exponential growth, cities are.  Limiting formers just push toward the small cities/ICS approach.  I personally think large cities are stronger, but only because of facilities, and to a lesser extent, the availability of formers to make enough productive land available for a large city.

Formers and crawlers are powerful, and are the key to logistics side of SMAC, and in my opinion, what makes SMAC better than any Civ game before or afterwards (which did not include crawlers, and where formers where much more limited in abilities).  Otherwise, it is just military verses military.  Part of your military goal now must be to protect your logistics side, crawlers and formers.  I think this makes the strategy much more interesting if it were only military verses military.

I do not like the idea of improving crawlers to crawl more than one resource; I the crawlers are powerful enough as it is.  As for the borehole, I almost always make them in range of a city so the city can work the borehole for full value.  I think it is fine that a crawler can get only half of the value of a borehole.

Once I get enough formers than control become tedious, I automate a bunch of road building formers, and I also automate a bunch of fungicidal fungus removing formers.  The rest of the formers I tend to bunch up in groups of 4, and move an terraform them as a pack.  This makes management of formers much less tedious when you have a lot.

As for crawlers, I usually place them and forget about them; no real micromanagement required.

Since I think formers and crawlers are the most interesting aspect of SMAC, I would take care before I made any serious modifications (like having high reactors result in faster terraforming).  I would not go that route.  The only change that made sense to me is allow formers to use higher reactors with no great cost than fission reactor for the same capabilities.  This gives basic formers a nominal bit of extra defense from the reactor.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 16, 2013, 11:32:30 AM
Quote
Since I think formers and crawlers are the most interesting aspect of SMAC, I would take care before I made any serious modifications (like having high reactors result in faster terraforming).  I would not go that route.  The only change that made sense to me is allow formers to use higher reactors with no great cost than fission reactor for the same capabilities.  This gives basic formers a nominal bit of extra defense from the reactor.

Yea - as I said I tend to favor all unit costs not being tied to reactor - it over complicates the cost formula.
1 - Reactors already give a survivability increase to military.  No need to double dip with a cost reduction as well.
2 - For non-military they drive the cost up more than they're worth.
3 - Native life has a constant cost and ignores reactor.  Therefore military units should have a constant cost ignoring reactor as well.

Try cost mode #2/4 that Yitzi put in.  Of course this requires some re-tweaking of all the base armor and both military and non-military weapon costs.  I've been playing around with mode 2 and some customized armor/weapon/chassis balances.  Still testing...I noted a few things but haven't had time to analyse..

And yea...I need more understanding of growth in smac.  It's actually time that drives growth.  Cities are just an abstract much like formers, crawlers.  Non-linear growth is fine and probably outside the scope of unit costing...at least for now.


Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Dio on September 16, 2013, 11:35:45 AM
This illustrates what I see for weapons better...their graphic depends on the power and not their name/tech in alphax.txt

#WEAPONS
Hand Weapons,         Gun,            1, 0, 1, -1, None,
Laser,                Laser,          2, 0, 2, -1, Physic,
Particle Impactor,    Impact,         4, 0, 3, -1, Chaos,
Gatling Laser,        Gatling,        6, 1, 4, -1, Super,
Missile Launcher,     Missile,        8, 2, 5, -1, Fossil,
Chaos Gun,            Chaos,         12, 0, 6, -1, String,
Fusion Laser,         Fusion,        16, 1, 7, -1, SupLube,
Tachyon Bolt,         Tachyon,       20, 1, 8, -1, Unified,
Plasma Shard,         Shard,         24, 2, 9, -1, Space,
Quantum Laser,        Quantum,       30, 1,10, -1, QuanMac,
Graviton Gun,         Graviton,      40, 0,11, -1, AGrav,
Singularity Laser,    Singularity,   50, 1,12, -1, ConSing,
Resonance Laser,      R-Laser,        8, 1, 7, -1, Bioadap,
Resonance Bolt,       R-Bolt,        20, 1,11, -1, SentRes,
String Disruptor,     String,        60, 1,13, -1, BFG9000,
Psi Attack,           Psi,           -1, 2,10, -1, CentPsi,
Planet Buster,        Planet Buster, 99, 0,30, -1, Orbital,
Colony Module,        Colony Pod,     0, 8, 3, -1, None,     ; Noncombat packages
Terraforming Unit,    Formers,        0, 9, 2, -1, Ecology,
Troop Transport,      Transport,      0, 7, 2, -1, DocFlex,
Supply Transport,     Supply,         0,10, 3, -1, IndAuto,
Probe Team,           Probe Team,     0,11, 3, -1, PlaNets,
Alien Artifact,       Artifact,       0,12,36, -1, Disable,
Conventional Payload, Conventional,  12, 0, 8, -1, Orbital,
Tectonic Payload,     Tectonic,       0,13,12, -1, NewMiss
Fungal Payload,       Fungal,         0,14,12, -1, NewMiss

You could also simply swap the caviar file names in the game folder. In this case, VW03.cvr becomes VW04.cvr and VW04.cvr becomes VW03.cvr. I had that same issue and found an acceptable workaround so long as you do not exceed the pre-determined range of weapon values for each weapon slot.

This also ties into my desire to figure out how to make the weapon graphics work in the design shop.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Geo on September 16, 2013, 12:01:28 PM
This illustrates what I see for weapons better...their graphic depends on the power and not their name/tech in alphax.txt

I see. Thanks for clarifying.  :)
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Geo on September 16, 2013, 12:11:53 PM
On the topic of unit maintenance, I wonder if it is code-wise possible to let a popped independent crawler be re-homed to the closest base of the faction popping it.
I know a player can do it manually, but I've seen AI independent crawlers happily crawling tiles to the benefit of no-one.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 16, 2013, 02:49:03 PM
My issue about micromanagement verses clean is that if I support 2 free units per city, I don't want the micromanagement of trying to figure out which cities have some unit support left.  I would just rather make everything clean.

Would it help to have each city, when you enter it, just show how much support it has left?  If you tell me how and where you want it shown, I can probably code it in.

Quote
I still have no seen a good argument why clean should be different costs on different units.  I still like the idea of 1 row, period.  This way it is a fairly no-brainer choice for most units whether to build clean or not, or to worry about city resource micromanagement.

Perhaps I'll add both...I'll add the scaling support costs earlier, because I like the idea, and then later on I can add the ability to set a fixed cost to clean.

Quote
I also don't like the idea of reactors increasing the costs of non-combat units like formers.

Why not?  If they give a worthwhile benefit in exchange then it's worth it, and if they don't you can just build the lower-reactor version.

Formers and crawlers are powerful, and are the key to logistics side of SMAC, and in my opinion, what makes SMAC better than any Civ game before or afterwards (which did not include crawlers, and where formers where much more limited in abilities).  Otherwise, it is just military verses military.  Part of your military goal now must be to protect your logistics side, crawlers and formers.  I think this makes the strategy much more interesting if it were only military verses military.

Makes sense.

Quote
I do not like the idea of improving crawlers to crawl more than one resource; I the crawlers are powerful enough as it is.

I feel that is true for much of the game...however, once you get transcendi, specialists (and thus nutrients) are so powerful that even with crawling only one resource, crawling farm/enricher/condenser is generally superior to any option that involves actually working squares.  Thus, the only ways to avoid a boring "everyone crawls f/e/c" are to nerf crawlers and possibly condensers (which will have an impact on the earlier game), or to allow late-game crawlers to crawl multiple resources.  This is largely a question of personal preference; fortunately, my patch supports both.

Quote
Since I think formers and crawlers are the most interesting aspect of SMAC, I would take care before I made any serious modifications (like having high reactors result in faster terraforming).  I would not go that route.

Ok, thanks for the input.

Quote
The only change that made sense to me is allow formers to use higher reactors with no great cost than fission reactor for the same capabilities.  This gives basic formers a nominal bit of extra defense from the reactor.

It'd be more work to code, awkward, overpowered on armored formers, and not really that relevant otherwise.

You could also simply swap the caviar file names in the game folder. In this case, VW03.cvr becomes VW04.cvr and VW04.cvr becomes VW03.cvr. I had that same issue and found an acceptable workaround so long as you do not exceed the pre-determined range of weapon values for each weapon slot.

Though what about if you want several in one of those ranges?

Have you found where those ranges are described?

On the topic of unit maintenance, I wonder if it is code-wise possible to let a popped independent crawler be re-homed to the closest base of the faction popping it.

Popped?  You mean like from a cloning pod?  I don't really like the idea of automatic re-homing without having to go to that base, and as for AI independent crawlers, that's more a question of the AI needing to be taught to rehome unowned crawlers (and AI is Kyrub's specialty.)
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Geo on September 16, 2013, 05:12:15 PM
On the topic of unit maintenance, I wonder if it is code-wise possible to let a popped independent crawler be re-homed to the closest base of the faction popping it.

Popped?  You mean like from a cloning pod?  I don't really like the idea of automatic re-homing without having to go to that base, and as for AI independent crawlers, that's more a question of the AI needing to be taught to rehome unowned crawlers (and AI is Kyrub's specialty.)

I meant from a general Unity pod, which cloning is one of the benefits. Basically, in my mod a Unity pod can give a supply crawler directly to the faction that opened (popped) it.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 16, 2013, 07:22:18 PM
On the topic of unit maintenance, I wonder if it is code-wise possible to let a popped independent crawler be re-homed to the closest base of the faction popping it.

Popped?  You mean like from a cloning pod?  I don't really like the idea of automatic re-homing without having to go to that base, and as for AI independent crawlers, that's more a question of the AI needing to be taught to rehome unowned crawlers (and AI is Kyrub's specialty.)

I meant from a general Unity pod, which cloning is one of the benefits. Basically, in my mod a Unity pod can give a supply crawler directly to the faction that opened (popped) it.

It's a fairly unusual case for cloning (I mean, who uses crawlers to pop pods), and your mod is fairly niche, so I think this one is probably going to wait until I'm ready to take votes from the community on what to do next (currently I'm taking suggestions; if I really like one, I include it, if I don't it'll wait.)
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Earthmichael on September 25, 2013, 03:47:57 AM
It sounds like more bother than it's worth to make formers not cost more with better reactions.  So I will just continue to do what I do now: I obsolete AI designed formers with better reactors (in general) and keep making my own fission clean formers (and clean fungicidal formers) and clean super formers.  The survival value of the better reactor is usually not worth even one row of added cost.  I do find better reactors help with rover formers, but I don't make many of those.  The current solution works fine, so no need to bother with modding formers.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on September 27, 2013, 02:02:29 AM
Would it be difficult to make a flag so that Clean does not work at Negative Support rating (like NLM for Police)?  Similarly, a flag that makes all non-Military units not require Support (i.e. Colony Pods, Formers.  Scout units should require support).  This may be opinion but I feel the Support SE should tie to military units only. 

If this could be done I may try some games where Formers cost 30 instead of 20.

Also I noted in mode #2 (and I assume mode #4) there was a cost bumpup at Fusion but not at Quantum/Sing.  Was this intended?  I can give examples if you need them
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on September 29, 2013, 06:14:19 AM
Would it be difficult to make a flag so that Clean does not work at Negative Support rating (like NLM for Police)?

I'm not sure that it's needed (I did that for Police because as it was -1 Police was too weak a penalty, but -1 Support is quite significant), but it could definitely be done.  Once I start taking requests for voting, it's definitely a possibility.  Not making the priority list, though.

Quote
Similarly, a flag that makes all non-Military units not require Support (i.e. Colony Pods, Formers.  Scout units should require support).  This may be opinion but I feel the Support SE should tie to military units only. 

Same: Could be done, not even that difficult, but not making the priority list.  Note that pre-made units can just be given the Clean ability and have cost set to what it would cost without it, though.

Quote
Also I noted in mode #2 (and I assume mode #4) there was a cost bumpup at Fusion but not at Quantum/Sing.  Was this intended?  I can give examples if you need them

It is intended, since Fusion is a 100% increase to hit points whereas the others are substantially less proportionately.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: TarMinyatur on November 25, 2013, 06:53:28 PM
I played a game using unit cost code #4, in which infantry units cost 1x the higher of weapon or armor, mobile units cost 2x, and air units cost 3x. I like how it tends to reward the construction of, say, a single 6-4-1 shock troop, instead of building a 6-1-1 thug and its defensive complement, a 1-4-1, at a low cost.

I would, however, like to try an option in which infantry costs 1x, mobile costs 1.5x and air costs 3x. This would make speeders more economical than they are using option #4. I don't think a speeder should cost the same as two similarly armed infantry, and thus I rarely built them. A speeder's useful ability to disengage may be worth a 50% increase in cost...but not 100%, in my opinion.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on November 25, 2013, 07:39:09 PM
I played a game using unit cost code #4, in which infantry units cost 1x the higher of weapon or armor, mobile units cost 2x, and air units cost 3x. I like how it tends to reward the construction of, say, a single 6-4-1 shock troop, instead of building a 6-1-1 thug and its defensive complement, a 1-4-1, at a low cost.

I would, however, like to try an option in which infantry costs 1x, mobile costs 1.5x and air costs 3x. This would make speeders more economical than they are using option #4. I don't think a speeder should cost the same as two similarly armed infantry, and thus I rarely built them. A speeder's useful ability to disengage may be worth a 50% increase in cost...but not 100%, in my opinion.

Keep in mind they don't just get the ability to disengage; they also get to get places faster, and are far better for "killzoning".  There are still slots available, though, so I can definitely make one where it's 1.5X instead of 2X.  It'll be in the next patch version.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on November 25, 2013, 09:06:48 PM
I've done a fair amount of playing around with all the new cost modes. 

I think the new mode 1 had resulted in low former/colony pod/crawler costs (20 minerals).  Makes for a lot faster growth.  Military wise the formula was pretty good.

My mode 2/4, I found also that Rovers weren't that great.  2x cost made them too expensive, and the result was 100% infantry armies.  The thing is that although one rover beats one infantry, it doesn't beat two infantry.  If the rover attacks then it can't disengage on the next turn.  I would also value a Rover at approximately 1.5x the cost of an Infantry.

Air at 3x was also a bit steep.  Perhaps less so for Copters if unmodified, but it's steep for Needlejets.  Depends a bit whether AAA is set to -1.  A side issue I have with Needlejets is the "stalling" technique due to their zone of control.  If you rush air you can make a scout needlejet and infantry can't advance past or even around it.  Would it be possible to add a flag to rid their zone of control?  Or allow attacking infantry to be on the same square as an enemy Needlejet (if without SAM?).  I think with Copters, the move:4 fix is a good one.  I'm thinking 2x infantry cost for air would be a bit too cheap.   But 3x is too steep - a 2.5x cost mode on air might be better.  Thoughts anyone?

Yitzi is it possible to add variables for the defensive power of Perimeter Defense and Aerospace Complex?  I think they're reasonably balanced as they are, but I was curious on this.  Mostly Perimeter Defense could use a bit of a boost.  I do think the paradigm of 2:1 (attack:defense) is good.  Defenders should only be able to hole up in cities.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on November 25, 2013, 10:42:43 PM
Air at 3x was also a bit steep.  Perhaps less so for Copters if unmodified, but it's steep for Needlejets.  Depends a bit whether AAA is set to -1.  A side issue I have with Needlejets is the "stalling" technique due to their zone of control.  If you rush air you can make a scout needlejet and infantry can't advance past or even around it.  Would it be possible to add a flag to rid their zone of control?  Or allow attacking infantry to be on the same square as an enemy Needlejet (if without SAM?)

Both of those would be possible, but not easy.  When I start taking requests, you can ask then.  Meanwhile, you might want to try the effects of moving SAM down in the tech tree; "stalling" fails as soon as the opponent has a few SAM units.

Quote
I think with Copters, the move:4 fix is a good one

I think reducing the move from reactor to 0 might work better; it makes for slightly faster fission copters (so they're not too weak), but slower quantum and singularity copters.

Quote
I'm thinking 2x infantry cost for air would be a bit too cheap.   But 3x is too steep - a 2.5x cost mode on air might be better.  Thoughts anyone?

Since this is probably going to be something that people want to be able to tweak, I think the best way is just to change the formula to (Weapon+Armor)XChassis/4 for mode 2, and max(weapon,armor)Xchassis/4 for mode 4, and then you can set the chassis cost to whatever you want.  So for 2.5X you'd use 10, for 3X you'd use 12, and so on.

Quote
Yitzi is it possible to add variables for the defensive power of Perimeter Defense and Aerospace Complex?  I think they're reasonably balanced as they are, but I was curious on this.  Mostly Perimeter Defense could use a bit of a boost.  I do think the paradigm of 2:1 (attack:defense) is good.  Defenders should only be able to hole up in cities.

Adding those variables is definitely possible; it's not making the short list because they're fairly decent as they are, but once I finish the short list they're definitely possible requests.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Nexii on December 01, 2013, 07:15:46 PM
Quote


Since this is probably going to be something that people want to be able to tweak, I think the best way is just to change the formula to (Weapon+Armor)XChassis/4 for mode 2, and max(weapon,armor)Xchassis/4 for mode 4, and then you can set the chassis cost to whatever you want.  So for 2.5X you'd use 10, for 3X you'd use 12, and so on.



Yea this would work well.  I've noted some oddness with Missile cost with these alternate cost formulas.  I think, they might be on another chassis cost formula something like air or sea but I'd have to test to check.
Title: Re: Unit cost formula: Alternate approaches (taking requests)
Post by: Yitzi on December 01, 2013, 07:21:48 PM
Quote


Since this is probably going to be something that people want to be able to tweak, I think the best way is just to change the formula to (Weapon+Armor)XChassis/4 for mode 2, and max(weapon,armor)Xchassis/4 for mode 4, and then you can set the chassis cost to whatever you want.  So for 2.5X you'd use 10, for 3X you'd use 12, and so on.



Yea this would work well.  I've noted some oddness with Missile cost with these alternate cost formulas.  I think, they might be on another chassis cost formula something like air or sea but I'd have to test to check.

They shouldn't be...let me know what's happening and I can check up on it.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 33 - 892KB. (show)
Queries used: 19.

[Show Queries]