Author Topic: Unit cost calculation formula modification  (Read 3894 times)

0 Members and 1 Guest are viewing this topic.

Re: Unit cost calculation formula modification
« Reply #15 on: December 06, 2019, 12:28:11 AM »
You mean obsolete cheaper inferior unit? I think it already does it.

No no no, the opposite!  The criteria for obsoletion should consider whether a unit is cheap and useful.  If it is, it shouldn't just cancel the design.


The game does it opposite or you want it opposite? And what is useful?

Re: Unit cost calculation formula modification
« Reply #16 on: December 06, 2019, 12:32:53 AM »
2.0 to 1.6 it is still a huge jump for undeveloped civilization.

In my mod, first I had to stabilize the appearance of the reactors in my tree.  That took some time because many direct and indirect factors could cause me to move a tech around in the tree.  Then I had to make sure that the paths to reaching the techs were equitable.  I've had very easy paths to get to Fusion power, very obstructive paths, and I think now I have something sort of in between.  How you weight the tech changes very much how quickly or slowly it is discovered.

After my regime of Fusion Power and Quantum Power were settled, it took several iterations of manually tweaking unit costs, before I found a balance of chassis, weapon, and armor costs that seemed reasonable to me.  I may have nailed it now, but my provisional results are still subject to other people's playtesting and complaining.  People could still tell me that they think things are unfair.  But I think I've at least stepped away from the ridiculous.  I've had enough iterations to figure that out.  For awhile I had some grossly expensive late game units, and I toned that down recently.  The real trouble with deciding such things, is you have to actually get to a late game to experience those costs firsthand, to have an idea how much they really impact.  It's always more difficult to get to a complete late game, they take a bloody long time to play.

All of these costs are tied together in a web.  It's not generally possible to figure out a simple formula for what the costs should be, because the web is sufficiently complex.


I agree you did a great job on this. I don't want to go this path, though. The time when you get a technology varies. And it should. This is the game primary concept. So if I want to set something in the tech tree I use only very rough positioning, like 25% for Fusion reactor which could be easily anywhere between 15% and 35% and who know at which exact year it happens - this can fluctuate even stronger. Trying to time everything perfectly is flawed in my eyes. Instead I try to price them right. So even if you get it early you still pay the right price.

Re: Unit cost calculation formula modification
« Reply #17 on: December 06, 2019, 12:35:37 AM »
I guess this is the consequence of Thinker mod making AI faction smarter in terraforming and thus developing faster which speeds up common research pace too.

I don't believe in establishing any game rules or phenomena with Thinker Mod egging anything on.  To me, the purpose of Thinker Mod is to find the exploits that it likes, and then plug them as best I can.  This also somewhat simulates a human player who likes to use exploits.  Often I can only delay the exploit, I cannot end it entirely.  Huge delays are an important tool though, i.e. no Thermal Boreholes until the late midgame in my mod.

You of course aren't required to use Thinker Mod's default settings to create an experience though!  You can tone it down or change it around however you want.


It doesn't sound like Thinker mod a I know it. You should read its description and/or play it. It targets on improving AI and it does it very well. AI developers very fast there.

Re: Unit cost calculation formula modification
« Reply #18 on: December 06, 2019, 01:10:11 AM »
Never mind the above. I think I found a brilliant plan how to make myself happy about reactors. I will not change their HP multiplier. However, I'll change how these HP are burned during the battle. Sort of like native attack ignores reactor completely = does more damage to higher reactor unit.

There are two option to go by.
1. Reactor doesn't change the price but changes effective HP by some percentage, like 20%. Higher HP gives some battle advantage. However, fractional burning HP will be hard to implement. Unit with singularity reactor will have twice more HPs.
2. Reactor doesn't change the effective HP. I.e. higher reactor burns HP proportionally faster. This way higher reactor doesn't give battle advantage but it makes units cheaper thus more economically effective. Unit with singularity reactor will be twice cheaper.

I think I'll end up with #2 anyway as it seems to be easier to implement. I'll just multiply damage by reactor level. Same way as native combat does.


Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Unit cost calculation formula modification
« Reply #19 on: December 06, 2019, 05:18:26 AM »
It doesn't sound like Thinker mod a I know it. You should read its description and/or play it.


Dude, go read the writeups of the 14 games I played of it earlier this year.  Here's the last one I tested.  I haven't played it lately and I don't intend to.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Unit cost calculation formula modification
« Reply #20 on: December 06, 2019, 05:25:11 AM »
And what is useful?

"Useful" unfortunately has to be decided on a per type basis.  For instance, a Fission Probe Team is still useful for stealing techs from bases.  And for sabotaging, and for inflicting plagues.  There's a benefit / cost analysis for putting bigger reactors on such units.  In my mod, for instance, drop units are pretty useful once you've got Graviton Theory or the Space Elevator built and can do orbital insertions.  Drop capability is somewhat expensive, so I have found that Fission Drop probe teams are often more cost effective than Fusion Drop versions.

A lot also depends on the prevailing minerals output of your cities, as to what is "useful".  Units that take a long time to deploy aren't all that useful.

