Example mods that only change leader art?

downy

Chieftain
Joined
Feb 7, 2023
Messages
2
I just want to gender swap the male leaders by changing their diplomacy screen and icon art.

Attached is what I have so far, for Montezuma.

This should be incredibly simple to do, but I can't find any example or clearly written guide on how to do it.
 

Attachments

  • ICON_LEADER_BISHOUJO_MONTEZUMA_256.png
    ICON_LEADER_BISHOUJO_MONTEZUMA_256.png
    105.3 KB · Views: 17
  • leader_bishoujo_montezuma.png
    leader_bishoujo_montezuma.png
    853.1 KB · Views: 17
It says in this post that you just can't do mods that modify an existing civ:

Is that true? You'd have to recreate the original from scratch, including figuring out how to code their traits and units, just reusing the art for their unique units or buildings? If so, that would explain why nobody seems to modify existing civs or reuse existing uniques.

I found one mod, though, that just replaces the diplomacy screen background for Teddy Roosevelt. If you can do that, shouldn't you be able to replace leader art? Only problem is, the workshop file is uneditable BLP format, so I can't use that mod as the basis for a new one. The creators are on here, Sailor Cat and SeelingCat, so maybe I could just ask them how it was done: https://steamcommunity.com/sharedfiles/filedetails/?id=2553066993

I don't know if I want to learn everything there is to know about modding, just to do a gender swap. Would anyone who already knows this stuff want to collaborate on a Mega Gender Swap Pack? I've got a lot of art for it already: https://imgur.com/a/IJmSagB
 
It says in this post that you just can't do mods that modify an existing civ:

Is that true? You'd have to recreate the original from scratch, including figuring out how to code their traits and units, just reusing the art for their unique units or buildings? If so, that would explain why nobody seems to modify existing civs or reuse existing uniques.
That isn't what that post (by me) says/intends to say.

The specific context in which I was providing that advice was for somebody that was looking to create new civilizations/leaders but that were based on existing civilizations/leaders. In that scenario, you effectively have to make a duplicate so that both can exist side-by-side.

It is perfectly possible to modify existing database content and also the art representation of that content.

As a simple principle: for database content (gameplay code, etc), you would use a REPLACE methodology to alter things (or, perhaps, a combination of DELETE and INSERT if, for example, you wanted to remove an existing leader's assigned item and give them something else that already exists instead).

For art representation, it depends on what art as to where the replacement is done.

For icons (by which I mean anything that is held within the IconDefinitions section of the database) and User Interface textures, you package your new icons/textures as part of your mod and use a REPLACE methodology via the database.

For most other types of art - which includes the static diplomacy screen view, animated diplomacy screen view, 3D assets that appear in-game on the map, 2D assets that appear in the Strategic View - you define art via the Art Definition (ArtDef) files. In these cases, the way the overwrite works is to match the naming convention that the base-game/DLC files use - this way, the contents of your mod replaces whatever is previously defined.

To be a bit more specific, using your example. The static image and 3D animated leader that appear in the diplomacy screens are defined in two different ArtDef files. Those two ArtDef files reference different source artwork, naturally. The static image is a Texture of the class "Fallback_Leader" (or "Leader_Fallback" - I can never remember which way around it is). The 3D animated leader is an Asset (.ast) of the class "Leader" which is how the final, composed leader model is wrapped up in Asset Editor, referencing all of the relevant Geometries, Materials and Animations.

The static image is referenced within an ArtDef file of the class 'FallbackLeaders', whilst the 3D animated leader is referenced within an ArtDef file of the class 'Leaders'. Neither file has much to it, as it pretty much just holds these references (there are perhaps 1-2 other things, but inconsequential overall).

Replacing these, as cited further up in this reply, is a case of creating equivalent ArtDef files as part of your mod and matching the naming structure that the originals have. Doing this, your mod will overwrite those entries and the outcome is that you replace the diplomacy screen leader art.

If you do not intend to create a 3D animated replacement (which most do not), how you go about stopping the original from being displayed when a user has animated leaders enabled, I am less sure. When creating a mod, simply not defining the animated version is enough to force the static version to always be used - but in this scenario, the game defines the animated version already, so there may need to some forcible overwrite done that 'blanks out' the entry. It should be possible, but I've never done it so wouldn't want to present a guaranteed capability around that.
 
Top Bottom