induktio / thinker Goto Github PK
View Code? Open in Web Editor NEWAI improvement patch for SMACX.
License: GNU General Public License v2.0
AI improvement patch for SMACX.
License: GNU General Public License v2.0
Line 92 in dd260b7
The issue has been already discussed on https://old.reddit.com/r/alphacentauri/comments/15sx90w/techshare_doesnt_appear_to_work/
I understand I'm misusing the SMAC-in-SMAX mod by making use of expansion-related content, but I would like to ask anyway if it would be possible to fix the issue with TECHSHARE as descrived above in the reddit thread, where in SMAC-in-SMAX it behaves like SHARETECH (or is simply ignored), restoring the infiltration requirement for gaining techs.
In general, would be possible to have all the expansion-related rules for factions fully enabled also on SMAC-in-SMAX?
Remark: run game in wine under linux
System tells me, that I have Iron Man option -- which is not true -- and then crashes.
Same behavior when I have Iron Man selected.
terranx_enums.h contains a hardwiring of predefined units in alphax.txt. Nobody ever guaranteed that these units are as claimed. It may be of no consequence to Thinker itself, but it is of consequence to those of us who mod units in alphax.txt. For example in a game where I combined Thinker with my SMACX AI Growth mod, I got illegal creation of a Clean 3-Res Transport every game, because I have it in the "unit = 3" slot (counting from 0). Thinker assumes that's always a Transport with no other capabilities, and that's not true in general.
https://alphacentauri2.info/index.php?topic=21768.msg133377#msg133377
The stock binary, in contrast, does not require a Transport unit to be defined in alphax.txt at all, for Transports to appear in the game. It somehow designs a plain Transport if such is needed.
It does not fix incorrect number of colonies given to late starting factions. I had this fix in WTP before but now I am retiring this code in favor of subject one. Therefore, I need to reintroduce this into the flow somehow. Would be simpler to integrate it in Thinker code since it started take care of player setup.
Suggestion
Thinker offers free formers and colonies to computer player. I've got a lot of feedback from players that they want same too. Would be nice to treat everybody equally or to introduce more parameters controlling how many free units human players receive.
This is really a nit, but I just wanted to see if you knew about it and it was the way you wanted it. It concerns "hurrying" production. I will use the numbers from my current game.
Greater Intertwining can The Citizen's Defense Force with 404 credits.
Minimum cost to hurry for next turn completion is 344 credits.
We have 289 credits.
If I click "Make Partial Payment", a window comes up that says
ENTER PAYMENT AMOUNT (0-289)
Below this it says PAYMENT: and the amount 344 is in the box.
The non-Thinker (original GOG) game displays 289 in the box after PAYMENT:, which makes sense to me.
I'm not saying this is a bug, and yes it is really picky. :)
Original function proposes production choice and nothing else
.text:004F81A0 base_prod_choice proc near ; CODE XREF: base_reset+C1↑p
mod_base_production modifies original function.
It also calls consider_hurry which may modify base state. Original function doesn't do that.
It would be nice if you stick to original function purpose. Then I can safely redirect to your function for production suggestion.
Currently I have to modify your function to ensure it doesn't silently modify base state under the hood.
Firstly, a huge thank you for polishing one of my favourite games up to ying-yang – it's an amazing experience.
Beyond your countless AI improvements, the simple ability to scroll-zoom and mouse-drag around smoothly from PRAX is the single most groundbreaking change to how the game feels moment to moment.
I experience inconsistent behaviour with it, though, and have read a few related issue reports from others here and in PRAX, but I don't think the cause was fully narrowed down, so here's what I found:
Goes without saying, if there is a way to fix that, the perfect Alpha Centauri experience completes.
A shortcut for toggling global/detailed minimap and for zooming it in-out would be double-plus-good ;)
Here's what was dumped onto the terminal, I have no real idea how to interpret this.
Hi, scrolling the mouse wheel now sends keyboard up and keyboard down events, which is great for scrolling menus and stuff, but isn't what I expected on the main map view (where it orders units to move up or down).
I think the scrollwheel should either be disabled on the map screen or be remapped to zoom in and out.
I tried compiling Thinker myself and debugging it, but it exits immediately if I try to run it under gdb (but works fine otherwise). I was able to confirm that map_is_visible()
is returning false when the map is visible, though.
I just guess this is related to some AI functions. Just end the turn in the savegame.
I use wine on linux, but had never any problems, so I guess it's not related to that.
This is what appears on my console:
002c:fixme:ver:GetCurrentPackageId (000000000031FD70 0000000000000000): stub
0024:err:ole:apartment_add_dll couldn't load in-process dll L"a3d.dll"
0024:err:ole:com_get_class_object no class object {d8f1eee0-f634-11cf-8700-00a0245d918b} could be created for context 0x1
od.exe: ../nptl/pthread_mutex_lock.c:434: __pthread_mutex_lock_full: Zusicherung »robust || (oldval & FUTEX_OWNER_DIED) == 0« nicht erfüllt.
0114:err:seh:dispatch_exception Fatal EXCEPTION_WINE_ASSERTION exception (code=80000101) raised
looks like a deadlock to me
The last game I played, I had the Hunter-Seeker Algorithm Secret Project, yet Drone Probe units still infiltrated my cities. I read the notes about enhanced probes in the documentation, but it did not specifically say, nor did I understand it to imply, that the Hunter-Seeker Algorithm could be overridden.
Is this functioning correctly ?
Thanks !!!
#define min(x, y) std::min(x, y)
#define max(x, y) std::max(x, y)
These macros are very fragile. I am sure it compiles in your environment since you were able to release. However, any shift in includes or their sequence may trigger the double substitution problem.
max(x, y) => std::max(x, y) => std::std::max(x, y)
I understand that your code comes at no warranty and I am the only one who can suffer from this downstream.
😃
However, if not much trouble, would you mind to either use std:: calls directly as is or rename the macro to be lexically distinct from function name you substitute?
Like, for example:
#define MIN(x, y) std::min(x, y)
![image](https://user-images.githubusercontent.com/80346254/110498913-09d30080-80f8-11eb-93f6-26d7d172e794.png
For some reason thinker mod don't want to launch, I follow all instructions but I still have this error
I've freshly installed the Thinker 3.1 mod to a GOG installation on Windows 10, and when checking the version with Ctrl+F4 it correctly displays the version number when launched from thinker.exe
. However, the mod's menu does not appear when pressing Alt+T; instead, it cycles through the terrain display modes (as if simply pressing T). Any assistance would be appreciated.
Cloned from b-casey/OpenSMACX#29
Not really a bug, but a nuisance anyways ;)
In modern Civs if you press Space on a unit you can still activate and move it later that round.
In SMACX the unit's turn is over for good - no chance to move it later.
I would propose to allow later movement.
A serious issue repeatedly spotted: during enemy turn, my air unit flies from my Mathematical Medium base on successful interception mission. At the start on my turn, this unit disappears. Attached are autosaves before and after the event.
Autosave_2381.zip
As you already added highlighting for HQ...
Afaik the only way to see if a base has a golden age (after the initial pop-up) is in the base menu (F3).
I suggest to add a visual clue when you a) open the base screen or even b) from the world map.
When I apply PRACX v1.11 to the mod my resolution from launching the game is distorted, this has not happened to me in any other exes with PRACX installed, I am not sure what is causing this conflict, and or this is config problem.
Here is a screenshot of what I see when I launch the game.
https://imgur.com/a/oBxUZwA
Line 684 in 87ae1ea
Line 403 in 87ae1ea
Don't understand why you explicitly skip vehicle when at destination.
What if this is sea colony still having some movement left? Why not let it to build a base same turn?
With PRACX installed, launching via the thinker.exe causes a blown up, distorted resolution which obfuscates the UI/menus. Tweaking the ini resolution settings manually or attempting windowed mode does not help. I have tried clean installs, either starting with PRACX or installing it over Thinker. Same result.
The game intermittently fails to start when using the launcher app. When it does start, it will not always respect flags (tested with the -smac flag), too. I've tested this on a Windows 10 and 11 PC and both have the issue.
Somewhat of a fix is to set Windows XP compatibility mode on terranx.exe. The game will reliably start every time, but it will sometimes start in 1024x768 resolution instead of native resolution, even with DirectDraw=0 set. Compatibility mode doesn't fix the flag issue.
With both Thinker 3.0, and 3.1 I was able to use PracX to go Windowed mode.
Since updating to Thinker 3.3 I was no longer able to. Confirmed I cannot run it in Thinker 3.2 either.
Process to repeat:
2.4 had pretty logical combat move.
When I play this save with 2.4 believers' scouts in base attack my troops staying right next to their base.
When I play same save with latest code they get out of the base without attacking my forces leaving base undefended.
I blame this code. When I comment it out the logic returns to normal.
Line 2142 in ac4852e
Keep in mind that I have only tested 2.4 from your release. There is no release for current commit. So you may want to retest it yourself to confirm the problem.
The red box around the base size number that shows up when the base is about to grow and will get drone riots on growth shows up a turn too soon when not pop-booming.
Bases grow the turn after they finish filling their nutrient box, not the turn that they fill it. However, the red warning box reliably shows up on the turn before they fill their box, AND on the turn before they grow. This isn't relevant for most games post-early-game, since you're pop-booming all your growth, but I'm playing a Morgan game and seeing it a lot.
This behavior is 100% reliable on every base that will get drone riots on growth; let me know if you need a save anyhow.
Curious behavior is repeatedly spotted: my land units spontaneously leave my seabase at the start of my turn going to nearby shore when an ally moves a transport in the base. Probably, ally issues an unload or move order to wrong units. Attached are autosaves before and after one such event. The seabase is Empirical Algorithms.
WrongUnitsMove.zip
It correctly conducts combat. All units fight as if they have fission reactor. When a unit incurs 10 damage it is destroyed. So the 10 last unit HP are actually counts.
It doesn't work in other areas. Examples below
The display does not reflect this. Unit health bar is still computed with actual reactor.
Create singular scout and set its damage to 10. You'll see its health bar reduced by 1/4. If you fight any other unit it will be destroyed immediately as having max damage already.
The healing does not take this into account as well. Singular unit heals 4 point at a time as in vanilla while fission one heals 1. So from your modified combat perspective singular unit heals 4 times faster. At the same time unit outside of the base can heal only up to 80% which means 32 for singular. So in your combat version it actually gets 2 HP only.
I suggest to use existing for psi combat reactor power ignoring mechanics. It is pretty simple and does not require a huge array of ones and such massive patching in 50 places.
This is just a request for integration ease. I like to reference your functions to reuse your functionality without modifying your files as much as possible but sometimes they are not exposed in headers so I have to ether modify header or rewrite it completely. Would you mind exposing all functions if it is not much trouble? Thank you.
I've had this issue in several games vs. opponents where the infiltration has expired. The option to Infiltrate Datalinks simply doesn't show up. In the save I'm attaching, I'm trying to reinfiltrate Lal. My last infiltration expired several turns ago, but I haven't had the option to infiltrate in several probe actions since then.
Lal does have Hunter-Seeker, but I don't think that's relevant because A) my probe teams all have algorithmic enhancement and B) I've had this issue in previous games versus opponents without Hunter-Seeker.
Attached is the file I mentioned in the Steam discussion group. It hangs on my system (running via a couple of different Wine and Proton versions) once you press the next move button.
The hang seems to be related to my design workshop artillery vehicle. I wasn't having any problems until I created them. Taking manual control of the vehicle seems to side step the issue.
After turning on the debug flag it seems to be related to the mod_enemy_move() method. These vehicles seem to take the final return, which is the call to the game's enemy_move() method. This method returns VEH_SKIP. Forcing mod_enemy_move()'s return code to be VEH_SYNC also side steps the issue.
Thanks!
Line 132 in ac4852e
You are fixing the wrong thing here. Alien factions DO get their extra colonies as defined in their configuration file.
The problem is that late starters (alien faction + Cult of Planet) are not getting their bonus colony due to game conditions which has nothing to do with faction preconfigured extra colony.
Test your game with three above factions and you'll see that alien factions get extra colony but Cult does not.
The correct fix is described here already. You can just import my code which is already embedded into mod_setup_player.
#15
The AI is building a foil probe in Laborer's Utopia that will be completely useless to him.
I don't know if this is a Thinker bug or a Vanilla bug, and I'm not sure how to distinguish. I have a reproducable save here:
Marr of the Usurpers, 2217-pre-conquest.zip
Edit: I have a theory. I think the colony pods pop out before I properly gain ownership of the base. Their adjacency to my units triggers a 'make peace' conversation. I make peace, and THEN I finish stealing his base.
I've had to do a few late-game fights against a builder AI who has outscaled me, and they're generally viciously effective in unit choice. However, there are a couple units that are really useful I've never seen them build:
Not a bug, obviously, but a suggestion for improving AI performance.
Same savegame as in #8
If you look into the university bases (south), you'll notice one landlock base that builds a very strange probe-foil (with a weird picture). I noticed this in other faction's bases as well.
Idk if there's some general corruption going on, e.g. in a mind worm vs former fight gunfight sounds are played instead of the typical PSI "siren".
Line 376 in dd260b7
This block adds bias for soc_priority_model within soc_priority_category and subtract bias for all other models in this category except default one.
Line 382 in dd260b7
What this one does? As I understand it adds bias to currently tested model if faction current SE choice is soc_priority_model within soc_priority_category and subtracts bias for all other choices in soc_priority_category category except default one. This logic does not take currently tested category and model into account. Meaning all models in all categories besides the soc_priority_category will get the same bonus/penalty. Is this an intended logic?
In the attached savegame move the active jet to the south-east, there's a university unit that remains completely invisible.
InvisibleUnitSE.zip
I just finished up an After Action Report over on the alphacentauri2 forum, where Miriam conquered the entire world aside from me. She was the first faction to research Orbital Spaceflight (around 2250), and got Advanced Spaceflight around 2284. I won the game in 2306 with her having built exactly 1 Hydroponics Lab and 2 Power Transmitters, both near the end of the game. At that point she had over 100 bases; there's just no way this is close to optimal.
It's not a bug, obviously, but I think the AI of a successful aggressive faction with a ton of bases should actually prioritize satellites very heavily. They're the build-option that scales best with conquest, after all.
Edit: I can provide save files for a lot of different points in this game if they would be helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.