Modernized the SDK.
84
OpenRA.Mods.Example/Rendering/ColorPickerColorShift.cs
Normal file
@ -0,0 +1,84 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright (c) The OpenRA Developers and Contributors
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version. For more
|
||||
* information, see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Example.Rendering
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Create a color picker palette from another palette.")]
|
||||
public class ColorPickerColorShiftInfo : TraitInfo
|
||||
{
|
||||
[PaletteReference]
|
||||
[FieldLoader.RequireAttribute]
|
||||
[Desc("The name of the palette to base off.")]
|
||||
public readonly string BasePalette = "";
|
||||
|
||||
[Desc("Hues between this and MaxHue will be shifted.")]
|
||||
public readonly float MinHue = 0.83f;
|
||||
|
||||
[Desc("Hues between MinHue and this will be shifted.")]
|
||||
public readonly float MaxHue = 0.84f;
|
||||
|
||||
[Desc("Hue reference for the color shift.")]
|
||||
public readonly float ReferenceHue = 0.835f;
|
||||
|
||||
[Desc("Saturation reference for the color shift.")]
|
||||
public readonly float ReferenceSaturation = 1;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ColorPickerColorShift(this); }
|
||||
}
|
||||
|
||||
public class ColorPickerColorShift : ILoadsPalettes, ITickRender
|
||||
{
|
||||
readonly ColorPickerColorShiftInfo info;
|
||||
readonly ColorPickerManagerInfo colorManager;
|
||||
Color color;
|
||||
|
||||
public ColorPickerColorShift(ColorPickerColorShiftInfo info)
|
||||
{
|
||||
colorManager = Game.ModData.DefaultRules.Actors[SystemActors.World].TraitInfo<ColorPickerManagerInfo>();
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
void ILoadsPalettes.LoadPalettes(WorldRenderer worldRenderer)
|
||||
{
|
||||
color = colorManager.Color;
|
||||
var (_, hue, saturation, _) = color.ToAhsv();
|
||||
|
||||
worldRenderer.SetPaletteColorShift(
|
||||
info.BasePalette,
|
||||
hue - info.ReferenceHue,
|
||||
saturation - info.ReferenceSaturation,
|
||||
info.MinHue,
|
||||
info.MaxHue);
|
||||
}
|
||||
|
||||
void ITickRender.TickRender(WorldRenderer worldRenderer, Actor self)
|
||||
{
|
||||
if (color == colorManager.Color)
|
||||
return;
|
||||
|
||||
color = colorManager.Color;
|
||||
var (_, hue, saturation, _) = color.ToAhsv();
|
||||
|
||||
worldRenderer.SetPaletteColorShift(
|
||||
info.BasePalette,
|
||||
hue - info.ReferenceHue,
|
||||
saturation - info.ReferenceSaturation,
|
||||
info.MinHue,
|
||||
info.MaxHue);
|
||||
}
|
||||
}
|
||||
}
|
||||
63
OpenRA.Mods.Example/Rendering/PlayerColorShift.cs
Normal file
@ -0,0 +1,63 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright (c) The OpenRA Developers and Contributors
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version. For more
|
||||
* information, see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Example.Rendering
|
||||
{
|
||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||
[Desc("Add color shifts to player palettes. Use to add RGBA compatibility to PlayerColorPalette.")]
|
||||
public class PlayerColorShiftInfo : TraitInfo
|
||||
{
|
||||
[PaletteReference(true)]
|
||||
[FieldLoader.RequireAttribute]
|
||||
[Desc("The name of the palette to base off.")]
|
||||
public readonly string BasePalette = "";
|
||||
|
||||
[Desc("Hues between this and MaxHue will be shifted.")]
|
||||
public readonly float MinHue = 0.83f;
|
||||
|
||||
[Desc("Hues between MinHue and this will be shifted.")]
|
||||
public readonly float MaxHue = 0.84f;
|
||||
|
||||
[Desc("Hue reference for the color shift.")]
|
||||
public readonly float ReferenceHue = 0.835f;
|
||||
|
||||
[Desc("Saturation reference for the color shift.")]
|
||||
public readonly float ReferenceSaturation = 1;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new PlayerColorShift(this); }
|
||||
}
|
||||
|
||||
public class PlayerColorShift : ILoadsPlayerPalettes
|
||||
{
|
||||
readonly PlayerColorShiftInfo info;
|
||||
|
||||
public PlayerColorShift(PlayerColorShiftInfo info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
void ILoadsPlayerPalettes.LoadPlayerPalettes(WorldRenderer worldRenderer, string playerName, Color color, bool replaceExisting)
|
||||
{
|
||||
var (_, hue, saturation, _) = color.ToAhsv();
|
||||
|
||||
worldRenderer.SetPaletteColorShift(
|
||||
info.BasePalette + playerName,
|
||||
hue - info.ReferenceHue,
|
||||
saturation - info.ReferenceSaturation,
|
||||
info.MinHue,
|
||||
info.MaxHue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright (c) The OpenRA Developers and Contributors
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version. For more
|
||||
* information, see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Mods.Common.Widgets;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Example.Widgets.Logic
|
||||
{
|
||||
public class TemplateMenuLogic : ChromeLogic
|
||||
{
|
||||
[ObjectCreator.UseCtor]
|
||||
public TemplateMenuLogic(Widget widget)
|
||||
{
|
||||
widget.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
Speech:
|
||||
DefaultVariant: .wav
|
||||
Notifications:
|
||||
StartGame:
|
||||
|
||||
Sounds:
|
||||
DefaultVariant: .wav
|
||||
Notifications:
|
||||
ClickSound:
|
||||
|
Before Width: | Height: | Size: 32 B |
|
Before Width: | Height: | Size: 3.4 KiB |
@ -1,11 +0,0 @@
|
||||
button:
|
||||
Image: dialog.png
|
||||
PanelRegion: 1, 1, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-hover:
|
||||
Image: dialog.png
|
||||
PanelRegion: 1, 129, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-pressed:
|
||||
Image: dialog.png
|
||||
PanelRegion: 129, 1, 2, 2, 122, 122, 2, 2
|
||||
BIN
mods/example/chrome/assets/dialog.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/example/chrome/assets/glyphs.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
mods/example/chrome/assets/loadscreen.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
380
mods/example/chrome/chrome.yaml
Normal file
@ -0,0 +1,380 @@
|
||||
^Dialog:
|
||||
Image: chrome/assets/dialog.png
|
||||
|
||||
^Glyphs:
|
||||
Image: chrome/assets/glyphs.png
|
||||
|
||||
^LoadScreen:
|
||||
Image: chrome/assets/loadscreen.png
|
||||
|
||||
observer-scrollpanel-button:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 769, 257, 2, 2, 122, 122, 2, 2
|
||||
|
||||
observer-scrollpanel-button-hover:
|
||||
Inherits: observer-scrollpanel-button
|
||||
|
||||
observer-scrollpanel-button-pressed:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 897, 257, 2, 2, 122, 122, 2, 2
|
||||
|
||||
observer-scrollpanel-button-disabled:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 769, 385, 2, 2, 122, 122, 2, 2
|
||||
|
||||
observer-scrollheader:
|
||||
Inherits: observer-scrollpanel-button-disabled
|
||||
|
||||
observer-scrollheader-highlighted:
|
||||
Inherits: observer-scrollpanel-button-disabled
|
||||
|
||||
observer-scrollitem:
|
||||
|
||||
observer-scrollitem-hover:
|
||||
Inherits: observer-scrollpanel-button
|
||||
|
||||
observer-scrollitem-pressed:
|
||||
Inherits: observer-scrollpanel-button
|
||||
|
||||
observer-scrollitem-highlighted:
|
||||
Inherits: observer-scrollpanel-button-pressed
|
||||
|
||||
# Used for the main menu frame
|
||||
dialog:
|
||||
Inherits: ^Dialog
|
||||
Regions:
|
||||
background: 1, 1, 480, 480
|
||||
border-r: 492, 1, 9, 190
|
||||
border-l: 483, 1, 9, 190
|
||||
border-b: 1, 492, 189, 9
|
||||
border-t: 1, 483, 189, 9
|
||||
corner-tl: 192, 483, 9, 9
|
||||
corner-tr: 201, 483, 9, 9
|
||||
corner-bl: 192, 492, 9, 9
|
||||
corner-br: 201, 492, 9, 9
|
||||
|
||||
# Used for Music and Map selection (normal button)
|
||||
dialog2:
|
||||
Inherits: button
|
||||
|
||||
# It's a Container, used in various places, like Hotkeys, ColorPicker, Asset Browser frames (looks like a pressed button)
|
||||
dialog3:
|
||||
Inherits: button-pressed
|
||||
|
||||
# Used for tooltips and the video player
|
||||
dialog4:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 512, 387, 6, 6, 52, 52, 6, 6
|
||||
|
||||
# completely black tile
|
||||
dialog5:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 580, 388, 0, 0, 62, 62, 0, 0
|
||||
PanelSides: Center
|
||||
|
||||
lobby-bits:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
spawn-claimed: 68, 119, 22, 22
|
||||
spawn-unclaimed: 91, 119, 22, 22
|
||||
spawn-disabled: 114, 119, 22, 22
|
||||
admin: 170, 0, 6, 5
|
||||
colorpicker: 68, 119, 22, 22
|
||||
huepicker: 136, 0, 7, 15
|
||||
kick: 153, 0, 11, 11
|
||||
protected: 0, 17, 12, 13
|
||||
protected-disabled: 17, 17, 12, 13
|
||||
authentication: 34, 17, 12, 13
|
||||
authentication-disabled: 51, 17, 12, 13
|
||||
admin-registered: 0, 51, 16, 16
|
||||
admin-anonymous: 34, 51, 16, 16
|
||||
player-registered: 17, 51, 16, 16
|
||||
player-anonymous: 51, 51, 16, 16
|
||||
|
||||
reload-icon:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
enabled: 0, 34, 16, 16
|
||||
disabled-0: 17, 34, 16, 16
|
||||
disabled-1: 34, 34, 16, 16
|
||||
disabled-2: 51, 34, 16, 16
|
||||
disabled-3: 68, 34, 16, 16
|
||||
disabled-4: 85, 34, 16, 16
|
||||
disabled-5: 102, 34, 16, 16
|
||||
disabled-6: 119, 34, 16, 16
|
||||
disabled-7: 136, 34, 16, 16
|
||||
disabled-8: 153, 34, 16, 16
|
||||
disabled-9: 170, 34, 16, 16
|
||||
disabled-10: 187, 34, 16, 16
|
||||
disabled-11: 204, 34, 16, 16
|
||||
|
||||
strategic:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
unowned: 68, 119, 22, 22
|
||||
critical_unowned: 137, 119, 22, 22
|
||||
enemy_owned: 160, 119, 22, 22
|
||||
player_owned: 160, 142, 22, 22
|
||||
|
||||
flags:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
example: 226, 241, 30, 15
|
||||
Random: 226, 241, 30, 15
|
||||
spectator: 226, 241, 30, 15
|
||||
|
||||
music:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
pause: 0, 0, 16, 16
|
||||
stop: 17, 0, 16, 16
|
||||
play: 34, 0, 16, 16
|
||||
next: 51, 0, 16, 16
|
||||
prev: 68, 0, 16, 16
|
||||
fastforward: 85, 0, 16, 16
|
||||
|
||||
progressbar-bg:
|
||||
Inherits: button-pressed
|
||||
|
||||
progressbar-thumb:
|
||||
Inherits: button
|
||||
|
||||
button:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 513, 1, 2, 2, 122, 122, 2, 2
|
||||
|
||||
# 5% lighter than a normal button (mouseover)
|
||||
button-hover:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 513, 129, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-pressed:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 641, 1, 2, 2, 122, 122, 2, 2
|
||||
|
||||
# 50% grey (disabled button)
|
||||
button-disabled:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 513, 257, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-highlighted:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 769, 129, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-highlighted-hover:
|
||||
Inherits: button-highlighted
|
||||
|
||||
button-highlighted-pressed:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 897, 129, 2, 2, 122, 122, 2, 2
|
||||
|
||||
button-highlighted-disabled:
|
||||
Inherits: button-highlighted
|
||||
|
||||
newsbutton:
|
||||
Inherits: button
|
||||
|
||||
newsbutton-hover:
|
||||
Inherits: button
|
||||
|
||||
newsbutton-highlighted:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 769, 1, 2, 2, 122, 122, 2, 2
|
||||
|
||||
newsbutton-highlighted-hover:
|
||||
Inherits: newsbutton-highlighted
|
||||
|
||||
newsbutton-highlighted-pressed:
|
||||
Inherits: button-pressed
|
||||
|
||||
newsbutton-pressed:
|
||||
Inherits: button-pressed
|
||||
|
||||
textfield:
|
||||
Inherits: button-pressed
|
||||
|
||||
textfield-hover:
|
||||
Inherits: checkbox-hover
|
||||
|
||||
textfield-disabled:
|
||||
Inherits: checkbox-disabled
|
||||
|
||||
textfield-focused:
|
||||
Inherits: button-pressed
|
||||
|
||||
scrollpanel-bg:
|
||||
Inherits: button-pressed
|
||||
|
||||
scrollpanel-button:
|
||||
Inherits: button
|
||||
|
||||
scrollpanel-button-hover:
|
||||
Inherits: button-hover
|
||||
|
||||
scrollpanel-button-pressed:
|
||||
Inherits: button-pressed
|
||||
|
||||
scrollpanel-button-disabled:
|
||||
Inherits: button
|
||||
|
||||
slider:
|
||||
Inherits: ^Dialog
|
||||
Regions:
|
||||
tick: 513, 2, 2, 4
|
||||
|
||||
slider-track:
|
||||
Inherits: button
|
||||
|
||||
slider-thumb:
|
||||
Inherits: button
|
||||
|
||||
slider-thumb-hover:
|
||||
Inherits: button-hover
|
||||
|
||||
slider-thumb-pressed:
|
||||
Inherits: button-pressed
|
||||
|
||||
slider-thumb-disabled:
|
||||
Inherits: button-disabled
|
||||
|
||||
checkbox:
|
||||
Inherits: button-pressed
|
||||
|
||||
checkmark-tick:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
checked: 187, 0, 16, 16
|
||||
checked-pressed: 204, 0, 16, 16
|
||||
unchecked: 0, 0, 0, 0
|
||||
unchecked-pressed: 204, 0, 16, 16
|
||||
|
||||
checkmark-tick-highlighted:
|
||||
Inherits: checkmark-tick
|
||||
|
||||
checkmark-cross:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
checked: 221, 0, 16, 16
|
||||
checked-pressed: 238, 0, 16, 16
|
||||
unchecked: 0, 0, 0, 0
|
||||
unchecked-pressed: 238, 0, 16, 16
|
||||
|
||||
checkmark-cross-highlighted:
|
||||
Inherits: checkmark-cross
|
||||
|
||||
checkmark-mute:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
unchecked: 0, 170, 16, 16
|
||||
unchecked-pressed: 17, 170, 16, 16
|
||||
checked: 17, 170, 16, 16
|
||||
checked-pressed: 0, 170, 16, 16
|
||||
|
||||
checkmark-mute-highlighted:
|
||||
Inherits: checkmark-mute
|
||||
|
||||
checkbox-hover:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 641, 129, 2, 2, 122, 122, 2, 2
|
||||
|
||||
checkbox-pressed:
|
||||
Inherits: checkbox-hover
|
||||
|
||||
checkbox-disabled:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 641, 257, 2, 2, 122, 122, 2, 2
|
||||
|
||||
checkbox-highlighted:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 897, 1, 2, 2, 122, 122, 2, 2
|
||||
|
||||
checkbox-highlighted-hover:
|
||||
Inherits: checkbox-highlighted
|
||||
|
||||
checkbox-highlighted-pressed:
|
||||
Inherits: checkbox-highlighted
|
||||
|
||||
checkbox-highlighted-disabled:
|
||||
Inherits: checkbox-disabled
|
||||
|
||||
checkbox-toggle:
|
||||
|
||||
checkbox-toggle-hover:
|
||||
Inherits: button
|
||||
|
||||
checkbox-toggle-pressed:
|
||||
Inherits: checkbox-pressed
|
||||
|
||||
checkbox-toggle-highlighted:
|
||||
|
||||
checkbox-toggle-highlighted-hover:
|
||||
Inherits: button-highlighted
|
||||
|
||||
checkbox-toggle-highlighted-pressed:
|
||||
Inherits: checkbox-highlighted-pressed
|
||||
|
||||
scrollitem:
|
||||
|
||||
scrollitem-hover:
|
||||
Inherits: button
|
||||
|
||||
scrollitem-pressed:
|
||||
Inherits: button
|
||||
|
||||
scrollitem-highlighted:
|
||||
Inherits: button-pressed
|
||||
|
||||
scrollitem-nohover:
|
||||
|
||||
scrollitem-nohover-highlighted:
|
||||
|
||||
scrollheader:
|
||||
Inherits: button
|
||||
|
||||
scrollheader-highlighted:
|
||||
Inherits: button
|
||||
|
||||
logos:
|
||||
Inherits: ^LoadScreen
|
||||
Regions:
|
||||
logo: 0, 0, 256, 256
|
||||
|
||||
loadscreen-stripe:
|
||||
Inherits: ^LoadScreen
|
||||
PanelRegion: 258, 0, 0, 0, 253, 256, 0, 0
|
||||
PanelSides: Center
|
||||
|
||||
mainmenu-border:
|
||||
Inherits: ^Dialog
|
||||
PanelRegion: 650, 389, 39, 39, 38, 38, 39, 39
|
||||
PanelSides: Edges
|
||||
|
||||
scrollpanel-decorations:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
down: 68, 17, 16, 16
|
||||
down-disabled: 85, 17, 16, 16
|
||||
up: 102, 17, 16, 16
|
||||
up-disabled: 119, 17, 16, 16
|
||||
right: 136, 17, 16, 16
|
||||
right-disabled: 153, 17, 16, 16
|
||||
left: 170, 17, 16, 16
|
||||
left-disabled: 187, 17, 16, 16
|
||||
|
||||
dropdown-decorations:
|
||||
Inherits: ^Glyphs
|
||||
Regions:
|
||||
marker: 68, 17, 16, 16
|
||||
marker-disabled: 85, 17, 16, 16
|
||||
|
||||
dropdown-separators:
|
||||
Inherits: ^Dialog
|
||||
Regions:
|
||||
separator: 513, 2, 1, 19
|
||||
separator-hover: 513, 130, 1, 19
|
||||
separator-pressed: 766, 2, 1, 19
|
||||
separator-disabled: 513, 258, 1, 19
|
||||
observer-separator: 769, 258, 1, 19
|
||||
|
||||
separator:
|
||||
Inherits: button
|
||||
6
mods/example/chrome/layouts/ingame-player.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
Container@PLAYER_WIDGETS:
|
||||
Logic: MenuButtonsChromeLogic
|
||||
Children:
|
||||
LogicTicker@SIDEBAR_TICKER:
|
||||
MenuButton@OPTIONS_BUTTON:
|
||||
Key: escape
|
||||
@ -1,6 +0,0 @@
|
||||
Cursors:
|
||||
mouse.shp: terrain
|
||||
default:
|
||||
Start: 0
|
||||
X: -16
|
||||
Y: -12
|
||||
BIN
mods/example/cursors/assets/default.png
Normal file
|
After Width: | Height: | Size: 382 B |
4
mods/example/cursors/default.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
Cursors:
|
||||
cursors/assets/default.png:
|
||||
default:
|
||||
Start: 0
|
||||
@ -1,2 +0,0 @@
|
||||
# Game speeds:
|
||||
Normal = Normal
|
||||
@ -1,10 +0,0 @@
|
||||
Container@MAINMENU:
|
||||
Logic: TemplateMenuLogic
|
||||
Children:
|
||||
Button@QUIT_BUTTON:
|
||||
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
||||
Width: 140
|
||||
Height: 30
|
||||
Text: Quit
|
||||
Font: Bold
|
||||
|
Before Width: | Height: | Size: 147 B |
@ -1,29 +0,0 @@
|
||||
MapFormat: 11
|
||||
|
||||
RequiresMod: example
|
||||
|
||||
Title: Placeholder Map
|
||||
|
||||
Author: Example Mod author
|
||||
|
||||
Tileset: TEMPLATE
|
||||
|
||||
MapSize: 5,5
|
||||
|
||||
Bounds: 1,1,1,1
|
||||
|
||||
Visibility: Shellmap, Lobby
|
||||
|
||||
Categories: Maps
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Faction: example
|
||||
PlayerReference@Multi0:
|
||||
Name: Multi0
|
||||
Playable: True
|
||||
|
||||
Actors:
|
||||
BIN
mods/example/maps/example/map.bin
Normal file
BIN
mods/example/maps/example/map.png
Normal file
|
After Width: | Height: | Size: 83 B |
38
mods/example/maps/example/map.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
MapFormat: 11
|
||||
|
||||
RequiresMod: Example
|
||||
|
||||
Title: Example Map
|
||||
|
||||
Author: Example Author
|
||||
|
||||
Tileset: EXAMPLE
|
||||
|
||||
MapSize: 34,34
|
||||
|
||||
Bounds: 1,1,32,32
|
||||
|
||||
Visibility: Lobby
|
||||
|
||||
Categories: Maps
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
PlayerReference@Creeps:
|
||||
Name: Creeps
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
PlayerReference@Multi0:
|
||||
Name: Multi0
|
||||
Playable: True
|
||||
Faction: Random
|
||||
Enemies: Creeps
|
||||
|
||||
Actors:
|
||||
Actor0: mpspawn
|
||||
Owner: Multi0
|
||||
Location: 16,16
|
||||
BIN
mods/example/maps/shellmap/map.bin
Normal file
BIN
mods/example/maps/shellmap/map.png
Normal file
|
After Width: | Height: | Size: 83 B |
30
mods/example/maps/shellmap/map.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
MapFormat: 11
|
||||
|
||||
RequiresMod: Example
|
||||
|
||||
Title: Example Shellmap
|
||||
|
||||
Author: Example Author
|
||||
|
||||
Tileset: EXAMPLE
|
||||
|
||||
MapSize: 34,34
|
||||
|
||||
Bounds: 1,1,32,32
|
||||
|
||||
Visibility: Shellmap
|
||||
|
||||
Categories: Maps
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
PlayerReference@Creeps:
|
||||
Name: Creeps
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
|
||||
Actors:
|
||||
@ -1,3 +0,0 @@
|
||||
Metrics:
|
||||
ClickDisabledSound:
|
||||
ClickSound:
|
||||
107
mods/example/mod.chrome.yaml
Normal file
@ -0,0 +1,107 @@
|
||||
Chrome:
|
||||
example|chrome/chrome.yaml
|
||||
|
||||
ChromeLayout:
|
||||
common|chrome/assetbrowser.yaml
|
||||
common|chrome/color-picker.yaml
|
||||
common|chrome/confirmation-dialogs.yaml
|
||||
common|chrome/connection.yaml
|
||||
common|chrome/credits.yaml
|
||||
common|chrome/dropdowns.yaml
|
||||
common|chrome/editor.yaml
|
||||
common|chrome/gamesave-browser.yaml
|
||||
common|chrome/gamesave-loading.yaml
|
||||
common|chrome/ingame.yaml
|
||||
common|chrome/ingame-chat.yaml
|
||||
common|chrome/ingame-debug.yaml
|
||||
common|chrome/ingame-debuginfo.yaml
|
||||
common|chrome/ingame-fmvplayer.yaml
|
||||
common|chrome/ingame-info.yaml
|
||||
common|chrome/ingame-infobriefing.yaml
|
||||
common|chrome/ingame-infochat.yaml
|
||||
common|chrome/ingame-info-lobby-options.yaml
|
||||
common|chrome/ingame-infoobjectives.yaml
|
||||
common|chrome/ingame-infoscripterror.yaml
|
||||
common|chrome/ingame-infostats.yaml
|
||||
common|chrome/ingame-menu.yaml
|
||||
common|chrome/ingame-observer.yaml
|
||||
common|chrome/ingame-perf.yaml
|
||||
example|chrome/layouts/ingame-player.yaml
|
||||
common|chrome/ingame-transients.yaml
|
||||
common|chrome/lobby.yaml
|
||||
common|chrome/lobby-kickdialogs.yaml
|
||||
common|chrome/lobby-mappreview.yaml
|
||||
common|chrome/lobby-music.yaml
|
||||
common|chrome/lobby-options.yaml
|
||||
common|chrome/lobby-players.yaml
|
||||
common|chrome/lobby-servers.yaml
|
||||
common|chrome/mainmenu.yaml
|
||||
common|chrome/mainmenu-prompts.yaml
|
||||
common|chrome/map-chooser.yaml
|
||||
common|chrome/missionbrowser.yaml
|
||||
common|chrome/multiplayer-browser.yaml
|
||||
common|chrome/multiplayer-browserpanels.yaml
|
||||
common|chrome/multiplayer-createserver.yaml
|
||||
common|chrome/multiplayer-directconnect.yaml
|
||||
common|chrome/musicplayer.yaml
|
||||
common|chrome/playerprofile.yaml
|
||||
common|chrome/replaybrowser.yaml
|
||||
common|chrome/settings.yaml
|
||||
common|chrome/settings-advanced.yaml
|
||||
common|chrome/settings-audio.yaml
|
||||
common|chrome/settings-display.yaml
|
||||
common|chrome/settings-hotkeys.yaml
|
||||
common|chrome/settings-input.yaml
|
||||
common|chrome/text-notifications.yaml
|
||||
common|chrome/tooltips.yaml
|
||||
|
||||
ChromeMetrics:
|
||||
common|metrics.yaml
|
||||
|
||||
Fonts:
|
||||
Tiny:
|
||||
Font: common|FreeSans.ttf
|
||||
Size: 10
|
||||
Ascender: 8
|
||||
TinyBold:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 10
|
||||
Ascender: 8
|
||||
Small:
|
||||
Font: common|FreeSans.ttf
|
||||
Size: 12
|
||||
Ascender: 9
|
||||
Regular:
|
||||
Font: common|FreeSans.ttf
|
||||
Size: 14
|
||||
Ascender: 11
|
||||
Bold:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 14
|
||||
Ascender: 11
|
||||
MediumBold:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 18
|
||||
Ascender: 14
|
||||
BigBold:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 24
|
||||
Ascender: 18
|
||||
Title:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 32
|
||||
Ascender: 24
|
||||
|
||||
Hotkeys:
|
||||
common|hotkeys/chat.yaml
|
||||
common|hotkeys/control-groups.yaml
|
||||
common|hotkeys/editor.yaml
|
||||
common|hotkeys/game.yaml
|
||||
common|hotkeys/observer.yaml
|
||||
common|hotkeys/production-common.yaml
|
||||
common|hotkeys/production-peractor.yaml
|
||||
common|hotkeys/supportpowers.yaml
|
||||
common|hotkeys/viewport.yaml
|
||||
|
||||
Translations:
|
||||
common|languages/en.ftl
|
||||
32
mods/example/mod.content.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
Cursors:
|
||||
example|cursors/default.yaml
|
||||
|
||||
Missions:
|
||||
example|missions/example.yaml
|
||||
|
||||
Music:
|
||||
example|music/example.yaml
|
||||
|
||||
Notifications:
|
||||
example|notifications/example.yaml
|
||||
|
||||
Rules:
|
||||
example|rules/example.yaml
|
||||
example|rules/mpspawn.yaml
|
||||
example|rules/palettes.yaml
|
||||
example|rules/player.yaml
|
||||
example|rules/world.yaml
|
||||
|
||||
Sequences:
|
||||
example|sequences/example.yaml
|
||||
example|sequences/mapeditor.yaml
|
||||
example|sequences/mpspawn.yaml
|
||||
|
||||
TileSets:
|
||||
example|tilesets/example.yaml
|
||||
|
||||
Voices:
|
||||
example|voices/example.yaml
|
||||
|
||||
Weapons:
|
||||
example|weapons/example.yaml
|
||||
@ -1,47 +1,26 @@
|
||||
Metadata:
|
||||
Title: Example mod
|
||||
Version: {DEV_VERSION}
|
||||
WindowTitle: Example
|
||||
|
||||
Packages:
|
||||
^EngineDir
|
||||
$example: example
|
||||
^EngineDir|mods/common: common
|
||||
example|bits
|
||||
|
||||
MapFolders:
|
||||
example|maps: System
|
||||
|
||||
Rules:
|
||||
example|rules.yaml
|
||||
|
||||
TileSets:
|
||||
example|tileset.yaml
|
||||
|
||||
Cursors:
|
||||
example|cursor.yaml
|
||||
|
||||
Chrome:
|
||||
example|chrome.yaml
|
||||
|
||||
Assemblies:
|
||||
^BinDir|OpenRA.Mods.Common.dll
|
||||
^BinDir|OpenRA.Mods.Example.dll
|
||||
|
||||
ChromeLayout:
|
||||
example|mainmenu.yaml
|
||||
AssetBrowser:
|
||||
AudioExtensions: .wav
|
||||
SpriteExtensions: .png
|
||||
VideoExtensions:
|
||||
|
||||
Music:
|
||||
example|audio/music.yaml
|
||||
|
||||
Notifications:
|
||||
example|audio/notifications.yaml
|
||||
|
||||
Translations:
|
||||
common|languages/en.ftl
|
||||
example|languages/en.ftl
|
||||
|
||||
Hotkeys:
|
||||
common|hotkeys/game.yaml
|
||||
SupportsMapsFrom: Example
|
||||
|
||||
LoadScreen: BlankLoadScreen
|
||||
|
||||
@ -51,21 +30,11 @@ ServerTraits:
|
||||
MasterServerPinger
|
||||
LobbySettingsNotification
|
||||
|
||||
ChromeMetrics:
|
||||
common|metrics.yaml
|
||||
example|metrics.yaml
|
||||
|
||||
Fonts:
|
||||
Bold:
|
||||
Font: common|FreeSansBold.ttf
|
||||
Size: 14
|
||||
Ascender: 11
|
||||
|
||||
MapGrid:
|
||||
TileSize: 32, 32
|
||||
Type: Rectangular
|
||||
|
||||
SpriteFormats: ShpTS
|
||||
SpriteFormats: PngSheet
|
||||
|
||||
SoundFormats: Wav
|
||||
|
||||
@ -80,7 +49,30 @@ DefaultOrderGenerator: UnitOrderGenerator
|
||||
GameSpeeds:
|
||||
DefaultSpeed: default
|
||||
Speeds:
|
||||
slowest:
|
||||
Name: slowest
|
||||
Timestep: 80
|
||||
OrderLatency: 2
|
||||
slower:
|
||||
Name: slower
|
||||
Timestep: 50
|
||||
OrderLatency: 3
|
||||
default:
|
||||
Name: Normal
|
||||
Name: normal
|
||||
Timestep: 40
|
||||
OrderLatency: 3
|
||||
fast:
|
||||
Name: fast
|
||||
Timestep: 35
|
||||
OrderLatency: 4
|
||||
faster:
|
||||
Name: faster
|
||||
Timestep: 30
|
||||
OrderLatency: 4
|
||||
fastest:
|
||||
Name: fastest
|
||||
Timestep: 20
|
||||
OrderLatency: 6
|
||||
|
||||
Include: mod.content.yaml
|
||||
Include: mod.chrome.yaml
|
||||
|
||||
0
mods/example/music/example.yaml
Normal file
5
mods/example/notifications/example.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
Sounds:
|
||||
Notifications:
|
||||
ChatLine:
|
||||
ClickDisabledSound:
|
||||
ClickSound:
|
||||
@ -1,38 +0,0 @@
|
||||
World:
|
||||
TerrainRenderer:
|
||||
AlwaysVisible:
|
||||
ActorMap:
|
||||
ScreenMap:
|
||||
LoadWidgetAtGameStart:
|
||||
Faction@0:
|
||||
Name: Example
|
||||
InternalName: example
|
||||
Side: Example
|
||||
Selectable: False
|
||||
PaletteFromFile:
|
||||
Name: terrain
|
||||
Tileset: TEMPLATE
|
||||
Filename: template.pal
|
||||
CursorPalette: true
|
||||
ShadowIndex:
|
||||
Selection:
|
||||
ControlGroups:
|
||||
|
||||
DummyActor:
|
||||
BodyOrientation:
|
||||
HitShape:
|
||||
AlwaysVisible:
|
||||
|
||||
Player:
|
||||
AlwaysVisible:
|
||||
TechTree:
|
||||
PlaceBuilding:
|
||||
SupportPowerManager:
|
||||
PlayerResources:
|
||||
DeveloperMode:
|
||||
Shroud:
|
||||
FrozenActorLayer:
|
||||
|
||||
EditorPlayer:
|
||||
AlwaysVisible:
|
||||
Shroud:
|
||||
17
mods/example/rules/example.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
example:
|
||||
AlwaysVisible:
|
||||
BodyOrientation:
|
||||
HitShape:
|
||||
Immobile:
|
||||
MapEditorData:
|
||||
Categories: Actors
|
||||
QuantizeFacingsFromSequence:
|
||||
RenderSprites:
|
||||
WithSpriteBody:
|
||||
|
||||
example.colorpicker:
|
||||
Inherits: example
|
||||
RenderSprites:
|
||||
Image: example
|
||||
Palette: colorpicker
|
||||
-MapEditorData:
|
||||
8
mods/example/rules/mpspawn.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
mpspawn:
|
||||
AlwaysVisible:
|
||||
Immobile:
|
||||
OccupiesSpace: false
|
||||
MapEditorData:
|
||||
Categories: System
|
||||
RenderSpritesEditorOnly:
|
||||
WithSpriteBody:
|
||||
13
mods/example/rules/palettes.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
^palettes:
|
||||
PaletteFromGrayscale@greyscale:
|
||||
Name: greyscale
|
||||
PlayerColorPalette@player:
|
||||
BasePalette: greyscale
|
||||
PlayerColorShift:
|
||||
BasePalette: player
|
||||
ColorPickerPalette@colorpicker:
|
||||
Name: colorpicker
|
||||
BasePalette: greyscale
|
||||
AllowModifiers: false
|
||||
ColorPickerColorShift:
|
||||
BasePalette: colorpicker
|
||||
10
mods/example/rules/player.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
^baseplayer:
|
||||
AlwaysVisible:
|
||||
Shroud:
|
||||
|
||||
player:
|
||||
Inherits: ^baseplayer
|
||||
DeveloperMode:
|
||||
|
||||
editorplayer:
|
||||
Inherits: ^baseplayer
|
||||
43
mods/example/rules/world.yaml
Normal file
@ -0,0 +1,43 @@
|
||||
^baseworld:
|
||||
Inherits: ^palettes
|
||||
ActorMap:
|
||||
AlwaysVisible:
|
||||
ControlGroups:
|
||||
Faction@Random:
|
||||
InternalName: Random
|
||||
Name: Random
|
||||
RandomFactionMembers: example
|
||||
Faction@example:
|
||||
InternalName: example
|
||||
Name: Example
|
||||
LoadWidgetAtGameStart:
|
||||
MusicPlaylist:
|
||||
ScreenMap:
|
||||
Selection:
|
||||
TerrainRenderer:
|
||||
|
||||
world:
|
||||
Inherits: ^baseworld
|
||||
ColorPickerManager:
|
||||
PreviewActor: example.colorpicker
|
||||
CreateMapPlayers:
|
||||
CustomTerrainDebugOverlay:
|
||||
DebugVisualizations:
|
||||
MapStartingLocations:
|
||||
SpawnMapActors:
|
||||
SpawnStartingUnits:
|
||||
StartingUnits@Example:
|
||||
BaseActor: example
|
||||
Factions: example
|
||||
|
||||
editorworld:
|
||||
Inherits: ^baseworld
|
||||
BuildableTerrainOverlay:
|
||||
AllowedTerrainTypes:
|
||||
Palette:
|
||||
EditorActionManager:
|
||||
EditorActorLayer:
|
||||
EditorCursorLayer:
|
||||
EditorSelectionLayer:
|
||||
Palette:
|
||||
TerrainGeometryOverlay:
|
||||
BIN
mods/example/sequences/assets/example.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
mods/example/sequences/assets/mapeditor.png
Normal file
|
After Width: | Height: | Size: 159 B |
BIN
mods/example/sequences/assets/mpspawn.png
Normal file
|
After Width: | Height: | Size: 298 B |
2
mods/example/sequences/example.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
example:
|
||||
idle: sequences/assets/example.png
|
||||
8
mods/example/sequences/mapeditor.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
overlay:
|
||||
build-invalid: sequences/assets/mapeditor.png
|
||||
Start: 1
|
||||
|
||||
editor-overlay:
|
||||
copy: sequences/assets/mapeditor.png
|
||||
paste: sequences/assets/mapeditor.png
|
||||
Start: 1
|
||||
2
mods/example/sequences/mpspawn.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
mpspawn:
|
||||
idle: sequences/assets/mpspawn.png
|
||||
@ -1,7 +1,8 @@
|
||||
General:
|
||||
Name: Template
|
||||
Id: TEMPLATE
|
||||
Name: Example
|
||||
Id: EXAMPLE
|
||||
EditorTemplateOrder: Terrain
|
||||
Palette:
|
||||
|
||||
Terrain:
|
||||
TerrainType@Clear:
|
||||
@ -10,7 +11,7 @@ Terrain:
|
||||
Templates:
|
||||
Template@255:
|
||||
Id: 255
|
||||
Images: blank.shp
|
||||
Images: tilesets/example/example.png
|
||||
Size: 1,1
|
||||
Categories: Terrain
|
||||
Tiles:
|
||||
BIN
mods/example/tilesets/example/example.png
Normal file
|
After Width: | Height: | Size: 516 B |