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

0 Members and 9 Guests are viewing this topic.

Offline Nevill

Re: SMAX - The Will to Power - mod
« Reply #975 on: September 26, 2020, 12:53:26 PM »
Can you please take a look if WtP did anything to change/undo the starting location changes made by Thinker?
faction_placement=1

It's several games in a row that I start within 8 tile distance from another faction.

Not sure if it should go in Issues, since I don't even know if it isn't just my confirmation bias. But if you want, I'll open a thread there instead.

Re: SMAX - The Will to Power - mod
« Reply #976 on: September 26, 2020, 05:36:59 PM »
Can you please take a look if WtP did anything to change/undo the starting location changes made by Thinker?
faction_placement=1

It's several games in a row that I start within 8 tile distance from another faction.

Not sure if it should go in Issues, since I don't even know if it isn't just my confirmation bias. But if you want, I'll open a thread there instead.

Nope. Never touched it. I also observe pretty close starting locations sometimes. I'd say it is no biggie as long as each faction is not constrained in other directions. Remember that due to randomness in map generation it is not possible to give everybody an absolute equal location. There always will be some fluctuations.

Offline MercantileInterest

Re: SMAX - The Will to Power - mod
« Reply #977 on: September 27, 2020, 04:49:07 AM »
There's a bug/exploit from the original coding. When formers finish a terraforming operation or a movement, you can click on the them, order them to perform a different forming option, cancel and the order and they'll regain 1 movement point.

For example, I order a former to build a farm. This takes four turns. At the end of the fourth turn, the former will complete the farm but be unable to move. However, if I order him to build a road and then cancel the road order, he'll gain one movement point, which I can then use to terraform faster or go somewhere else.


Re: SMAX - The Will to Power - mod
« Reply #978 on: September 27, 2020, 06:02:13 AM »
Yep. That one is there as well as countless number of others. It will never be free of bugs. 😢

Re: SMAX - The Will to Power - mod
« Reply #979 on: September 27, 2020, 06:53:26 PM »
Finally. This one hanged around my computer for quite a long time. I tried to limit the scope as much as possible. However, I kept discovering more and more vanilla bugs interfering with my new features. So I had to change them along the way too. Even though I didn't fix everything I found the result satisfactory.

https://github.com/tnevolin/thinker-doer/blob/master/wtp_changelog.md#version-145

The main goal of this iteration was to teach AI expand faster = spam more colonies instead of wasting time on expensive 20 turn combat units. It seems to be doing pretty decent job now. Most of early production is colonies, formers, explorers, and some cheap facilities. See test screenshots on how fast it covers the normal map. Naturally, expansion slows down when faction engages in war but that is expected. Feel free to try it out and comment.

Warning/Disclaimer

A lot of code modification. Even though I tested it to run there still could be game crashing bugs. Please treat it as experimental and don't embark on PBEM games with it. Yet.

Other notable things

Fixed MercantileInterest's bug. It was pretty difficult to design a fix approach to it as the code (as usual) is very hard-coded, convoluted, and interdependent. Luckily I found one case where I can just exhaust all the movement point to eliminate exploit. It seems to work for human at least.

Move Hab Complex one level down to the level 2 tech. Previously I still observed cases when factions in need couldn't get it in time (Morganites, Jungle, Aquiatic). I hope this is not a big deal for everybody.

Sea explorers were permanently stuck in land port. Heinous bug affecting both AI and human. You can easily reproduce it by building sea unit in land port and set it to explore by "/" key. It won't ever leave the port. Whereas if you manually move it out of the port in the ocean and set it to explore there it'll start exploring. A lot of people didn't know about it as people rarely use this order. Yet it impacts AI as well. Now sea explorers are kicked out of port when healty.

Offline Nevill

Re: SMAX - The Will to Power - mod
« Reply #980 on: September 27, 2020, 07:01:18 PM »
Cool. Special thanks go for fixing the double terraforming bug. If only you knew the temptation... :) 
(this exploit could double terraforming speeds)

But can you please call it v146 instead, because I downloaded v145 yesterday to start another MP game, and this was what was written in the readme:
# Version 145
* AI: Added land improvement demand computation.
* Global production hurry happens before production phase to produce fully completed items.
* Fixed Thinker production unit mineral cost calculation. Previously it didn't account for prototypes/Skunkworks and Brood Pit.
* Added predefined units: Trance Formers, Trance Sea Formers.
* Hab Complex is now enabled by FldMod (level 2). Sea and jungle bases still struggle to get it in time.
* Restored vanilla emergency retooling after base attack. That was previously overriden by Thinker.
* AI production: added multiplying facilities.
* AI production: added psych facilities.
* AI production: added population limit facilities.

...were there other code changes besides the two bugs since then? Should I upgrade to the latest build?

Edit: there were, apparently. I see a few new parameters in thinker.ini. NVM, I'll just update to the "latest" v145 then.

