Difference between revisions of "XML/Menu"

From MegaGlest
Jump to navigation Jump to search
(One intermediate revision by the same user not shown)
Line 9: Line 9:
 
<?xml version="1.0"?>
 
<?xml version="1.0"?>
 
<menu>
 
<menu>
    <water value="true" height="3" />
+
<water value="true" height="3" />
    <rain value="true" />
+
<rain value="true" />
    <fog value="true" density="0.025" />
+
<fog value="true" density="0.025" />
    <camera>
+
<camera>
        <start-position x="5" y="10" z="40" />
+
<start-position x="5" y="10" z="40" />
        <root-position x="-9" y="11" z="10" />
+
<root-position x="-9" y="11" z="10" />
        <about-position x="6" y="8.5" z="11" />
+
<about-position x="6" y="8.5" z="11" />
        <config-position x="4" y="17" z="0" />
+
<config-position x="4" y="17" z="0" />
        <info-position x="5" y="6" z="-5" />
+
<info-position x="5" y="6" z="-5" />
        <new-game-position x="12" y="17" z="5" />
+
<new-game-position x="12" y="17" z="5" />
        <join-game-position x="14" y="15" z="5" />
+
<join-game-position x="14" y="15" z="5" />
        <scenario-position x="10" y="13" z="2" />
+
<scenario-position x="10" y="13" z="2" />
 +
<!-- Start GAE Only -->
 +
<loadgame-position x="0" y="20" z="-5" />
 +
<!-- End GAE Only -->
 +
<start-rotation x="0" y="0" z="0" />
 +
<root-rotation x="0" y="-40" z="0" />
 +
<about-rotation x="0" y="-80" z="0" />
 +
<config-rotation x="0" y="-5" z="0" />
 +
<info-rotation x="0" y="25" z="0" />
 +
<new-game-rotation x="0" y="10" z="0" />
 +
<join-game-rotation x="0" y="12" z="0" />
 +
<scenario-rotation x="0" y="-10" z="0" />
 +
<!-- Start GAE Only -->
 +
<loadgame-rotation x="-15" y="0" z="0" />
 +
<!-- End GAE Only -->
 +
</camera>
 
<!-- Start GAE Only -->
 
<!-- Start GAE Only -->
        <loadgame-position x="0" y="20" z="-5" />
+
<logos>
 +
<total-conversion value="false" />
 +
<gae-logo value="false" />
 +
<gpl-logo value="true" />
 +
</logos>
 
<!-- End GAE Only -->
 
<!-- End GAE Only -->
 
+
<!-- Start MG Only -->
        <start-rotation x="0" y="0" z="0" />
 
        <root-rotation x="0" y="-40" z="0" />
 
        <about-rotation x="0" y="-80" z="0" />
 
        <config-rotation x="0" y="-5" z="0" />
 
        <info-rotation x="0" y="25" z="0" />
 
        <new-game-rotation x="0" y="10" z="0" />
 
        <join-game-rotation x="0" y="12" z="0" />
 
        <scenario-rotation x="0" y="-10" z="0" />
 
<!-- Start GAE Only -->
 
        <loadgame-rotation x="-15" y="0" z="0" />
 
<!-- End GAE Only -->
 
    </camera>
 
    <!-- Start GAE Only -->
 
    <logos>
 
        <total-conversion value="false" />
 
        <gae-logo value="false" />
 
        <gpl-logo value="true" />
 
    </logos>
 
    <!-- End GAE Only -->
 
 
 
    <!-- Start MG Only -->
 
 
<intro>
 
<intro>
 
<intro-time value="47500"/>
 
<intro-time value="47500"/>
Line 56: Line 54:
 
<show-intro-pictures value="8" random="true" time="2500"/>
 
<show-intro-pictures value="8" random="true" time="2500"/>
 
<show-intro-models value="true" random="true" min-anim-speed="0.010" max-anim-speed="0.6"/>
 
<show-intro-models value="true" random="true" min-anim-speed="0.010" max-anim-speed="0.6"/>
 
 
<camera>
 
<camera>
 
<start-position x="6" y="8.5" z="11"/>
 
<start-position x="6" y="8.5" z="11"/>
 
<start-rotation x="0" y="-80" z="0"/>
 
