Author Topic: SMAX - The Will to Power - mod  (Read 5989 times)

0 Members and 1 Guest are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • 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.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX The Will to Power mod
« Reply #15 on: December 05, 2019, 04:16:06 AM »
Unpatched.  With my own mod version 1.37, another Discover oriented faction, the Cyborgs, were doing extremely well for themselves on tech.  So much so, that compared to myself as the Morganites, they were beating me on tech.  Even though they were the farthest faction across the map, I felt compelled to invade them first, by orbital insertion.  And complete extermination by gassing, saving only the cities with Secret Projects in it.  Even as their empire was crumbling, they were still researching more tech than me!  I found it remarkable.  It seemed my changes had created a bit of a threat.  I believe if I had left them alone, they would have become a problem.

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #16 on: December 07, 2019, 10:08:38 PM »
I think I'm pretty much done with first satisfactory version of unit cost and reactor things. Any further changes will be just changes.
Now I am onto my new crusade - combat mechanics. So long it annoyed my with its flawed formulas. I am not sure if it worth efforts, though. It doesn't seem that game breaking or changing anyway. At least nobody bothers. Feel free to vote either way.

Here is the essence of the culprit.

1. Combat round roll probabilities.
Game does apply pretty simple algorithm to decide which side wins each combat round. I'm glad that at least here they opted out for simplicity. Unfortunately, this is one of rare places where probability math does matter. In short, displayed odds are calculated linearly by attack to defense ratio. Meaning when attacker total attack strength is twice as more than defender total defense strength game expectedly shows 2:1 odds providing same HP left on both units. Here is the twist: real combat formula does not give odds as displayed!!! D'oh. Isn't everybody tired to discover game design flaws over and over again?
Just for an example, 2:1 strength ratio produces 3:1 combat winning odds. Odd, isn't it? Combat odds formula is not even linear. Meaning it favors stronger side more than it should. That is the problem as it economically renders even slightly weaker units much more economically ineffective and forces mod designers like me and bvanevery to bring armor and weapon values as close to each other as possible. Otherwise, with linear formula it wouldn't be too bad to fight with weaker units as long as you can match their numbers proportionally.

2. Multi round combat.
Another math probability catch. Probability of winning in a multi round battle is a power of singe round winning probability. Meaning that even if you have a slightest advantage this advantage multiplies tenfold (for 10 round combat). Example, 2:1 strength advantage ratio gives you about 99.9% winning chance with both units using Fission reactor (10 HP). One would think that slight 11:10 advantage should result in some slightly above 50% win chance. Nope. With Fission reactor it's ~70%. And with Fusion reactor it's ~87%. Even worse with higher reactors. Impressive, isn't it? You can see how even slightest advantage matters with these formulas since winning unit can heal and thus winning unit owner incurs no loss.

The only way to fix it is to match complete battle win probability to what displayed odds screen says: the chance of each unit success is directly proportional to this unit strength all effects combined (attack and defense modifiers, HPs left, etc.).

Your thoughts?
Tim

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • 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.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX The Will to Power mod
« Reply #17 on: December 08, 2019, 12:29:54 AM »
I think the odds checker, which I always have turned on nowadays, is completely lying to me.  It requires a 3:2 advantage to be very likely to win.  4:3, I might lose.  11:10, I'm going to die, I don't do the fight.  It does not agree with Part 2 of your analysis.

Psi combat seems to be particularly screwed up.  I've developed a gut feeling for how many 'grains of salt" to take with the odds checker.

I think a lot of combat systems could work, if the displayed odds were actually true.  A player gains instincts over enough iterations, if the phenomena are consistent.

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #18 on: December 08, 2019, 12:40:50 AM »
I think the odds checker, which I always have turned on nowadays, is completely lying to me.

That is what I am trying to convey.

It does not agree with Part 2 of your analysis.

This is not my analysis. This is what people extracted from disassembled code before me. I am not running a discussion on how it is implemented now. This is just an example of how flawed it is. I plan to change it.

