Light Style© by Fisana

Jump to content


Photo

How to create mods for 0 A.D.?


  • Please log in to reply
9 replies to this topic

#1 Phoenix4646

Phoenix4646

    Discens

  • Community Members
  • Pip
  • 18 posts

Posted 25 February 2012 - 07:23 PM

Hi there,

I've been trying to mod the game by creating a new folder in the mods folder (where you find the 'public' folder as well) and calling it gen. In that folder I put the audio/music folder and changed the main menu and hellenic peace tracks, then I created a new shortcut from pyrogenenis.exe and added -mod=gen. But when I start it, nothing has changed, all the tracks are the same. What did I do wrong? Do I have to change anything else?
  • 0

#2 historic_bruno

historic_bruno

    Primus Pilus

  • WFG Programming Team
  • 2,300 posts

Posted 26 February 2012 - 12:39 AM

Did you rename the sounds or were they exactly the same?
  • 0
Ben Brian [ aka historic_bruno ]

Wildfire Games Programmer
Contact me: ben [at] wildfiregames [dot] com

#3 Phoenix4646

Phoenix4646

    Discens

  • Community Members
  • Pip
  • 18 posts

Posted 26 February 2012 - 10:13 AM

They are exactly the same, to test it I put all the files from the game into that new folder and renamed it to public (calling it 'internal' also worked), and then it worked. I could hear all the tracks I changed. But why does it only work when I replace the files?

03/02/2012 : Does no-one have an idea?

Edited by Phoenix4646, 02 March 2012 - 07:17 PM.

  • 0

#4 Phoenix4646

Phoenix4646

    Discens

  • Community Members
  • Pip
  • 18 posts

Posted 08 March 2012 - 07:47 PM

I'm still looking for the problem, I can't seem to find it. Can nobody help me?
  • 0

#5 Pureon

Pureon

    Primus Pilus

  • 0 A.D. Art Team
  • 3,508 posts

Posted 09 March 2012 - 09:45 AM

I thought I'd reply to your question even though I don't really have an answer for you. The changes you are making will not change the music - I have replicated what you are doing and I can confirm it does not work.

What you could try instead, is change the MAIN_MENU_TRACK in the music.js file which is here:
binaries/data/mods/public/gui/common/music.js

So place a duplicate of that file (and folder structure) into your mod folder, and change the track references there.
  • 0

Pureon
0 A.D. Part time Designer / Texturer / 3D Artist
Contact email:
pureon{@}wildfiregames.com


#6 Phoenix4646

Phoenix4646

    Discens

  • Community Members
  • Pip
  • 18 posts

Posted 19 March 2012 - 08:14 PM

Okay, I've tried out what you told me, but it didn't work. However, creating a new civ and using added tracks for them is no problem. Replacing files that are already in the game (e.g. music files or scripts, like music.js) doesn't seem to work.
  • 0

#7 Mythos_Ruler

Mythos_Ruler

    Megas Philhellene

  • 0 A.D. Project Leader
  • 14,877 posts

Posted 19 March 2012 - 08:23 PM

Hmmm, looks like additive mods work right now then, and not mods that replace anything. Sorry for the confusion.
  • 0

Michael D. Hafer [aka Mythos_Ruler]

Wildfire Games Project Leader

Contact me: michaeldhafergmailcom

 

Support Wildfire Games!

 

10298.png


#8 quantumstate

quantumstate

    Primus Pilus

  • WFG Programming Team
  • 1,150 posts

Posted 20 March 2012 - 12:11 AM

If only additive mods are working that it sounds like the load order is wrong. I don't think we have any way of defining it yet though.
  • 0
Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!

#9 Phoenix4646

Phoenix4646

    Discens

  • Community Members
  • Pip
  • 18 posts

Posted 20 March 2012 - 12:26 AM

Hm, whatever, I'm sure you guys get to 'fix' this anytime :)
But while I'm at it, where are the unit files located at?

EDIT:: @Quantumstate: Yeah, I thought the same. Yet it is still odd that it even didn't work when I renamed the folder ^^

Edited by Phoenix4646, 20 March 2012 - 12:28 AM.

  • 0

#10 quantumstate

quantumstate

    Primus Pilus

  • WFG Programming Team
  • 1,150 posts

Posted 20 March 2012 - 11:05 AM

Hm, whatever, I'm sure you guys get to 'fix' this anytime :)
But while I'm at it, where are the unit files located at?

EDIT:: @Quantumstate: Yeah, I thought the same. Yet it is still odd that it even didn't work when I renamed the folder ^^


The data files describing the units are in simulation/templates, they use an inheritance system. There are also data files which describe the 3D models in art/actors/.
  • 0
Jonathan Waller [ aka quantumstate ]

Wildfire Games Programmer
Contact me: jonathanmarkwaller at gmail dot com


Support Wildfire Games!