• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

FPK live (tm)

Not sure if this is the place for it, if you ever unpack the arts, try to move it somewhere else before you start the game or otherwise it won't launch!
 
The scripts I put in should unpack to the "unpacked" directory, is this not the case? Or does it pick them up there somehow? I thought it would only load from the art directory!
 
Art file itself doesn't nothing, you need path in xml to read it, so art in unpacked folder is going to be harmless.

Apparently I was wrong - loose art files were being loaded anyway.
 
It's probably because the exe tries to enumerate every file under the Assets folder, even if its path is not used. During that run, it hung for a long time, and my dll wasn't even loaded.
 
Last edited:
Yep my experiments show the same. If I hide the directory it is not indexed, but SVN doesn't support hidden attribute at all, so it would need to be done locally somehow for everyone to be able to use that.
I would propose a different solution, however it is a big change:

Move the actual mod under a sub-directory, and keep the source code and assets separate. So now you have:
\Caveman2Cosmos\
--- \Assets
--- \Source
--- \PrivateMaps
--- \ini file
--- \icon
--- etc.

Instead you would have:
\Caveman2Cosmos\
--- \Mod\
--- --- \Assets
--- --- \PrivateMaps
--- --- \ini file
--- --- \icon
--- \Source
--- \UnpackedArt

This has other benefits like stopping the game indexing the source directory, keeping a clean distinction in the repo between what the mod loads at run time and what it doesn't, separating source from build etc.

Of course this change means a one time move of a lot of assets in SVN, which probably results in a long fetch and maybe some annoying merges (not sure how well SVN handles file moves), and people would need to update their mod load path from mod\Caveman2Cosmos to mod\Caveman2Cosmos\Mod.

I think this is the best solution in the long term, but of course it requires some (I think modest) effort from everyone to update their paths when (if) it drops.

If we were to move to github (my experiences with sourceforge servers in the last week make it essential in my book), that would be an ideal time to do a change like this.
 
Other suggestion for SVN folder structure:
\Caveman2Cosmos\
--- \Assets
--- \PrivateMaps
--- \ini file
--- \icon
\SourceC2C
--- \Source
--- \UnpackedArt
--- \Tools

Because the "Caveman2Cosmos" folder is the mod that BtS loads.
I don't think BtS will consider the SourceC2C folder a valid mod.
 
Last edited:
Other suggestion:
\Caveman2Cosmos\
--- \Assets
--- \PrivateMaps
--- \ini file
--- \icon
\SourceC2C
--- \Source
--- \UnpackedArt
--- \Tools

Because Caveman2Cosmos is the mod that BtS loads.
I don't think BtS will consider SourceC2C a valid mod.
I guess something would be has to changed in SVN, so if you use Mods as base folder (SVN checkout) then here two main folders are created.
 
I guess something would be has to changed in SVN, so if you use Mods as base folder (SVN checkout) then here two main folders are created.
The structure I suggested there is what would be inside the folder you do checkout on, regardless of what that checkout folder is named.
Doing the checkout on the mods folder within BtS directory would be possible, but then you would really have to delete all the other mods that come with the game as the SVN would clean them out anyway when doing SVN clean up.
I would say that doing SVN export is the recommended way anyway.
 
Scary Stuff!:hide:
 
Do you mean have this under the same location we currently checkout to? So e.g. if you checkout into Mods dir it would be mod=Mods\Caveman2Cosmos\Caveman2Cosmos?
No if you need to have the SVN checkout folder inside the BtS mods folder, then with my suggestion you would have to do checkout on the bold folder in this line:
CivIV\BtS\Mods\
---- Caveman2Cosmos\'
---- ---- Assets
---- ---- etc.
---- Caveman2CosmosSource\
---- ---- Source
---- ---- Tools

---- Afterworld\
---- ---- Assets
---- ---- etc.
---- Broken Star\
---- ---- Assets
---- ---- etc.

etc.
Where the red mods (all vanilla BtS mods) would eventually have to be deleted as SVN clean up would delete them anyway.

My suggestion kinda took it for granted that everyone does SVN export and have their SVN checkout folder outside the BtS installed Mods path.
 
