Resource icon

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

Could we have a top 3 rivals + yourself showing key strategic resources user defined similar to the multiplayer text, but permanent (just updates as details change).
I can't say exactly how difficult this would be because I don't understand the game's interface that well. It would for sure be more difficult than coloring owned water tiles on the minimap. In that case, all I had to do was modify the point in the game's logic where it's coloring tiles on the minimap and checking whether each tile is water in order to skip over it. The modification causes that check to return that every tile is not water so they all get colored. I was able to get the multiplayer-style messages to appear on the left because I figured out how to trigger them, there's a bit the game sets when opening a popup message to indicate that it's supposed to appear multiplayer-style. Actually, it was more difficult than that since I also had to figure out how to refresh the UI so the messages appeared while the turn was still processing. But to add another info display to the screen, I'd have to figure out how things are drawn in more detail.

Regarding the science slider, in my opinion, you don't need to double the size, but do it somehow like this
I think that would interfere with the little global warming sun icon that appears in the top left of that box, but it could probably be made to fit by shifting the beaker and buttons downward. My idea was to have the +/- buttons on either side of the research line at the bottom of that box, what's showing "Literature (13 turns)" in your screenshot. That line already gets cut off especially during golden ages.

That's fantastic.
If you find more ways to add such features, that will be excellent.
Turns out that flag that doubles city capture gold was the collateral damage flag, so it's not a completely new ability, just part of the collateral damage ability that no one's noticed before (as far as I know). Already in the base game using the official editor, you can give units the ability to double gold captured from cities by ticking the collateral damage box. Though they must be given some bombard strength to enable the box, and that will also mean they can do bombard damage to a city when attacking it.

Another neat unit feature would be being able to apply the cruise missile 1 time use flag to defensive units and their zone of control so you could have "trap" style lethal units.
Sure, I'll add it to the list. This shouldn't be hard.
 
I can't say exactly how difficult this would be because I don't understand the game's interface that well. It would for sure be more difficult than coloring owned water tiles on the minimap. In that case, all I had to do was modify the point in the game's logic where it's coloring tiles on the minimap and checking whether each tile is water in order to skip over it. The modification causes that check to return that every tile is not water so they all get colored. I was able to get the multiplayer-style messages to appear on the left because I figured out how to trigger them, there's a bit the game sets when opening a popup message to indicate that it's supposed to appear multiplayer-style. Actually, it was more difficult than that since I also had to figure out how to refresh the UI so the messages appeared while the turn was still processing. But to add another info display to the screen, I'd have to figure out how things are drawn in more detail.
Ah, ok -- too bad, appreciate the feedback though.
 
I think that would interfere with the little global warming sun icon that appears in the top left of that box, but it could probably be made to fit by shifting the beaker and buttons downward. My idea was to have the +/- buttons on either side of the research line at the bottom of that box, what's showing "Literature (13 turns)" in your screenshot. That line already gets cut off especially during golden ages.
Apparently, no one except me needs this idea, because they don't offer their own options, so do what you think is best. If you place the +- buttons on both sides of the science field, I would also indicate the percentage of science to help you navigate. And where to place it so that it is obvious and understandable? The main thing is to destroy the general appearance of the original interface as little as possible.
 
I'm having in R25 an issue with the phantom resource bug.

Despite having that setting set to "true", i.e. fix the phantom resource, extra resources still pop up. To be clear, only the correct resource shows, however the count includes all for the entire empire, not just that city and an connected.

In the city below should should only be one count of that item. Note: in this scenario airports do exist, but this city doesn't have any, nor does it have any other connection to the trade network.


Phantom.png

Answered below.
 
Last edited:
I'm having in R25 an issue with the phantom resource bug.

Despite having that setting set to "true", i.e. fix the phantom resource, extra resources still pop up. To be clear, only the correct resource shows, however the count includes all for the entire empire, not just that city and an connected.

In the city below should should only be one count of that item. Note: in this scenario airports do exist, but this city doesn't have any, nor does it have any other connection to the trade network.