Re: SMAX - The Will to Power - mod
« Reply #981 on: September 27, 2020, 09:05:02 PM »
Cool. Special thanks go for fixing the double terraforming bug. If only you knew the temptation... :) 
(this exploit could double terraforming speeds)

Are you talking about same bug MercantileInterest mentioned? He said this only can be used at the end of terraforming action. Are you saying it can be used at every turn? Please post reproducible scenario.

But can you please call it v146 instead, because I downloaded v145 yesterday to start another MP game, and this was what was written in the readme:
# Version 145
* AI: Added land improvement demand computation.
* Global production hurry happens before production phase to produce fully completed items.
* Fixed Thinker production unit mineral cost calculation. Previously it didn't account for prototypes/Skunkworks and Brood Pit.
* Added predefined units: Trance Formers, Trance Sea Formers.
* Hab Complex is now enabled by FldMod (level 2). Sea and jungle bases still struggle to get it in time.
* Restored vanilla emergency retooling after base attack. That was previously overriden by Thinker.
* AI production: added multiplying facilities.
* AI production: added psych facilities.
* AI production: added population limit facilities.

...were there other code changes besides the two bugs since then? Should I upgrade to the latest build?

Edit: there were, apparently. I see a few new parameters in thinker.ini. NVM, I'll just update to the "latest" v145 then.

Crap. Sorry. Mixed them up. Let me try to restore it.



Separated 145 and 146. You don't need to upgrade. 145 is completely workable too. 146 just has more stuff and more tuned AI but this is never ending process anyway. So you can pick any. Of course, all other things equal the later version is better.

Offline Nevill

Re: SMAX - The Will to Power - mod
« Reply #982 on: September 27, 2020, 10:07:50 PM »
Are you talking about same bug MercantileInterest mentioned? He said this only can be used at the end of terraforming action. Are you saying it can be used at every turn? Please post reproducible scenario.
Pre-requisites: have a road network connecting the tiles you need to work on.
Assuming a borehole takes 16 turns, order 8 formers to drill a borehole. Hit next turn. It will complete, and the formers will be out of moves. Order them to do something else, then cancel order. They will all gain 1 movement point. Move them to a new tile, and order them to drill a borehole. It will complete next turn. Repeat.

8 formers will be drilling one borehole a turn where normally you'd need 16.

Edit: do check, though, if your solution allows a former to resume a terraforming action if it was cancelled on accident. Because that is what they are supposed to do, too.

(they can also carry over their work, i.e. work on one tile, then move to another and keep their progress, but that could be inintended)

Re: SMAX - The Will to Power - mod
« Reply #983 on: September 27, 2020, 11:47:53 PM »
Ah. Yes. That's the one just multiplied by many formers.
I believe it is fixed. However, I didn't test it extensively. Sort of side task.

Offline MercantileInterest

Re: SMAX - The Will to Power - mod
« Reply #984 on: September 28, 2020, 05:48:30 PM »
Are you talking about same bug MercantileInterest mentioned? He said this only can be used at the end of terraforming action. Are you saying it can be used at every turn? Please post reproducible scenario.

It can also be used for movement.

Former is out of moves. Order him to move to adjacent tile. He won't because he has no moves but, next turn, he'll slide over and finish that turn's move. Order him to terraform, cancel, and he'll get another move.

Re: SMAX - The Will to Power - mod
« Reply #985 on: September 28, 2020, 06:18:28 PM »
Yea. I figured. It is either movement of terraforming which consumes all moves anyway. I think I fixed it but cannot be 100% sure. Let me know if you still see it.

Re: SMAX - The Will to Power - mod
« Reply #986 on: September 30, 2020, 08:19:04 PM »
Extra prototype cost modification proposal

Currently extra prototype cost is a fixed percentage of unit cost regardless of how many prototyped components are in it. That allows saving on prototyping by combining all new components (weapon, armor, chassis) in one unit. Building such unit immediately prototypes all included components. Another problem is that extra prototype cost is proportional to unit cost thus making prototyping same component cheaper on overall cheaper unit. I.e. it is cheaper to prototype weapon and armor on chassis unit. It is cheaper to prototype new chassis on Scout Patrol, etc.

I propose to rework this formula to eliminate the need for such fiddling and exploits. Helps AI as well.

Proposed formula


extra prototype unit cost = sum of extra prototype component cost for each prototyping component
extra prototype component cost = component cost * extra prototype cost percentage from alphax.txt


There are three extra prototype cost values in alphax.txt based on triad type. They surely can be attributed to chassis. There are no special percentage applicable to weapon and armor, though. I think taking average of the triad extra prototype costs is the most logical as weapon and armor can be used for any triad.

Extra prototype cost is not affected by reactor price reduction it is just a flat addition. This way prototyping component always costs the same. No room for exploit or fiddling.

The above formula also somewhat lowers overall cost of prototype unit as it applies to a single prototyping component only and not to the whole unit. We can increase extra prototype costs to 100% to still keep extra prototype cost significant.

