Asher Posted April 1 Share Posted April 1 Is there a basic, somewhat beginner modding guide somewhere? Quote Link to comment Share on other sites More sharing options...
guerringuerrin Posted April 1 Share Posted April 1 6 minutes ago, Asher said: Is there a basic, somewhat beginner modding guide somewhere? https://gitea.wildfiregames.com/0ad/0ad/wiki/Modding_Guide And also you have the full 0ad Wiki here: https://gitea.wildfiregames.com/0ad/0ad/wiki 1 Quote Link to comment Share on other sites More sharing options...
Asher Posted April 1 Author Share Posted April 1 Thanks! 1 Quote Link to comment Share on other sites More sharing options...
Asher Posted April 1 Author Share Posted April 1 16 hours ago, guerringuerrin said: https://gitea.wildfiregames.com/0ad/0ad/wiki/Modding_Guide And also you have the full 0ad Wiki here: https://gitea.wildfiregames.com/0ad/0ad/wiki Is there a list of the xml tags for units and structures? Quote Link to comment Share on other sites More sharing options...
Atrik Posted April 1 Share Posted April 1 6 minutes ago, Asher said: Is there a list of the xml tags for units and structures? https://docs.wildfiregames.com/entity-docs/r28/components/ @Vantha gave me this link a while ago, but no idea where I was supposed to find it. 1 Quote Link to comment Share on other sites More sharing options...
guerringuerrin Posted April 1 Share Posted April 1 45 minutes ago, Atrik said: https://docs.wildfiregames.com/entity-docs/r28/components/ @Vantha gave me this link a while ago, but no idea where I was supposed to find it. That's cool stuff to add to my bookmarks 56 minutes ago, Asher said: Is there a list of the xml tags for units and structures? I'm not really into modding units, but maybe this web can be useful for you too: https://docs.wildfiregames.com/templatesanalyzer/ Quote Link to comment Share on other sites More sharing options...
Asher Posted April 1 Author Share Posted April 1 Thanks for all these resources! 1 Quote Link to comment Share on other sites More sharing options...
Asher Posted April 5 Author Share Posted April 5 On 01/04/2026 at 1:56 PM, guerringuerrin said: On 01/04/2026 at 1:09 PM, Atrik said: https://docs.wildfiregames.com/entity-docs/r28/components/ @Vantha gave me this link a while ago, but no idea where I was supposed to find it. That's cool stuff to add to my bookmarks On 01/04/2026 at 12:58 PM, Asher said: Is there a list of the xml tags for units and structures? I'm not really into modding units, but maybe this web can be useful for you too: https://docs.wildfiregames.com/templatesanalyzer/ Are there templates for the units and structures and other civ data for a new civ? Quote Link to comment Share on other sites More sharing options...
guerringuerrin Posted April 5 Share Posted April 5 10 minutes ago, Asher said: Are there templates for the units and structures and other civ data for a new civ? I can’t really tell you. I’ve never modded unit/civ templates. But if I were to do it, I think I’d start by looking at how a civ’s files are structured here: https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/simulation/templates Quote Link to comment Share on other sites More sharing options...
Asher Posted April 5 Author Share Posted April 5 56 minutes ago, guerringuerrin said: 1 hour ago, Asher said: Are there templates for the units and structures and other civ data for a new civ? I can’t really tell you. I’ve never modded unit/civ templates. But if I were to do it, I think I’d start by looking at how a civ’s files are structured here: https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/simulation/templates Do you know if there is a guide to making a new civ? Quote Link to comment Share on other sites More sharing options...
guerringuerrin Posted April 5 Share Posted April 5 30 minutes ago, Asher said: Do you know if there is a guide to making a new civ? I don't know. But, you could check how is done in this mods: https://github.com/JustusAvramenko/delenda_est Or maybe @Emacz can help you with that =) 1 Quote Link to comment Share on other sites More sharing options...
Asher Posted April 5 Author Share Posted April 5 Ok, Thanks so much! 1 Quote Link to comment Share on other sites More sharing options...
Lopess Posted April 6 Share Posted April 6 @Asher, My advice is to download a mod from Github, for example, and get it running. Analyze the mod's files closely (I recommend using VS Code or something similar). Start with something simple, (Create a new unit, or change the name and icon of a civilization) with this you can find most of the errors by reading the logs.The manuals are a good starting point, but that doesn't negate the fact that the best approach is to modify existing mods to achieve a greater goal. Believe me, the learning curve is quite steep. 2 Quote Link to comment Share on other sites More sharing options...
Asher Posted April 6 Author Share Posted April 6 9 hours ago, Lopess said: @Asher, My advice is to download a mod from Github, for example, and get it running. Analyze the mod's files closely (I recommend using VS Code or something similar). Start with something simple, (Create a new unit, or change the name and icon of a civilization) with this you can find most of the errors by reading the logs.The manuals are a good starting point, but that doesn't negate the fact that the best approach is to modify existing mods to achieve a greater goal. Believe me, the learning curve is quite steep. Thanks! Quote Link to comment Share on other sites More sharing options...
Asher Posted Tuesday at 20:33 Author Share Posted Tuesday at 20:33 I am trying to make a text input box for starting resources. How would I make it text input: GameSettingControls.StartingResources = class StartingResources extends GameSettingControlDropdown { constructor(...args) { super(...args); this.dropdown.list = g_StartingResources.Title; this.dropdown.list_data = g_StartingResources.Resources; this.sprintfArgs = {}; g_GameSettings.startingResources.watch(() => this.render(), ["resources", "perPlayer"]); g_GameSettings.map.watch(() => this.render(), ["type"]); this.render(); } ... Quote Link to comment Share on other sites More sharing options...
Vantha Posted Tuesday at 21:50 Share Posted Tuesday at 21:50 Making it a text input is definitely possible, but not straightforward, unfortunately. In the game settings code there are a lot of layers of abstraction, a lot of wrappers and super classes, to make adding new ones easy. Like the current dropdown. But there are no such classes for text inputs yet, since no game setting actually requires them. I suggest to try to make it a slider instead, this is easier since there are existing game setting controls that are sliders. See https://gitea.wildfiregames.com/0ad/0ad/commit/38eb999ff9d627ab319820a5fc77f332b100e32d Quote Link to comment Share on other sites More sharing options...
Asher Posted Tuesday at 21:53 Author Share Posted Tuesday at 21:53 (edited) 3 minutes ago, Vantha said: Making it a text input is definitely possible, but not straightforward, unfortunately. In the game settings code there are a lot of layers of abstraction, a lot of wrappers and super classes, to make adding new ones easy. Like the current dropdown. But there are no such classes for text inputs yet, since no game setting actually requires them. I suggest to try to make it a slider instead, this is easier since there are existing game setting controls that are sliders. See https://gitea.wildfiregames.com/0ad/0ad/commit/38eb999ff9d627ab319820a5fc77f332b100e32d But there are text inputs when singing in to the multiplayer lobby. I guess a slider would work though Edited Tuesday at 21:54 by Asher Quote Link to comment Share on other sites More sharing options...
Vantha Posted yesterday at 08:43 Share Posted yesterday at 08:43 10 hours ago, Asher said: But there are text inputs when singing in to the multiplayer lobby. I guess a slider would work though Yes, the engine totally supports text inputs, but as I said on the game setup screen there is a lot of extra JS logic for each of the setting types (dropdown, checkbox, etc.) but there is no "GameSettingControl_____" class for text inputs here yet: https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/public/gui/gamesetup/Pages/GameSetupPage/GameSettings, so you'd probably have to add that first. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.