Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,378
Looking at what is going on here on the forum, way too much time is wasted moving from one mod to another. This applies when starting a new mod/modcomp, merging modcomps into mods or even just helping people, who have become stuck. So much time is wasted that I have caught myself "why bother?", which isn't something we should be thinking. We need something faster and with less hassle. What we is is a modding industrial revolution 
I have created a project for this very purpose. It can be found here: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
The core is the git server. It has a branch called BTS_3.19 and it is just that: DLL source, python and xml for vanilla. Well I added "project files", which allows compiling the DLL with all the features from the newest makefile.
Creating a new mod or modcomp:
Fork if you have to. Create a new branch from BTS_3.19 for your mod. The setup is made out of the box and should be able to compile on any computer with a compiler installed already.
Placing your mod on git:
Fork if you have to. Create a new branch from BTS_3.19 for your mod. Drop all your files into the git repository. Add all unversioned files and commit. Git prefers if you do not pack your graphic files, but keep them as individual files.
Benefits of using a common git foundation
Merging might be the most interesting one of everything mentioned here. With your mod selected, select the branch (modcomp) you want to include and click merge. If there aren't any conflicts (you and modcomp changed the very same line), then that's it. If the DLL code is modified, then it needs to be compiled again, but it takes a minute or so because the setup is already present.
It wouldn't be farfetched to say that once this system is populated with mods and modcomps, it would be realistic to add 5 modcomps this way in 10 minutes
I added the ewi modcomp to the git server. It turned out not to have been made for BTS, but using git to revert all changes not commented to be present in the modcomp turned it into a BTS mod. This mean the upgrade took a few minutes and we should be able to enjoy the revived edition with BTS too. The goal is to add images to events using xml only, which sounds useful, though I admit I haven't actually tested it (yet?).
Getting help from me
Once in a while people complain about a crash or similar. If I am to help from now on, it would have to be through git using this system. It simply takes me way too long to look into each mod individually and set up the compiler for it and all that.
Setting up git for a mod
SmartGIT guide
TODO: setting up git to use multiple remotes to fetch modcomps from multiple people.
Using the compile server
I have set up a computer, which once in a while downloads from git, compiles the DLL and places it on a DropBox account.
Compile server file directory
Do note that this is just the DLL and that other files are needed as well. This is primary a service for people without compilers. If you want your mod to be included, post in this thread. The server requires git URL, mod name, branch name and target type. Post here even if you don't know the answers to those and we will figure it out.

I have created a project for this very purpose. It can be found here: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
The core is the git server. It has a branch called BTS_3.19 and it is just that: DLL source, python and xml for vanilla. Well I added "project files", which allows compiling the DLL with all the features from the newest makefile.
Creating a new mod or modcomp:
Fork if you have to. Create a new branch from BTS_3.19 for your mod. The setup is made out of the box and should be able to compile on any computer with a compiler installed already.
Placing your mod on git:
Fork if you have to. Create a new branch from BTS_3.19 for your mod. Drop all your files into the git repository. Add all unversioned files and commit. Git prefers if you do not pack your graphic files, but keep them as individual files.
Benefits of using a common git foundation
- the project files are set up already
- all mods can be pulled (downloaded) into the same repository. It saves time when switching as it is just a click or two away
- merging is a two click operation
Merging might be the most interesting one of everything mentioned here. With your mod selected, select the branch (modcomp) you want to include and click merge. If there aren't any conflicts (you and modcomp changed the very same line), then that's it. If the DLL code is modified, then it needs to be compiled again, but it takes a minute or so because the setup is already present.
It wouldn't be farfetched to say that once this system is populated with mods and modcomps, it would be realistic to add 5 modcomps this way in 10 minutes

