Resource icon

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

Congrats. The submarine-bug fix did work ! :clap::goodjob:

In my testgame a wolfpack of new WW1 submarines (Type U-51) reached a Turkish predreadnought and I am not at war with Turkey. My submarines encircled the predreadnought and left only one direction open to move for that ship.

Subbug-Fix1.jpg


The Turkish ship took the only free direction to move.

Subbug-Fix2.jpg


Now, using the land terrain, I was able to do a complete encirclement of the Turkish ship. The only solution for the Turkish ship to avoid the submarine bug was to stop moving at all - and the Turkish ship didn´t move !!

Subbug-Fix3.jpg
 
Last edited:
The ability to unload the army, upgrade the unit and then reload it in the army would be nice or maybe just be able to upgrade while the unit is in the army?
Added to the list. I can't say much about how difficult this would be without looking into it in detail, but based on what I've seen so far the idea of loading units into an army (like you would into a transport) extends throughout the code. If we're lucky unloading units from an army is as simple as enabling a hidden option.
Is there a way we can the number of Anarchy turns?
Added too. My guess is that this would be an easy change to make.
I've just been lurking with interest so far but I second @Civinator 's request for Small Wonder building placement!
That's good since this is what I've been looking into for the past couple of days. It's doable but I still have to decide the best approach and then, of course, actually do it. So far I've found that function that (re)assembles the hash table of free improvements (0x55A560 in the GOG EXE). In the base game it's written to consider only great wonders, which matters in two places: (1) it loops over all improvements and picks out the great wonders and (2) it calls a function that returns in which city some great wonder is built. Changing (1) to accommodate small wonders is easy with a bit of machine code patching but changing (2) requires more significant patching since I'd need to replace a call with another with a different signature. The other option is to intercept this function then run some code after it which would duplicate the logic in the original function but apply it to small wonders. I'm leaning to toward the first option, I'll start implementing it tomorrow.
 
I must say I am very impressed with all the new progress. Please keep up the hard work! Its projects like this, mods, and other creations that keep me coming back to Civ3. I am so happy that someone has taken up this challenge and cooked up a way to mod the game. I hope artillery behaviour will be figured out but already I cannot believe the progress. Great Work!
 
Flintlock, thank you very much for sharing your excellent work. You are making a lot of people's dreams come true. I'm looking forward to seeing not only your continuing progress, but also how modders decide to utilize the changes.
 
I'm looking forward to seeing not only your continuing progress, but also how modders decide to utilize the changes.

Per example in the upcoming new version of the WW2 scenario SOE now stealth attack can be set much better (anti-tank guns, jagdpanzer and sturmgeschütze now can pick out even a single tank in a stack full of other units with better defense values, light recon units now must not have set additional units with a good defense value as stealth attack targets to pick out artillery), in the upcoming version of WW2 Global Gold the adjustable railroad movement can be used).
 
How does the rail road movement limit work? If I set the number to 10 would it mean that the unit has can move 10 tiles maximum? This would make 3 mover just 1 tile faster than on regular roads? Or is the 10 tiles considered "free" and afterwards the unit will then use the regular roads?
 
How does the rail road movement limit work? If I set the number to 10 would it mean that the unit has can move 10 tiles maximum? This would make 3 mover just 1 tile faster than on regular roads? Or is the 10 tiles considered "free" and afterwards the unit will then use the regular roads?
The short answer is: Yes, if you set the railroad movement limit to 10 any unit moving along a railroad will exhaust all of its movement points after traveling 10 tiles.

The long answer is: The unit has one pool of movement points that is consumed for both railroad and road moves (and actions of course). In the base game, assuming road movement rate is left at 3, one full move is 3 movement points (MP), one road move costs 1 MP, and one railroad move costs 0 MP. A unit with 1 "move" starts its turn with 3 MP, one with 3 moves starts with 9 MP, etc. With the RR move limit, one full move equals the product of the RR and road move rates (30 MP in your example), one road move costs railroad-move-rate MP (10 MP in your example) and one railroad move costs road-move-rate scaled by the unit's total number of moves (for a one move unit that would be 3 * 1 = 3 MP, for a 3 move unit that would be 3 * 3 = 9 MP).



Progress report: I implemented free buildings from small wonders. In the end the approach I took was not exactly either of the ones I mentioned in my previous post, instead it was more like a hybrid approach. After sleeping on the problem, I remembered a technique I had thought of but hadn't had an opportunity to use yet. When it's necessary to replace a single function call, the obvious approach is to just overwrite the call in machine code, but an easier and more clever approach is to intercept the target function then change its behavior depending on where it's called from. You can find where a function was called from by reading the return address off the stack, it's stored in the four bytes below the first stack parameter. I mentioned before that I needed to change the function's signature, but there too there's an easier alternative, just pass the additional data in through a global variable.

