Imperialism Mod

I think it looks ok, but I'm not an xml expert. However your post just gave me an idea. People post in the bts development forum about strange crashes and they turn out to be incorrect arts setup. We could add an assert, which checks if the art file is present on game startup. That will provide a human readable assert error rather than a CTD at runtime with no useful error.

The only problem is that we have the files in pak files right now. For this to work, the files should be unpacked. I think they should be unpacked in git anyway for several reasons. Let's see if we can agree on unpacking the files.
 
Yeah, when VIE gets further along it will have a lot of it's own graphics that won't be packed (mostly because I am lazy and have never packed graphics!) :D (I think I unpacked all the art files when I did them for WHM, and then moved all that content over to my new VIE work folder.

I think packed art is only good for a release version, but I do not know the relative sizes of the packed and unpacked for M:C

I added this Tutorial because knuckle was struggling, I think he had a Bts tutorial and it caused some kind of issue, hopefully this one will work better!

That randon art crash is usually to do with the ',' in an art entry at the beginning of it's path when it doesn't use an atlas reference, a lot of people put in a 'normal' path, and don't know about the comma issue.
 
This tutorial will also become more complicated if we decide to turn 'artilleries' into professions, so that they require a citizen to be created, rather than hammers.

I also started wondering about the idea of 'refit' professions for ships, though I do not know if something in the code prevents a 'built' unit from having a profession??
 
I think packed art is only good for a release version, but I do not know the relative sizes of the packed and unpacked for M:C
1:1
There is a compression option when packing files, but if you use it, the game will not read the files. In other words it will use up precisely the same amount of HD space. That is, the HD has a block size (usually 4kB) and each block can only contain a single file. This mean if you have 4 files using 0.9 kB, it can be packed to a single block, but the individual files use 4 blocks or 16 kB. This makes a minor difference, but it's not big enough to matter.

The main difference is startup time of the game. The game asks windows to open a file, reads it and then asks windows to close the file and then it carries on to the next file. Opening and closing the file is fairly fast, but not instant. Multiply this action with the number of files and suddenly you have a slowdown where you can easily tell the difference. Civ4 use pak files to get around this issue. Neverwinter Nights use zip files (with no compression?) to store txt files with settings. There are multiple formats to deal with this issue, but the idea is the same: reduce the number of tiny files to open and close in one go.

Git compresses everything you commit meaning it will not help to compress anything yourself. In fact if you pack two or more files together, git makes a new version of everything if you change just one file. If you store the files individually, then if you change one, git will only use the space for the change in one, meaning git will use significantly less space with unpacked files. Remember that git stores .git together with the files. In that hidden directory, it stores every single revision (commit) as changes compared to the previous commit. Removing the dll from git saved hundreds of MB of diskspace, not to mention download size as everything has to be downloaded when somebody makes a new checkout. Git isn't designed to handle frequently changing binary files. It's optimized for files it can view as plain text (like xml).

That randon art crash is usually to do with the ',' in an art entry at the beginning of it's path when it doesn't use an atlas reference, a lot of people put in a 'normal' path, and don't know about the comma issue.
"a lot of people" includes me :eek:
Can you please explain precisely what happens with and without the comma.

I still think it's a good idea to verify the files to be present. If I get to understand the comma issue, maybe that one can be verified as well. Ideally any problem should be reported either by the compiler or at startup. Also any CTD, which can be changed to an assert with an explanation for what went wrong would also be quite useful.
 
I also started wondering about the idea of 'refit' professions for ships, though I do not know if something in the code prevents a 'built' unit from having a profession??
I have been thinking the same thing. I do see one issue though. The domain is written in the unit, which mean AFAIK changing profession will not make it a water domain unit.

DoaNE has a crew feature. The ship itself will never gain experience or promotions, but the crew will. If you move the ship to a city and click the unload crew, it will spawn the unit as a colonist and make the ship immobile until a unit selects "board ship as crew". This mean you can build ships, leave them in the city and if needed, citizens can man the ships and they can go to war.

DoaNE is closed source and we will likely never know how they coded it, but I have been wondering about adding the same functionality to M:C. This feature should be something simple like a "bRequiresCrew", which mean it isn't limited to ships. It could make sense for siege engines as well.

Also if you have frigate and invent an armoured frigate, you can build one, unload the promoted crew from the frigate and board the armoured one. The frigate can then be scrapped or boarded by a regular crew or whatever you want to do with it. The point is that the experienced crew can move to your newly invented improved units.
 
yeah what I was wondering was more for say you build the base ship frigate and it cost 5 gun and 10 wood to build, once built you can change it to say 'armoured frigate profession' and takes 100 armour, then 'up gunned armored frigate profession' which takes 100 armour and 100 guns, etc.

so it would be ship units having ship professions, not people becoming ships.

I was planning to make tanks/artillery into professions at some point with very high costs, so then the crew can change from tank type to tank type or gun type to gun type etc. which is already doable... I think?

',' Issue:
Code:
<Button>,Art/Interface/Buttons/Units/Lion.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,6,5</Button>

this is a standard bts button reference with atlas. if you changed it to:

Code:
<Button>[COLOR="Red"],[/COLOR]Art/Interface/Buttons/Units/Lion.dds</Button>

The game will crash at startup with no explanation.
 
At one point I proposed making units, which can't be moved and can't do anything on their own. However transports can load them and such units will provide a free promotion. It could be an extra cannons unit, which will cause the ship to cause more damage or something for +1 visibility range or whatever we come up with. You can then want to add 8 such units, but the ship only has 3 slots, in which case you have to decide which to load.

This will add the ability to upgrade units and make units somewhat customizable by the player in addition to what the player provided. I'm not entirely sure that is what you meant, but it's the closest of the existing ideas.

A ship change profession... it might actually be possible right now. If you feel like a daredevil, you can allow some professions for a ship and see what happens.
 
I think it looks ok, but I'm not an xml expert. However your post just gave me an idea. People post in the bts development forum about strange crashes and they turn out to be incorrect arts setup. We could add an assert, which checks if the art file is present on game startup. That will provide a human readable assert error rather than a CTD at runtime with no useful error.

Just passing by... :popcorn:

Note: I'm talking about Civ4 BtS.

To clarify a bit: a missing art does not crash the game, you get what is called a 'red blob' instead of your beautiful unit. What is causing a crash (apart from the leading comma thing explained by Lib) is a missing or improper ArtDef entry. The game finds the reference to the art in the unit file, ART_DEF_UNIT_LION, but can't find it referenced in the ArtDefines_Unit file.

I have encountered Asserts in a debug dll about this problem, so it already exists. For all those who can't run a debug dll, I have created, with Python coding by Platyping, a tool called 'ArtDef Checker' (see my signature). It is an amateurish tool but, hey, that's just me :D The complication in BtS is the files in Modules (I don't know if Col has a similar approach).

To check the missing art itself, there is a tool made by Davidlallen, CivChecker.
 
Been a little while...

Unfortunately, I have major family issues to attend to with an uncertain return...it has not been a good past three months.

Take care and have a prosperous New Year.

KD
 
Not entirely, more in a very deep sleep.

I don't have access to my Mod files at the moment and no one is that active on it at the moment so my focus has been else where.

If someone was interested in putting in some work I would converse with them, I just don't really have much motivation to work on it solo.

Here's what we have so far:

Names:
Buildings
Yields
Professions
Some Units

Art:
Yields

New Content:
Some New Victoria PoP inspired units with some very specific work skill sets (No art yet)
3 New Continental Terrains (Africa, America, Asia) each with a unique yield.
Terrain: Terrains have had their yield outputs changed somewhat (This still needs work as I don't fully understand how some things in terrain work. Like Hills)
Some buildings have had there effects changed(needs more work I think)

I think that might be it.... Doesn't feel like much for a whole weekend, but I am pretty sure there is about 20 hours of work done. (Though my pace is probably rubbish!)

Victorian Imperial Empires Test Build Mk1

I think that was the latest version, not sure if I did anything after this or not, I think I was waiting on some team work that never came to fruition.
 
Interested In Building Imperialism 2 Mod

Hi all, im so surprised to find that there is/was actually a mod trying to rebuild Imperialism 2, one of the best TBS game ever. I would like to continue on this project. If anyone is still interested please drop me a message. Thank you.
 
@Keean
I strongly suggest to use WTP as a base for your project to save yourself a lot of trouble and effort.
It is by far the technically most advanced mod with the largest amount of content out there.

Since the huge majority of remaining modders work either directly on WTP core mod or have their own WTP mod mod,
also starting your project as a WTP modmod is really your best chance to maximise cooperation and sharing with others.

WTP is more or less the only Civ4Col mod that is still in development and still has a few experienced modders.
(It is the continuation of RaR which itself was based on TAC - both 2 of the most popular mods in this community as well.)

Wish you a lot of success with your project.
Have fun modding. :thumbsup:
 
Last edited:
Top Bottom