Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,279
Multiple people requested using more Art for units than the vanilla early/middle/late setup. I wrote this modcomp to meet the demand. It is able to set art for each era and can be controlled 100% from XML.
Download link: https://sourceforge.net/projects/civ4-modcomps-by-nightinggale/files/ModComps/Art%20for%20all%20eras/ (includes a precompiled DLL)
GIT: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
Important notice: when starting a custom game in a certain era, it actually starts in one era earlier. For instance starting in ERA_FUTURE will start in ERA_MODERN and you would actually have to get one more tech to enter the future. Use worldbuilder's feature to get all techs from an era to set the era rather than starting era to test setup when using this modcomp.
Download link: https://sourceforge.net/projects/civ4-modcomps-by-nightinggale/files/ModComps/Art%20for%20all%20eras/ (includes a precompiled DLL)
GIT: https://sourceforge.net/p/civ4-modcomps-by-nightinggale/code/ci/master/tree/
Important notice: when starting a custom game in a certain era, it actually starts in one era earlier. For instance starting in ERA_FUTURE will start in ERA_MODERN and you would actually have to get one more tech to enter the future. Use worldbuilder's feature to get all techs from an era to set the era rather than starting era to test setup when using this modcomp.
Readme said:Art for all eras
This modcomp allows specifying unit art for each era, rather than just early/middle/late provided by vanilla. The number of eras can be set in Civ4EraInfo.xml and will not require recompiling the DLL. There is a minimum of 1 era and no upper limit.
To make adapting this modcomp easier, the DLL can be used without any changes to the XML files. However no changes to the XML files mean no change ingame. Still it allows to adapt the DLL and then add art for one unit at a time and the game will never have a fail to start moment during the "conversion". It also mean it is possible to completely ignore units you don't plan to add more art for.
Usage:
Civ4UnitInfos.xml
The UnitMeshGroup now looks like this:
PHP:<UnitMeshGroup> <iRequired>1</iRequired> <EarlyArtDefineTag>ART_DEF_UNIT_WARLORD_ANCIENT</EarlyArtDefineTag> <LateArtDefineTag>ART_DEF_UNIT_WARLORD_MODERN</LateArtDefineTag> <MiddleArtDefineTag>ART_DEF_UNIT_WARLORD_MEDIEVAL</MiddleArtDefineTag> <ArtForEras> <ArtForEra> <Era>ERA_MEDIEVAL</Era> <ArtDefineTag>SOME_ART_TAG</ArtDefineTag> </ArtForEra> <ArtForEra> <Era>ERA_FUTURE</Era> <ArtDefineTag>ANOTHER_ART_TAG</ArtDefineTag> </ArtForEra> </ArtForEras> </UnitMeshGroup>
Everything after EarlyArtDefineTag is optional, though content of ArtForEra isn't. Any number of ArtForEra can be added as long as it doesn't exceed the number of eras.
What happens is a list is generated with the content from ArtForEras.
EarlyArtDefineTag overwrites the first era.
LateArtDefineTag overwrites the era half way through the game +1.
MiddleArtDefineTag overwrites 1/4 through the game+1.
If an era isn't mentioned, the art from the previous era will be used. This mean if art is set for ancient and nothing else, then that one will be used in all eras.
It isn't recommended to use MiddleArtDefineTag and LateArtDefineTag because rounding makes it a bit difficult to precisely determine when they activate. Add more ArtForEra instead for complete control. Again the vanilla tags are only kept to prevent breaking the ability to load vanilla XML files.
CIV4UnitArtStyleTypeInfos.xml
This file can overwrite what is written in UnitInfo and allows to give different styles to different civilizations (just like in vanilla).
The xml setup is more or less identical. ArtForEras is added after MiddleArtDefineTag.
Differences:
-EarlyArtDefineTag is optional
-Blank art string will make the unit use the default art from UnitInfo
-Default is blank (use UnitInfo)
Example:
ERA_CLASSICAL is set to some custom art
ERA_RENAISSANCE is set to blank
Nothing else
The result is a style, which has custom art in ERA_CLASSICAL and ERA_MEDIEVAL and will use the default art in all other eras.
Python:
The vanilla python interface is preserved for compatibility and a new function is added to access art from all eras.
getArtDefineTag (int i, UnitArtStyleTypes eStyle, EraTypes eEra)
It works like getEarlyArtDefineTag, except art for all eras can be reached.