Also, some bad news, I found a bug in the city production info while testing the above. The part of the code that checks if the city is producing Wealth or not doesn't first check that the city isn't building a unit. You can see this if you set a galley building, you'll get production info as if you'd set Wealth. The real problem though is that this could cause a crash due to out-of-bounds array access. I did some testing on the base game and never got a crash, but just in case I'm putting out Release 4B, which is identical to 4 except this matter is fixed.
 
Hi Flintlock. I have a request but I'm not entirely sure it's even possible. If each Civilization can have it's own diplomacy music? Perhaps some interception of the mp3 file that is called based on which Civilization leader is on screen.

I have literally no understanding of the work/magic you are performing so forgive if my request sounds simple. A quick notepad++ search of Civ3Conquests.exe turns up the following.

Capture.png


Thanks for the amazing work you have done so far,

Michael.
 
Last edited:
If each Civilization can have it's own diplomacy music?
I had a quick look into this just now. It's definitely possible, not particularly easy because it would require modifying behavior in the middle of a function, but it's a simple function so not too difficult either. I'll add it to the list.
 
The more I am reading it the more excited I am :). Stay the course and hopefully you will find the way how to fix a bug with land carriers and land artillery and hidden nationality. I have been strugling with it years and years. Increased culture groups would also be beneficial. Your work untill now is great anyway :)
I did not read any scripting treads on this forum, I do only simple scripting in python but wouldn't mind to look at code while you working on it, maybe I can find someting there even by accident. Can I ask how you edit civ script?

//edit// something else came to my mind, would it be difficult to implement stack deleting units? Very often I have stack of 20-30 units I have delete one by one and this is quite tiresome.
 
Last edited:
I had a quick look into this just now. It's definitely possible, not particularly easy because it would require modifying behavior in the middle of a function, but it's a simple function so not too difficult either. I'll add it to the list.
I can't tell you how genuinely excited I am for this. Thank you for your time.
 
Today I made an awesome discovery of an easter egg when testing the patch with the next version of CCM:

When using the new bombard function, it seems, now every unit has a programmed 'weak spot' when using this new bombardment option. By bombardment over two tiles or more, there is the chance of doing a critical hit, if this weak spot was targeted properly by the targeting cursor, triggering a sudden death of the attacked unit.

Unfortunately, the firing and sinking animations in C3C cannot shown properly in screenshots, but here are the screenshots of targeting the attacked unit and the message box appearing on that unit after the hit before sinking:

Critical Hit1.jpg


Critical Hit2.jpg


This is an unbelievable great new feature provided to C3C! Absolutely unbelievable!! :goodjob::thumbsup:

Edited: As everybody had recognized, this post is an April Fool's trick and this "unbelievable" easteregg of the new bombard option is not existing in reality. The idea for this post is based on a post about my irrational thoughts of using the cross wires cursor when bombarding a unit: https://forums.civfanatics.com/thre...-and-are-embarrassed-by.624700/#post-14922594
 
Last edited:
When using the new bombard function, it seems, now every unit has a programmed 'weak spot' when using this new bombardment option.

THAT is a Great addition! I can see players will "take aim" more seriously than before :clap:
 
Today I made an awesome discovery of an easter egg when testing the patch with the next version of CCM:

When using the new bombard function, it seems, now every unit has a programmed 'weak spot' when using this new bombardment option. By bombardment over two tiles or more, there is the chance of doing a critical hit, if this weak spot was targeted properly by the targeting cursor, triggering a sudden death of the attacked unit.

Unfortunately, the firing and sinking animations in C3C cannot shown properly in screenshots, but here are the screenshots of targeting the attacked unit and the message box appearing on that unit after the hit before sinking:

View attachment 592268

View attachment 592269

This is an unbelievable great new feature provided to C3C! Absolutely unbelievable!! :goodjob::thumbsup:

:p
 
This looks very promising.

But I assume that a variant for the CD-Version of Civ3 Complete will not come? :undecide:

I tried to install your mod in my Civ3 (CD), but it totally wrecked the game (good, that I have an up to date backup ;) ).

Has anyone successfully installed the mod into the CD-Version? If yes, how?

I have two additional suggestions for the mod, but I really do not know if these are possible:

- move the "Wake all" and "Wake transported" to the top of list in the unit menu. This prevents long scrolling and in really large stacks one can not reach the lower end of the list.

- add a "Wake by unit type". This would allow to wake only the requested units (z. B. Bombers or Artillery) needed.

Thanks!
 
Back
Top Bottom