Aragorn30 Posted June 21, 2018 Share Posted June 21, 2018 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 Go in the folder where you install 0ad : "0 A.D. alpha" then into "0 A.D. alpha\binaries\data\mods" Create a new folder with the name of you mod (replace space by _) Go in "0 A.D. alpha\binaries\data\mods\public" ; copy "mod.json" in your own mod directory 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 In the directory of your mod, create these folders : "\gui\session" 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. Edit session.xml with Notepad++ : line 103 add "<include file="gui/session/the_name_of_your_panel.xml"/>" 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%" /> </sprite> 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" type="image" sprite="the_name_of_your_sprite" size="coordinateX1 coordinateY1 coordinateX2 coordinateY2" tooltip_style="sessionToolTip"> </object> 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 ! 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now