Zone Maker Validation
Closed this issue · 0 comments
Panzerhandschuh commented
Only relevant to runtime:
- "Failed to create zone region: failed to make physcovex"
- "Failed to create zone region: failed to make physcollide"
- "Volume %i region %i specifies only one of teleDestPos and teleDestYaw but it must define both or neither.", volumeIndex, regionIndex
- "Volume %i region %i specifies both a targetname-based destination and a custom position destination, but only one is allowed.", volumeIndex, regionIndex
- "Failed to create info_teleport_destination for Volume %i region %i.", volumeIndex, regionIndex
Not possible to get these errors..? (assuming coherent Hammer/Zonemaker logic):
- "Track %s %s has an invalid volume index", trackName, zoneName
- "Failed to create zone region: polygon is probably self-intersecting"
- "Bad format version"
- "Volume %i has no regions", volumeIndex
- "Volume %i Region %i does not have enough points", volumeIndex, regionIndex
- "Volume %i Region %i has no bottom position", volumeIndex, regionIndex
- "Volume %i Region %i bottom is out of bounds", volumeIndex, regionIndex
- "Volume %i Region %i has no height", volumeIndex, regionIndex
- "Volume %i Region %i point %i is out of bounds", volumeIndex, regionIndex, pointIndex
- "Bonus %i track must have a single segment", bonusIndex + 1
- "Volume %i is unused", i
- "The Main track has no segments"
Errors which could be handled in a more entity-centric way (e.g. reporting problems with a specific entity rather than a volume or region)
- "Track %s %s must specify a teleport destination for each Volume region (missing region %i)", trackName, zoneName, regionIndex
- "Track %s has too many segments", flatTrack.GetName() // could be enforced by erroring if some entity stage num is > MAX_TRACK_SEGMENTS
- "Track %s segment %i has too many checkpoints", flatTrack.GetName(), segmentIndex // could be enforced by erroring if some entity checkpoint num is > MAX_SEGMENT_CHECKPOINTS
- "Volume %i Region %i has too many points", volumeIndex, regionIndex
- "Volume %i Region %i polygon vertices are too close to each other", volumeIndex, regionIndex
- "Volume %i Region %i polygon has an angle which is too small", volumeIndex, regionIndex
- "Volume %i Region %i polygon has an angle which is too large. Check for colinear points.", volumeIndex, regionIndex
- "Stage %i does not have a checkpoint to use as the stage track end. Add a checkpoint or use stagesEndAtStageStarts.", stageIndex + 1
- "Stage %i wants to use its last checkpoint as the stage track end but has checkpointsOrdered == false. Enable at least one of checkpointsOrdered or stagesEndAtStageStarts.", stageIndex + 1
- "Too many Bonus tracks" // could be enforced by erroring if some entity track num is > MAX_BONUS_TRACKS
Valid errors for zonemaker:
- "Track %s %s filter entity "%s" was not found", trackName, zoneName, zone.filtername.Get()
- "Teleport destination "%s" not found", targetname
- "Teleport destination "%s" is ambiguous", targetname
- "Teleport destination "%s" is not an info_teleport_destination", targetname
- "Too many zones in total"
Things zonemaker needs that are not explicitly in the runtime checks:
- Main track exists
- No segment gaps
- No track number gaps
- Every defined track has a start and end zone
- All zone brush sides are flat or vertical
- Maybe: No collinear edges within a single zone (need zonemaker to take a zone with multiple contiguous brushes and turn it into a single polygon)