Resource icon

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

Darn. I tested it out. I still got the same error. I still don't know why I was able to install 16, 17, and 18 on another install of the game, but can't install any version after 15 now. I'll try to do some more investigating and post back if I come now with anything new.
@Flintlock You're correct, I kind of assumed it was because v15 was the last one working for me and @SayHayKid . When I try installing version 16 I get another error:
Code:
<string>:226: warning: implicit declaration of function ’slice_matches_str’
<string>:659: error: field not found: integer_config_offsets
That part is also missing from v15.
It definitely looks like the compiler is not pulling in the correct files that are needed as dependencies for injected_code.c. The warning about "implicit declaration" means that the compiler did not see the definition of slice_matches_str. That function is supposed to be defined in common.c, which is one of the files that injected_code.c depends on. The relevant line is #include "common.c", which copies in the contents of that file. Similarly, the integer_config_offsets field is supposed to be part of the definition of the injected_state struct located in C3X.h. Since there are no errors about missing include files, the compiler must be finding these files, except it's finding old ones somehow. I don't know anything about PortingKit so I can't even guess why that would happen.

I took a closer look at the occurrence of “Healt 0/X” cases.
The ship would sometimes take damage down to 0/X health when passing by a city that was simultaneously occupied by:
- Portus building (Naval Defense: 15, Naval Bombard Def: 15);
- Velites land unit: “Bombard Range” 1, “Zone of Control” ability, but without the “Lethal Sea Bombardment” ability;
- Triremis naval unit: “Bombard Range” 0, “Zone of Control” and “Lethal Sea Bombardment” abilities.
When a ship passed my city with Portus, but without Velites and Triremis units, the damage was dealt correctly (Healt 1/2), without animation.
When the ship passed by my city, which only had a Velites unit, without Portus, the damage was dealt correctly (Healt 1/2), without animation.
When a ship passed by my city, which had only the Triremis (“Bombard Range” 0) unit, without Portus, the damage was dealt correctly (there were cases of the ship being sunk), the animation did not show my ship, only with flying arrows...
Most likely, the “Healt 0/X” damage is associated with the “Zone of Control” ability and a combination of several types of damage.
Thanks for the info. The bug is caused by the fact that C3X deletes some game logic that excludes 1 HP units from zone of control when the lethal ZoC setting is on. Naval defense buildings do damage via zone of control so that change also allows them to knock the last hit point off of passing units. I'll fix this for future versions. I'm not sure what you mean by "the animation did not show my ship, only with flying arrows". Did you expect to see an animation there but didn't? That case should work like regular zone of control, e.g. some land unit passing an enemy cavalry, except it can be lethal. Since the Triremis has bombard range of zero, it shouldn't be able to use its bombard strength for ZoC, only its attack strength.

- when a city is attacked by AI units from a transport ship, the captured slaves are not loaded onto this or another transport ship (there is space on the ships). They remain on water tiles and cannot be captured. When my ship is attacked, they disappear. At the same time, my ship does not lose the possibility of a new attack; in one turn it was able to attack 2 tiles with workers, and then sink the ship.
I'll look into it. This is a bug in the base game, right?
 
I'll look into it. This is a bug in the base game, right?
Yes, if I've understood right, the "swimming land-unit" problem can occasionally occur when an elite Berserker or Marine generates an MGL during an Amphibious attack. If the MGL can't spawn in the attacked land-tile (because there are still defending units present), it will instead appear on the Coast tile where the attacker came from.

The human player can then "rescue" the MGL into a transport-boat by hitting the Load button, but the AI can (apparently) only load units onto boats in town-tiles, so it will leave any Amphibiously generated units (in the above case, presumably Workers generated by Enslavement, rather than an MGL) all at sea.
 