Re: Unit cost calculation formula modification
« Reply #21 on: December 06, 2019, 02:21:23 PM »
It doesn't sound like Thinker mod a I know it. You should read its description and/or play it.


Dude, go read the writeups of the 14 games I played of it earlier this year.  Here's the last one I tested.  I haven't played it lately and I don't intend to.


Maybe wrong wording. I meant in my understanding Thinker tries to improve AI play. Doesn't target to eliminate exploit for human. But never mind. This has nothing to do with the main discussion.

Re: Unit cost calculation formula modification
« Reply #22 on: December 06, 2019, 02:23:19 PM »
Drop capability is somewhat expensive, so I have found that Fission Drop probe teams are often more cost effective than Fusion Drop versions.

If you are playing unpatched version how come your Fusion unit is more expensive?

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Unit cost calculation formula modification
« Reply #23 on: December 06, 2019, 04:38:51 PM »
All the reactors seem to have minimum costs in certain categories, particularly when abilities are added.  Drop Pods are a cost 2 ability in my mod, same as the original game.  Try adding Drop Pods to your units and see how it constrains minimum cost.  If you want usable armor in the face of mindworms that is.

Re: Unit cost calculation formula modification
« Reply #24 on: December 06, 2019, 06:07:03 PM »
Minimum cost applies to whole unit, not to the ability only. Yes, if your unit is exceptionally cheap like 1-2 rows then you'll see it. Singularity reactor minimal cost is 6. Anything above it becomes cheaper with reactor.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Unit cost calculation formula modification
« Reply #25 on: December 07, 2019, 12:28:28 AM »
Hey while you're at it, look at upgrade costs.  I just learned from the Reddit sub /r/alphacentauri that there's a pretty serious exploit where you can upgrade a supply crawler for very cheap.  Way cheaper than you can then cash it in for Secret Project minerals.

Offline dino

Re: Unit cost calculation formula modification
« Reply #26 on: December 07, 2019, 10:28:28 AM »
2. Reactor doesn't change the effective HP. I.e. higher reactor burns HP proportionally faster. This way higher reactor doesn't give battle advantage but it makes units cheaper thus more economically effective. Unit with singularity reactor will be twice cheaper.

I was always thinking that would be the best solution, but didn't want to bother Inductio about it, since gameplay changes are not his thing. It gives quiet interesting effect, when max army size one can support doesn't change, but in case of total war across land border cheaper production allows to replace looses faster. That way reactor is both less overpowered and provides a different benefit than weapon and armor.

While you are at it, you could make both reactor impact on cost and reactor HP burn rate as you called it, adjustable through ini, since it will be hard to find a consensus among players on what values should be. I'm not even sure on values I'd set for myself until I try it ingame, but I lean toward completely neutering combat advantage and changing cost reduction rates to 100/75/50/25, from 100/50/25/12,5 %

There is one more issue to consider though, you should also adjust calculation of combat outcome estimation, to not confuse both AIs and players decission making.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: Unit cost calculation formula modification
« Reply #27 on: December 07, 2019, 02:37:20 PM »
While you are at it, you could make both reactor impact on cost and reactor HP burn rate as you called it, adjustable through ini, since it will be hard to find a consensus among players on what values should be.

Think carefully about providing "ease of fundamental change" features like this.  Is your goal to write a modder's toolkit?  Or is your goal to popularize your mod?

If the latter, you need to make decisions, and then promote your game design.  For my mod I don't run around apologizing or second guessing the changes I made.  I do take input from other people and I do listen to what playtesters have to say.  Tweaking your scheme yourself is very different from promoting a never-ending expansion of different forks to be tweaked.  And I really don't believe in handing players the tools to turn important core features on and off, because that means (say) 50% of people who could have been playtesting your mod, now aren't.  They're off on that other options path.  Option-itis is a curse for any kind of testing: game, 3d graphics benchmark, doesn't matter, it creates work.

The considerate thing to do would be to document how you did your changes somewhere, so that other binary modders who want to grab your GPL licensed work and commit to doing something different with it, can do so.  My version of that sort of thing is my CHANGELOG.  Almost every gory detail of what I've done is in there.  Only my 1st month of initial development is missing, before I made a release.


Re: Unit cost calculation formula modification
« Reply #28 on: December 07, 2019, 04:36:55 PM »
Hey while you're at it, look at upgrade costs.  I just learned from the Reddit sub /r/alphacentauri that there's a pretty serious exploit where you can upgrade a supply crawler for very cheap.  Way cheaper than you can then cash it in for Secret Project minerals.


Upgrade cost formula.
http://alphacentauri2.info/wiki/Upgrade_Cost
You cannot upgrade between different chassis.

Well, I am sure there are tons of exploit just because you cannot tie all the ends properly. Don't understand what is "upgrade a supply crawler", though. It is still a Supply module of the same price. Do you put extra armor on upgraded unit?

