Difference between revisions of "Luna Engine Configuration Guide"
(→Global Templates) |
(→Common Config Commands) |
||
Line 147: | Line 147: | ||
</nowiki> | </nowiki> | ||
− | == | + | ==Basic Configuration Overview== |
+ | |||
+ | ===Part 1: Block Definition=== | ||
+ | All scene-related Luna YMLs are organized in the same way. The overall layout can be defined via four distinct blocks that all have their individual functions. By understanding what each of these Blocks do, it becomes far easier to understand what needs to be changed to get the intended effect. | ||
+ | |||
+ | ====Block 1: Basic Components==== | ||
+ | Contains the default windows available for configuration. | ||
+ | Allows for the most basic configurations for windows such as size, position, spacing, font used, window skins, and much more. | ||
+ | <nowiki>components:#Header for Basic Components | ||
+ | Background:#Window 1 (Background) | ||
+ | #-Configurations removed for the sake of easy identification- | ||
+ | |||
+ | TitleCommand:#Window 2 (Title Screen Buttons/Commands) | ||
+ | #-Configurations removed for the sake of easy identification- </nowiki> | ||
+ | |||
+ | ====Block 2: Layout==== | ||
+ | Determines the relationship windows have to each other and how they are layered on top of each other. Windows drawn later will be on top, while windows drawn first will be on the bottom. | ||
+ | |||
+ | For a window to appear, it must be listed somewhere within the layout. As such, there must be a “MainLayout”. Will only accept existing windows. Attempting to add a nonexistent window under layout will result in nothing happening. | ||
+ | |||
+ | Also allows for the ability to link windows together and move them as a whole unit. | ||
+ | |||
+ | <nowiki>layouts:#Header for Layouts | ||
+ | MainLayout:#Name of Layout | ||
+ | type: FreeLayout #Type of Layout (How it's displayed) | ||
+ | components:#components of Layout | ||
+ | - Background #Window 1 | ||
+ | - TitleCommand #Window 2 </nowiki> | ||
+ | |||
+ | ====Block 3: Events/Animations==== | ||
+ | Used for animations. | ||
+ | Specifies what should happen on an event such as when something is selected, etc. Only predefined animations in the animations.yml can be used. Attempting to use a nonexistent animation will cause an error. | ||
+ | |||
+ | <nowiki>events: #Header for Events | ||
+ | onSceneEnter:#Event Condition (When first opening the screen) | ||
+ | #-Configurations removed for the sake of easy identification- | ||
+ | |||
+ | onItemSelect:#Event Condition (When selecting an object/item/command/) | ||
+ | #-Configurations removed for the sake of easy identification- | ||
+ | |||
+ | |||
+ | onItemUnselect:#Event Condition (When unselecting an object/item/command) | ||
+ | #-Configurations removed for the sake of easy identification- </nowiki> | ||
+ | |||
+ | ====Block 4: Lunatic==== | ||
+ | Used for heavy customization. | ||
+ | |||
+ | Allows complete freedom to customize all existing windows mentioned in Block 1. | ||
+ | |||
+ | Each window is customized individually, allowing both the adding of removing of individual components, as well as components that only appear of a certain condition is true. The block of Luna’s customization is here. | ||
+ | |||
+ | <nowiki>lunatic:#Header for Lunatic | ||
+ | TitleCommand:#Name of customized window. Must be the same as in Block 1. | ||
+ | #-Configurations removed for the sake of easy identification- </nowiki> | ||
==Common Config Commands== | ==Common Config Commands== |
Revision as of 10:18, 22 June 2019
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
Contents
- 1 Common Terms
- 2 Common Config Commands
- 3 Global Templates
- 4 Basic Configuration Overview
- 5 Common Config Commands
- 6 Common Config Commands
- 7 Common Config Commands
- 8 Common Config Commands
- 9 Common Config Commands
- 10 Common Config Commands
- 11 Common Config Commands
- 12 Common Config Commands
- 13 Common Config Commands
- 14 Common Config Commands
- 15 Common Config Commands
Common Terms
This is a list of common terms you will find throughout all the configurations.
KEY | DESCRIPTION | |
---|---|---|
components | A map of components and windows in the scene. The key is the window class name. Default windows (windows that are defined by RMMV) will have a more friendly name defined by LunaEngine. For the config of each component, see Component table.
It is important to remember that Components are only shown once and are not updated every instance. | |
layouts | A map of layouts in the scene. MainLayout is required as it is the scene itself. The name of layout can be anything. See Layout table for more information. | |
events | A conditional that triggers something to happen. Exclusively used for common UI animations such as transition in, transition out, on option select, and other similar effects. | |
lunatic | Lunatic mode for each component. The key name will be the key name of component/window you want to activate lunatic mode.
Lunatic is always updated for every instance. | |
lunatic item | A special type of component that is rendered for every entry in a list of data. Examples include things such as per party member during battle screens/status screens, per skill on skill screen, per item on the item screen, per command on a menu, etc. | |
type | Defines what type of asset is rendered or how it is rendered. Examples for type of asset include: image, text, grid. Examples for styles of rendering include: horizontal, vertical, freestyle, fixed. Scenes/screens are also defined by type. In this case, the type will be scene, this to make sure LunaEngine knows this config is a scene config. | |
version | This is a marker to see what version or iteration your current configuration is. This is helpful to keep track of your changes and what version has a previous feature you might’ve removed and what returned and so forth. |
Common Config Commands
type: <string>
Type is what kind of component you are using. Depending on what the type is defining, there are a number of valid strings.
version: 0.0.0
Version, also known as Version History, is to keep track what version your Luna Config is. It is useful for Version Control and keep track of changes.
x: <number>
X indicates either the width or horizontal position. A bigger number moves the object right, where a smaller number moves it left. Negatives are allowed for position.
y: <number>
Y indicates either the height or vertical position. A bigger number moves the object down, where a smaller number moves it up. Negatives are allowed for position.
image: <string>
Specifies the source image file. By default, Luna looks for all source files in the “systems” folder. Via encasing the filename (without file extension) in quotation marks, it’s possible to direct Luna to a subfolder. For Example:
image: "battlehud\cursor"
Global Templates
Presets.yml
This yaml file is used for general configuration, something like a core engine. When using a “default” setting in any YML, it will refer back to the presets. It is possible to define multiple presets as long as they all have their individual names.
type: presets # Defines this as the preset configuration version: 0.1.0 # Defines the version number presets: # Indicates the below as different presets default: # name of the preset. Input this into the configuration to call data entered into this preset. fontName: DS Pixel Cyr # Name of font in the font folder. Do not include font file extensions. fontSize: 16 # Size of font fontOutline: # Indicates how the font outline is drawn. In pixels. enable: true # Tells Luna you want font outlines lineWidth: 4 # Width of the font outline lineColor: rgba(16, 16, 16, 1) # Colour of the font outline and transparency. fontShadow: # Indicates below defines the font shadow enable: true # Tells Luna you want font shadows shadowOffset: # Indicates shadow offset distance. In pixels. x: 2 # Horizontal offset (bigger = more right, negatives accepted) y: 2 # Vertical offset (bigger = more down, negatives accepted) shadowColor: rgba(32, 32, 32, 0.6) # The colour and transparency of the shadow shadowBlur: 4 # The amount of blur on the shadow (bigger = more blur) lineHeight: 36 # Space between lines of text. (bigger = more space). In pixels. textPadding: 6 windowPadding: 18 # Padding around the edge of the window. (bigger = more padding). In pixels. gaugeOffset: x: 0 y: 4 gaugeHeight: 16 gaugeOutline: enable: true lineWidth: 2 lineColor: rgba(16, 16, 16, 1) gaugeSlanted: true windowSkin: BlueWindowSkin # Name of the windowskin used without file extensions Cursor: # Indicates below defines the cursor type: normal # normal / image / none |Normal uses the one included in window skin. Image, allows for the use of a seperate image instead. None means an invisible cursor. blink: true # Includes whether blink animation is used image: cursor # Name of the image used if image type is used. Setting to “none” produces an invisible cursor offset: # Offset of the position of the cursor x: 0 # Horizontal offset (bigger = more right, negatives accepted) y: 0 # Vertical offset (bigger = more down, negatives accepted)
Animations.yml
This yaml files defines the animations that can be called on in Block 3: Events of every scene/screen configuration.
Currently, all animations are keyframe animations with two keyframes:
- The start position
- The end position
This makes simple transition animations such as fade in from the top, or move left easy to set. As end keyframe offset is permanent unless it is changed by another animation, it’s suggested that both offset x and y is either set to 0 in the ending keyframe or a dedicated animation exists to move the offset back to 0, 0.
type: animations # Defines this as the animation configuration file version: 0.1.0 # Defines the version number Animations: # Indicates below as animation settings FadeInDown: # Name of animation. Can be set to anything. 0: # Starting keyframe (starting position of the animation) offsetX: # Offset of horizontal from predefined position in scene configuration for the asset/window type: fixed # fixed for animations only.|Defines what "value" means. value: 0 # Amount of the X offset. (bigger = more right, negative allowed) offsetY: # Offset of vertical from predefined position in scene configuration for the asset/window type: fixed value: -150 alpha: 0 # Transparency of the asset the animation is targeting 100: # Ending keyframe (Ending position of the animation) offsetX: # Offset of horizontal from predefined position in scene configuration for the asset/window type: fixed value: 0 offsetY: type: fixed value: 0 alpha: 1 MoveBack: # Example of an animation designed to reset any prior animations 100: # Only has an ending keyframe. The starting keyframe is implied to be whatever state the asset is currently in. offsetX: type: fixed value: 0 offsetY: type: fixed value: 0 alpha: 1
Basic Configuration Overview
Part 1: Block Definition
All scene-related Luna YMLs are organized in the same way. The overall layout can be defined via four distinct blocks that all have their individual functions. By understanding what each of these Blocks do, it becomes far easier to understand what needs to be changed to get the intended effect.
Block 1: Basic Components
Contains the default windows available for configuration. Allows for the most basic configurations for windows such as size, position, spacing, font used, window skins, and much more.
components:#Header for Basic Components Background:#Window 1 (Background) #-Configurations removed for the sake of easy identification- TitleCommand:#Window 2 (Title Screen Buttons/Commands) #-Configurations removed for the sake of easy identification-
Block 2: Layout
Determines the relationship windows have to each other and how they are layered on top of each other. Windows drawn later will be on top, while windows drawn first will be on the bottom.
For a window to appear, it must be listed somewhere within the layout. As such, there must be a “MainLayout”. Will only accept existing windows. Attempting to add a nonexistent window under layout will result in nothing happening.
Also allows for the ability to link windows together and move them as a whole unit.
layouts:#Header for Layouts MainLayout:#Name of Layout type: FreeLayout #Type of Layout (How it's displayed) components:#components of Layout - Background #Window 1 - TitleCommand #Window 2
Block 3: Events/Animations
Used for animations. Specifies what should happen on an event such as when something is selected, etc. Only predefined animations in the animations.yml can be used. Attempting to use a nonexistent animation will cause an error.
events: #Header for Events onSceneEnter:#Event Condition (When first opening the screen) #-Configurations removed for the sake of easy identification- onItemSelect:#Event Condition (When selecting an object/item/command/) #-Configurations removed for the sake of easy identification- onItemUnselect:#Event Condition (When unselecting an object/item/command) #-Configurations removed for the sake of easy identification-
Block 4: Lunatic
Used for heavy customization.
Allows complete freedom to customize all existing windows mentioned in Block 1.
Each window is customized individually, allowing both the adding of removing of individual components, as well as components that only appear of a certain condition is true. The block of Luna’s customization is here.
lunatic:#Header for Lunatic TitleCommand:#Name of customized window. Must be the same as in Block 1. #-Configurations removed for the sake of easy identification-