Resource icon

C3X: EXE Mod including Bug Fixes, Stack Bombard, and Much More Release 23

Arexander, thank you for your interest in CCM 2.50 (besides the great mod Tides of Crimson). :) In my installation of CCM 2.50 (after having done now the proper link to the R8 exe :D), the tile information and the resource on that tile is shown properly. Here is a screenshot about the same resource (peat) as it is in the screenshot of your post. For my screenshot I used the same CCM 2.50 testgame as it was used for my wrong submarine bug post, so everybody who has properly installed R8 and wants to see the information about the coordinates of that tile, can do it with the save file I have attached to that post.

Tileinfo Resources.jpg
 
I installed a fresh version of Civ3 and DL'd the R8 from the official location just in-case, but I'm still getting the issue. Could it be due to me using the Steam version of Civ3?

e42d65e184.png
 
Arexander, I cannot tell about this, as I don´t have the steam version of Civ 3 Complete. My screenshot was done with the Civ Chronicles version combined with the R8 exe created with my GOG version.
 
Are you saying the R8 exe works with a CD version?

I am saying the exe is working with the Civ Chronicles version, so it cannot be installed with this version - but an installed R8 (or less) exe of the GOG version can be transferred (together with the other needed files) to the Chronicles version and than it is working.
 
I modified the AI production chooser function to show the point value computed for each available improvement. This was harder than it sounds since the code I needed to modify had no function calls I could intercept so I had to insert one, which means replacing an instruction while preserving the registers, stack, and behavior of the original. That required some thought and care but I made it work. Anyway, here's what it looks like so far:

ai_prod_coventry.png


Right now you would need to run the game in a debugger to see the info but I'll look into putting it in-game somehow. First thing to notice about the point values is that they're a lot higher than I thought they were, so that comment I wrote in the readme of R8 is wrong. One culture is worth a lot more than one point, to make a building significantly more appealing to the AI you'd need to use a perfume value of 20 or more. Second thing I noticed is the AI's irrational love for colosseums. Here's a more extreme example of that:

ai_prod_chengdu.png


A colosseum is the AI's preferred build here by a good margin even though it adds very little to this city while costing significant maintenance. I'd guess the problem is that the AI likes happiness regardless of whether or not it needs any more and/or it doesn't properly reduce an improvement's value according to its shield & maintenance costs. It's something to explore.

I installed a fresh version of Civ3 and DL'd the R8 from the official location just in-case, but I'm still getting the issue. Could it be due to me using the Steam version of Civ3?
I can confirm this is a problem with C3X on the Steam executable. I'd gotten in the habit of not thoroughly testing the Steam version of the mod since usually the machine code is very similar in both versions (the only difference being the addresses) but it looks like that's not the case this time. I'll look into this and get it fixed soon.
 
Thank you for all this work Flintlock! I'm especially excited about the potentialities that Land-Sea intersections open up for interesting custom maps with rivers made of "coast."
 
The submarine bug was what made me give up on my mod. Because I used the ship-invisibility-flag for a workaround to prevent ships guarding transports with 3 ships by turning them into submarines but also giving all of them the Aegis-special so they could see other ships. However the AI still ran into other ships by accident causing unwanted wars.

I shall install the game, your fix and see if my Mod works properly with it! :D
 
The submarine bug was what made me give up on my mod. Because I used the ship-invisibility-flag for a workaround to prevent ships guarding transports with 3 ships by turning them into submarines but also giving all of them the Aegis-special so they could see other ships. However the AI still ran into other ships by accident causing unwanted wars.

I shall install the game, your fix and see if my Mod works properly with it! :D

So the AI doesn't make these "subs" punching bags? To think of it, I've never seen a sub escort a transport before...
 
I had a look into that bug with the tile info box on the Steam build of the game. It's caused by the fact that the mod intercepts the function call that writes "No information available" onto the info box for unexplored tiles and replaces that text with the tile coordinates. Turns out that same call is also used in the Steam build to write the resource name onto the info box for explored tiles, so that text also gets replaced with the tile coords. The compiler made a strange decision structuring the code this way, I don't even see how it's more optimal than having two separate calls. Anyway, I'll fix it properly for the next release and in the mean time anyone running C3X on Steam can work around the bug by removing the call replacement. To do that, edit the mod file civ_prog_objects.csv (you can use Notepad, CSV files are just text), find the following line:
Code:
repl call, 0x5AAB93,    0x5B9899,    "PCX_Image_draw_no_tile_info",            ""
and delete it. Or replace the civ_prog_objects with the version in the ZIP attached below. This change means tile coordinates won't appear on unexplored tiles. Also after editing or replacing the civ_prog_objects.csv you must re-run INSTALL.bat.
 

Attachments