View attachment 749389
I think Flintlock mentioned before recently, that the game doesn't count how many seperate copies of each resource a city has access to if it isn't connected to the capital through trade routes.

However, since you cannot trade excess resources to/from cities not connected to the capital with rival civs, and since you only need access to one copy maximum of a resource to be able to use it, it's only a minor typographical issue for now.
 
  • Like
Reactions: ajb
@Flintlock It might be somewhat outside of scope of current things but I'd like to draw attention to several deficiencies of civ3s right-click unit stack list. Those are actually very bad to deal with ingame.

1) When waking unit stack 1 by 1 by shift-clicking it on the list, makes the fortified stack you are waking jump wildly up/down randomly on the list. I've been dealing with that for ages now while trying to split out 10, 20, 30 etc units out of a massive stack.
It gets completely crazy when you have a mixed stack where some units are veteran others elite, have different remaining HP or movement points, but it happens on full HP full movement stacks all the time as well, as long as there are positions to jump through on the list, the stacks position WILL jump.
The stack you are trying to wake will just jump down and up through entire list. It seems almost as if game tracks when the exact one single man that's part of the stack and is the current unit that will be waken has been either created or joined the stack or something like that, and makes the whole stack change position on the list based on that.
If you could identify what on earth the game is doing while waking the stacks and null it so that the stack stays in place on the list that would be HUGE improvement for big games.
I suspect this won't happen on an editor made synthetic scenario, because all the units will have their on-creation ID number in a perfect order, so if it's of use to you I can dig through my save folder and supply you with a "test subject", where this issue happens.

Side request - if you could implement a function that allows players to wake custom amount of selected units on the right-click list while clicking on it (while for example holding down some button, just like the stack movement/stack worker action/stack fortify icons function right now) and having a window pop up where you enter a number of units to wake, that would be incredible but it might take lots of work so I'd be just happy with the list being not jumpy anymore. :)

2) When right-clicking a stack that is above 255~256 units, it starts taking a lot of time for the list to appear, and dealing with such massive stack is slow as well. I had 330 units stack that has 500ms+ freeze delay on the list appearing, and another stack that was 390 units had already 1000ms+ delay. It grows exponentially fast like that with it's size going up. Up to 255 units there is zero delay. Ordering a move of whole stack is even slower, I think my game was frozen for like 6 seconds straight on the later stack. I can supply an exact save file cause I've just amassed in my game a landing force where I've got 4 tiles with 300 - 400+ sized stacks each and 2 tiles with 40+ combined armies, that I will be loading onto 170+ 5-capacity caravels. Monstrosity Marathon games are truly something else. :lol:
Also my games are getting very close to the save game filesize limit - compressed manual saves are in 1.6~1.7MB ballpark, but I see an uncompressed autosave is at 36.5MB, so maybe they will be of use to you for testing/breaking the limit? I am playing on R25 C3X, so without any of the district functionality if it's of any matter.
 
Hello!
I don't know if it is possible:
- a setting to "cut" (with pillage) the irrigation - and as an image: the fields to "dry up", or to make the irrigation disappear from the fields!
- a worker can build a 3,4...10 tile long wall in your territory... after the Great Wall of China is built! :)
Thanks for your attention!

ps ... and if possible, don't laugh! :) :)
 
Last edited:
Apparently, no one except me needs this idea, because they don't offer their own options, so do what you think is best. If you place the +- buttons on both sides of the science field, I would also indicate the percentage of science to help you navigate.
If I double the size of that box in the lower right, there would be plenty of room to add things like the current science slider setting. I'm tempted to do something similar to what I did for the city production info and have the mod just tell you how much of a surplus you're running. It could say, for example, "Surplus: 20%" on a new line when you could reduce the slider by 20% without slowing the current research project.

