S&box Wiki

Tilesets-Proxies

This page assumes you have solid foundation on how Tile Sets work. This page assumes familiarity with setting properties and building Tile Mesh's.

If you are not already familiar with Tile Sets check the Tilesets page and the Tilesets-Advanced page.

Proxies

A Proxy is a special tile object that uses another group as a reference for what and where to put in the tile.

There are three different types of proxies: Tile Proxies, Group Proxies, Weighted Proxies.


Tile Proxies

TBD

Group Proxies

a Group Proxy is one of the simplest proxies to start working with. All this proxy does is take a reference group, and place a random object from that group in place of the proxy when the tile is placed.

Lets make a very basic forest that places random trees on each tile.

  1. create a Tile Set containing and Tile with a simple rectangle in it.
image.png
  1. Find a few variations of trees from asset party and place them somewhere in the world. I will be using the 4 provided in the "S&box assets" collection from Facepunch

  2. Once you have all your objects placed, select all of them in object mode and group them (ctrl + g). Then give them a unquiet name.

image.png
  1. With the group selected in the outliner, Select Tiles -> Create Group Proxy.

  2. This should place a blue question mark somewhere near the group.

image.png
  1. Move this proxy to the tile

  2. In the outline make the proxy a child of the tile you want to place it in

image.png
  1. In the proxy's object properties change the "TargetGroup" to the group we made ealier. (In my case this is "Trees")
image.png
  1. Now that we have the proxy's reference group set we can now check "Show Preview" and it will display a random object from that group. ( I will cover the rest of the properties at the end )
image.png
  1. Once all that is done you can create your tile mesh and start using the tile set.
image.png
Because we dont care about how the tiles connect in this set, we didnt need to add any mesh properties

Group Proxy Properties

Property Description
Proxy Name Use Given Name
Show Preview Shows Preview of one of the options from the group
Probability The probability this proxy places anything at all
Allow Deformation
Always Orient Up
Conditional Sets the proxy to only work when properties from the tile set are satisficed
Removeable
TargetGroup The group the proxy will use when getting replace

Setting up Conditionals for Group Proxies

  1. Go to the tile set Object Properties -> Tile Set Properties.

  2. Add or Select the property you want the proxy to use

  3. Under "Apply To" Check "Proxies"

image.png
I am modifying the simple forest tile set from earlier, since this tile set only consists of one tile and I don't care how it connects I can un-check from applying this rule to tiles so I don't have to worry about the rules on the tile side and can just use it for proxy behavior.
  1. Select the Proxy object, and check "Conditional" Property.

  2. When you checked that the mesh property you applied to proxies in step 3 should have appeared.

  3. Set up the proxy conditions the same way you would a tile.

  4. Now the Proxy will only appear when the condition is met.

image.png

In this picture I used "mesh_edge_connectivity" and set all conditions to closed, meaning trees wont spawn along the edge of the tile mesh.


Weighted Proxies

TBD