Modding:Worlds: Difference between revisions

m
Use hills instead of jungle since RoadNorthMouth / RoadSouthMouth won't really have any effect on the latter
m (Fix typo)
m (Use hills instead of jungle since RoadNorthMouth / RoadSouthMouth won't really have any effect on the latter)
 
Line 101: Line 101:
# (Optional) If you want to make the secret findable while traversing the world map, get the <code>TerrainTravel</code> part on the block of terrain that you popped and add a new <code>EncounterEntry</code> to it.
# (Optional) If you want to make the secret findable while traversing the world map, get the <code>TerrainTravel</code> part on the block of terrain that you popped and add a new <code>EncounterEntry</code> to it.


The code example below demonstrates how we would go through these steps to add a secret creature to a random jungle tile.
The code example below demonstrates how we would go through these steps to add a secret creature to a random hills tile.


<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
Line 116: Line 116:
         public override void OnAfterBuild(JoppaWorldBuilder builder)
         public override void OnAfterBuild(JoppaWorldBuilder builder)
         {
         {
             var location = builder.popMutableLocationOfTerrain("Jungle", centerOnly: false);
             var location = builder.popMutableLocationOfTerrain("Hills", centerOnly: false);
             var zoneID = builder.ZoneIDFromXY("JoppaWorld", location.X, location.Y);
             var zoneID = builder.ZoneIDFromXY("JoppaWorld", location.X, location.Y);