1) When waking unit stack 1 by 1 by shift-clicking it on the list, makes the fortified stack you are waking jump wildly up/down randomly on the list. I've been dealing with that for ages now while trying to split out 10, 20, 30 etc units out of a massive stack.
This annoys me too and I don't know what causes it. As far as I know, the game just loops over all units on a tile and adds them one by one to the menu. Waking a unit shouldn't change its place in the list of units on its tile, but evidently it does or I'm missing something about how units are added to the menu. I'd have to look into the code that fills in the right click menu in detail to determine what's going on. It's not easy because that code is annoyingly verbose.

2) When right-clicking a stack that is above 255~256 units, it starts taking a lot of time for the list to appear, and dealing with such massive stack is slow as well. I had 330 units stack that has 500ms+ freeze delay on the list appearing, and another stack that was 390 units had already 1000ms+ delay. It grows exponentially fast like that with it's size going up.
This I also can't explain. I'll try to look into it at some point.

Also my games are getting very close to the save game filesize limit - compressed manual saves are in 1.6~1.7MB ballpark, but I see an uncompressed autosave is at 36.5MB, so maybe they will be of use to you for testing/breaking the limit?
Someone sent me a save near the limit a while ago. As far as I could tell, the save file limit is not really a hard limit, it's a side effect of the game running out of memory. As memory becomes scarce, saving is the first thing that's affected because when saving the game tries to allocate a contiguous chunk of memory that's large enough to hold the entire contents of the uncompressed save file and fails when there's no 30+ MB chunk of memory available. Other game functions still work because they allocate in smaller pieces so can still slot in somewhere.

I'm curious at what point you'll hit the limit, assuming you're using C3X installed to the EXE. Installation sets the large address aware bit, meaning the program can allocate up to about 3.5 GB instead of 2.0 GB like a non-LAA 32-bit program. Using RUN.bat does not set the LAA bit. That should mean you can go farther than the ~36 MB point at which the limit usually appears. Though if it appears at that point anyway, then I'm not entirely sure what's happening. If you hit the limit, you can send me the save and I'll check it out.

I'm still thinking about what to do about the save limit. It's hard because the game is fundamentally running out of memory. If it were an artificial limit like the unit limit, that would be easy to remove, or even the city limit was a technical issue that didn't actually have to be there. When I looked before, I saw that the Civ 3 process's memory usage was mostly coming from jgl.dll, which is responsible for the graphics, and sound.dll. That's a problem because I don't know much about how those DLLs work internally and C3X isn't set up to modify them. I suspect what's going on is that the game is loading a new set of graphics and sound files for each unit on the map instead of sharing those assets among all units of the same type. One possible solution is to unload the unit graphics and sounds while saving the game then reload them afterward. That would make saving take longer but at least it would work. Another possible solution is to reserve some memory, say a 100 MB chunk, ahead of time to be used for saving. That could backfire if it causes the game to run out of memory sooner.

- a setting to "cut" (with pillage) the irrigation - and as an image: the fields to "dry up", or to make the irrigation disappear from the fields!
- a worker can build a 3,4...10 tile long wall in your territory... after the Great Wall of China is built! :)
It would be possible to make irrigation work like that, it would just require effort to program. As for the wall built by workers, that depends what you would want it to do. Block movement, I guess? You can already sort of build a wall on the map by building fortresses in a line. They need to be garrisoned to be effective, but that is at least realistic.
 
If I double the size of that box in the lower right, there would be plenty of room to add things like the current science slider setting. I'm tempted to do something similar to what I did for the city production info and have the mod just tell you how much of a surplus you're running. It could say, for example, "Surplus: 20%" on a new line when you could reduce the slider by 20% without slowing the current research project.
The main thing is not to abandon this idea with science on the main screen. I think it will be useful to many.
 
