Jump to content

Modding: Can't disable TerritoryDecay on neutral land without removing the TerritoryInfluence field


MirceaKitsune
 Share

Recommended Posts

While playing around with modding I found what must be a bug in the engine... or perhaps just functionality I don't understand, but I'd rather have it clarified just in case.

I'm trying to make some buildings possible to place anywhere (both own and neutral territory) but only decay in enemy territory (not neutral). So I set <BuildRestrictions><Territory>own neutral</Territory></BuildRestrictions> with <TerritoryDecay><Territory>enemy</Territory></TerritoryDecay> but there's a problem: I must also remove <TerritoryInfluence></TerritoryInfluence> otherwise the building will still decay and fall to Gaia.

It's worth noting that if I set <TerritoryDecay disable=""/> instead, the building will no longer decay even with the TerritoryInfluence field left there. The two only seem to conflict if I want to have decay but only for enemy and potentially ally territory.

Is there a reason why you can't disable territory decay on neutral ground without also disabling territory influence? Why does the later cancel out the settings of the former?

Link to comment
Share on other sites

1 hour ago, Freagarach said:

Have you checked the template of the outpost? That seems to do exactly what you want?

Yes, it's how I found this inconsistency. The outpost has a customized TerritoryDecay but lacks the TerritoryInfluence: That makes sense in its case... for the Storehouse and Farmstead however, which I'll allow building anywhere for my mod, I would have liked disabling decay but still allowing the territory influence.

Technically I could disable decay entirely and leave the influence instead, but then an attacker will have to capture farmsteads / storehouses manually even in their own territory which is kind of illogical. So for now I commented out the influence paragraph in the XML and the buildings do indeed work like the outpost, if it doesn't break anything important I can go with this functionality for the mod in the end.

Edited by MirceaKitsune
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...