VisualRemaps - Visuals for Custom Units

The_goggles_do_nothing

King
Supporter
Joined
Oct 26, 2021
Messages
758
Thanks to @izica . I learned this from his Scythia mod.

modinfo

Code:
        <ActionGroup id="age-exploration-current-swiss-confederacy" scope="game" criteria="exploration-age-current">
                <UpdateVisualRemaps>
                    <Item>data/visual-remap.xml</Item>
                </UpdateVisualRemaps>
            </Actions>
        </ActionGroup>

visual-remap.xml


Code:
<?xml version="1.0" encoding="UTF-8"?>
<Database>
    <VisualRemaps>
    <!-- subei -->
        <Row>
            <ID>REMAP_UNIT_PIKE_SQUARE</ID>
            <DisplayName>LOC_UNIT_PIKE_SQUARE_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_PIKE_SQUARE</From>
            <To>UNIT_MAN_AT_ARMS</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_PIKE_SQUARE_2</ID>
            <DisplayName>LOC_UNIT_PIKE_SQUARE_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_PIKE_SQUARE_2</From>
            <To>UNIT_PIKEMAN</To>
        </Row>
        <!-- AMTSBURGERMEISTER -->
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_JOHANN_CONRAD_FISCHER</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_JOHANN_CONRAD_FISCHER_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_JOHANN_CONRAD_FISCHER</From>
            <To>UNIT_CONQUISTADOR_FERDINAND_MAGELLAN</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_JOACHIM_VADIAN</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_JOACHIM_VADIAN_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_JOACHIM_VADIAN</From>
            <To>UNIT_CONQUISTADOR_FRANCISCO_PIZARRO</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_WILHELM_HERTER_VON_HERTNECK</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_WILHELM_HERTER_VON_HERTNECK_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_WILHELM_HERTER_VON_HERTNECK</From>
            <To>UNIT_CONQUISTADOR_JUAN_PONCE_DE_LEON</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_MARX_ROIST</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_JOACHIM_VADIAN_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_MARX_ROIST</From>
            <To>UNIT_CONQUISTADOR_CHRISTOPHER_COLUMBUS</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_ELISABTH_OF_WETZIKON</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_ELISABTH_OF_WETZIKON_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_ELISABTH_OF_WETZIKON</From>
            <To>UNIT_ALIM_RABIA</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_AMTSBURGERMEISTER_HULDRYCH_ZEINGLI</ID>
            <DisplayName>LOC_UNIT_AMTSBURGERMEISTER_HULDRYCH_ZEINGLI_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_AMTSBURGERMEISTER_HULDRYCH_ZEINGLI</From>
            <To>UNIT_CONQUISTADOR_HERNAN_CORTES</To>
        </Row>
  
          <Row>
            <ID>REMAP_UNIT_LEHRBEAUFTRAGTER_LEONHARD_EULER</ID>
            <DisplayName>LOC_UNIT_LEHRBEAUFTRAGTER_LEONHARD_EULER_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_LEHRBEAUFTRAGTER_LEONHARD_EULER</From>
            <To>UNIT_CONQUISTADOR_HERNANDO_DE_SOTO</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_LEHRBEAUFTRAGTER_DANIEL_BERNOULLI</ID>
            <DisplayName>LOC_UNIT_LEHRBEAUFTRAGTER_DANIEL_BERNOULLI_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_LEHRBEAUFTRAGTER_DANIEL_BERNOULLI</From>
            <To>UNIT_CONQUISTADOR_FRANCISCO_DE_ORELLANA</To>
        </Row>
        <Row>
            <ID>REMAP_UNIT_LEHRBEAUFTRAGTER_PARACELSUS</ID>
            <DisplayName>LOC_UNIT_LEHRBEAUFTRAGTER_PARACELSUS_NAME</DisplayName>
            <Kind>UNIT</Kind>
            <From>UNIT_LEHRBEAUFTRAGTER_PARACELSUS</From>
            <To>UNIT_CONQUISTADOR_ALVAR_NUNEZ_CABEZA_DE_VACA</To>
        </Row>
        
    </VisualRemaps>
</Database>
<!-- generated with https://github.com/izica/civ7-modding-tools -->
 
Is the ID used for something ? ie is it triggered by a modifier for example, or is it a replacement for the whole age/game ?
 
Is the ID used for something ? ie is it triggered by a modifier for example, or is it a replacement for the whole age/game ?
I don't think so, adding the two sections above is all I did. I would assume the ID need to be unique but I didn't test that. I did try it with buildings and kind=CONSTRUCTABLE and nothing happened.
 
It doesn't seem to work with constructibles. I think we see that visual remaps are often used for units, but never for buildings so perhaps it's not implemented in the engine.
 
You can take a building from an earlier, but not later age and just assign it all the modifiers of your custom building. This might give a player your building's bonuses if they built it last age. You cannot do this with civ unique buildings, I think because they belong to quarters, and the game does not let you modify existing quarters.

I'm also struggling to swap out the building icon, but that might just be a problem on my side.

There's one other bug which is that if a building is in progress in a full district, and you swap to build your age-migrated building it won't overbuild or change out properly. So, because of this you can stack many buildings in one quarter. It might have to do with the overbuilding parameters, but I don't know if this can be changed.

For instance I have a "theater" building for the exploration age and I'm using the antiquity arena model. So I change all its modifiers including its age. It basically works, but like I said there's a bug probably having to do with overbuilding. I wonder if the engine is keeping track of a building's age for graphical purposes. While you can give the game permission to build an antiquity building in exploration, the graphical engine might not be prepared for this.
 
This trick also works for wonders. Again, it has to be the same or an earlier age because the later ages aren't loaded into the database yet. Obviously, using a same age wonder removes it from the age, and to use a past age wonder you might want to increase the number of allowed constructibles from 1 to 2. It's far from perfect, but at least you aren't building the default Pyramids each time.

I still am not sure how to modify the icons of base game buildings. I can't tell if the database values are locked, or the game loads them in from files later than the mod files (doesn't seem correct).
 
Back
Top Bottom