Re: SMAX - The Will to Power - mod
« Reply #987 on: October 01, 2020, 06:17:40 PM »
Flat prototype cost

https://github.com/tnevolin/thinker-doer/blob/master/wtp_changelog.md#version-149

The modification was very obscure due to original convoluted, scattered, and hard-coded implementation. I will appreciate if someone will do a second look at it and test different scenarios: different percentage, different composition of prototyped and not prototyped components, in different places: design workshop, call design workshop from base item picker screen, actual values for unit cost, etc.

However, when modifying extra prototype cost percentages in alphax.txt, keep them all equal due to the vanilla bug.


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/alphacen/public_html/Sources/Aeva-Subs.php on line 2546

Online bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6395
  • €720
  • 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: SMAX - The Will to Power - mod
« Reply #988 on: October 02, 2020, 02:57:24 AM »
lockup
lockup

Version 148, per your recent post in r/4Xgaming.  After customizing my random map, I never got a faction selection menu.  I get dumped into the Cyborg selection and it locks up.  To install, I first did a clean install of GOG SMAC and SMACX in a folder named "C:\GOG Games\The Will To Power".  Then I copied the stuff from /core on top of it.  Then I copied the stuff from /factions on top of it.  Started the game by clicking directly on terranx_mod.exe in its directory.

I just recently played Thinker mod 2.0 release combined with my own mod just fine.  So it is not an underlying Thinker bug.  At least, not in 2.0 release.  I don't know what Thinker your 148 is using.

I noticed your #CUSTOMFACTIONS in alphax.txt is not empty.  It contains:

Code: [Select]
#CUSTOMFACTIONS
atlantis
bree
empath
genesis
ghost
republic
templar

These don't exist in a normal alphax.txt.  Before I did the clean install, I tried overwriting a really old WTP directory, from May of this year.  I was getting parse errors about bree and ghost and republic, I think.  That's why I tried a clean install.

Will try another clean install with only /core.  It may turn out that you have divergences between /core and /factions and are not achieving real world test coverage of these during installation.  I would recommend that you ship the factions that you intend to have as the experience of your mod, and not complicate the number of steps / permutations that a user can install with.  If this works when only installing /core, I will be proven correct.  Stay tuned.

Online bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6395
  • €720
  • 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: SMAX - The Will to Power - mod
« Reply #989 on: October 02, 2020, 03:46:13 AM »
what it should look like
what it should look like

Ok first I thought I should verify that the clean install actually works, without any file changes.  I installed to "C:\GOG Games\The Will To Power core only".  This is where I got to.  I think you can see that when the Cyborgs are displayed, there's supposed to be a faction selection menu above them.  This wasn't happening in the modded game.  I changed everyone to RANDOM, started the game, drew Yang, landed on the planet, and saved the game.

I then went into Alpha Centauri.ini and added "DirectDraw=0".  Restarting the game, I have it correctly displaying on my laptop's widescreen.

I then adjusted all my Preferences to my usual.  I saved the game to retain them.  Then I dumped everything from 148 /core into the game directory.  Then I started terranx.exe to verify that the normal game still works.  Well, it doesn't exactly.  I got the following screen:

ghost faction parser error
ghost faction parser error

Oddly, then I did get dumped into the game's main menu.  I quit and started terranx.exe again, to make sure I'm straight on what's happening.  This time I got the Firaxis logo, and then the following error screen:

genesis faction parser error
genesis faction parser error

I'm a little surprised that the error is indeterminate, with different spurious #CUSTOMFACTIONS called out from run to run.  Clicking on the OK button, I got errors about "republic" and then "empath".  Then it repeated again with "genesis" then "republic" then "empath".  Then I got dumped into the game's main menu.  I loaded my saved game just fine.  So terranx.exe does work, but it's getting upsetting / scary errors due to the spurious #CUSTOMFACTIONS entries in alphax.txt.  I think you need to delete those.

Now I finally try clicking on terranx_mod.exe.  I again get 6 parsing errors, this time with "templar" and "atlantis" and "republic".  Get dumped to main menu.  Start Game.. Customize Random Map.. Standard Planet.. 50-70% of Surface.. Average Erosion.. Average Life Forms.. Average Cloud Cover.. Transcend.. Customize Rules.. OK because rules haven't changed.. and, BANG:

no faction selection menu
no faction selection menu

It's bugged.  And it isn't about the DirectDraw.  I bet it's about #CUSTOMFACTIONS.  Note that I get Roze because I had RANDOM factions selected last time.  I'll probably get a new one every time now.

 

* User

Welcome, Guest. Please login or register.

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

The popular stereotype of the researcher is that of a skeptic and a pessimist. Nothing could be further from the truth! Scientists must be optimists at heart, in order to block out the incessant chorus of those who say: It cannot be done.
~Academician Prokhor Zakharov @ University Commencement

* 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: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 50 - 1568KB. (show)
Queries used: 36.

[Show Queries]