I'm curious at what point you'll hit the limit, assuming you're using C3X installed to the EXE. Installation sets the large address aware bit, meaning the program can allocate up to about 3.5 GB instead of 2.0 GB like a non-LAA 32-bit program. Using RUN.bat does not set the LAA bit. That should mean you can go farther than the ~36 MB point at which the limit usually appears. Though if it appears at that point anyway, then I'm not entirely sure what's happening. If you hit the limit, you can send me the save and I'll check it out.
Yup I'm running the exe, so LAA should be present... But then again the game must be coded in such way that allows the use of it since signed 4 byte pointers will overflow past the 2GB. That's always a possible issue to keep in mind with LAA - most of the code might not mind but then you run into some obscure game subroutine that actually do mind it and goes bonkers over time.
Funfact, there are boilerplate code functions that mitigate signed pointers issues without needing the whole game to be rewritten to use unsigned pointers, but I'm unsure whenever any of the known LAA patchers made any use of it, the kind that people used for old games.
I do remember there used to be plenty of mitigation code examples but it's been so long that I'm not sure where to find them anymore - for me it goes all the way back to WH40K DoW 1 modding so like 15+ years ago, an ancient era. :old:

Anyway unloading the graphics/sounds assets for save game duration would be a brilliant idea. Manual save takes almost no time even in my games, maybe like 2 seconds top, it literally takes way, WAY longer to navigate the menu screen to rename the save file. I do have my system and civ3 on NVMe SSD and run a fairly modern CPU (R5 5600 @ 4.4GHz locked) so I can't speak for those that rock the game on some ancient Core2Quad or Phenom II rigs.
Altho even if unloading/loading the assests added like 10-20 seconds, it still wouldn't be a big deal - just add it as new togglable feature that's by default off and no one will compain. :)

Edit: By the way, should I provide save files with big laggy stacks, and with jumpy list stacks?
 
Last edited:
The easiest way to show scores is probably to show that list of players that appears in the top right in multiplayer. Adding a science slider to the main screen would be possible, though I don't know of a good place for it. It's probably best to have it around the display of the current research project and turns remaining but there's already not enough space there. That reminds me, it would be nice to double the size of that box in the lower right like I did for the minimap, but it's also more difficult than the minimap because it has various elements that would need to be repositioned.
I myself didnt like how civ4 had too much crap on the screen. I do think increasing the size of the box to match the minimap would be good to balance out the screen. The numbers that it does display for science and lux is not the most clear, so I guess with more space, would have a little more clarity with what info is there.
 
This annoys me too and I don't know what causes it. As far as I know, the game just loops over all units on a tile and adds them one by one to the menu. Waking a unit shouldn't change its place in the list of units on its tile, but evidently it does or I'm missing something about how units are added to the menu. I'd have to look into the code that fills in the right click menu in detail to determine what's going on. It's not easy because that code is annoyingly verbose.

When waking individual units from a group on the right click menu, how does C3X select which unit to wake? Does it simply cyle the units on the tile and then pick the first one to wake?

If so, maybe it might be an idea to cycle the units on the tile and then pick the last one in the group to wake. This should keep the rest of the stack in the same place I think; currently when waking individual units in a stack, the remaining stack only moves down the list it doesn't jump up it.
 
I myself didnt like how civ4 had too much crap on the screen.
I completely agree with this. It is one of the biggest advantages of Civ 3 over Civ 4,5,6 and 7, that it don´t has so much crap on the screen. :yup:
 
The numbers that it does display for science and lux is not the most clear, so I guess with more space, would have a little more clarity with what info is there
Given that the slider settings are already displayed on the info-box, would it maybe be possible to recode that part of the display so that when an overspend is imminent, the science-value gets made bold/ underlined/ changes to red/ starts blinking, or similar?
 
Given that the slider settings are already displayed on the info-box, would it maybe be possible to recode that part of the display so that when an overspend is imminent, the science-value gets made bold/ underlined/ changes to red/ starts blinking, or similar?
Something like that would make it useful. The numbers there dont really mean much to me as I always have to think when I see them. It's much easier to pull up Domestic Advisor and see the slider settings. I use Domestic Advisor a lot to track happiness as well. All the advisor pages have fast response times so I have no issues with using them. I've always been a big fan of the civ3 minimalist interface and being able to find the info you need quickly in the advisor pages than just all out in front screaming at you all the time.

