Jump to content
Sign in to follow this  
niektb

[Tutorial] Setting up a mod for your maps

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

Share this post


Link to post
Share on other sites

a tutorial on how to make custom upgrades in a mod. for example all units get +20 hp but -0.5 movement speed. would be really cool, but if you dont have time i understand.

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

Hey guys! I tried to make a mode for my map on fedora 24 using gnome terminal and vim, I did all what should be done and it doesn't work :shrug: , strange.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi Niek,

It's been ages, I know, but I want to start doing something again. Is this guide still the same guide I can use to start creating a scenario? Also, could you help me get the latest tutorial on triggers? Planning to revive Alexander's campaign.

  • Like 3

Share this post


Link to post
Share on other sites

Hi @shieldwolf23: that's great to hear! This guide should still work (let me know if it doesn't ;) ) but unfortunately I'm afraid the the most recent and most complete tutorial on triggers is our own unfinished Battle of Gergovia map. Not a lot has happened in the past two years in the trigger area :unsure: 

Share this post


Link to post
Share on other sites

:( That's sad, but I can still use your examples in the A Silent Day in Gaul, right? I remember you've made a comprehensive examples of trigger work there. Could you link me on that post? I've formatted my PC and tech-savvy as I am (sarcasm), I haven't properly linked files yet.

Share this post


Link to post
Share on other sites

Is it throwing an error or does it crash? 

Likely you haven't updated the map file to make use of the new maximum height. Could that be?

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...