Making a permit delivering... ennemies !

Started by Cluric, June 10, 2024, 10:57:47 AM

Previous topic - Next topic

Cluric

Hello there !

(sorry for the poor english).

I'm currently working on some Royal Permit mod adding a bit of... fun to my games. I've search a lot in the workshop and found no similar purpose mod : a permit generating chaos with "hostile to all" "reinforcements".
What fun it could be if you're submerged by a horde of tribal, to call in some spacer ennemies in the middle of them ! Hopefully the tribal problem will be solved soon and you'll have a Spacer Problem instead ! How fun !

Looking at some basic vanilla permit, I intend to modify them in a mod for that purpose. Here is an example :

<RoyalTitlePermitDef>
<defName>CallMilitaryAidGrand</defName>
<label>call cataphract squad</label>
<description>Call a group of 4 heavy cataphracts</description>
<workerClass>RoyalTitlePermitWorker_CallAid</workerClass>
<minTitle>Count</minTitle>
<faction>Empire</faction>
[...truncated]
<royalAid>
<pawnCount>4</pawnCount>
<pawnKindDef>Empire_Fighter_Cataphract</pawnKindDef>
[...truncated]
</royalAid>
</RoyalTitlePermitDef>

I am especially interested in the lines
"<faction>Empire</faction>"
and "<pawnKindDef>Empire_Fighter_Cataphract</pawnKindDef>"

I've already some <PawnKind> of my own in a custom <Faction> so I though I'd use them instead.
So from my understanding, an EMPIRE permit raid should allow me to define some non-imperial faction "help" if I provide the proper variables.

However I doesnt work that easily  :-\

Here is what i've tried :
- if my <PawnKind> is hostile, the permit works, but they spawn as allied empire
- if I use a <Faction> of mine, or even an hostile vanilla one (Mechanoid and Pirate), the Permit just doesnt appear in the UI.

In debug I've got no perticular warning or error about the permit in both cases.
If I change back the faction back to "Empire", the permit works again (except allied troops).

I can still use my mod as if right now, but it's only half the fun I intended.
Mayber I should work arount the "RoyalTitlePermitWorker_CallAid" <workclass> too, but i'm not really sure of how this one works.


Anyone has an idea how to make it works ?
Some way around or something i'm missing ?

Any help would be appreciated. Thanks anyway for you time !

Cluric