1. Firaxis celebrates the "Asian American and Pacific Islander Heritage Month", and offers a give-away of a Civ6 anthology copy (5 in total)! For all the details, please check the thread here. .
    Dismiss Notice
  2. We have selected the winners of the Old World random draw and competition. For the winning entries, please check this thread.
    Dismiss Notice
  3. Old World has finally been released on GOG and Steam, besides also being available in the Epic store . Come to our Old World forum and discuss with us!
    Dismiss Notice

Sub Bug Fix and other Adventures in EXE Modding Release 10B

EXE mod featuring stack bombard, bug fixes, and more

  1. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    7,621
    Gender:
    Male
    In this case may be it is better to wait for C3XR9 before releasing the German version. :)
     
  2. Ares de Borg

    Ares de Borg Norman Knight

    Joined:
    Sep 19, 2004
    Messages:
    5,136
    Location:
    Heart Of Europe
    Is there any clue why this doesn't work with the CD version of Civ3? I'd love to try it but my Civ is so heavily modded that I dread to reinstall it...
     
  3. tjs282

    tjs282 Stone \ Cold / Fish

    Joined:
    May 19, 2009
    Messages:
    4,189
    Gender:
    Male
    Location:
    Inside my skull
    IIUC, it's because Flintlock built the patch framework based on the noCD-version of the conquests.exe supplied with the GOG(/Steam) installation of Civ3Complete — which unfortunately does not contain exactly the same code as the executable supplied on most CD-versions. So even though the patch-installer can find the CD-based executable, it can't modify it.

    One option to get round this is to buy the GOG-version (€5 or less), install it in a new location on your HDD, copy the executable from there to your primary (CD-based) installation, and then patch it (or patch it in the secondary-installation, and then copy the patched .exe plus the associated .../CX8 directory to your primary).

    (Either way, don't forget to rename/backup the original .exe first, blah yada faseln...)

    That's how I got the CX8 patch also working on our no-longer-internet-capable WinXP laptop (on which I'd previously installed the also-not-patchable GamersGate version of C3C), just a couple of weeks ago.
     
    Last edited: Nov 5, 2021
  4. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    7,621
    Gender:
    Male
    Ares, the patched exe can work with a CD version of Civ 3 Complete, if the pc is still able to run it without the patched exe. At least it does with my CD Chronicles version of Civ 3 Complete. The problem seems to be, that the Flintlock patch cannot find the normal CD C3C exe for boosting it with the new code. So -as tjs282 posted - you need a (separate) installing of the GOG version of Civ 3 Complete (in the GOG sale every some weeks for € 1,29). It is possible to install several versions of Civ 3 Complete on the same pc (but this is not necessary for this operation). Per example, for modding reasons, I have on my win 10, 64 bit pc, three independent operable versions of Civ 3 Complete: One version in the C/GOG directory, one in the Programme (x86) directory (the CD version) and one in the C/Programme directory.

    Now boost the exe of the GOG Civ3 Complete version with the flintlock patch. Rename the Civ3Conquests exe in your CD version to Civ3Conquests-orig (or something like that) and than copy the Civ3Conquests exe, boosted with the Flintlock patch, to your CD installation. It is important that the other parts of the flintlock patch are copied to the C3C mainfolder of your Civ 3 Complete CD version, too, otherwise the boosted exe will not work. I was able to draw even different shortcut links from my Civ Chronicles CD version exes of Civ 3 Complete to the desktop for starting those different exes.

    I cannot say if this procedure will work with CD versions of C3C older than Civ 3 Complete, but in this case you should have at least a working separate installing of the GOG version, patched with the Flintlock path. I was able to transfer my CCM 2.50 mod (more than 6 GB) without any problems to the GOG installation, too, but of course - as always - before doing these operations, please make a safety copy of your mod on a separate hard disk. :)
     
  5. Flintlock

    Flintlock King

    Joined:
    Sep 25, 2004
    Messages:
    860
    C3X Release 9
    Changes:
    • Perfume can be applied to multiple improvements or unit types
      • Perfuming is now a polished feature, in R8 it was more of an experiment. Now it can be applied to units as well as improvements and you can specify a list of perfume targets and amounts instead of just one. Also the perfume amount will now be added accurately, before it was added in the middle of the AI computation and might have gotten multiplied later in the process, now it's added at the very end. Lastly there's now a warning in case of misspelled perfume targets.
    • Corruption can be completely removed with "OFF" government setting
    • Press P in city screen to see AI point value for each available build
    • Press L on map to see how desirable the AI finds each tile as a city location
      • The display is like I showed earlier in the thread. Pressing L opens a popup where you can select the player from whose perspective you want to see the valuations, or turn them off. The values are pretty similar for all players (but I only learned that by implementing this feature). See attached screenshots.
    • AI naval invasion forces can include artillery (with offensive artillery AI enabled)
    • Option to disable worker automation
    • Disallow land settlers from founding on water
      • Useful for modders who want to allow founding cities on water but don't want settlers on boats to be able to do it.
    • Fix tile coords replacing resource name in the info box on the Steam version
    • Proper movement check for replacement army inclusion criteria
    Link: https://forums.civfanatics.com/resources/c3x.28759/

    For the next version I'm planning to work on the AI some more, that's why so much of this release is about revealing what the AI is "thinking". I'd like to look into improving the AI's city placement, production choices especially about naval units, and naval invasions. The first two are definitely doable but the third might not be, we'll have to see. I have no idea when R10 will be done, to be honest work on C3X has slowed during the past weeks and especially recently as I've been spending time on the Civ 3 recreation project instead. Again we'll have to see, and in the mean time, enjoy the update!
     

    Attached Files:

  6. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    7,024
    Gender:
    Male
    Location:
    USA
  7. Civinator

    Civinator Blue Lion Supporter

    Joined:
    May 5, 2005
    Messages:
    7,621
    Gender:
    Male
    Flintlock, one more time thank you very much! :thanx:

    While waiting for the C3X Release 9, I made another testgame with your version 8 and the upcoming German C3C version (the translated standard C3C with updated graphics). Now I cannot stop this game as it is very interesting. :woohoo: The offensive artillery in version 8 is a real game play changer. Here is a screenshot of an offensive Iroquois stuck in era 4, containing 34 artillery (bombard range 2), 67 infantry and 1 flak. Absolutely devastating!

    I don´t know, why the Iroquois artillery has two "rows" with the same stats in that stack.
    Edit: May be artillery with own nationality and captured artillery?

    Spoiler :
    Monster-Arty-Stack.jpg
     
    Last edited: Nov 9, 2021
    Nathiri and Flintlock like this.
  8. tjs282

    tjs282 Stone \ Cold / Fish

    Joined:
    May 19, 2009
    Messages:
    4,189
    Gender:
    Male
    Location:
    Inside my skull
    I think it's the experience-levels? Because C3X separates stacks of similar units by "remaining/total" HP (as illustrated in your screenie by the separation of the Infantry units into 3 separate stacks: 3/4, 4/4 and 3/3 HP).

    So I would guess that some of those Artillery units are technically "veterans" and the others are only "regulars" — but units with A/D-values = 0 don't show health-bars (or HP-counts in the right-click unit-list).
     
  9. Flintlock

    Flintlock King

    Joined:
    Sep 25, 2004
    Messages:
    860
    It is. I noticed this same thing with workers when I was playing a game a few weeks ago and made a mental note to change it, but then it slipped my mind. I'll write it down this time so I remember to do it for the next version.
     
    tjs282 likes this.
  10. tjs282

    tjs282 Stone \ Cold / Fish

    Joined:
    May 19, 2009
    Messages:
    4,189
    Gender:
    Male
    Location:
    Inside my skull
    I actually don't mind the separation by HP-levels, because it means that when everyone's fortified, I can find and selectively wake only the healthy units.

    But I've noticed that it seems glitchy sometimes, because in the game I finished last night (Tides of Crimson v.2.87; Orcs rool OK!), I frequently saw similar units with the same HP-level, getting split into 2 groups (does CX3 v.8 maybe also split by remaining movement-points?).

    With respect to worker-units (and to a lesser extent, bombard-units), it would certainly helpful to have a split between natives and foreigners, but unless these units also have non-zero A/D values (as do many in ToC) I agree that splitting by 'virtual' HP is meaningless.
     
  11. Flintlock

    Flintlock King

    Joined:
    Sep 25, 2004
    Messages:
    860
    It does. Here's the full criteria, two units will be grouped together if all of the following is true:
    • they have the same type and that type's transport capacity is zero
    • they've taken the same amount of damage
    • they've used up the same number of movement points
    • their statuses match (status includes things like whether or not the unit has attacked yet that turn)
    • their states match (includes things like fortification and ongoing worker actions)
    • they have the same experience level
    • they are both not contained in any unit or they are both contained in the same unit
    Noted.
     
    tjs282 likes this.
  12. Quintillus

    Quintillus Archiving Civ3 Content Supporter

    Joined:
    Mar 17, 2007
    Messages:
    7,166
    Location:
    Ohio
    It looks like I may have chosen the wrong year to dial down my Civ involvement! Just reading the Release 9 new features, and Civinator's post about offensive artillery, it sounds like I've been missing out on a good amount. I might have to put some other things on the back burner and play another 540 turns...
     
  13. BlueSox14

    BlueSox14 Chieftain

    Joined:
    Nov 11, 2021
    Messages:
    4
    Gender:
    Male
    Hi all,

    I've been watching this thread with some interest over the last few months and when Steam recently offered a Civ3 sale, I couldn't help myself. 20 years on, Civ3 is ruining my life. Again!

    Like many others, I'd like to thank Flintlock and all the giants of whose shoulders he stands upon for this great work. It really adds so much wonderful enjoyment and value to this already great game!

    I'm intrigued to learn a little bit more about how Flintlock has done this, the technology used, and the Civ3 game code. Beware that I'm very much a novice with just a little bit of visual basic coding under my belt.

    I've downloaded the GOG version above, extracted it, but really have no clue what to do with the files in it now. Do I need to open those up through some specific software? If so, which software?

    Can I help? If I was able to source the relevant EXEs, I think I'd be prepared to try to analyse these. I probably don't have the skillset to do this, but if I don't try, I'll never know.

    I have the CD version of this game from 20 years ago and an Win XP virtual machine. So I think I have the EXEs. How would I decompile them to get them to a stage where I can analyse?

    Keep up the great work Flintlock et al!

    BlueSox14
     
    Puppeteer and Flintlock like this.
  14. vmxa

    vmxa Deity Supporter

    Joined:
    Feb 9, 2004
    Messages:
    14,049
    Location:
    Oviedo, Fl
    Special thanks Flintlock for the disable auto worker, yahoo. Not such a big issue with 20-50 workers, huge issue with 400. Can't help but hit that automate once in a while.
     
    Flintlock likes this.
  15. vmxa

    vmxa Deity Supporter

    Joined:
    Feb 9, 2004
    Messages:
    14,049
    Location:
    Oviedo, Fl
    I have been playing a custom map and it is very large (unit types). In a game like that players likely do not know the units and have to use the pedia.

    You run into the issue that scrolling to a given unit and selecting to read about ends up putting you back to the start, when you close that entry.

    Now you have to scroll all the way out to that point to continue looking at units.

    Is it possible to have it save the pointer and return to it, when you close that item's detail? If I want to look a several units, often just give up on a list with 20 or more entries.

    Anyway massive kudo's, you made this game so much better.
     
  16. Flintlock

    Flintlock King

    Joined:
    Sep 25, 2004
    Messages:
    860
    Glad to hear you're enjoying it.
    The software you need is Ghidra: https://ghidra-sre.org/. By the way, if you downloaded the 7-zip archives from months ago you should instead use the GAR files I uploaded a few weeks ago. They're more recent so have more stuff decoded and they're proper Ghidra archives unlike the 7Z files where I just zipped up my project folder because I didn't know Ghidra had an archive feature. Though Ghidra's own compression is much worse than 7-zip.

    About how the mod works, I've been thinking about writing up a nice, comprehensive technical explanation since I've been asked that several times, but I never got around to it. It's not very technical but here's something I wrote back in April about it:
    Also around the same time I posted an example of how the mod can be used to modify the game rules, specifically the minimum distance between cities. I included it in the C3X GitHub repo in the "Min City Sep Demo" folder (link to text: https://raw.githubusercontent.com/maxpetul/C3X/master/Min City Sep Demo/writeup). Note that demo dates back to April so it mentions civ_prog_objects.h which has now become a CSV file, but the process is still fundamentally the same.
    Sure. If you're interested in this stuff, go ahead and jump in. That's what I did, I already knew C and basic x86 assembler but I had no experience with reverse engineering software before I started working on C3X almost a year ago.

    The thing with the old PTW EXEs is that if you want to study them you'll be faced with the enormous chore of porting over the reverse engineering work from the newer ones. I would instead start by studying the relevant functions in the newer (GOG Complete) EXE to try to figure out why the bug occurs, and only if I really couldn't figure it out would I look to the earlier ones. Most of the bugs I've fixed so far were not super subtle. The relevant functions, where I would start searching, are Unit::ai_move_barbarian and maybe secondarily Leader::update_preproduction. Those are the locations of the barbarian AI that I've found so far.
    I doubt it would be difficult, added to the list.
     
    Sutsuj likes this.
  17. Takeo

    Takeo Shogun

    Joined:
    Dec 3, 2002
    Messages:
    792
    Gender:
    Male
    Location:
    Kentucky
    Flintlock,
    In certain mods, like RaR, there are many added specialists. When the player wants to change to a different one, you might accidentally click past the one you want and then have to click thru all of the specialists again. Would it be possible to click on a specialist and bring up a little mini-list and just move the mouse pointer to the specialist you want?

    Thanks for all your work!!:)
     
  18. SteamCiv

    SteamCiv Warlord

    Joined:
    May 18, 2012
    Messages:
    131
    You fixed the sub bug...
    YOU FIXED THE SUB BUG!?!

    Just been thinking about playing Civ3 again, one of the things been putting me off from it was the use of submarines, the sub bug, Ai tripping over my subs and suddenly I’m at war with a friendly.
    Been trying the other Civs, but 3 has the allure!
    Plus a whole lot of other stuff fixed, houseboat, Ai armies stocked and I guess no more AI hoarding artillery to high heaven in their cities!
     
    Flintlock likes this.
  19. Flintlock

    Flintlock King

    Joined:
    Sep 25, 2004
    Messages:
    860
    Added to the list. A little popup selector sounds difficult to do, the easier but almost as good solution to this problem is probably making right click scroll backwards through possible specialists, but I'll see if it's practical to do better than that. Come to think of it, doesn't right click open the civilopedia? In that case it'll have to be shift+click or something.
     
  20. justanick

    justanick Emperor

    Joined:
    Oct 6, 2010
    Messages:
    1,278
    Location:
    Germany
    Maybe it should not be changed. In case of the korean UU you may want to know if a unit is elite and could therefore generate a MGL via lethal bombardment.

    In a modded game it may also occur that units without HP may be updated to units with HP.
     
    WildWeazel likes this.

Share This Page