Interesting to see such progress being made even now as I look back to what I can possibly do with this game. Folks here seem to remember me as the guy who tricked the vanilla editor (the C3C one won't let you do it) let you make techs from previous eras requisites for techs in the current era. Kind of curious if that was something that one of those external editors ever let you do...

Anyway, the last thing I did before I stopped messing with it a few years ago was figure out how to make Settlers cost less population for Expansionist civs - maybe actually making the damn trait useful. My more current aim is to take some of the programming knowledge I've picked up in the last year and look at further modifying the traits. I found - at least in the vanilla .exe - where it checks for the Militaristic, Scientific, and Religious traits for the building discounts, so adding one in for Commercial civs should be relatively easy. I'd also like to take a crack at reworking the corruption formula.

As for actual suggestions on what you could do with this patch that people might like... disabling (or hell, even remapping) certain keyboard shortcuts would be really nice. Playing Civ 3 makes me want to throw my "E" key in the Goddamn trash.

Some other things...

-Default to the cheapest tech available for research when the game starts (prevents you from losing a turn)
-Standardize the length of anarchy for government transitions instead of having it happen on set turns
-Cutting a forest/jungle down should destroy any resource in it
-Allow medicine to disable disease from jungle as well as flood plains
-Editable odds of sinking in sea/ocean squares
 
Playing Civ 3 makes me want to throw my "E" key in the Goddamn trash.
Oh gods, the shortcut keys...

If we're going to start on those, then my 2¢ would be the dumb overlaps/duplications which no-one at Firaxis seemed to have thought about, e.g. mapping "Ctrl-C" (IIRC?) to both "Clear Forest" and "Clear Pollution" was also a pretty boneheaded idea...
 
Not having read every post, I could be wasting time for you Flintlock. I hope not.

Anyway, my biggest headache is the automation of workers. It is in a horrible location (for me) and I seem to hit it from time to time (going too fast). I never use it and wished I could remove it or at least put it in an out of the way place. Trying to find a worker that is now automated is a real pain, especially with hundreds of workers.
 
My more current aim is to take some of the programming knowledge I've picked up in the last year and look at further modifying the traits. I found - at least in the vanilla .exe - where it checks for the Militaristic, Scientific, and Religious traits for the building discounts, so adding one in for Commercial civs should be relatively easy. I'd also like to take a crack at reworking the corruption formula.
You'd probably be interested in my decompilation of the executable. It's not a complete decompilation, in other words it's not something you could compile to a working binary, or even close, but I have found & named most of the important functions for game logic and I have most of the game's internal classes decoded courtesy of Antal1987. I posted my Ghidra project folder before but that was many months ago (May, I think) so it's obsolete by now. I could post a newer version but I've been thinking instead of just posting it along with the whole mod to GitHub. I've had that in the back of my mind for months now and just haven't gotten around to it, but if I knew someone cared I'd feel more motivated. This is all for the Conquests executable BTW.
Some other things...
Added to the list. Adjusting the length of anarchy is something I can already do, in fact the mod includes the option to shorten anarchy periods by a given percentage. This is implemented in patch_get_anarchy_length in injected_code.c, that function replaces the game's original get_anarchy_length function, calls it, and reduces its return by the amount set in the mod config.
If we're going to start on those, then my 2¢ would be the dumb overlaps/duplications which no-one at Firaxis seemed to have thought about, e.g. mapping "Ctrl-C" (IIRC?) to both "Clear Forest" and "Clear Pollution" was also a pretty boneheaded idea...
The one that always gets me is Shift+D which I habitually press to open diplomacy, except with a worker selected it instead orders the worker to automatically clear pollution, usually sending it to some useless volcano tile on the other side of the continent. Changing around the hotkeys can't be too difficult, the hardest part would probably be replacing the tooltips so they're not inaccurate.
Anyway, my biggest headache is the automation of workers. It is in a horrible location (for me) and I seem to hit it from time to time (going too fast). I never use it and wished I could remove it or at least put it in an out of the way place.
Alright, I'll look into it. If all you want to do is remove the option to automate, I expect that would be very easy.
 
You'd probably be interested in my decompilation of the executable. It's not a complete decompilation, in other words it's not something you could compile to a working binary, or even close, but I have found & named most of the important functions for game logic and I have most of the game's internal classes decoded courtesy of Antal1987. I posted my Ghidra project folder before but that was many months ago (May, I think) so it's obsolete by now. I could post a newer version but I've been thinking instead of just posting it along with the whole mod to GitHub. I've had that in the back of my mind for months now and just haven't gotten around to it, but if I knew someone cared I'd feel more motivated. This is all for the Conquests executable BTW.

I very much am interested! I've always worked with the vanilla executable just because I actively dislike almost everything that was added by the expansions, but I think the multiplayer aspect of it alone might convince me to just move onto C3C and find a way to hack out all of the garbage.

Are you on Discord at all, btw? You're very much the kind of person I'd really like a chance to talk to.
 
I figured out what the bug is that caused alliance members to declare war on each other. Turns out that for some reason, even though sharing a square with allies is not normally possible in this game, you can land your aircraft on an allies airfield that does not contain any air units. As soon as you do that war is declared. Now to figure out how to stop this from happening.

Note: air units from one faction can share a tile with land units of another faction when on an airfield. This results in war.
 
I very much am interested! I've always worked with the vanilla executable just because I actively dislike almost everything that was added by the expansions, but I think the multiplayer aspect of it alone might convince me to just move onto C3C and find a way to hack out all of the garbage.
Are you on Discord at all, btw? You're very much the kind of person I'd really like a chance to talk to.
Alright, I'll post the decompilation along with the rest of the mod to GitHub tomorrow. Transferring all the decompilation work to another executable would be a big project, doubly so if the other executable isn't for an identical game. It would probably be easier to mod Conquests to emulate the original game, though it's been so long since I've played the original I've forgotten most of what was changed.

I'm not on Discord. Is there a big Civ 3 modding community there? I've heard there's a multiplayer community, but MP Civ has never interested me.
 
Back
Top Bottom