Jump to content
Sign in to follow this  

[Tuto] Customize the GUI

Recommended Posts

Hello everyone, I didn't see any totorial to explain how to change the GUI. So, I will try to write one. I'm not English, so if they are mistakes, moderators could edit this. 

I will update this tutorial when I will found new things (I learn from analysing the source code).


Customize your Gui

0.Create a mod

1. Add a new panel

2. Coming soon ...


0.Create a mod

  1. Go in the folder where you install 0ad : "0 A.D. alpha" then into  "0 A.D. alpha\binaries\data\mods"
  2. Create a new folder with the name of you mod (replace space by _)
  3. Go in "0 A.D. alpha\binaries\data\mods\public" ; copy "mod.json" in your own mod directory
  4. Edit the file with Notepad++ : after "label :" delete "0 A.D. Empires Ascendant" and enter the name of your own mod ; you can also change the description

Congratulations ! Now your mod appears in the mod selection of 0ad !

1. Add a new panel

  1. In the directory of your mod, create these folders : "\gui\session"
  2. Go into the public mod folder (0 A.D. alpha\binaries\data\mods\public) open the zip file and then go in gui\session. Copy session.xml and sprites.xml in your own session folder.
  3. Edit session.xml with Notepad++ : line 103 add "<include file="gui/session/the_name_of_your_panel.xml"/>"
  4. Edit sprites.xml : after "<!-- Panel Backgrounds -->" (line 27) add :
	<sprite name="the_name_of_your_sprite">
		<image texture="session/folder_of_my_pictures/name_of_my_background_picture.png"
			texture_size="0 0 100% 100%"
			size="0 0 100% 100%"

5. Create in the folder session a file named the_name_of_your_panel.xml , then edit it :

<?xml version="1.0" encoding="utf-8"?>
<object name="the_name_of_your_panel"
	size="coordinateX1 coordinateY1 coordinateX2 coordinateY2"

You must define the placement of your panel with its coordinates.

6. Place the background picture of your panel in name_of_your_mod\art\textures\ui\session\folder_of_my_picture\name_of_my_background_picture.png

Launch 0ad and activate your mod. Your panel is now present during your game !

  • Like 2
  • Thanks 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this