I added the ewi modcomp to the git server. It turned out not to have been made for BTS, but using git to revert all changes not commented to be present in the modcomp turned it into a BTS mod. This mean the upgrade took a few minutes and we should be able to enjoy the revived edition with BTS too. The goal is to add images to events using xml only, which sounds useful, though I admit I haven't actually tested it (yet?).
Getting help from me
Once in a while people complain about a crash or similar. If I am to help from now on, it would have to be through git using this system. It simply takes me way too long to look into each mod individually and set up the compiler for it and all that.
Setting up git for a mod
Spoiler :
First step would be to fork the project on sourceforge. This will create a complete copy, which you have write access to and can add your modded files to.
You do not need all of this as we ignore the merge requests, at least for now.
0-1:25 explains the setup.
Demo repo: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
Forked repo: your mod on sourceforge
Local repo: your mod on your computer
1:25 how to actually do it
1:50 use your user account unless you know what you are doing with projects
2:00 name them the same as your mod
2:25 end of what we need from this video
Note: SmartGit guide later on telling how to do this in git.
You clone your new repo to your Mods folder (see notes on program files)
You copy your modded files into the repo files and overwrite as promted.
Add new files to git (no FPK files! Unpack them to help git).
Commit and push.
Done. Everybody can now reach your mod and when you make changes in the future, you can commit and push and people can access the changes.
If the compile server should be aware of your mod, do post about it in this thread. Once it is aware of a mod, it will compile the changes once in a while, usually once a day or so.
You do not need all of this as we ignore the merge requests, at least for now.
0-1:25 explains the setup.
Demo repo: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
Forked repo: your mod on sourceforge
Local repo: your mod on your computer
1:25 how to actually do it
1:50 use your user account unless you know what you are doing with projects
2:00 name them the same as your mod
2:25 end of what we need from this video
Note: SmartGit guide later on telling how to do this in git.
You clone your new repo to your Mods folder (see notes on program files)
You copy your modded files into the repo files and overwrite as promted.
Add new files to git (no FPK files! Unpack them to help git).
Commit and push.
Done. Everybody can now reach your mod and when you make changes in the future, you can commit and push and people can access the changes.
If the compile server should be aware of your mod, do post about it in this thread. Once it is aware of a mod, it will compile the changes once in a while, usually once a day or so.
SmartGIT guide
Spoiler :
I always recommend SmartGit as a git client because it's fairly easy to use and it is causes less technical problems than other clients I tried. It's also cross platform should people need that.
Not the newest version, but it sort of look the same today. It shows the basics and apart from starting a new repo from scratch it all seems relevant.
If you made your clone in Mods, BTS will detect the mod as a playable mod, meaning you will not have to move files between the game and git. This is very much recommended.
Do note that when cloning from sourceforge, you do get a line line this:
You should use the bold part and not copy paste the crossed out part. The line SF provides can be copy pasted into command line git, but it seems to confuse people using GUI clients. Sadly people using the GUI clients tend to be the people who requires the most help with the setup, meaning it's not ideal how it is presented.
You will notice that the username is actually in the URL. This mean there is a personal URL for each person and I can't give you the one you need. You have to use sourceforge to get it yourself.
A bit of understanding of git:
Remote is the server in sourceforge.
Local is your local SERVER
Working copy is the files you see in explorer.
Commit moves files from working copy into local server.
Push moves from local server to remote server
Pull moves from remote server to local server. SmartGit asks if you want to merge into your working copy, which you most likely want to do every time.
Not the newest version, but it sort of look the same today. It shows the basics and apart from starting a new repo from scratch it all seems relevant.
If you made your clone in Mods, BTS will detect the mod as a playable mod, meaning you will not have to move files between the game and git. This is very much recommended.
Do note that when cloning from sourceforge, you do get a line line this:
Code:
git clone [B]ssh://nightinggalemod@git.code.sf.net/p/civ4-modcomps-by-nightinggale/code[/B] [S]civ4-modcomps-by-nightinggale-code[/S]
You will notice that the username is actually in the URL. This mean there is a personal URL for each person and I can't give you the one you need. You have to use sourceforge to get it yourself.
A bit of understanding of git:
Remote is the server in sourceforge.
Local is your local SERVER
Working copy is the files you see in explorer.
Commit moves files from working copy into local server.
Push moves from local server to remote server
Pull moves from remote server to local server. SmartGit asks if you want to merge into your working copy, which you most likely want to do every time.
TODO: setting up git to use multiple remotes to fetch modcomps from multiple people.
Using the compile server
I have set up a computer, which once in a while downloads from git, compiles the DLL and places it on a DropBox account.
Compile server file directory
Do note that this is just the DLL and that other files are needed as well. This is primary a service for people without compilers. If you want your mod to be included, post in this thread. The server requires git URL, mod name, branch name and target type. Post here even if you don't know the answers to those and we will figure it out.