Jump to content

[Tutorial] Setting up a mod for your maps


niektb
 Share

Recommended Posts

With the recent questions for help it seemed a good idea to us (shieldwolf and I) to create a tutorial about scenario designing. This post is a small part of it to answer recent questions to creating mods for your maps. (The rest of the tutorial is still WIP and deals with the Battle of Gergovia as you might notice from the text and the screenshots). Click on the images to view a larger size.

Setting up a mod and run Atlas

Create the folder

zGnJiNB.png

Browse to <0adfolder>/binaries/data/mods and create a new folder. Call it whatever you like, I call it ‘map_Battle_of_Gergovia’ where ‘map’ is used to distinguish it (for us, humans) from the other mods and ‘Battle of Gergovia’ will be the name of the map.

Another option is to browse to My Documents/My Games/0ad/mods and create the folder there. The result is equal.

Allow your mod to be recognized by 0 A.D.

Open the folder and create a file called ‘mod.json’. Make sure that the extension of the file is changed into ‘.json’.

This file is very important! Thanks to this the game will read your mod.

Now open that folder in any code editor you like. I use Sublime Text 3 (http://www.sublimetext.com/3) but programs like Notepad++ (http://notepad-plus-plus.org/) are possible too.

uEXIjqF.png

Your file should read something like my file in the image above. The text you fill in shows up later in the Mod Launcher as you can see further down the post. In the dependencies you define what is needed to run the mod. We choose 0ad since we want people to use it with 0 A.D. It is also possible to specify a version but we don't need that here. Save and close the code editor.

Run the Scenario Editor with your mod enabled

Now run the game and choose ‘Mod Selection’ in the Tools & Options menu.

0zoT8en.png

Select your mod in the list and click ‘Enable’.

bKlZehz.jpg

When in mod is in the lower list, click ‘Save Configuration’ and ‘Start Mods’.

After the game has restarted, click ‘Scenario Editor’ in the Tools & Options menu. Atlas will now open and you're ready for the next step.

4VVgyLr.jpg

Happy painting! :artist:

Edited by niektb
  • Like 3
Link to comment
Share on other sites

but where do i decide where it can be researched?

That would depend on the culture you are creating ie: if it's a an armour upgrade the blacksmith if that culture has one or if you want it to work in the early phases choose one of the buildings from the village phase.

Enjoy the Choice :)

Link to comment
Share on other sites

  • sanderd17 pinned this topic
  • 4 months later...

Use gedit the text editor set the language to XML as that's the format of most of the unit/building stats using the gnome terminal means you are actually interacting with the bash shell of the operating system:huh: while vim is mostly used when you have no graphical environment ie: the command line before Xwindows starts up and you need to change a config file to get Xwindows to run;)

Enjoy the Choice :)

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
  • 4 weeks later...
On 10/01/2017 at 3:45 PM, niektb said:

So in Atlas you open your map but nothing happens?

Atlas gives this message:
 

Spoiler

 

Much to our regret we must report the program has encountered an error.

Please let us know at http://trac.wildfiregames.com/ and attach the crashlog.txt and crashlog.dmp files.

Details: unhandled exception (PSERROR_Game_World_MapLoadFailed("Failed to load map.
Check application log for details."))

Location: unknown:0 (RtlSubscribeWnfStateChangeNotification)

Call stack:

(error while dumping stack: No stack frames found)
errno = 0 (No error reported here)
OS error = 0 (no error code was set)

 

 

39 minutes ago, fcxSanya said:

@shieldwolf23 can you post both map files (pmp + xml, zipped) here?

Attaching here.

 

Alexander.zip

Link to comment
Share on other sites

Ok --- I have set it up so that I can now access and play it in the scenario list. However, if I want to link some triggers to an existing map, could someone help me on how to do it? Don't worry, I'm documenting the things I'm doing and will definitely create a tutorial for other guys like me, with the help of the existing trigger work done by Niek in "A Silent Day in Gaul".

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...