Help with Russian City Center Visual

Modding, Map Editor, IES Scripting and Other Questions
Post Reply
User avatar
Gonzalo
Posts: 336
Joined: 24 Aug 2018, 08:56
Been thanked: 3 times

Help with Russian City Center Visual

Post by Gonzalo »

I am trying to set different models of City Center for different civilizations in epoch 7 with different flags by country. The only way I see of accomplishing this, due to create several city center unittypes would mean to mod the entire game, is to upgrade visual of each city center, just like original game upgraded the Russian City Center for Campaign. I have tried all means of accomplish this, copying the paradigm of the Russian City Center, creating unit model and unit type, and making every change I looked necessary for updating visuals of City Center...but there are so many mods that have altered the Russian City Center Visual that I am not sure how it worked at the beginning. I have tried to copy original code from the original gode, but perhaps Mona's patch, which is awesome and I certainly recommend, has deleted this feature. Please help...

User avatar
Dr.MonaLisa
High Representative
Posts: 8697
Joined: 17 Jun 2010, 11:21
Location: Poland
Has thanked: 49 times
Been thanked: 108 times

Re: Help with Russian City Center Visual

Post by Dr.MonaLisa »

Please use Developers Version of UP1.5 for modding: https://ee2.eu/patch/developers

The "Normal" version has changed files structure, and if you can't learn the new one, then it's better to mod on game in unchanged form.
You can learn about the differences between the Developers Version and the Normal one by reading this topic: viewtopic.php?f=7&t=5133
Best regards,
Dr.MonaLisa
Ministry of Game Affairs
Department of Control and Complains
brownsfan_95
Posts: 18
Joined: 31 Jan 2019, 03:06
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by brownsfan_95 »

Gonzalo,
We know the game did something similar to what you want with the 1.20 patch. In that patch, they changed the visual for the heavy infantry 1, epoch 11 (rifleman), for only the Turkish civ while leaving the other two middle eastern civs riflemen alone.They also did this for the mortar and machine gunner. Below is what ithey added to the "db\Units\heavy_infantry1.ddf" file:

Code: Select all

//------------------------------------------------
//	EPOCH 11
//------------------------------------------------

UnitModel	HeavyInfantry1_11
{
	Parent		= BaseHuman
	DefaultModel 	= lhi11_rifleman.nif
	ChildNames 	= [ UnitShadow Beam_Tracer01 Muzzle_Rifleman ]
	States 		= [
		{	StateName = Idle	AnimName = sh_rifleman_idle01.KF	  
                              AnimVariants = [ sh_rifleman_idle02.KF 
						sh_rifleman_idle03.KF
                                                 sh_rifleman_season01.KF ]
                              AnimVariantsWeights = [ 0.1 0.1 0.1 ]
                 }
		{              StateName = UnpackedIdle  AnimName = sh_rifleman_unpackidle01.KF   }
                                { 	StateName = Walk	AnimName = sh_rifleman_walk01.KF
		}
		{ 	StateName = Run	AnimName = sh_rifleman_jog01.KF
		}
		{ 	StateName = Attack1	AnimName = sh_rifleman_attack02.KF 
			TextKeys = [
					{ Name = PLAY_SOUND Data = fx_rifle_fire KeyTime = 0.16 }
					] }
		// The capture related standing & shooting
		{ 	StateName = CaptureAttack1	AnimName = sh_rifleman_capture_bomb01.KF }
		// The capture specific animations
		{ 	StateName = CaptureAttack2	AnimName = sh_rifleman_capture01.KF
										AnimVariants = [ sh_rifleman_capture02.KF ]
										AnimVariantsWeights = [ 1.0	] }
		{ 	StateName = Pack	AnimName = sh_rifleman_pack02.KF  }
		{ 	StateName = Unpack	AnimName = sh_rifleman_unpack02.KF  }
                                { 	StateName = Death	           AnimName = sh_rifleman_unpackdeath01.KF  }  
                                {              StateName = PackedDeath  AnimName = sh_rifleman_death02.KF   }      
			]
	UIRenderingParams {
		xOffset = 0.01
		yOffset = -0.13
		zOffset = -6.12
		scale = 2.43
	}
}

UnitModel	HeavyInfantry1_11_Turkish
{
	Parent		= HeavyInfantry1_11
	DefaultModel 	= lhi11_rifleman_turkish.nif
} 
That last part there is how i think they added it. I've tried it with the Russian City Center in "EE2X_db\EE2X_db\Units\city_center.ddf" but it didn't work.

Code: Select all

//------------------------------------------------
//	CITY CENTER - EPOCH 7
//------------------------------------------------
UnitModel CityCenter_7
{
	Parent		= BaseBuilding
	DefaultModel 	= bld_citycenter7.NIF
	ChildNames 	= [ UnderCityCenter HugeGlow ExplSelectorBuild_Medium CityNameText ExplPartsCityCenter7 ]
	UIRenderingParams {
		xOffset = 2.63
		yOffset = 1.11
		zOffset = -0.43
		scale = 1.79
		angle = 42.63
		rotationSpeed = 0.00
		pitch = 32.63
		lightAngle = 30.00
		lightPitch = 90.00
		lightDiffuse = [50 50 45 255]
		lightSpecular = [0 0 0 255]
		lightAmbient = [40 40 40 255]
	}
}

