Modify flags

Hey!
How do I modify a flag on a unit WITHOUT using a proto mods file? Not because I don’t know.
I didn’t find a trigger. Maybe with a tech? But with a quick look, I didn’t find an effect that could allow me to modify a flag.

I’m not sure how to do that, but I think I have a clue: in the techtreey.xml look for “ProtoUnitFlag”, for example:

  <tech name="DEChasquiHCDropoff" type="Normal">
    <dbid>6676</dbid>
    <researchpoints>0.0000</researchpoints>
    <status>UNOBTAINABLE</status>
    <flag>Shadow</flag>
    <effects>
      <effect type="CommandAdd" command="SetUnitAsHomeCityGatherPointEconomic" page="0" column="10">
        <target type="ProtoUnit">deChasqui</target>
      </effect>
      <effect type="Data" amount="1.00" subtype="SetUnitType" unittype="HCGatherPointPri3" relativity="Assign">
        <target type="ProtoUnit">deChasqui</target>
      </effect>
      <effect type="Data" amount="1.00" subtype="ProtoUnitFlag" flagid="206" relativity="Assign">
        <target type="ProtoUnit">deChasqui</target>
      </effect>
    </effects>
  </tech>

  <tech name="deUnknownNoWallsEcoRegen" type="Normal">
    <dbid>10191</dbid>
    <status>UNOBTAINABLE</status>
    <flag>Shadow</flag>
    <effects>
      <effect type="Data" amount="0.00" subtype="Enable" relativity="Absolute">
        <target type="ProtoUnit">AbstractWall</target>
      </effect>
      <effect type="Data" amount="0.25" subtype="UnitRegenRate" relativity="Assign">
        <target type="ProtoUnit">ColonyBuilding</target>
      </effect>
      <effect type="Data" amount="0.00" subtype="ProtoUnitFlag" flagid="233" relativity="Assign">
        <target type="ProtoUnit">ColonyBuilding</target>
      </effect>
    </effects>
  </tech>

(The first example is to add a flag and the second is to remove a flag)

If I am understanding correctly, the problem is that in order to add or remove a flag, a list of each flagid would be needed, in order to know which flagid number corresponds to each flag, but I don’t know where to get that.

2 Likes

This is a great clue. Too bad we don’t know the flagid’s, hhaa

Thanks!

Edit: this may be it

This one is the same, but for some reason it triggers a risk warning
https://test.aoebbs.net/forum.php?mod=viewthread&action=printable&tid=1525&forcemobile=1

AlistairJah provided me a google docs file link for legacy but the forum censors it

1 Like

Here is the link →

No clue why it doesnt censore it for me?

2 Likes

Because you are a mod maybe?

I wanted to create a new post instead of editing the former post
I added a new tech succesfully. I tested adding like 5000 HP to a unit and it worked.
The thing is that I also set to 1 the id in Legacy that corresponds to NotDeletable and the unit was deletable. Fine, it may have changed for DE. I set to 0 the id that corresponded to NotShowOnMinimap in DE, according to the people from aoebbs and it didn’t work, too.

I’m out of luck, it seems.