Long Distance Teleport - KonradHeinser/EBSGFramework GitHub Wiki
This is an upgraded version of the farskip code that tries to add far more customization options to the ability while also removing the Royalty hard requirement. For your basic comp you're going to need code that looks similar to the below comp. The three tags included can be customized as desired, though they should still all be present in the final version:
<comps>
<li Class="EBSGFramework.CompProperties_LongDistanceTeleport">
<stunTicks>1~2</stunTicks>
<clamorType>Ability</clamorType>
<clamorRadius>10</clamorRadius>
</li>
</comps>
For your customization tags, you have the below options. It is important to note that if you leave these blank, then the code will try to use the Royalty ones if they are available:
- effecterUsed : The effecter used when the ability is cast. This is the one before teleportation
- maintainedEffect : The effecter maintained for a duration after cast. This is the one after teleportation
- maintainDuration : Default (60) : dictates the duration of the maintainedEffect
- soundPlayed : Sound played after ability is cast before teleportation
- exitSound : Sound played after teleportation
The below customization tags will alter how the teleport itself functions:
- maxDistance : The maximum distance away from the caster's position that they can teleport
- requireAllyAtDestination : Default (False) : Tries to find an ally at the map. If you want this to be true then the ability will try to act similar to farskip
- bringCorpses : Default (False) : Honestly not sure if anyone would want this, but in theory this will cause the ability to bring valid corpses with the caster. The corpses should follow all the other parameters without issue
- onlyAllies : Default (True) : Only pawns within the caster's faction will be transferred
Adapted example from Superhero Genes. Nothing of note is within the parent:
<AbilityDef ParentName="SHGPowerAbilitiesBase">
<defName>SHG_Gate</defName>
<label>open gate</label>
<description>Teleport yourself and everyone within 10 tiles to a distant location that has at least one colonist.</description>
<iconPath>Powers/Gene_Gate</iconPath>
<hotKey>Misc12</hotKey>
<targetWorldCell>True</targetWorldCell>
<showGizmoOnWorldView>True</showGizmoOnWorldView>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<hostile>false</hostile>
<jobDef Inherit="False" />
<statBases>
<Ability_EffectRadius>10</Ability_EffectRadius>
</statBases>
<verbProperties>
<range>10</range>
<drawAimPie>False</drawAimPie>
<requireLineOfSight>False</requireLineOfSight>
</verbProperties>
<comps>
<li Class="EBSGFramework.CompProperties_LongDistanceTeleport">
<stunTicks>1~2</stunTicks>
<clamorType>Ability</clamorType>
<clamorRadius>10</clamorRadius>
<requireAllyAtDestination>False</requireAllyAtDestination>
</li>
</comps>
</AbilityDef>