Revision Difference
Tilesets-Group-Proxy#552492
<cat>Hammer.Advanced</cat>
<title>Tilesets-Proxies</title>
<warning>
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 <page>Tilesets</page> page and the <page>Tilesets-Advanced</page> page.
</warning>
# 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
<validate> TBD </validate>
# 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.⤶
<upload src="aaf9e/8dbdf290ecf97c6.png" size="331286" name="image.png" />⤶
⤶
2. 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⤶
⤶
⤶
3. Once you have all your objects placed, select all of them in object mode and group them (<key>Ctrl</key> + <key>G</key>). Then give them a unquiet name.⤶
<upload src="aaf9e/8dbdf29fde8af7c.png" size="631168" name="image.png" />⤶
⤶
4. With the group selected in the outliner, Select Tiles -> Create Group Proxy.⤶
⤶
5. This should place a blue question mark somewhere near the group.⤶
<upload src="aaf9e/8dbdf2a4bb7c000.png" size="793338" name="image.png" />⤶
⤶
6. Move this proxy to the tile⤶
⤶
7. In the outline make the proxy a child of the tile you want to place it in⤶
<upload src="aaf9e/8dbdf2a90d5eec5.png" size="371834" name="image.png" />⤶
⤶
8. In the proxy's object properties change the _"TargetGroup"_ to the group we made ealier. (In my case this is "Trees")⤶
<upload src="aaf9e/8dbdf2ac31fcf5d.png" size="17457" name="image.png" />⤶
⤶
9. 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 )⤶
<upload src="aaf9e/8dbdf2b1c889695.png" size="701819" name="image.png" />⤶
⤶
10. Once all that is done you can create your tile mesh and start using the tile set.⤶
<upload src="aaf9e/8dbdf2bbfa9b090.png" size="735057" name="image.png" />⤶
⤶
<note>⤶
Because we dont care about how the tiles connect in this set, we didnt need to add any mesh properties⤶
</note>⤶
⤶
⤶
## 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"⤶
<upload src="aaf9e/8dbdf3025cfa9d5.png" size="52375" name="image.png" />⤶
<note>⤶
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. ⤶
</note>⤶
⤶
4. Select the Proxy object, and check "Conditional" Property.⤶
⤶
5. When you checked that the mesh property you applied to proxies in step 3 should have appeared.⤶
⤶
6. Set up the proxy conditions the same way you would a tile. ⤶
⤶
7. Now the Proxy will only appear when the condition is met.⤶
<upload src="aaf9e/8dbdf31eeff7580.png" size="504376" name="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
⤶
# Weighted Proxies
<validate> TBD </validate>