Last edited:
@BenjiTre and @Flintlock it does seem that something changed within the WINE wrapper itself that PortingKit uses. I can still install all current versions of C3X on my original installation of the game. However, if I use the current WINE wrapper I can only install up to version 15. The game runs the same either way. The earlier versions up to 15 will still run. But starting with version 16 and after it is a no go using the current WINE wrapper. I get the same error that Benji posted, but I don't have the technical knowledge to know what it means. I'll just have to make sure not to delete the working version that I have.

I also noticed that I can run the 18b patch on my old install and move the .EXE file over tot he new install and C3C will load as if patched to C3X 18b even if it won't install/patch it directly.
 
Yes, if I've understood right, the "swimming land-unit" problem can occasionally occur when an elite Berserker or Marine generates an MGL during an Amphibious attack. If the MGL can't spawn in the attacked land-tile (because there are still defending units present), it will instead appear on the Coast tile where the attacker came from.
The human player can then "rescue" the MGL into a transport-boat by hitting the Load button, but the AI can (apparently) only load units onto boats in town-tiles, so it will leave any Amphibiously generated units (in the above case, presumably Workers generated by Enslavement, rather than an MGL) all at sea.
Good to know. I think the best solution is to add a bit of logic that causes the game to automatically load AI units into transports in this case or delete them if they can't be loaded. Human players can work around the issue so no changes are needed there and I'd feel better about enabling this change by default if it only affects the AI.

I also noticed that I can run the 18b patch on my old install and move the .EXE file over tot he new install and C3C will load as if patched to C3X 18b even if it won't install/patch it directly.
Installing the mod only modifies the EXE so this is a fine solution. I still wonder what changed from versions 15 to 16 that would break the install. When I have time I'll look over all the changes between those versions to see if anything stands out to me, right now I have no idea what it could be.
 
Hello to everyone,
so glad I finally joined the forum recently.
Just a technical question / suggestion: Would that be possible with the C3X mod to have a resource as a prerequisite for a Tech? i.e. in order to research a tech you must have a certain resource in your pool. Combined with the option buildings to generate resources, this would open a complete new world of modding possibilities.
Thanks,
 
Hello to everyone,
so glad I finally joined the forum recently.
Just a technical question / suggestion: Would that be possible with the C3X mod to have a resource as a prerequisite for a Tech?
Welcome! It should be possible to have resources as prereqs for research. The game has a function that determines if a given tech is a research option for a given player and I could modify it to depend on the presence of certain resources. That should be sufficient. The only catch is that the resources would be required to begin research but not continue it. Unlike for city production, the game doesn't check every turn if the current research project is still allowed.
 
@Flintlock terrific EXE mod! Wow, Wow, Wow!

The latest version has the AI actually posing a threat, I'm scared I might lose!

I did mess around with the V18 preview and altered the RYG stop lights (I had blue for air missions; white for workers; nothing for units out of moves; etc.) I understand you have things set up to your liking, I'm simply asking for a way for alter as desired for myself. The preview gave that option via editing the image file you included, the latest version seems to only have the ability to change the 3 options available.
 
@Flintlock terrific EXE mod! Wow, Wow, Wow!
The latest version has the AI actually posing a threat, I'm scared I might lose!
I did mess around with the V18 preview and altered the RYG stop lights (I had blue for air missions; white for workers; nothing for units out of moves; etc.) I understand you have things set up to your liking, I'm simply asking for a way for alter as desired for myself. The preview gave that option via editing the image file you included, the latest version seems to only have the ability to change the 3 options available.
Thank you! I suppose I should allow for more right-click menu indicators since you're now the second person to ask for them. The most convenient way would be to expand the icons PCX file so it has sets of icons for more cases, for example separate columns for combat vs non-combat units and busy vs non-busy units. Then by default I'd fill them in with the existing green/yellow/red icons but people could recolor them as desired. The alternative approach would be to have a config option that controls which icons are used but I expect that would be more complicated.
 
