# Define the Name of this Building Set # Think of this as the "Map Name" in your lobby settings. RuleSetName:string = "MyProceduralFort" # The Main Setup Function # This is called when the game starts or the building is generated. # PT (Piece Type) is like the "Gallery" you pick from. SetupRules(PT:piece_type_dir):void= { # --------------------------------------------------------- # RULES FOR ONE FLOOR # This is the core logic for a single story of your building. # --------------------------------------------------------- FloorRules := vo_cornerwallsplit: { # 1. Define the Corners (The Anchors) # Like placing Spawn Points at the edges of your zone. VO_CornerLength1 := vo_corner: { VO_Corner := vo_prop: { # Assign the Corner Prop from your Gallery # This is like picking a specific wall piece from your Quick Bar. Prop := PT.Building1_corner } } # 2. Define the Walls/Faces (The Fillers) # These connect the corners. VO_Face := vo_prop: { # Assign the Face/Prop piece Prop := PT.Building1_face } # 3. Define the Covered Space (The Roof/Floor Surface) # This is the actual playable area. VO_Covered := vo_prop: { # Assign the Box/Tile piece Prop := PT.Building1_box } # 4. Define the Wall Structure # This handles the vertical walls between floors. VO_Wall := vo_wall: { # Check width and coverage to ensure walls align properly. VO_Width1 := vo_facecoveragecheck_1voxel: { # Ensure the space is clear before placing VO_Clear := vo_prop: { Prop := PT.Building1_face } # Ensure the covered space is accounted for VO_Covered := vo_prop: { Prop := PT.Building1_box } } } # 5. Define the Center/Roof Check # This handles the middle of the floor or the roof tile. VO_Centre := RoofTileCheck: { # This could be a specific tile type for the center } # 6. Define the Floor Split Logic # This ties everything together into a single "Floor" entity. set VO_Root = vo_floorsplit: { # The height of this floor is determined by FloorRules VO_FloorHeight1 := FloorRules } } }