I want to help this mod

You cant stress enough how important writing is. Language, Writing, Printing Press, Internet etc, techs that allow people to communicate, store and access knowledge are the grease for the wheel of innovation. Sure, you can go to mid renaissance or further without writing, but its also a question of how likely this is. Dont you think that at one point, somebody will figure out that such a simple "tech" could enhance their lives so much that they just do it anyways? You can also go very far without hunting, fishing, cooking, fire making, the wheel... but these things are so convenient, that I suspect at one point, it is basically given that a certain tech is developed.

Bla bla bla, enough smart-assing, having building prereqs for techs is just plain awesome and Id love to see it in game! :)
Would also be a nice feat to give more meaning to the various lab buildings you can build in ren. and later areas.
First off, language is not the same as writing. It is possible to forget one but still do the other. Although I believe it is reading of writing that is possible not the writing itself. There are many examples of people forgetting how to speak a language but can still read it. Similarly language is possible without writing. So don't get the two confused.

See
 
These gitbhub issues are done.
Add Remapping code for YieldTypes #83
Add Remapping code for CommerceTypes #82
 
Units are tough to mod but the community was working on tons of them and we've found some sources from other games but the graphics and animations are still something we struggle with that I'm about to have to overcome the challenge of learning how to do efficiently.

The animated leaders were possibly removed due to some not being animated and to align the rest with them but largely due to memory usage - they are heavy and we didn't want to burden the mod's data load with them as many of us didn't feel the animations brought as much to the table as Firaxis must have felt they did to include them in the first place.

Otherwise it's all pretty much on point except that AND and C2C have grown so far now in different directions that you can't anymore really say we're a sub-mod of them now. We certainly did grow out of that root though.
 
Units are tough to mod but the community was working on tons of them and we've found some sources from other games but the graphics and animations are still something we struggle with that I'm about to have to overcome the challenge of learning how to do efficiently.

The animated leaders were possibly removed due to some not being animated and to align the rest with them but largely due to memory usage - they are heavy and we didn't want to burden the mod's data load with them as many of us didn't feel the animations brought as much to the table as Firaxis must have felt they did to include them in the first place.

Otherwise it's all pretty much on point except that AND and C2C have grown so far now in different directions that you can't anymore really say we're a sub-mod of them now. We certainly did grow out of that root though.
Animated leaders were removed mosty because they made the download way too big;). Memory was a lesser consideration. Once the decision was made it allowed the inclusion of all those non-animated leaders and after all C2C is about MORE:lol:.
 
because they made the download way too big
Memory has multiple term applications. That the download was too big is the same as saying they were costing too much memory. Not RAM memory, but overall mod space for the download memory.
 
Here's copy paste from a current pr. It confused me when I went to switch it.

Code:
bool CvSelectionGroup::visibilityRange() const
{
    int iMaxRange = 0;

    for (unit_iterator unitItr = beginUnits(); unitItr != endUnits(); ++unitItr)
    {
        const int iRange = (*unitItr)->visibilityRange();
        if (iRange > iMaxRange)
        {
            iMaxRange = iRange;
        }
    }

    return iMaxRange;

    // Matt: Why search for max, then return bool?
    return algo::any_of(units(), CvUnit::fn::visibilityRange() > 0);
}
 
Yeah, that looks confusing, you gotta look at how other code use the return value of that function, see if you can spot what the other code expects to get from it.
Maybe the return should be the int max range, but who knows, is it only called within an "if statement" without a comparator (<, >=, ==, !=) . . .? Or is the value used as an int there. . .?
 
Last edited:
The function isn't actually called from anywhere as far as I could see.
bool CvSelectionGroup::visibilityRange() const
You could just delete it I think.

This variant is the only one used in code:
int CvUnit::visibilityRange(const CvPlot* pPlot) const
 
To work on c++ code you will need to fork our git repository, as that is where you'll find our dll's source files, .cpp and .h. We also have bat files that will compile the current source files automatically for you so that anyone on any windows computer can compile a dll without any knowledge of programming whatsoever.

SVN will suffice if you're only going to work on python modding, as python code are just txt files that the exe interprets at run time as code, meaning there are no hidden source files, the source files are the same as the working files needed by the mod to work.
SVN doesn't include files that are not needed for the game to work, like the dll source files.

Thank you :D. I'll check out the Git and have a look!
 
Hello everyone,
I would like to update the spanish translation. As I read here, someone should add me as a project contributor if I want to update files.
Thunderbrd is at the moment busy and told me to ask here.

Thank you

Moderator Action: Moved to an appropriate thread. leif
 
Last edited by a moderator:
Hello everyone,
I would like to update the spanish translation. As I read here, someone should add me as a project contributor if I want to update files.
Thunderbrd is at the moment busy and told me to ask here.

Thank you

Moderator Action: Moved to an appropriate thread. leif
The git repo and setup guide is here:

We typically have new contributors go thru pull requests the first few times before giving write access. Are you familiar with git/github?

Also, you may wish to check out the discord (see signature) for faster responses, devs tend to be more active there.
 
