Custom structure in quests - AndroidQuazar/VanillaExpandedFramework GitHub Wiki
First create a new SitePartDef
, here is an example:
<SitePartDef>
<defName>Wiki_RuinedSite</defName>
<label>ruined site</label>
<description>A ruined site.</description>
<siteTexture>World/WorldObjects/Sites/GenericSite</siteTexture>
<expandingIconTexture>World/QuestIcons/AbandonedFactory</expandingIconTexture>
<handlesWorldObjectTimeoutInspectString>true</handlesWorldObjectTimeoutInspectString>
<tags>
<li>Wiki_RuinedSite</li>
</tags>
</SitePartDef>
Then create a new GenStepDef
.
- You need to add
<linkWithSite>
with the defName/tag of the SitePartDef you created before, or it won't work (see example below). - Use
KCSG.GenStep_CustomStructureGen
as the<genStep>
Class. - There are no limits in the number of
structureLayoutDefs
<structureLayoutDefs>
can accept.
Example:
<GenStepDef>
<defName>Wiki_RuinedSite</defName>
<linkWithSite>Wiki_RuinedSite</linkWithSite>
<order>460</order>
<genStep Class="KCSG.GenStep_CustomStructureGen">
<structureLayoutDefs>
<li>Wiki_Struct1</li>
<li>Wiki_Struct2</li>
<li>Wiki_Struct3</li>
<li>Wiki_Struct4</li>
</structureLayoutDefs>
<!-- Additional options -->
<fullClear>false</fullClear> <!-- Clear any impassable in the way -->
<clearFogInRect>false</clearFogInRect> <!-- Clear fog on the structure -->
<preventBridgeable>false</preventBridgeable> <!-- Prevent lake/river/marsh (bridgeable) -->
</genStep>
</GenStepDef>
There is also an option to run additional resolvers. For example, you can use the premade resolver to ruin your structure randomly (at generation). This is usually better than making ruins yourself, because it means fewer structures to export, and more ruins variety. To enable the option, follow the example below:
<GenStepDef>
[...]
<genStep Class="KCSG.GenStep_CustomStructureGen">
[...]
<!-- Premade resolver, you can add or remove any of
them, and also add custom ones -->
<symbolResolvers>
<li>kcsg_randomdamage</li>
<li>kcsg_randomfilth</li>
<li>kcsg_randomterrainremoval</li>
<li>kcsg_randomroofremoval</li>
<li>kcsg_randomitemremoval</li>
<li>kcsg_removeperishable</li>
<li>kcsg_destroyrefuelablelightsource</li>
<li>kcsg_scatterstuffaround</li>
</symbolResolvers>
<!-- Only if tou use kcsg_randomfilth -->
<filthTypes>
<li>Filth_Dirt</li>
<li>Filth_Trash</li>
<li>Filth_RubbleBuilding</li>
</filthTypes>
<!-- Only if tou use kcsg_scatterstuffaround-->
<scatterThings>
<li>Gold</li>
<li>Silver</li>
</scatterThings>
<scatterChance>0.02</scatterChance>
</genStep>
</GenStepDef>