<start-rotation x="0" y="-80" z="0"/>
 
</camera>
 
</camera>
 
 
</intro>
 
</intro>
    <!-- End MG Only -->
+
<!-- End MG Only -->
 
</menu>
 
</menu>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
==LNG Files==
 
{{LNG_definition_header}}
 
;-------------------------------- Intro Text Start
 
IntroText1=Based on award-winning classic Glest
 
IntroStartMilliseconds1=1000
 
IntroText2=the MegaGlest Team presents
 
IntroStartMilliseconds2=4400
 
IntroText3=a libre software real-time strategy game
 
IntroStartMilliseconds3=8400
 
IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
 
IntroTextureWidth4=256
 
IntroTextureHeight4=128
 
IntroStartMilliseconds4=12000
 
IntroText5=$GAMEVERSION
 
IntroTextX5=+5
 
IntroTextY5=-45
 
IntroTextFontType5=menunormal
 
IntroStartMilliseconds5=12000
 
IntroText6=http://megaglest.org
 
IntroStartMilliseconds6=16000
 
IntroModelStartMilliseconds=24000
 
IntroTextureStartMilliseconds=26000
 
;-------------------------------- Intro Text End
 
; Font configuration for FTGL
 
; Before using an alternative font, please verify license compatibility
 
ISO639-1=en
 
NativeLanguageName=English
 
MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_Re-0.6.4.ttf
 
  
 
==Documentation==
 
==Documentation==
Line 174: Line 140:
 
===gpl-logo===
 
===gpl-logo===
 
If true, the GPL logo will be shown at the bottom of the main menu.
 
If true, the GPL logo will be shown at the bottom of the main menu.
 +
 +
 +
 +
===intro===
 +
<p style="border-style: initial; border-color: initial; font-style: normal;">These settings control the game intro, modifying this is generally an action of trial and error. All time values are in milliseconds (1 second == 1000 milliseonds)</p>
 +
 +
{| class="wikitable sortable"
 +
! Element name
 +
! Effect
 +
|-
 +
| <div id="start-position">intro-time</div>
 +
| This is the total amount of time that the intro should display before showing the start menu
 +
|-
 +
| <div id="root-position">appear-time</div>
 +
| <span style="font-style: normal; ">This is the amount of time that it will take one line of intro data to fade into display</span>
 +
|-
 +
| <div id="about-position">show-time</div>
 +
| <span style="font-style: normal; ">This is the amount of time that it will take one line of intro data to remain in display after fading in</span>
 +
|-
 +
| <div id="config-position">disappear-time</div>
 +
| <span style="font-style: normal; ">This is the amount of time that it will take one line of intro data to fade out of display</span>
 +
|-
 +
| <div id="info-position">menu-music-path</div>
 +
| The path to menu music files (relative to data/core/)
 +
|-
 +
| <div id="new-game-position">menu-intro-music</div>
 +
| The intro music file to play (located in menu-music-path)
 +
|-
 +
| <div id="join-game-position">menu-music</div>
 +
| The main menu music file to play <span style="font-style: normal; ">(located in menu-music-path)</span>
 +
|-
 +
| <div id="loadgame-position">show-intro-pictures</div>
 +
|
 +
This node describes how intro pictures should display
 +
 +
value attribute = # of images to display (using the following path and naming: data/core/menu/textures/intro*.*)
 +
 +
random = true or false meaning display order of images should be sequential (false) or random (true)
 +
 +
time = time in milliseconds to disply the picture
 +
|-
 +
| <div id="start-rotation">show-intro-models</div>
 +
|
 +
<span style="font-style: normal; ">This node describes how intro models should display</span>
 +
 +
value = true (show intro models) or false (do not show intro models)
 +
 +
<span style="font-style: normal; ">random = true or false meaning display order of models should be sequential (false) or random (true)</span>
 +
 +
<span style="font-style: normal; ">min-anim-speed = minimum animation speed from 0 to 1</span>
 +
 +
<span style="font-style: normal; ">max-anim-speed </span><span style="font-style: normal; ">= maximum animation speed from 0 to 1</span>
 +
|}
 +
 +
 +
 +
==Special language strings==
 +
In MegaGlest, several language strings also effect the introduction, which can modify the images, text, and time to display the text/image.
 +