I didn't play test it but here is the math from the above formula.
Supply crawler [unit cost 3] -> Supply crawler with armor cost 10 [unit cost 13].
WeaponRise = 0,
ArmorRise = 10 - 1 = 9
NewRowsCost = 13
total upgrade cost = 0 + 9+ 13 = 22
total bonus project cost = [13 - 3] * 4 = 40

Yep. That is an exploit all right. Essentially it makes your project about twice as cheap to spend money on. However, it is still extremely expensive to pay completely for. Big part of it is usually minerals.

I guess this is due to the fact of stupid vanilla unit cost formula which makes mixed units cost to grow quadratic of armor price. I guess effect increases with more expensive armor.


Just out of curiosity, let me see how it works out in my unit cost calculation model.
Supply crawler [unit cost 8] -> Supply crawler with armor cost 10 [unit cost 13].
WeaponRise = 0,
ArmorRise = 10 - 1 = 9
NewRowsCost = 13
total upgrade cost = 0 + 9+ 13 = 22
total bonus project cost = [13 - 8] * 4 = 20

Woo-hoo! Apparently I fixed this exploit even not knowing about its existence.
:D

Re: Unit cost calculation formula modification
« Reply #29 on: December 07, 2019, 05:16:42 PM »
2. Reactor doesn't change the effective HP. I.e. higher reactor burns HP proportionally faster. This way higher reactor doesn't give battle advantage but it makes units cheaper thus more economically effective. Unit with singularity reactor will be twice cheaper.

I was always thinking that would be the best solution, but didn't want to bother Inductio about it, since gameplay changes are not his thing. It gives quiet interesting effect, when max army size one can support doesn't change, but in case of total war across land border cheaper production allows to replace looses faster. That way reactor is both less overpowered and provides a different benefit than weapon and armor.

Exactly, man! Why didn't you share your idea with me earlier since gameplay changes are my thing now?
:)

I've implemented it and I love it love it!
  • It does solve overpowered reactor HP problem. It just vanished now!
  • Unit cost does not double/triple with reactor as in my previous solution. They stay on quite reasonable level throughout the game both because relatively slower weapon/armor cost progression and reactor discount. Pure attacker infantry with strongest weapon and Singularity engine is only 10 rows. Of course, hovertanks and ships will be somewhat more but this is bearable for end game.
  • I extended reactor discount equally to non combat units as well. I believe this makes sense. They do not change equipment to more costly but cost reduction allow to use more expensive chassis, armor, and abilities on them without ridiculous cost growing. Fission infantry colony pod = 6 -> Singularity hovertank colony pod = 6 too. Fission infantry former = 4 -> Singularity speeder clean super former = 4 too.
  • As you exactly pointed out, while stronger weapon/armor provides combat survivability (and later healing) advantage, reactor now delivers economical efficiency for units. I like such diversity too.

New reactor dropping price 20% is not some extraordinary economical advantage but it is right on the money for new technology value. Doesn't make it too overpowered but does still keep it useful to target.

By the way, reactor price proportion is right there in alphax.txt replacing reactor power value. One can easily tweak it. However, I don't think dropping price more than half for latest reactor is any good. You are constrained with minimal unit cost of 6 for Singularity engine anyway.

While you are at it, you could make both reactor impact on cost and reactor HP burn rate as you called it, adjustable through ini, since it will be hard to find a consensus among players on what values should be.

I didn't find a good way to do flexible rate. Currently I just reuse the psi combat mechanics that sets each unit firepower to the opponent reactor value. HP burn rate is essentially same as temporarily setting opponents firepower to the unit reactor value for the course of the battle. I just call it that to highlight that this rate pertains to the unit with corresponding reactor not to the opponent whose FP is temporarily adjusted to provide unit desired HP burn rate.

Current firepower is a whole number of damage unit inflicts to the opponent if it wins the combat round. Flexible HP burn rate requires fractional FP that is impossible to implement. The best thing you can play with is to set reactor HP burn rate to higher whole numbers. Like Fission = 2, Fusion = 3, which makes their effective HPs 10/2 = 5 and 20/3 = 7, correspondingly.
That is theoretically possible. Unfortunately, there is only one unused field in alphax.txt and I already use it for cost factor. Flexible burn rate will be quite difficult to implement properly. Plus all the odds computation, plus all the help entries. Is it worth it?

I'm not even sure on values I'd set for myself until I try it ingame, but I lean toward completely neutering combat advantage and changing cost reduction rates to 100/75/50/25, from 100/50/25/12,5 %

My current digression is 100/80/65/50. I don't see a point in reducing it even more, as I mentioned above. Otherwise, all non combat units will hit minimal unit cost. Of course, we can exclude non combat modules from reactor effect or make it different. I tried it in my previous version and I didn't like it. It adds unnecessary complexity to the game mechanics that is difficult for player to grasp.

There is one more issue to consider though, you should also adjust calculation of combat outcome estimation, to not confuse both AIs and players decission making.

Right. That is on my TODO list. Currently odds are calculated incorrectly.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

What actually transpires beneath the veil of an event horizon? Decent people shouldn't think too much about that.
~Academician Prokhor Zakharov 'For I Have Tasted The Fruit'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 37.

[Show Queries]