How to: Disabling Big Button Tech UI on buildings

When setting a civilization to civtype 1 or 2 (Lakota, Hauds, Aztecs, Inca, and the two Warchiefs campaign civs), the UI automatically reserves the final two columns on most buildings for the Big Button Tech. This will probably not come up too often as if you’re using one of those civtypes you’re likely wanting to use Big Button Techs, however it can cause chaos on certain buildings such as the Advanced Arsenal where techs get pushed off into the ether and it becomes detrimental to gameplay.

image

Fixing it is pretty simple and requires adding the DisableBigButtonUI flag to the building’s proto entry, which can be done a few different ways.

Additive modding will let you add the flag to the proto unit.

<protomods>
  <Unit name='Arsenal'>
	<flag>DisableBigButtonUI</flag>
  </Unit>
</protomods>

If you want to disable it for a specific civ, or after a specific tech or card, you can use a ProtoUnitFlag effect to assign flagid 182 to the building. (This is used on the Gun Running Big Button Tech which removes the BigButtonUI from the Native Embassy after it is activated.)

<effect type="Data" amount="1.00" subtype="ProtoUnitFlag" flagid="182" relativity="Assign">
	<target type="ProtoUnit">Arsenal</target>
</effect>

Finally, if there is a situation where you need to make a new copy of a building then don’t forget to add the DisableBigButtonUI flag to its proto entry.

While on the topic at hand, there is also an EnforceBigButtonUI flag, here you can see it added to a Barracks with five units which causes UI chaos. In theory there is probably a flagid for this flag as well so you could selectively enable it, but I don’t know where those are defined so it could be a bit of an endeavor to track that down as there’s potentially at least 240 flagids based on the ones used in techtreey.

image

5 Likes

Thanks for the little tutorial! Helps alot !!

1 Like

Is there a way to change those icons to normal icons?

If you mean make a Big Button Tech into a normal icon, yes indeed. There’s at least two ways you could do it, one would be to make copies of the techs and go through the steps to remove the Big Buttons and replace them with your new versions. The other, likely easier method would be to just additively mod the existing techs.

Let’s say we want Lacrosse to not be a Big Button Tech. The objective is to remove the NativeDance flag. Using additive modding we can do that in our techtreemods.xml by either using a replace command on the entire entry or using a remove command on the flag itself. I know the game scales normal sized icons up into Big Button size, so I have a hunch it’ll work and we shouldn’t need to mess with anything besides the flag.

<tech name='BigWarHutLacrosse'>
    <flag mergeMode="remove">NativeDance</flag>
</tech>

<tech mergeMode="replace" name="BigWarHutLacrosse" type="Normal">
    <dbid>2745</dbid>
    <displaynameid>43614</displaynameid>
    <cost resourcetype="Wood">600.0000</cost>
    <cost resourcetype="Gold">600.0000</cost>
    <researchpoints>10.0000</researchpoints>
    <status>UNOBTAINABLE</status>
    <icon>resources\images\icons\techs\native\Dance2.png</icon>
    <icontexturecoords>.400390625 .3046875 .59765625 .60546875</icontexturecoords>
    <iconwpf>resources\images\icons\techs\native_big_button\native_07.png</iconwpf>
    <rollovertextid>43613</rollovertextid>
    <flag>CountsTowardMilitaryScore</flag>
    <prereqs>
      <techstatus status="Active">Colonialize</techstatus>
    </prereqs>
    <effects>
      <effect type="Data" action="StaggerRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpTomahawk</target>
      </effect>
      <effect type="Data" action="DefendRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpAenna</target>
      </effect>
      <effect type="Data" action="DefendRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpMusketWarrior</target>
      </effect>
      <effect type="Data" action="VolleyRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpAenna</target>
      </effect>
      <effect type="Data" action="StaggerRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpAenna</target>
      </effect>
      <effect type="Data" amount="2.00" subtype="LOS" relativity="Absolute">
        <target type="ProtoUnit">xpAenna</target>
      </effect>
      <effect type="Data" amount="2.00" subtype="LOS" relativity="Absolute">
        <target type="ProtoUnit">xpTomahawk</target>
      </effect>
      <effect type="Data" action="DefendRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpTomahawk</target>
      </effect>
      <effect type="Data" action="VolleyRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpTomahawk</target>
      </effect>
      <effect type="Data" action="VolleyAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpTomahawk</target>
      </effect>
      <effect type="Data" amount="2.00" subtype="LOS" relativity="Absolute">
        <target type="ProtoUnit">xpMusketWarrior</target>
      </effect>
      <effect type="Data" action="StaggerRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpMusketWarrior</target>
      </effect>
      <effect type="Data" action="VolleyRangedAttack" amount="2.00" subtype="MaximumRange" relativity="Absolute">
        <target type="ProtoUnit">xpMusketWarrior</target>
      </effect>
    </effects>
</tech>

I’m worried about the Big Button UI causing trouble, so I’ll be proactive and additively mod the WarHut proto to disable the Big Button UI. The result is as desired, Lacrosse is no longer a Big Button and the game scaled the icon down. If you don’t want the home city shipment icons up there you’d have to additionally tweak those in the WarHut proto entry or by using CommandRemove/CommandAdd in a tech like the civ’s age0 to move them around.
image

3 Likes