I think a lot of combat systems could work, if the displayed odds were actually true.  A player gains instincts over enough iterations, if the phenomena are consistent.

That's the plan. Match actual odds with displayed ones.
Tim

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #19 on: December 09, 2019, 04:43:09 AM »
Version 21 is available.
Changes are in description. The most important of them are:

Conventional and psi combat now ignores reactor power. Combat is processed as if all units have 10 HP. This is done by hijacking psi combat mechanics that actually does ignore reactor power by original design.

Conventional and psi combat odds calculation now ignores reactor power to match modified combat mechanics. This is actually not only mod for conventional combat but a fix for psi combat. In vanilla psi combat ignores reactor power but psi combat odds calculation does not. Which is a bug that haunted and confused whole community for so long. I am curious why previous fixer like Yitzi and Scient didn't touch it.

Reactor contribution to unit cost calculation is simplified. Now each subsequent reactor drops whole unit cost by approximately 20%. This is configurable. This drop does not affect abilities flat cost.

-----------------------------

These are exe patches. I barely tested them to make sure calculation works correctly. However, there are plenty of other branches I didn't even traced due to limited time: battle involving artifact, probe, artillery, missile. If you see any discrepancies - please let me know. Thank you.
Tim

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • 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.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX The Will to Power mod
« Reply #20 on: December 09, 2019, 06:58:33 AM »
Ok I finally get it now.  A reactor gives you slightly cheaper unit costs, but that's it.  No other benefit.  That puts beginning of game units much more at parity with end of game units.  Why upgrade?

Still working on my massive DAR, so not free to test this right now.  Got some other life concerns too.  But when I have time, I'll look at it.

Offline dino

Re: SMAX The Will to Power mod
« Reply #21 on: December 09, 2019, 09:15:24 AM »
Judging on thinker.ini, you've included an outdated version of thinker mod, or is it just outdated version of ini file by mistake ?

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #22 on: December 09, 2019, 03:12:33 PM »
Ok I finally get it now.  A reactor gives you slightly cheaper unit costs, but that's it.  No other benefit.  That puts beginning of game units much more at parity with end of game units.  Why upgrade?

Still working on my massive DAR, so not free to test this right now.  Got some other life concerns too.  But when I have time, I'll look at it.

Not sure what you mean by parity. End game units are much stronger. Acquiring next level item is always beneficial from both combat and economy point of view. Making end game units slightly cheaper makes them even more economically effective.
Tim

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #23 on: December 09, 2019, 03:22:47 PM »
Judging on thinker.ini, you've included an outdated version of thinker mod, or is it just outdated version of ini file by mistake ?

I checked it and it matches v0.9. Can you point specific things made you think so?
Tim

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #24 on: December 09, 2019, 04:24:12 PM »
Judging on thinker.ini, you've included an outdated version of thinker mod, or is it just outdated version of ini file by mistake ?

I checked it and it matches v0.9. Can you point specific things made you think so?

Never mind. I think you meant alphax.txt. It is not even outdated. It is from prehistoric times when Thinker didn't distribute it with own changes. Updated it. Here is it. Didn't tested it myself yet.
Tim

Offline bvanevery

  • Emperor of the Tanks
  • Librarian
  • *
  • Posts: 4350
  • €483
  • 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.  
  • Planning for the next 20 years of SMACX.
  • AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: SMAX The Will to Power mod
« Reply #25 on: December 09, 2019, 05:52:07 PM »
Not sure what you mean by parity. End game units are much stronger.

Only due to putting bigger weapon or armor on them.  A Chaos Fission unit isn't going to have any less of a punch than a Chaos Fusion unit.  The latter just costs less to build, if you're not dealing with minimum cost issues.  I can see cases at least in the stock binary, where if only your reactor difference was implemented, a Fission version of something might actually be better than the Quantum version of something.

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #26 on: December 10, 2019, 06:16:48 PM »
Added TODOs to my head post for my agenda.

I plan to fix some exploit related to unit hurrying and upgrading as discussed in http://alphacentauri2.info/index.php?topic=21360.0.