UnitModel CityCenter_7_Russian
{
	Parent		= BaseBuilding
	DefaultModel 	= bld_citycenter10_ru.NIF
}
There must be some other directory when each region gets assigned its region specific unit visuals, but I can't find it. I've tried reverse engineering the 1.20 patch file but still nothing.
Sat42
Posts: 129
Joined: 03 Dec 2018, 18:01
Has thanked: 6 times
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by Sat42 »

@brownsfan_95 and @Gonzalo:

What you are trying to accomplish is of great interest to me! Please share your findings (if any), I will be most grateful. In the immediate term I am not going to try and do this, but after a couple or so ("easy") scenarios I will be needing a solution to accomplish this (in 1.5 "normal").

@brownsfan_95 it seems that you can already do this change of models for units with that code you displayed: does it work in 1.5?

Cheers
brownsfan_95
Posts: 18
Joined: 31 Jan 2019, 03:06
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by brownsfan_95 »

Sat42

No, i could never get it to work and i don't understand why. I tried it with some of RGV1's units from his EE4 mod but it wouldn't work. There has to be some other directory i am missing...
brownsfan_95
Posts: 18
Joined: 31 Jan 2019, 03:06
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by brownsfan_95 »

Some related progress on this. I have found that all buildings (and probably units) in the game can have there visual changed based on the region. All you have to do is make the filename of the .nif of the building match a specific format.

For example, if i wanted all Barracks built by African civs in 1-4 to use the model of the ikhanda from EE4, simply rename that nif from ikhanda.nif to bld_barracks1_af.nif and place in one of the graphics folders, i use C:\Program Files (x86)\Sierra\Empire Earth II\zips\graphics_150. From there the game will automatically use bld_barracks1_af.nif in place of the basic bld_barracks1.nif for African region civilizations.

The tags are:
af - African
fe - Far Eastern
we - Western
me - Middle Eastern
am - Mesoamerican

I have two other .nif building models i have also used in the same way, a market for the Far Eastern and a a mill/worshop/factory for the African. They are with the attachments.

Now to figure out how to add more buildings... I attached a model of a Mesoamerican warehouse for epochs 8-11-ish from Civ4 mods but i do not know how to make it compatible. Probably a different topic...
EE2_ScreenShot1.jpg
EE2_ScreenShot1.jpg (251.46 KiB) Viewed 1782 times
Attachments
bld_warehouse7_am.nif
Does not work in EE2/EE2x
(116.67 KiB) Downloaded 131 times
EE2_ScreenShot0.jpg
EE2_ScreenShot0.jpg (264.54 KiB) Viewed 1782 times
bld_market5_fe.nifcache
(15.22 KiB) Downloaded 133 times
bld_mill12_af.nifcache
(100.22 KiB) Downloaded 138 times
bld_barracks1_af.nifcache
(42.89 KiB) Downloaded 146 times
These users thanked the author brownsfan_95 for the post:
PaulStretch
brownsfan_95
Posts: 18
Joined: 31 Jan 2019, 03:06
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by brownsfan_95 »

Textures.zip
(558.19 KiB) Downloaded 145 times
Textures.zip
(558.19 KiB) Downloaded 145 times
Sorry, forgot to add texture
Sat42
Posts: 129
Joined: 03 Dec 2018, 18:01
Has thanked: 6 times
Been thanked: 1 time

Re: Help with Russian City Center Visual

Post by Sat42 »

brownsfan_95 wrote: 17 Jun 2020, 18:07 Some related progress on this. I have found that all buildings (and probably units) in the game can have there visual changed based on the region. All you have to do is make the filename of the .nif of the building match a specific format.

For example, if i wanted all Barracks built by African civs in 1-4 to use the model of the ikhanda from EE4, simply rename that nif from ikhanda.nif to bld_barracks1_af.nif and place in one of the graphics folders, i use C:\Program Files (x86)\Sierra\Empire Earth II\zips\graphics_150. From there the game will automatically use bld_barracks1_af.nif in place of the basic bld_barracks1.nif for African region civilizations.

The tags are:
af - African
fe - Far Eastern
we - Western
me - Middle Eastern
am - Mesoamerican

(...)
Hi brownsfan_95,

Awesome post! Thank you for sharing your discovery!!
Maybe that is how the official developers did it for the Russian campaign town centre?
I suppose this technique also works for the Developers' Version of patch 1.5.
The more this kind of info comes to light, the easier it gets for me to imagine how to implement my scenario ideas, and the smoother the creation process becomes!
Cheers and please do continue sharing your findings, we may not be a huge crowd but there is still interest! :D
Post Reply

Return to “Questions”