Last edited:
No, I haven't !! I have had trouble with some parts of C2C which require too much technological knowledge. I understand the SVN and Some of civfanatics.com but I was very clumsy when I was on Discord and would need you to walk me through using Github Step-by-Step!!! I know you are busy working on MultiMaps so I really don't have an urgent need to add my input to C2C until someone who uses Github has the time to explain to me how to do it in way that I can understand and follow. Thank You MattCA!!!
 
No, I haven't !! I have had trouble with some parts of C2C which require too much technological knowledge. I understand the SVN and Some of civfanatics.com but I was very clumsy when I was on Discord and would need you to walk me through using Github Step-by-Step!!! I know you are busy working on MultiMaps so I really don't have an urgent need to add my input to C2C until someone who uses Github has the time to explain to me how to do it in way that I can understand and follow. Thank You MattCA!!!
This is an excellent tutorial imho: https://www.w3schools.com/git/default.asp
Note that using git fluently takes some time. I started using it around 2006 and still don't know it all.
 
Interesting thread about reducing memory:
Spoiler :

That packing is the reason people experience memory issues (in addition to poor memory management that was simply not designed for such a heavy mod).

Here’s an example: I went to the extreme and unloaded every .fpk file, including those from BTS, since they are loaded as well.

I then loaded a very large game (sent by Sinocpm—the save file is over 8MB) with 1.4GB of free space, using full graphics and high resolution. Before, the game was loading with only 300MB of free space, crashing very quickly (since the first turns after loading always take an additional 100MB each).

I could play 30 turns experiencing no crash, without using RAMMap or Process Lasso, but with dgVoodoo on (because it feels more fluid, so I'm keeping it). Then i went bed, seems stable. Before it was crashing on the 2nd turn.

Notice, "Mapped file" usage is now down to 29MB, whereas before, it was over 1.2GB. All of that within a 4GB limit—that's a massive memory reduction!

View attachment 723065
My loading time is about 6 minutes, but when you're planning to play for several hours, that's acceptable. And when the game crashes, you've probably already been playing for dozens of hours, so it's just a small inconvenience to continue. When you play civ you have time. I also think loading got faster after deleting the .fpk files (if not, then there's both indexing/checking of unpacked and packed files happening, but somehow the game understands and doesn't load the fpk).


So, the simple solution to finally fix the MAF issue would be to release an additional unpacked version that players could switch to in the endgame. With all the necessary warning about loading time. It would maybe be possible to have the unpacked version not overwriting the packed one, if placed in a different unpacked mod. Saves are compatible.

What do you think ?
Ok, I have something working.

I noticed that unpacking the FPK from BTS doesn’t change the loading time... So, I realized that the long scanning process is actually comparing what's in the BTS Assets folder and what's in the RI Assets folder. If a file exists in the mod, it chooses the mod's version, if not it keeps the BTS version. Then probably creates a list of paths in .dat files.

So, after unpacking all the FPKs, I copied everything from the RI Assets folder into the BTS Assets folder, and then deleted the Assets folder from the mod !

Result: The game launches immediately, with all available free memory ! It lauches instantly, much faster than the regular RI. Of course, this messes up your normal BTS game, and other mods will not work, and BTS will not work since you're merging BTS and RI. So that's dirty, be sure to have everything needed to reinstall the full game.

But it does loads instantly and has absolutely all the free memory needed, as long as you play only RI :)

Also i only play 2 turns, so let's see if it's stable.
I agree that apparently only files from mods get scanned, and this is interesting news. Just moving/merging (anyone trying this should make backups) my partial RI Art folder (the 3733 unpacked files) to BtS\Assets\Art removes the initial delay, at least the one upon launching repeatedly. However, loading the Art via CustomAssets also does the trick. So I doubt that the file comparison hypothesis is correct. I used to think that a mod can block custom XML and Python assets while allowing custom art, but it seems that it's the other way around. So Realism.ini will need these two changes to enable custom art:
Code:
; Custom Art from user folder is not loaded
NoCustomArt = 0
; Custom XML and Python from user folder are not loaded
NoCustomAssets = 0
Keeping the RI art in CustomAssets permanently can interfere with other mods. The ini files that the EXE generates allow all custom assets. One can rename the folder to e.g. "RIArt" in CustomAssets when not playing RI. A launch script that waits for RI to exit could handle the renaming:
Spoiler :
Code:
@echo off
setlocal enabledelayedexpansion

:: Set paths and original file name
set "originalFilePath=C:\Users\Administrator\Documents\My Games\Beyond the Sword\CustomAssets\RIart"
set "newFileName=art"
set "executablePath=C:\Program Files (x86)\Sid Meier's Civilization 4\Beyond the Sword\Civ4BeyondSword.exe"

:: Get the directory path of the original file
for %%f in ("%originalFilePath%") do set "originalDirPath=%%~dpf"

:: Get the original file name
for %%f in ("%originalFilePath%") do set "originalFileName=%%~nxf"

:: Rename the file
ren "%originalFilePath%" "%newFileName%"

:: Start the executable and wait for it to finish
start /wait "" "%executablePath%" mod=\Realism

:: Restore the original file name
ren "%originalDirPath%%newFileName%" "%originalFileName%"

:: Exit the script
exit
(Perplexity.ai says the renaming part needs to be this complicated.)
 
Last edited:
Back
Top Bottom