Hurry cost for all production is flat - no initial mineral investment restrictions.
Unit hurry cost = minerals * 4.
Unit upgrade cost = difference in hurry cost.

These two combined solve crawler upgrade exploit to add to SP as well as any other hurry/upgrade exploits. They are no exploits anymore as all costs are linear. One just pay the full price of the upgrade target design regardless of how they ended up there.

Game does not allow downgrade to weaker weapon/armor so formula should never produce negative upgrade cost. However, in this mod higher reactors decrease unit cost so it is possible to get negative upgrade cost for only upgrading reactor. I need to implement this and test to see if it works.

Talking about changing hurry cost formula from quadratic to linear. I don't think it'll break anything. People already spend most of the money on hurrying facilities due to their lower higher hurry cost comparing to units. I never find myself hurrying units on a regular basis past initial exploration stage of the game. I don't think there are so much money in the game to turn flat unit hurry rate into an exploit. It is impossible to buy them all.
On a negative side it does not help to buy out last 10 minerals for unit. Vanilla: 15 credits, new: 40 credits.
On a positive side one can buy out complete expensive unit with enough money. Example for 100 mineral worth unit, vanilla: 700 credits, new: 400 credits.
Tim

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #27 on: December 12, 2019, 07:00:35 PM »
Summarizing tech cost point. They are not yet all clear for me.

Problems
  • Uneven research pace. First few techs come fast. Then stagnation. End game pace is very high.
  • Tech trade hold off exploit. It is more beneficial to trade after research as each trade increases number of researched techs and makes next research tech more expensive.

#1 Analysis

Analyze or emulate average faction progress and use this as a baseline. It will never be exact as there are endless variations in games. However, it should reflect expected game stages and effect of map size correctly.
There are two important game stages to adjust: A) early game and B) finish run when map it fully occupied by bases. Finish run is not necessarily an end game. It could start much earlier on small maps.
A)
Early game is same on any map size until player actually hit map limits. Therefore, early techs cost should also be same regardless of the map size!
B)
Map size limits number of working tiles, obviously. After some point in the game whole map is occupied with bases, best terraforming technique is applied to each square, and all labs multiplying facilities are built. Then the only source of labs growth is base population growth which is quasi linear due to ever growing nutrient requirements for next citizen. So asymptotically labs grows about linearly proportionally to map size.

#2 Analysis

I don't think there is a bullet proof solution for this one. Even if we fix all tech costs based on their level (as dino suggests) player would still like to research cheaper technologies and trade more expensive ones. This time not based on research time appearance but based on their level. Either way player would try to minimize cost which is normal strategical choice. The only way to avoid this exploit is to price all techs same but this is unfeasible in 4X game. I believe the closest to this is to increase cost as proportionally smooth as possible. There will still be an opportunity to save small here and there but it will be also outweighed by losing trade opportunity saving big. After all, this is completely normal to avoid trading (and even researching!) unneeded technologies.

What vanilla design does wrong?

  • Linear tech cost growth at the beginning when development speed is exceptionally slow. First two technologies can be discovered in 4-8 turns each. Subsequent tech costs quickly climb to 40-50 turns easily especially if you traded a lot of them at the beginning. That results in early game tech stagnation and lack of research maneuver.

Data analysis

Assuming we are playing toughest difficulty level which limits game play to 400 turns. Tech costs should be set then to let player finish all research by then with some challenge. Assuming one acquire approximately every second technology by non research means (pods, trade, stealing). The last statement is disputable, of course. With that in mind some average faction should be able to research the rest of 45 techs in less than 400 turns leaving some time for ascent to transcendence. That gives us 400 / 45 = ~8 turns per tech. I'd say 6-8 should be good enough baseline to be not too harsh on player. However, building twice larger than average empire is another mean to achieve this even without trading.