Another feature that I would suggest for Flintlock to add is some other way to see which cities will be disordering than just the popup window he added. I look at the Domestic Advisor a lot and I have to kind of scan the happy faces to see which city is about to disorder. If there was some sort of dot that I could focus on quickly it would be nice especially once you get closer to 20 population cities, its hard to see. Once you pass the window, you just have to keep hitting end turn to see what other city is about to disorder. It would also be nice to have another way of knowing before hitting end turn. Another problem I've been noticing in my games is the trade advisor resource list gets flooded with copies and its basically unusable apart from telling you what civs can trade you something. With bigger resolutions, another little thing is sometimes can be hard to see what unit is selected. Every tile kind of blends and you have to hit the unit in the box to center it on the white circle. Not sure if anything can be done about that.
 
Last edited:
Has anyone experienced regular game crashing (freezing without an error message) in the newest version of c3x (R26_Preview_2) late in games, after editing the default C3X config file?
Doing some testing for the next version of the Tides of Crimson mod (watching AI play) and keep getting crashes late in the game, anywhere between 350-550 turns.

Would feel a lot better with an error message (that is common when you make naming errors on units/buildings), but no error message for me...

When switching the default (unedited scenario config file scenario.c3x.config , everything works perfectly).

I'm sure it's something I'm doing wrong in my editing of the file, just not sure what (note that I have some parenthesis (), asterisks *, pound signs #, apostrophes ', brackets <>, and plus signs + in some unit names that I added to the C3X scenario.c3x.config file. I put the unit names inside double quotes " " , but not sure if any one of these symbols , or maybe all of them, are causing the game to crash/freeze?) if it's a syntax error, just odd that it wouldn't crash right away, why wait until 300+ turns in?

Thanks for you help in advance.
 

Attachments

Last edited:
If so, maybe it might be an idea to cycle the units on the tile and then pick the last one in the group to wake. This should keep the rest of the stack in the same place I think; currently when waking individual units in a stack, the remaining stack only moves down the list it doesn't jump up it.
It does go up as well unfortunately. As example, I am waking up a fortified stack that starts, from top to bottom, as 3rd on the list. it will move several times to 4th, back to 3rd, to 4th, to 5th, 6th, back to 5th, had it even go up back to 4th. General trend is "downwards" but it keeps hovering up "upwards" as well. There is somekind of unit numbering going on regarding the position on the list, because IF it goes up, say it was 4th and went up to 3rd, and I wake an unit, lets call the imposter, from stack that took it's place sitting as 4th - the positions will momentarily switch back with stack I wanted to wake going back to 4th, and imposter unit back to its place.
Usually what happens next is that 1-2 wakes away they AGAIN switch positions, and keep switching them together.

You are less likely to encounter units going up the list on regular games, where maybe you will have 10 to 30 combat units total, but on modded maps, such as monstrosity, where there are countless thousands units total in the world-map and single tile stacks go casually in the hundreds, you see it happen all the time as you simply have way greater count of units that have different "date of creation/unique unit ID" attached to them, as well as utterly different turn-date that they walked on to join the same stack (my game is over 200 turns and nobody has railroads tech yet) - meaning much lesser chance for units to form perfect order count of whatever the game uses to determine units position on the list.
 
Hello!
1. I'm thinking about the tiles between cities, which remain
unused... can a setting be made so that in those spaces, inside the borders, something can be built, maybe a District, a farm, etc , and it will be activated if you build roads? Like the colonies?

2. The following settings/modifications are possible:
- with wild animals, before the appearance of the Barbarian tribes, which will attack, in a certain area, the people and the villages? E.g. Smilodon, Cave Bear etc.?
- "Migration" of animals such as Big Game, Deer, Caribou, etc. which will bring only a temporary bonus to the city and on condition that they have a tile (or more) as pasture - meaning uncultivated and without buildings on them?

Thank you for your attention!
 
Last edited:
Back
Top Bottom