Delete "Compact RelaxNG" / .rnc files

(Follows 76acc4e146 where I deleted actor.rnc)

This deletes the .rnc validation files, upgrading the .rng files to
being the source of truth.

- The engine uses, via LibXML2, .rng files to validate XML schemas, to
the .rnc files are redundant.
- The RelaxNG "Compact" format is a DSL for the RelaxNG XML format. Its
syntax is unique, unlike .rng files which are XML.
- Some errors are likely - I'm not sure anyone has converted the compact
files in years.
- The tool to generate .rng from .rnc files is trang
(https://github.com/relaxng/jing-trang), which runs on the JVM and is
quite annoying to install compared to "your usual text editor".
- The JS components use the full .rng format in XML, so editing this
format is already familiar to most people that mod the game.

The .rnc files were added in 2c9939ac74 along the .rng files.

Refs #413, #245

Differential Revision: https://code.wildfiregames.com/D3824
This was SVN commit r25258.
This commit is contained in:
wraitii 2021-04-14 07:39:36 +00:00
parent fde66f5134
commit 43a780504a
27 changed files with 0 additions and 840 deletions

View File

@ -1,19 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Textures {
element File {
attribute pattern { text }? &
attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
attribute mipmap { "true" | "false" }? &
attribute normal { "true" | "false" }? &
attribute alpha { "none" | "player" | "transparency" }? &
attribute filter { "box" | "triangle" | "kaiser" }? &
attribute kaiserwidth { xsd:float }? &
attribute kaiseralpha { xsd:float }? &
attribute kaiserstretch { xsd:float }?
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="Textures" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="File">
<interleave>

View File

@ -1,36 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
##
# Types #
##
flag = "0" | "1"
start = SoundGroup
SoundGroup = element SoundGroup {
element Gain { xsd:float }? &
element Looping { flag }? &
element Omnipresent { flag }? &
element HeardBy { "owner" }? &
element Distanceless { flag }? &
element Pitch { xsd:float }? &
element Priority { xsd:float }? &
element RandOrder { flag }? &
element RandGain { flag }? &
element GainUpper { xsd:float }? &
element GainLower { xsd:float }? &
element RandPitch { flag }? &
element PitchUpper { xsd:float }? &
element PitchLower { xsd:float }? &
element ConeGain { xsd:float }? &
element ConeInner { xsd:float }? &
element ConeOuter { xsd:float }? &
element Threshold { xsd:float }? &
element Decay { xsd:float }? &
element Sound { text }+ &
element Path { text }
}

View File

@ -1,15 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<define name="flag">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<a:documentation/>
<!-- Types # -->
<a:documentation/>
<choice>
<value>0</value>
<value>1</value>

View File

@ -1,288 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
start = object | objects | setup | sprites | styles
##
# Types #
##
# xsd:boolean could be used instead of this definition,
# though it considers "1" & "0" as valid values.
bool = "true" | "false"
align = "left" | "center" | "right"
valign = "top" | "center" | "bottom"
wrapmode = "repeat" | "mirrored_repeat" | "clamp_to_edge"
coord = xsd:string { pattern = "-?\d*\.?\d+%?([\+\-]\d*\.?\d+%?)*" }
clientarea = list { coord, coord, coord, coord }
# color can be a name or "R G B A" format string
rgba = list { xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" },
xsd:integer { minInclusive = "0" maxInclusive = "255" }?}
ccolor = rgba | xsd:string { pattern = "[A-Za-z]+" }
size = list { xsd:decimal, xsd:decimal }
pos = list { xsd:decimal, xsd:decimal }
rect = list { xsd:decimal, xsd:decimal, xsd:decimal, xsd:decimal }
##
# Defines #
##
unique_settings =
attribute name { text }?,
[ a:defaultValue = "empty" ] attribute type { text }?,
attribute style { text }?
# This could probably be made more specific/strict
# with more information regarding the use/meaning
# of these attributes.
base_settings =
attribute absolute { bool }?&
attribute enable { bool }?&
attribute ghost { bool }?&
attribute hidden { bool }?&
attribute size { clientarea }?&
attribute z { xsd:decimal }?
# Defaults are not put in here, because it ruins the concept of styles.
ex_settings =
attribute anchor { valign }?&
attribute auto_scroll { bool }?&
attribute buffer_zone { xsd:decimal }?&
attribute buffer_width { xsd:decimal }?&
attribute button_width { xsd:decimal }?&
attribute checked { bool }?&
attribute clip { bool }?&
attribute dropdown_size { xsd:decimal }?&
attribute dropdown_buffer { xsd:decimal }?&
attribute minimum_visible_items { xsd:nonNegativeInteger }?&
attribute enabled { bool }?&
attribute font { text }?&
attribute format_x { text }?&
attribute format_y { text }?&
attribute fov_wedge_color { ccolor }?&
attribute hotkey { text }?&
attribute independent { bool }?&
attribute input_initvalue_destroyed_at_focus { bool }?&
attribute mask { bool }?&
attribute mask_char { xsd:string { minLength = "1" maxLength = "1" } }?&
attribute max_length { xsd:nonNegativeInteger }?&
attribute maxwidth { xsd:decimal }? &
attribute multiline { bool }?&
attribute offset { pos }?&
attribute placeholder_text { text }?&
attribute placeholder_color { ccolor }?&
attribute readonly { bool }?&
attribute scrollbar { bool }?&
attribute scrollbar_style { text }?&
attribute scroll_bottom { bool }?&
attribute scroll_top { bool }?&
attribute selected_column { text }?&
attribute selected_column_order { text }?&
attribute sortable { bool }?&
attribute sound_closed { text }?&
attribute sound_disabled { text }?&
attribute sound_enter { text }?&
attribute sound_leave { text }?&
attribute sound_opened { text }?&
attribute sound_pressed { text }?&
attribute sound_selected { text }?&
attribute sprite { text }?&
attribute sprite2 { text }?&
attribute sprite_asc { text }?&
attribute sprite_heading { text }?&
attribute sprite_bar { text }?&
attribute sprite_background { text }?&
attribute sprite_desc { text }?&
attribute sprite_disabled { text }?&
attribute sprite_list { text }?&
attribute sprite2_disabled { text }?&
attribute sprite_not_sorted { text }?&
attribute sprite_over { text }?&
attribute sprite2_over { text }?&
attribute sprite_pressed { text }?&
attribute sprite2_pressed { text }?&
attribute sprite_selectarea { text }?&
attribute square_side { xsd:decimal }?&
attribute textcolor { ccolor }?&
attribute textcolor_disabled { ccolor }?&
attribute textcolor_over { ccolor }?&
attribute textcolor_pressed { ccolor }?&
attribute textcolor_selected { ccolor }?&
attribute text_align { align }?&
attribute text_valign { valign }?&
attribute tooltip { text }?&
attribute tooltip_style { text }?
##
# Objects #
##
objects = element objects { (script | object)* }
script =
element script {
text &
attribute file { text }? &
attribute directory { text }?
}
object =
element object {
((object
| action
| \attribute
| column
| \include
| item
| repeat
| script
| translatableAttribute)*
| text),
unique_settings,
base_settings,
ex_settings
}
action =
element action {
text,
attribute on { text },
attribute file { text }?
}
\attribute =
element attribute {
(keep | translate)*,
attribute id { text }
}
column =
element column {
translatableAttribute?,
(
attribute id { text }&
attribute color { ccolor }?&
attribute heading { text }?&
attribute width { text }?&
attribute hidden { bool }?
)
}
\include =
element include {
attribute file { text }|
attribute directory { text }
}
item =
element item {
text,
attribute enabled { bool }?
}
keep = element keep { text }
repeat =
element repeat {
object+,
attribute count { xsd:nonNegativeInteger },
attribute var { text }?
}
translate = element translate { text }
translatableAttribute =
element translatableAttribute {
text,
(
attribute id { text }&
attribute comment { text }?&
attribute context { text }?
)
}
##
# Styles #
##
styles = element styles { style* }
style =
element style {
attribute name { text },
base_settings,
ex_settings
}
##
# Setup #
##
setup = element setup { (icon | scrollbar | tooltip | color)* }
scrollbar =
element scrollbar {
attribute name { text }&
attribute width { xsd:decimal }&
attribute alwaysshown { bool }?&
attribute maximum_bar_size { xsd:decimal }?&
attribute minimum_bar_size { xsd:decimal }?&
attribute scroll_wheel { bool }?&
attribute show_edge_buttons { bool }?&
attribute sprite_button_top { text }?&
attribute sprite_button_top_pressed { text }?&
attribute sprite_button_top_disabled { text }?&
attribute sprite_button_top_over { text }?&
attribute sprite_button_bottom { text }?&
attribute sprite_button_bottom_pressed { text }?&
attribute sprite_button_bottom_disabled { text }?&
attribute sprite_button_bottom_over { text }?&
attribute sprite_bar_vertical { text }?&
attribute sprite_bar_vertical_over { text }?&
attribute sprite_bar_vertical_pressed { text }?&
attribute sprite_back_vertical { text }?
}
icon =
element icon {
attribute name { text }&
attribute size { size }&
attribute sprite { text }&
}
tooltip =
element tooltip {
attribute name { text }&
attribute sprite { text }?&
attribute anchor { valign }?&
attribute axis_color { ccolor }?&
attribute axis_width { xsd:decimal { minInclusive = "0" } }?&
attribute buffer_zone { xsd:decimal }?&
attribute font { text }?&
attribute maxwidth { xsd:decimal }?&
attribute offset { pos }?&
attribute textcolor { ccolor }?&
attribute delay { xsd:integer }?&
attribute use_object { text }?&
attribute hide_object { bool }?
}
color =
element color {
rgba,
attribute name { text }
}
##
# Sprites #
##
sprites = element sprites { sprite* }
sprite =
element sprite {
(effect?, image+),
attribute name { text }
}
image =
element image {
effect?,
(
attribute texture { text }?&
attribute size { clientarea }?&
attribute texture_size { clientarea }?&
attribute real_texture_placement { rect }?&
attribute backcolor { ccolor }?&
attribute bordercolor { ccolor }?&
attribute border { bool }?&
attribute z_level { xsd:float }?&
attribute fixed_h_aspect_ratio { xsd:decimal }?&
attribute round_coordinates { bool }?&
attribute wrap_mode { wrapmode }?
)
}
effect =
element effect {
attribute add_color { ccolor }?,
attribute grayscale { empty }?
}

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<choice>
<ref name="object"/>
<ref name="objects"/>

View File

@ -1,11 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element page {
element include {
text
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="page" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="include">
<text/>

View File

@ -1,46 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element material {
element alternative {
attribute material { text }
& attribute quality {
xsd:decimal { minInclusive = "0" }
}?
& attribute if { text }?
}*
& element alpha_blending {
# flag; true if present
empty
}?
& element shader {
attribute effect { text }
}
& element define {
attribute name { text },
attribute value { text }
}*
& element uniform {
attribute name { text },
attribute value {
list {
# X Y Z W
xsd:float,
xsd:float?,
xsd:float?,
xsd:float?
}
}
}*
& element renderquery {
attribute name { text }
}*
& element required_texture {
attribute name { text },
attribute define { text }?
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="material" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<zeroOrMore>
<element name="alternative">

View File

@ -1,44 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element particles {
element texture {
text
}? &
element blend {
attribute mode { "add" | "subtract" | "over" | "multiply" }
}? &
element start_full { # flag; true if present
empty
}? &
element use_relative_velocity { # flag; true if present
empty
}? &
element constant {
attribute name { text } &
attribute value { xsd:float }
}* &
element uniform {
attribute name { text } &
attribute min { xsd:float } &
attribute max { xsd:float }
}* &
element copy {
attribute name { text } &
attribute from { text }
}* &
element expr {
attribute name { text } &
attribute from { text } &
attribute mul { xsd:float } &
attribute max { xsd:float }
}* &
element force {
attribute x { xsd:float }? &
attribute y { xsd:float }? &
attribute z { xsd:float }?
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="particles" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<optional>
<element name="texture">

View File

@ -1,21 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Terrains {
element Terrain {
attribute groups { text } & # comma-separated list of groups
attribute mmap {
list {
xsd:integer { minInclusive = "0" maxInclusive = "255" }, # R
xsd:integer { minInclusive = "0" maxInclusive = "255" }, # G
xsd:integer { minInclusive = "0" maxInclusive = "255" } # B
}
}? &
attribute angle { xsd:float }? & # degrees
attribute size { xsd:float }? &
attribute movementclass { text }?
}
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="Terrains" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<element name="Terrain">
<interleave>
<attribute name="groups"/>

View File

@ -1,33 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element terrain {
element textures {
element texture {
attribute name { text } &
attribute file { text }
}*
} &
element material {
text
}? &
element alphamap {
text
}? &
element props {
attribute groups { text }? & # comma-separated list of groups
attribute mmap {
list {
xsd:integer { minInclusive = "0" }, # R
xsd:integer { minInclusive = "0" }, # G
xsd:integer { minInclusive = "0" } # B
}
}? &
attribute angle { xsd:float }? & # degrees
attribute size { xsd:float }? &
attribute movementclass { text }?
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="terrain" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<element name="textures">
<zeroOrMore>

View File

@ -1,19 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Textures {
element File {
attribute pattern { text }? &
attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
attribute mipmap { "true" | "false" }? &
attribute normal { "true" | "false" }? &
attribute alpha { "none" | "player" | "transparency" }? &
attribute filter { "box" | "triangle" | "kaiser" }? &
attribute kaiserwidth { xsd:float }? &
attribute kaiseralpha { xsd:float }? &
attribute kaiserstretch { xsd:float }?
}*
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="Textures" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="File">
<interleave>

View File

@ -1,57 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element variant {
attribute name { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
attribute file { text }? &
element mesh {
text
}? &
element textures {
element texture {
attribute file { text }? &
attribute name { text }
}*
}? &
element decal {
attribute width { xsd:float } & # X
attribute depth { xsd:float } & # Z
attribute angle { xsd:float } &
attribute offsetx { xsd:float } &
attribute offsetz { xsd:float }
}? &
element particles {
attribute file { text }
}? &
element color { list {
xsd:nonNegativeInteger, # R
xsd:nonNegativeInteger, # G
xsd:nonNegativeInteger # B
} }? &
element animations {
element animation {
attribute name { text } &
attribute id { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
attribute file { text }? &
attribute speed { xsd:nonNegativeInteger } &
attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
}*
}? &
element props {
element prop {
(attribute actor { text }? &
attribute attachpoint { text } &
attribute minheight { xsd:float }? &
attribute maxheight { xsd:float }? &
attribute selectable { "true" | "false" }?)
}*
}?
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="variant" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<optional>
<attribute name="name"/>

View File

@ -1,140 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
start = Scenario
##
# Defines #
##
color_rgb =
attribute r { xsd:decimal { minInclusive = "0" maxInclusive = "1" } },
attribute g { xsd:decimal { minInclusive = "0" maxInclusive = "1" } },
attribute b { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }
suncolor_rgb = # RGB can be > 1 due to overbrightness
attribute r { xsd:decimal { minInclusive = "0" } },
attribute g { xsd:decimal { minInclusive = "0" } },
attribute b { xsd:decimal { minInclusive = "0" } }
pos_xyz =
attribute x { xsd:float },
attribute y { xsd:float },
attribute z { xsd:float }
pos_xz =
attribute x { xsd:decimal },
attribute z { xsd:decimal }
angle = attribute angle { xsd:float }
##
# Scenario #
##
# TODO: bounds are not documented for many of these
Scenario = element Scenario {
attribute version { xsd:positiveInteger } &
element Environment {
element SkySet { text } &
element SunColor { suncolor_rgb } &
element SunElevation { angle } &
element SunRotation { angle } &
element AmbientColor { color_rgb } &
element Fog {
element FogFactor {
xsd:decimal { minInclusive = "0" } # TODO: what is the max?
} &
element FogThickness {
xsd:decimal { minInclusive = "0" } # TODO: what is the max?
} &
element FogColor { color_rgb }
}? &
element Water {
element WaterBody {
element Type { text } & # Not implemented
element Color { color_rgb } &
element Height { xsd:decimal } &
element Waviness { xsd:decimal } &
element Murkiness { xsd:decimal } &
element Tint { color_rgb } &
element WindAngle { xsd:decimal }?
}
} &
element Postproc {
element Brightness { xsd:decimal },
element Contrast { xsd:decimal },
element Saturation { xsd:decimal },
element Bloom { xsd:decimal },
element PostEffect { text }
}?
} &
element Terrain {
attribute patches { xsd:positiveInteger }?,
attribute texture { text }?,
attribute priority { xsd:nonNegativeInteger }?,
attribute height { xsd:positiveInteger }?
}? &
element Script {
text
}? &
element Camera { # Camera can have weird float values
element Position { pos_xyz },
element Rotation { angle },
element Declination { angle }
}? &
element ScriptSettings {
text
} &
element Entities {
element Entity {
attribute uid { xsd:positiveInteger } &
element Template { text } &
element Player { xsd:nonNegativeInteger }? &
element Position {
pos_xz
} &
element Orientation {
attribute y { xsd:decimal }
} &
element Obstruction {
attribute group { xsd:positiveInteger },
attribute group2 { xsd:positiveInteger }?
}? &
element Garrison {
element GarrisonedEntity {
attribute uid { xsd:positiveInteger } &
} &
} &
element Turrets {
element Turret {
attribute turret { text } &
attribute uid { xsd:positiveInteger } &
} &
} &
element Actor {
attribute seed { xsd:integer }
}?
}*
}? &
element Paths {
element Path {
attribute name { text } &
attribute timescale { xsd:decimal } &
attribute orientation { text } &
attribute mode { text } &
attribute style { text } &
element Node {
attribute deltatime {
xsd:decimal { minInclusive = "0" }
} &
element Position { pos_xyz }? &
element Target { pos_xyz }?
}*
}*
}? &
element Triggers { # Unused
empty
}?
}

View File

@ -1,12 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<ref name="Scenario"/>
</start>
<define name="color_rgb">

View File

@ -1,20 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element Pathfinder {
element MaxSameTurnMoves { xsd:nonNegativeInteger } &
element PassabilityClasses {
element * {
element Obstructions { xsd:string } &
element MinWaterDepth { xsd:decimal }? & # TODO: fixed type
element MaxWaterDepth { xsd:decimal }? &
element MaxTerrainSlope { xsd:decimal }? &
element MinShoreDistance { xsd:decimal }? &
element MaxShoreDistance { xsd:decimal }? &
element Clearance { xsd:decimal }?
}+
}
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="Pathfinder" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<element name="MaxSameTurnMoves">
<data type="nonNegativeInteger"/>

View File

@ -1,17 +0,0 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element TerritoryManager {
element ImpassableCost {
xsd:integer { minInclusive = "0" maxInclusive = "255" }
} &
element BorderThickness {
xsd:decimal
} &
element BorderSeparation {
xsd:decimal
}
}

View File

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="TerritoryManager" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<interleave>
<element name="ImpassableCost">
<data type="integer">

View File

@ -1,8 +0,0 @@
#!/bin/bash
VFSROOT=${1:-"../../../binaries/data/mods"}
for schema in $(find "$VFSROOT" -name '*.rnc')
do
trang "$schema" "${schema/.rnc/.rng}"
done