Thank you! I suppose I should allow for more right-click menu indicators since you're now the second person to ask for them. The most convenient way would be to expand the icons PCX file so it has sets of icons for more cases, for example separate columns for combat vs non-combat units and busy vs non-busy units. Then by default I'd fill them in with the existing green/yellow/red icons but people could recolor them as desired. The alternative approach would be to have a config option that controls which icons are used but I expect that would be more complicated.
I really think having things set up the less complicated way would be best. If someone really, really wants to change the RYG they can edit the PCX file. No need to have that complicated bit (though having a few unused bulbs at the bottom with a Rambo of colors would be terrific -- not necessary at all though).


On another note, I'm having issues with the group select button since this latest version/ preview version of this exe mod (not stack bombard but just the regular group select which comes with the base game). Perhaps inadvertently I've selected a setting which disables that function, but I can't tell where (it happens across multiple devices/operating systems). I cannot verify, but I swear occasionally the group select button(s) works (select all, select all of unit type).

Also, the increased unit maintenance function seems like a terrific idea!
The function seems to include most expensive units first, cheaper units last. So if for example I have a unit allowance of 10, 5 of which are 10g/turn and 10 of which are 1g/turn, I will only be charged 5g/turn even if the most recent units built are the more expensive ones (not sure if this was intended or not). Additionally, it seems to ignore units without the maintenance flag checked.
Would it be possible to have this set so it counts the latest units being built?
Would it be possible to have it set so units without maintenance are not included in the calculation?

Resources -- is it possible to have local? As in if I flag a building "must be within city radius" currently I don't seem to be able to use them, the resource is simply in the trade network locally (or available for the entire trade network, depending on my choice). Though this is from the preview, I've not tested the V18 apologies if this functionality was added.

As you are active and seem to respond I'm "complaining" but honestly, I cannot stress how amazing this EXE mod is, all the terrific functionality it offers, wow, wow, WOW!
 
Autocorrect can come up with some really funny phrases sometimes :lol:
No, no, that was intentional. Rambo's pants are light blue, he has a flag patch on his jacket (red, white (light grey, dark grey) (dirty outfit), blue), etc.

More or less all the colors I want (literally). So to reiterate I want Rambo colors! :lol:
 
My plan for the right-click menu icons is to split them out like so:
unit_rcm_icon_grid.png

Combat vs non-combat and busy vs non-busy units will have their own columns so people can recolor them as desired. By default they'll keep the existing red/yellow/green colors. Hopefully this is flexible enough. A unit is "busy" if it's doing any worker job, intercepting, on a move command, auto-bombarding, or exploring.

On another note, I'm having issues with the group select button since this latest version/ preview version of this exe mod (not stack bombard but just the regular group select which comes with the base game).
Do you have dont_escort_unflagged_units set? That option causes problems with group movement. I've already fixed that bug for the next version.

So if for example I have a unit allowance of 10, 5 of which are 10g/turn and 10 of which are 1g/turn, I will only be charged 5g/turn even if the most recent units built are the more expensive ones (not sure if this was intended or not). Additionally, it seems to ignore units without the maintenance flag checked.
Would it be possible to have this set so it counts the latest units being built?
Would it be possible to have it set so units without maintenance are not included in the calculation?
The way it works is that the units with extra maintenance costs are counted multiple times for the purposes of summing up maintenance. So if you have one unit with a 10x cost and 10 free units, then that one unit will absorb all your free unit credits. That way it doesn't matter what order the units are counted in. The extra maintenance feature messes with the unit counts on top of the military advisor screen. The math still adds up correctly for the total maintenance cost but the labels don't really apply.

It isn't practical to count units in the order they were built since the game doesn't record when each unit was built, as far as I know. Maintenance-free units are still free even with the extra cost setting. They get skipped over when summing up unit maintenance.

Resources -- is it possible to have local? As in if I flag a building "must be within city radius" currently I don't seem to be able to use them, the resource is simply in the trade network locally (or available for the entire trade network, depending on my choice).
I think so. I vaguely remember looking into this before and thinking it would be easy. I'll have to give it another look.
 
