ModbaseOffsets: Difference between revisions
m →Example |
m Added example image with all settings for Sheep Farm |
||
| Line 143: | Line 143: | ||
|} | |} | ||
[[File:BuildingFootprint 23 PaperMill.PNG|256px|PaperMill_FP]] | [[File:BuildingFootprint 23 PaperMill.PNG|256px|PaperMill_FP]] | ||
<br> | |||
=Example 2= | |||
Here is a visual of how all of the BaseOffsets would be listed in the json file for the Sheep Farm. See [[ModsBuildingOutlinesAndFunctions|BuildingOutlines]] to understand how the options are set for each tile. Note: In this image, yellow is used instead of the white lines on the BuildingsOutlines page.<br> | |||
[[File:BuildingFootprint 21 SheepFarm.PNG|256px|SheepFarmFootprint]]<br> | |||
[[File: Sheepfarm tile example.png||SheepfarmTileExamplewithBaseOffSets]] | |||
Latest revision as of 20:00, 27 June 2023
The `baseOffsets` section of the json file is used in buildings, structures, and flora to define the number and position of tiles associated with each item. Under `baseOffsets` is a list for each tile and the options for that tile. It repeats for each tile defined.
JSON
Table of baseOffsets:
| Value | Type | Description | Example/Link |
|---|---|---|---|
| type | integer | defines as 'baseOffsets' | 0 |
| coord | Name-Value pairs | X and Y coordinates of tile | "coord": {"x": -1,"y": 2} |
| requirements | array | tile requirements | see link ModbaseOffsetsRequirements |
| isOccupy | boolean | tile will count as player occupied? | true / CowFarm, Harbour, LargeHarbour, ShaftMine, SheepFarm, TrainStation |
| isOwnedTerritoryRequired | boolean | tile must be within player territory | true |
| structureToCreate | integer | structure to create | 255 or StructureModIds |
| layerTypeToCreate | integer | layer to create - can adjust bot height/pathing | 255 or 3 |
| customLayerHeights | array | allows slope of tile: height of TopLeft, TopRight, BottomLeft, BottomRight | null OR [ 0,-3, 0,-3] |
| autoAdjustType | integer | adjust tile. Default, None, Only Up, Only Down, Flatten | from : 0,1,2,3,4 |
| isPassable | boolean | bots may path through the tile | true |
| sidesToAdjust | array | side(s) to adjust height to adjacent tile | [] OR [{"x": -1,"y": 0},{"x": 1,"y": 0}] |
| heightOffset | integer | adjust height of tile from "0" | see Boatyard, TrainStation, ColonyShip, ShaftMine, Well |
| isBypassVerify | boolean | ask CodeByFire?? | see List of buildings with isBypassVerify=True |
| trackDirections | array | Obsolete? | |
| inaccessibleDirections | array | sides of tile that bot may not access | [] OR [{"x": 0,"y": 1},{"x": 1,"y": 0}] |
| doesNeedUnoccupied | boolean | Tile needs to be occupied? | See ShaftMine |
| showFootprintHighlight | boolean | Highlight tile footprint when placing/deleting | See ShaftMine 1,3 and 1,4 |
| heightLeeway | integer | Clearance needed over tile for Elevated Rails | -1, 6, 10, 12, 16, 24, 34 |
Example 1
Here is a visual of how the X,Y coordinates would be listed in the json file for the Paper Mill. Note that "coord" do not have to listed in a logical order (e.g. all the X=0 positioned follow by the X=1, etc.). Paying attention to the specific X,Y coordinates and the associated options is important. The (E) is the entrance to the building in this example. See BuildingOutlines to understand how the options are set for each tile..
| X,Y | X,Y | X,Y | X,Y | X,Y | X,Y |
|---|---|---|---|---|---|
| -2,3 | -1,3 | 0,3 | 1,3 | 2,3 | 3,3 |
| -2,2 | -1,2 | 0,2 | 1,2 | 2,2 | 3,2 |
| -2,1 | -1,1 | 0,1 | 1,1 | 2,1 | 3,1 |
| -2,0 | -1,0 | 0,0 | 1,0 | 2,0 | 3,0 |
| (E) |
Example 2
Here is a visual of how all of the BaseOffsets would be listed in the json file for the Sheep Farm. See BuildingOutlines to understand how the options are set for each tile. Note: In this image, yellow is used instead of the white lines on the BuildingsOutlines page.