What we can do to fix it with minimal efforts?

  • Set fixed cost to early technologies. Assuming average faction can come up with 2 labs at the very beginning first tech should cost 2 * 6-8 = 12-16.
  • Cost for following early techs should grow very slightly. Say about 5%-10% for each next to avoid stagnation and discourage trade hold off exploit.
  • Further cost growth should be somewhat exponential or otherwise accelerating with about 5-20% growth rate or so.
  • Approaching map saturation growth acceleration should slow down.
  • Past map saturation growth should stabilize on linear progression.
I am not going to apply precise math to emulate the above. Probably just something shape like. And then I'll introduce both adjustments as in vanilla: A) deviation from expected research schedule and B) deviation from other factions research progress.
A) is supposed to alleviate not exact matching between tech cost formula and actual development due to either not perfect formula itself or exceptional variation in development. If player falls behind in research techs become cheaper and vice versa.
B) is supposed to limit loss for least fortunate. Factions behind in research get technologies cheaper.
« Last Edit: December 12, 2019, 08:57:15 PM by tnevolin »
Tim

Offline dino

Re: SMAX The Will to Power mod
« Reply #28 on: December 12, 2019, 10:01:19 PM »
As a pure theory crafting and entertainment, since I understand reverse engineering effort required would huge, so what I wrote below is rather unfeasible...
The best solutions, to various tech realted issues would imo be:

1) Have cost fixed and level based like in thinker mod and have the cost of each level match development speed to extend the research beyond 300 turns
2) Make AI agree to trade only equal level techs as baseline, +- 1lvl depending on diplomacy standing, +- 1lvl depending on how much more or less traded techs are weighted according to AI weights.
3) If trade would be not possible according to the above rule, AI should trade for money according to tech cost, adjusted by diplomacy, commerce and AI tech weights.
4) Make probe steal tech action have a cost like base mind control, it should cost half the cost of research as baseline, modified by probe rating like mind control.

As for the awkward solution with the first 10 techs in thinker revised cost formula. I think just having the first lvl techs cost 2 - 3 times more than the first tech in vanilla would be fine,  as long as you speed up a bit early game development with one free former at the start ( thinker mod feature, could be modified to give it to the player too ) and make sure AIs will research Ecology as one of their first two techs. A free former is also a great feature, to help with overcoming a bad starting terrain.

Offline tnevolin

Re: SMAX The Will to Power mod
« Reply #29 on: December 12, 2019, 11:19:52 PM »
Interesting suggestions. You are right that most of them would be very difficult to implement, though.
:)

Not sure they all are applicable to my modding either. I try to not create new experience. Rather fix some obviously sticking problems those render certain feature of the game unusable or deviating from original idea. I highlighted two of them in my previous post: research stagnation in the early game and the opposite in the later. These are problems in terms of this mode because this is not what one would expect from game. There, of course, could be deviations in research pace but not that big and illogical. So I am going to tune tech cost to smooth them to extent where it is not that noticeable problem anymore.

As for trading thing, I don't think this is a problem at all. Past the first 20 techs their cost grows very slowly. Next tech is about just 3-5% more expensive. Holding off the trade may win you these 5% at risk of losing trade opportunity and whole 100% of free tech. Ergo, is better to trade as soon as possible and as much as possible. You still can exercise it but its a normal strategical risk. Trade hold off is not some overpowered or must have strategy.

Now, the first 20 techs is another story. Due to this design flaw their average cost increase is somewhere 30%. This is something worth holding. After I fix this specific design flaw the hold off exploit will die by itself.
Tim

 

* 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)
-=-
18 (6%)
XP Compatibility patch
-=-
9 (3%)
Gog version for Windows
-=-
76 (29%)
Scient (unofficial) patch
-=-
27 (10%)
Kyrub's latest patch
-=-
14 (5%)
Yitzi's latest patch
-=-
85 (32%)
AC for Mac
-=-
2 (0%)
AC for Linux
-=-
5 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
12 (4%)
Total Members Voted: 258
AC2 Wiki Logo

* Random quote

The first living thing to go through the device was a small white rat. I still have him, in fact. As you can see, the damage was not so great as they say.
~Academician Prokhor Zakharov 'See How They Run'

* Select your theme

*