My suggestion kinda took it for granted that everyone does SVN export and have their SVN checkout folder outside the BtS installed Mods path.
I gave up on doing it that way very quickly. What is the benefit of doing this? Seems easier to just checkout to Mods.
But if people do export (dunno what this is really), then they can just do packing etc. script at that point right?

Can't your script zip the unpacked art, or place the unpacked art somewhere else than in the mod folder?
The unpacked art would be in SVN so it will be in the SVN workspace to start with. I can't stop Civ exe from indexing everything inside the directory that is specified on the Mod command line. So to fulfill both the unpacked art being in SVN and making sure Civ doesn't index it (very slow) the Mod root can't be the SVN root. What you suggest would work, but it is way more drastic a change than what I am suggestion. It both requires moving the entire repo locally, AND it will delete all other mods, or accidentally add them to SVN.
 
Yep my experiments show the same. If I hide the directory it is not indexed, but SVN doesn't support hidden attribute at all, so it would need to be done locally somehow for everyone to be able to use that.
I would propose a different solution, however it is a big change:

Move the actual mod under a sub-directory, and keep the source code and assets separate. So now you have:
\Caveman2Cosmos\
--- \Assets
--- \Source
--- \PrivateMaps
--- \ini file
--- \icon
--- etc.

Instead you would have:
\Caveman2Cosmos\
--- \Mod\
--- --- \Assets
--- --- \PrivateMaps
--- --- \ini file
--- --- \icon
--- \Source
--- \UnpackedArt

This has other benefits like stopping the game indexing the source directory, keeping a clean distinction in the repo between what the mod loads at run time and what it doesn't, separating source from build etc.

Of course this change means a one time move of a lot of assets in SVN, which probably results in a long fetch and maybe some annoying merges (not sure how well SVN handles file moves), and people would need to update their mod load path from mod\Caveman2Cosmos to mod\Caveman2Cosmos\Mod.

I think this is the best solution in the long term, but of course it requires some (I think modest) effort from everyone to update their paths when (if) it drops.

If we were to move to github (my experiences with sourceforge servers in the last week make it essential in my book), that would be an ideal time to do a change like this.
That structure is actually adopted by the AND and RI teams. They have scripts to package their mod into installers, and their Mod proper is one level deeper than their repo root directory.
 
I gave up on doing it that way very quickly. What is the benefit of doing this? Seems easier to just checkout to Mods.
But if people do export (dunno what this is really), then they can just do packing etc. script at that point right?
SVN export isn't much more than copying all files from here to there, though the SVN can mark files so that they will not be exported, like the .svn folder.
When I use export on my 3.5 GB SVN folder I end up with a 1.5 GB C2C mod in the BtS\Mods folder.

I use export mostly because I like to keep things separated, to keep modmods and other custom modifications from getting on the repo by accident or getting deleted from a "clean up" command and so on.
I have two SVN folders and none of them are in my BtS installation path.
 
Instead you would have:
\Caveman2Cosmos\
--- \Mod\
--- --- \Assets
--- --- \PrivateMaps
--- --- \ini file
--- --- \icon
--- \Source
--- \UnpackedArt
If this works then I'm all good with it btw, I only gave the other suggestion in case that wouldn't work.

Just remember that this (in \Assets\XML\Art\CIV4ArtDefines_Misc.xml):
<MiscArtInfo>
<Type>DEFAULT_THEME_NAME</Type>
<Path>Mods/Caveman2Cosmos/Resource/C2C.thm</Path>
<fScale>0</fScale>
<NIF/>
<KFM/>​
</MiscArtInfo>

needs to point to our /Resource folder, so we will have to add a "Mod" in its path, or move the "Resource" folder out to the same folder level as the "Source" folder.
I guess it belongs in the "Mod" folder so "Mods/Caveman2Cosmos/Mod/Resource/C2C.thm" is the method I prefer.
But it would be easier to keep the resource folder on the same folder depth as it currently is due to it using relative paths to a lot of vanilla resources.
 
Last edited:
Back
Top Bottom