Skip to content

Commit

Permalink
Move (needs testing) label in linearzones.md. Add "ffa" to GameMode v…
Browse files Browse the repository at this point in the history
…alue table in teamspawns.md. Changes to Control Shift zone ramble in linearzones.md. Added TopDirection and SideDirection to blocktexturesv2.md. Added SideDirection rotation explanation in blocktexturesv2.md.
  • Loading branch information
RainlessSky committed Dec 14, 2024
1 parent bf63f41 commit 56722df
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 12 deletions.
43 changes: 43 additions & 0 deletions docs/guides/identical_indexes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
editLink: false
prev: false
next: false
---

# Creating visually identical indexes
::: tip
There is no actual use case for having identical indexes in a map.
:::
It is possible to have two or more indexes with the same look in-game. To do this, use block attributes that can loop.

## `Offset` method
Using `Offset`, increase the offset on an axis by a multiple of the index's `Size` value. This outputs a visually identical block with differing indexes.

## `HSL` method
This method isn't actually identical, but it can be used for detailing. Using `HSL`, you can do slight variance in any of the three values. PadreToto recommends using small lightness variation for detailing in some cases.

## Example
Example of some visually identical indexes.

### Gray crate
Normal crate
```json
{
"Note": "Gray offset crate",
"Name": "crategrey",
"Index": 1,
"Size": 4
},
```
Identical crate
```json
{
"Note": "Gray offset crate",
"Name": "crategrey",
"Index": 2,
"Size": 4,
"Offset": [ 0, 4, 0 ]
},
```

Guide created by RainlessSky
21 changes: 18 additions & 3 deletions docs/json/blocktexturesv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ next: false
# BlockTexturesV2
BlockTexturesV2 lists all block types, aka indexes, in the map and their configuration. Sector's Edge and MagicaVoxel can handle up to 255 indexes. There cannot be two or more indexes with duplicate configuration.
::: tip WORKAROUND
It is possible to have two or more indexes with the same look in-game. To do this, use fields that can loop. Using `Offset` as an example, increase the offset on an axis by a multiple of the index's Size value. This outputs a visually identical block with differing indexes.
It is possible to have two or more indexes with the same look in-game. See [the guide on how](/guides/identical_indxes.md).
:::
```json
"BlockTexturesV2": [
Expand Down Expand Up @@ -38,6 +38,8 @@ It is possible to have two or more indexes with the same look in-game. To do thi
// Armour: Probably damage*armour.
// Damage: Amount of damage given to any player standing on the index. If set, 1 is always used in official maps.
// Non-negative integer.
// TopDirection: Rotation of the texture on the top/bottom faces of the index. Used for the Railway trains. Should default to "up".
// SideDirection: Same thing as TopDirection, but for the sides of the block. Defaults to "up".
"Note": "Example texture",
"Name": "concrete",
"Offset": [ 0, 0, 0 ],
Expand All @@ -48,11 +50,25 @@ It is possible to have two or more indexes with the same look in-game. To do thi
"Bloom": 1.0,
"Health": 8,
"Armour": 0.3,
"Damage": 1
"Damage": 1,
"TopDirection": "up",
"SideDirection": "up",
},
// Add more indexes...
],
```
`SideDirection` sets the top of the texture to the given direction. This means the bottom of the texture is on the opposite side that you set.
| Direction | Angle |
|:------------:|:-----:|
| up (default) ||
| right | 90° |
| down | 180° |
| left | 270° |
<div style="justify-content: center; display: flex; margin-top:10px; font-size: 13px; margin-bottom: 40px">
<p align="center">
<img src="/sidedirection_example.png" alt="SideDirection set to right (pictured on right)"/>
<br/><i>`signirridyne` texture with `SideDirection` set to "right" (on the right)</i>
</p></div>

## Examples
Copy this into the `BlockTexturesV2` list.
Expand Down Expand Up @@ -128,7 +144,6 @@ The server sends multiple fields which were previously undocumented.
"Default": false,
"ReceivedFromServer": true,
"LayerID": 255,
"SideDirection": "up",
"Custom": false,
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/json/gamemodes/linearzones.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ next: false
# LinearZones
LinearZones are used in Breakthrough and Control Shift to mark where a zone should be.

The Control Shift zone always chooses the most direct path between LinearZones, so you may want to add corner zones if the intended path is around a corner. Additionally, the zone will also change size to match the nearest LinearZone. Additionally, the Control Shift zone also interpolates size linearly (needs testing) between the current zone and the next one.
The Control Shift zone always chooses the most direct path between LinearZones, so you may want to add corner zones if the intended path is around a corner. The zone will also change size to match the nearest LinearZone. Additionally, the Control Shift zone also interpolates size linearly between the current zone and the next one (needs testing).
```json
"LinearZones": [
{
Expand Down
17 changes: 9 additions & 8 deletions docs/json/teamspawns.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ next: false
```json
"TeamSpawns": [
{
// GameMode: sta (Static), brk (Breakthrough), ctf (Capture the Flag), esc (Escort), all, sal (Salvage, removed game mode)
// GameMode: sta/brk/ctf/esc/ffa/all
// Type: point, line, box, free, radius(?)
// Team: 0 or 1
// Min & Max: max must be greater than min, otherwise have glitchy spawn area.
Expand All @@ -29,13 +29,14 @@ next: false
}
],
```
| GameMode value | Game mode |
|:--------------:|:-----------------|
| sta | Static |
| brk | Breakthrough |
| ctf | Capture the Flag |
| esc | Escort |
| all | Any |
| GameMode value | Game mode |
|:--------------:|:---------------------------------------|
| sta | Static |
| brk | Breakthrough |
| ctf | Capture the Flag |
| esc | Escort |
| ffa | Free for all game modes (confirm this) |
| all | Any |

## SpawnCamera
```json
Expand Down
Binary file added docs/public/sidedirection_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 56722df

Please sign in to comment.