My plan for the right-click menu icons is to split them out like so:
View attachment 697595
Combat vs non-combat and busy vs non-busy units will have their own columns so people can recolor them as desired. By default they'll keep the existing red/yellow/green colors. Hopefully this is flexible enough. A unit is "busy" if it's doing any worker job, intercepting, on a move command, auto-bombarding, or exploring.
Looks amazing! However, is it possible to break out Air units? On the preview version I was able to set it up so that air was blue (unless they count as "non combat" in which case that is fine as 95% of the time it will be 100% air units which are blue not non combat).

Do you have dont_escort_unflagged_units set? That option causes problems with group movement. I've already fixed that bug for the next version.
This is it! You'll likely have the update done before I am far enough to really need that anyway. Glad it is known and dealt with!

The way it works is that the units with extra maintenance costs are counted multiple times for the purposes of summing up maintenance. So if you have one unit with a 10x cost and 10 free units, then that one unit will absorb all your free unit credits. That way it doesn't matter what order the units are counted in. The extra maintenance feature messes with the unit counts on top of the military advisor screen. The math still adds up correctly for the total maintenance cost but the labels don't really apply.
Interesting, not how I thought it was set up, makes sense though. Would it be possible to alter what number come out? As in rather than unit support limit of XXX and # of units YYYY, but have "Economic Unit Support Limit" XXX and then Y% above or below XXX limit.
So, if Support limit is 80 and units support costs = 140, then Y% would be "+75% above unit support limit". Sort of get what I'm saying, just a suggestion as currently those numbers are somewhat meaningless and don't provide at a glance much info.


It isn't practical to count units in the order they were built since the game doesn't record when each unit was built, as far as I know. Maintenance-free units are still free even with the extra cost setting. They get skipped over when summing up unit maintenance.
Ok, go it! The numbers I was getting more or less checks out with what you were saying.

I think so. I vaguely remember looking into this before and thinking it would be easy. I'll have to give it another look.
To be clear, I was messing around in the "preview" version, and I was able to get local resources, but those were local to the city's network only. So, if I flagged "Building A" to need "X resource" and some other building in the city produces that resource locally, then only that city can build "Building A". However, if I have "Building A" flagged as "needs locally", than that local resource won't allow it's production, as it is only locally within the network, not actually found locally. If that makes sense.
Sorry I don't know how to insert parts of a response.

Ok, I found out how after writing the whole thing, my comments are in blue of course.
 
Welcome! It should be possible to have resources as prereqs for research. The game has a function that determines if a given tech is a research option for a given player and I could modify it to depend on the presence of certain resources. That should be sufficient. The only catch is that the resources would be required to begin research but not continue it. Unlike for city production, the game doesn't check every turn if the current research project is still allowed.
Thanks a lot! That would be great to see in the future versions of the mod, even with the 'catch' :) That would be still good enough. Also, if a resource could be a prerequisite for another resource, this will expand options even more. Got some great ideas for a grand mod, implementing C3X to the max. Not so much of units variety, but very deep and comprehensive game mechanics, with many resources and complex production chains / dependencies, to make it as much as a challenge and fun to play, as possible. Hope to have it wrapped up soon.
 
Hello, I know that since it is an old mod, maybe theres no support for that, but I was using this patch (version 17c) together with Rhyes of Civilization mod, and stack bombardment for bombers was working as expected, I decided to upgrade to latest version (18b) and the stack bombardment feature seems not to be working anymore for bombers nor heavy bombers, I tried different saves and nothing, it bombs one by one, I checked the options of the patch, but couldnt find anything related. Not sure if it has to be with the fact that I was using a mod instead of regular conquest. But as I mentioned version 17c stack bombardment works perfectly fine.

Thank you very much for any advise on this, I really liked the green/red/yellow dots to know wich units have already moved, so I would like to use the latest version, but not having stack bombardment its a no no for me.
 