<syntaxhighlight lang="ini">
 +
IntroText1=Based on award-winning classic Glest
 +
IntroStartMilliseconds1=1000
 +
IntroText2=the MegaGlest Team presents
 +
IntroStartMilliseconds2=4400
 +
IntroText3=a libre software real-time strategy game
 +
IntroStartMilliseconds3=8400
 +
IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
 +
IntroTextureWidth4=256
 +
IntroTextureHeight4=128
 +
IntroStartMilliseconds4=12000
 +
IntroText5=$GAMEVERSION
 +
IntroTextX5=+5
 +
IntroTextY5=-45
 +
IntroTextFontType5=menunormal
 +
IntroStartMilliseconds5=12000
 +
IntroText6=http://megaglest.org
 +
IntroStartMilliseconds6=16000
 +
IntroModelStartMilliseconds=24000
 +
IntroTextureStartMilliseconds=26000
 +
ISO639-1=en
 +
NativeLanguageName=English
 +
MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_Re-0.6.4.ttf
 +
</syntaxhighlight>
  
 
==See Also==
 
==See Also==
Line 179: Line 227:
 
*[[GAE]]
 
*[[GAE]]
 
*[[MegaGlest]]
 
*[[MegaGlest]]
 +
[[Category:XMLs]]
 +
[[Category:XMLs]]
 +
[[Category:XMLs]]
 +
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]
 
[[Category:XMLs]]

Revision as of 18:30, 23 December 2011

Engines icons.png This article documents Glest, GAE, and MegaGlest

This is noted in the colored backgrounds, which denote lines as being engine specific. See the key below.[Editing help]

Template:Clear

The menu XML defines how the menu screen works. It controls the fog, rain, and water level, as well as the camera positions and angles for each menu option. It varies slightly in the differing versions of Glest, since the forks add different menu options, such as GAE's save menu. As well, GAE has options to toggle the images and a total conversion option.

Template:TOC limit

XML

Template:XML definition header

<?xml version="1.0"?>
<menu>
	<water value="true" height="3" />
	<rain value="true" />
	<fog value="true" density="0.025" />
	<camera>
		<start-position x="5" y="10" z="40" />
		<root-position x="-9" y="11" z="10" />
		<about-position x="6" y="8.5" z="11" />
		<config-position x="4" y="17" z="0" />
		<info-position x="5" y="6" z="-5" />
		<new-game-position x="12" y="17" z="5" />
		<join-game-position x="14" y="15" z="5" />
		<scenario-position x="10" y="13" z="2" />
		<!-- Start GAE Only -->
		<loadgame-position x="0" y="20" z="-5" />
		<!-- End GAE Only -->
		<start-rotation x="0" y="0" z="0" />
		<root-rotation x="0" y="-40" z="0" />
		<about-rotation x="0" y="-80" z="0" />
		<config-rotation x="0" y="-5" z="0" />
		<info-rotation x="0" y="25" z="0" />
		<new-game-rotation x="0" y="10" z="0" />
		<join-game-rotation x="0" y="12" z="0" />
		<scenario-rotation x="0" y="-10" z="0" />
		<!-- Start GAE Only -->
		<loadgame-rotation x="-15" y="0" z="0" />
		<!-- End GAE Only -->
	</camera>
	<!-- Start GAE Only -->
	<logos>
		<total-conversion value="false" />
		<gae-logo value="false" />
		<gpl-logo value="true" />
	</logos>
	<!-- End GAE Only -->
	<!-- Start MG Only -->
	<intro>
		<intro-time value="47500"/>
		<appear-time value="1000"/>
		<show-time value="1500"/>
		<disappear-time value="1000"/>
		<menu-music-path value="/menu/music/"/>
		<menu-intro-music value="intro_music.ogg"/>
		<menu-music value="menu_music.ogg"/>
		<show-intro-pictures value="8" random="true" time="2500"/>
		<show-intro-models value="true" random="true" min-anim-speed="0.010" max-anim-speed="0.6"/>
		<camera>
			<start-position x="6" y="8.5" z="11"/>
			<start-rotation x="0" y="-80" z="0"/>
		</camera>
	</intro>
	<!-- End MG Only -->
</menu>

Documentation

water

