Jump to content
  1. Welcome

    1. Announcements / News

      The latest. What is happening with 0 A.D. Stay tuned...

      5,3k
      posts
    2. Introductions & Off-Topic Discussion

      Want to discuss something that isn't related to 0 A.D. or Wildfire Games? This is the place. Come on in and introduce yourself. Get to know others who are using 0 A.D.

      38,4k
      posts
    3. Help & Feedback

      Here is where you can get help with your questions. Also be sure to tell us how we are doing. What can we improve? What do you wish we could do better? Your opinion matters to us!

      16,5k
      posts
  2. 0 A.D.

    1. General Discussion

      This is the place to post general stuff concerning the game. Want to express your love for hoplites or find people to play the game with? Want to share your stories about matches you have played or discuss historical connections to the game? These and any other topics which are related to the game, but don't have their own forums belong in this forum.

      49,9k
      posts
    2. Gameplay Discussion

      Discuss the game play of 0 A.D. Want to know why the game plays the way it does or offer suggestions for how to improve the game play experience? Then this is the forum.

      27,6k
      posts
    3. Game Development & Technical Discussion

      A forum for technical discussion about the development of 0 A.D. Feel free to ask questions of the developers and among yourselves.

      47,6k
      posts
    4. Art Development

      Open development for the game's art. Submissions, comments, and suggestions now open.

      31k
      posts
    5. Game Modification

      Do you have any questions about modifying the game? What will you need to do what you want to? What are the best techniques? Discuss Modifications, Map Making, AI scripting and Random Map Scripting here.

      43,8k
      posts
    6. Project Governance

      Forums for decision-making on issues where a consensus can't be reached or isn't sufficient. The committees are chosen from among the official team members, but to ensure an open and transparent decision process it's publically viewable.

      148
      posts
    7. 599
      posts
  • Topics

  • Posts

    • I was dabbling into this too. In my case i simply needed an extra main menu button, doing  let grapejuice = { "caption": translate("Grapejuice Info"), "tooltip": translate("View the changes that this mod brings to the game."), "onPress": () => { Engine.OpenChildPage("page_grapejuice.xml"); } }; mainMenuItems.unshift(grapejuice) into `MainMenuItems~grapejuice.append` Seems to be clean and works well if i do the same in another mod. However if the variable name is the same in some other mod it will hardcrash on startup. Even if you let the variable out of it and just do  mainMenuItems.unshift ( { "caption": translate("Grapejuice Info"), "tooltip": translate("View the changes that this mod brings to the game."), "onPress": () => { Engine.OpenChildPage("page_grapejuice.xml"); } } ) in 2 different mods it will hardcrash aswell. Not sure why and if this the recommended way of doing it anyway.
    • Thanks for your work! Also, the new log ram is cute (and efficient).
    • @phosit right, I was too quick. So, what works and what does not: ✔ gui/pregame/mainmenu~MyMod.append.js ✖ gui/pregame/mainmenu~MyMod.js The second approach has worked in all versions prior 28 - and this was "the" established practice, as far as I could see. It looks like the "append" keyword has a special meaning for evaluation of files (I tried with other keywords). Then I have two questions: Should modders be advised to rename all files of the form "module~MyMod.js" with "module~MyMod.append.js"? If so, could this be explicited somewhere? Probably not so relevant here https://gitea.wildfiregames.com/0ad/0ad/wiki/PortA27ToR28, but it would have helped.
    • With "any content" do you mean "no content"? Then that's expected. An empty file shouldn't change the behaviour. eg: appending nothing to the mainmenu.js doesn't change anything. When adding a `warn` call at global scope of the "append" file, it works for me.
×
×
  • Create New...