ajb said:
Looks amazing! However, is it possible to break out Air units? On the preview version I was able to set it up so that air was blue (unless they count as "non combat" in which case that is fine as 95% of the time it will be 100% air units which are blue not non combat).
Splitting out air units is awkward since that would mean adding a whole new layer of difference, i.e., air units can be combat units or not and they can be busy or not so I'd need a second complete set of columns. In the previous versions, air units never had their own color so I'm not sure how you had it set up there. Originally blue was supposed to be for fighters set to intercept before I expanded it to cover all multi-turn unit actions. Could that be what you're thinking of?

ajb said:
Would it be possible to alter what number come out? As in rather than unit support limit of XXX and # of units YYYY, but have "Economic Unit Support Limit" XXX and then Y% above or below XXX limit.
It should be possible to change the numbers but I'm not sure, I'd have to look at the code for the military advisor screen again. As I recall, I looked into that before, back when I added the extra maintenance option, and decided it would be too much trouble.

Also, if a resource could be a prerequisite for another resource, this will expand options even more. Got some great ideas for a grand mod, implementing C3X to the max. Not so much of units variety, but very deep and comprehensive game mechanics, with many resources and complex production chains / dependencies, to make it as much as a challenge and fun to play, as possible. Hope to have it wrapped up soon.
Glad to hear that, I'll keep an eye out for your mod. You will post it to CivFanatics, right? Making one resource a prerequisite for another would be tough. I'm guessing you're thinking of a resource on the map which could be revealed but wouldn't be added to the trade network unless some other prereq resource is already available on the network. The hard thing about that is that resources are not processed in the right order to make that possible. Right now map resources are processed one tile at a time, left to right and top to bottom, so a prereq resource could only be available for another if it were located above or to the left if they're both on the same row. You'd have to process the prereq resources first before the others somehow, which would require some elaborate edits to the code. I already did something similar for building resource generation, so it's possible, but quite difficult.

Hello, I know that since it is an old mod, maybe theres no support for that, but I was using this patch (version 17c) together with Rhyes of Civilization mod, and stack bombardment for bombers was working as expected, I decided to upgrade to latest version (18b) and the stack bombardment feature seems not to be working anymore for bombers nor heavy bombers, I tried different saves and nothing, it bombs one by one, I checked the options of the patch, but couldnt find anything related.
Unfortunately this is another bug that was added in version 18. In retrospect it was a mistake to rush that version out. I already have this bug and a couple of others fixed so I think what I'll do is post version 19 soon even though that will make it a small version, mostly bug fixes with a few simple additions.
 
My plan for the right-click menu icons is to split them out like so:
1721905990334.png


I like your setup, Flintlock. It should be enough to keep everyone happy. Every indicator model proposed this far should be possible to create with this grid, as far as I can tell.

But I have another idea that would make adding more colors a lot more useful. What if we could apply these indicators to the health bars of units on the map too? Sword and all, perhaps? Then the indicators would match. And players could have a sneak peek, right there on the map, of what they would see if they opened the right-click menu. Which allows for quicker gameplay in some cases.

For example, if you assign a blue color to every unit that is busy (already have orders), then you can tell directly on the map whether a unit has been given orders, and concentrate on the green and yellow ones (which have no orders, and can still move). The blue ones can be ignored, unless you want to wake them up by clicking on them for some reason. If more information is needed before deciding to wake them up, then the right-click menu can be opened to reveal exactly what the unit is occupied with.

If this requires a lot of extra work, then it is not super important to me personally. I'm content with the way the indicators work in R18B. But I'm sharing the idea in case more people find it helpful or interesting.
 
Flintlock, I would like, if there could be a fix for the powerplant loop and the "replaces other buildings flag". Best in my eyes would be, if a building (per example hydro plant) can make another building in the city obsolete (per example coal plant) or nuclear plant can obsolete coal plant and hydro plant.

A fix of this existing Civ 3 problem, that seems to be an error in the programming of civ 3, was requested longer time ago, per example here:

https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-55#post-16357765
https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-55#post-16357783
https://forums.civfanatics.com/thre...rd-and-much-more.666881/page-55#post-16357954
 
Top Bottom