Toggles and sets the height value, in game tiles, of the water. Each game tile is equal to roughly 1 tile in Blender. If the water is turned off, exclude the height value:

<water value="false" />

rain

Toggles on or off rain. There is not yet a method of adding snow.

fog

Toggles and sets the density of fog. The density is the thickness of the fog. You cannot yet choose the color of this fog, and it will be rendered the standard grey.

camera

These settings control the position and rotation of the camera for each menu. Positions are where the camera is located in space (in Glest tile units, where one tile is about the same as one tile in Blender, centered to the center of the model), while rotations are degrees in a direction from that position. Because there is no easy way to find out positions and rotations, modifying this is generally an action of trial and error.

All values are stored as x, y, and z. X is the horizontal axis, z is the depth axis, and y is the vertical axis.

Element name Effect
start-position
Sets the very first position the camera will be in when the game starts. It will not stay in this position and will move towards the root menu position, so this is entirely a cinematic effect.
root-position
The camera location for the main menu.
about-position
Position for the about screen.
config-position
Position for the configuration (options) screen.
info-position
Position for the info screen (subscreen in the options menu).
new-game-position
Position for the new game screen.
join-game-position
Position for the join game screen.
loadgame-position
Position for the load game screen (GAE only).
start-rotation
The direction the camera is facing when the program starts, before it moves for the main menu position.
root-rotation
The camera rotation at the main menu.
about-rotation
The camera rotation at the about screen.
config-rotation
The camera rotation at the configuration (options) screen.
info-rotation
The camera rotation at the info screen (subscreen in the options menu).
new-game-rotation
The camera rotation at the new game screen.
join-game-rotation
The camera rotation at the join game screen.
loadgame-rotation
The camera rotation at the load game screen (GAE only).

total-conversion

A GAE only value that defines whether or not the mod is meant to be a regular mod or a complete conversion. Complete conversions will hide the version numbers and show a different logo at the side.

If true, an alternative GAE logo will also be shown at the bottom of the main menu. Good for full conversion mods because you can then change the regular logo.

If true, the GPL logo will be shown at the bottom of the main menu.


intro

These settings control the game intro, modifying this is generally an action of trial and error. All time values are in milliseconds (1 second == 1000 milliseonds)

Element name Effect
intro-time
This is the total amount of time that the intro should display before showing the start menu
appear-time
This is the amount of time that it will take one line of intro data to fade into display
show-time
This is the amount of time that it will take one line of intro data to remain in display after fading in
disappear-time
This is the amount of time that it will take one line of intro data to fade out of display
menu-music-path
The path to menu music files (relative to data/core/)
menu-intro-music
The intro music file to play (located in menu-music-path)
menu-music
The main menu music file to play (located in menu-music-path)
show-intro-pictures

This node describes how intro pictures should display

value attribute = # of images to display (using the following path and naming: data/core/menu/textures/intro*.*)

random = true or false meaning display order of images should be sequential (false) or random (true)

time = time in milliseconds to disply the picture

show-intro-models

This node describes how intro models should display

value = true (show intro models) or false (do not show intro models)

random = true or false meaning display order of models should be sequential (false) or random (true)

min-anim-speed = minimum animation speed from 0 to 1

max-anim-speed = maximum animation speed from 0 to 1


Special language strings

In MegaGlest, several language strings also effect the introduction, which can modify the images, text, and time to display the text/image.

IntroText1=Based on award-winning classic Glest
IntroStartMilliseconds1=1000
IntroText2=the MegaGlest Team presents
IntroStartMilliseconds2=4400
IntroText3=a libre software real-time strategy game
IntroStartMilliseconds3=8400
IntroTexture4=$APPLICATIONDATAPATH/data/core/menu/textures/logo.tga
IntroTextureWidth4=256
IntroTextureHeight4=128
IntroStartMilliseconds4=12000
IntroText5=$GAMEVERSION
IntroTextX5=+5
IntroTextY5=-45
IntroTextFontType5=menunormal
IntroStartMilliseconds5=12000
IntroText6=http://megaglest.org
IntroStartMilliseconds6=16000
IntroModelStartMilliseconds=24000
IntroTextureStartMilliseconds=26000
ISO639-1=en
NativeLanguageName=English
MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_Re-0.6.4.ttf

See Also