Jump to content

How to package your mods on Windows


Stan`
 Share

Recommended Posts

Due to the recent increase in interest for mods as well as the relative simplicity with which you can install them (either through .pyromod files or mod.io) I decided to make a little guide to explain how to package mods. It's a relative tedious process when you are not familiar to it, so don't worry if you do not get it right the first time.

Requirements: You need to have the package_mod installed

Spoiler


binaries/data/mods
  • First go to 0 .A.D.'s root folder (This the one that contains the binaries folder):
Spoiler

image.png

  •   In the adress bar type "powershell"
Spoiler

image.png

  • A wild window will appear. (Notice the path is correct one):
Spoiler

image.png

  • Type or copy paste the following command, but replace "{yourmod}" by the mod folder name, for instance, terra_magna, delenda_est, milleniumad
binaries/system/pyrogenesis -mod=package_mod -mod={yourmod} -archivebuild="binaries/data/mods/{yourmod}" -archivebuild-output="{yourmod}.pyromod" -archivebuild-compress
  • You should have something like this after copy pasting/typing:
Spoiler

image.png

  • It will take some time to compile the modfile. For Ponies Ascendant which is like 300MB big,  it takes like 5 mins.

Optional: You can monitor the output of the packaging in Visual Studio or using a tool called DebugView by SysInternals (Recommended as fewer setup steps are required)

  • Open the zip and double click on Dbgview.exe:
Spoiler

image.png

  • It will open a window like this, and the output will appear when you run the packaging steps above.

Hope it helps.

Edited by wowgetoffyourcellphone
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Debug View is good to run while compiling so that if there are any troubles with the archiving process they will show up there in Debug View. 

You can see pyrogenesis.exe show up in Windows Task Manager and it'll stay there as long as the archiver is working. When it disappears, you can be relatively sure the archiver has completed the job. 

Spoiler

image.png.faeaa5de63e054c5fdc7c89ec25aa1c8.png

 

Link to comment
Share on other sites

binaries/system/pyrogenesis -mod=mod -mod=public -mod=theban_greeks_working -archivebuild="binaries/data/mods/theban_greeks_working"  -archivebuild-output="theban_greeks_a24_4.pyromod" -archivebuild-compress

 

Apparently, -mod=mod and -mod=public are important.

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

  • 3 months later...
On 03/06/2018 at 3:38 PM, Stan` said:

in the next release I'll make a patch to send a nice Packaging complete to the debug view :)

[14476] Finished packaging "delenda_est_A25.pyromod".
 

:D

Debug View was definitely essential for me to troubleshoot archival failures. Had about 8 or so issues which caused the archiver to fail and Debug View's interface allowed me to see what the problems were. 

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

Regarding the path used in the examples, I'm using the directories as described here https://trac.wildfiregames.com/wiki/GameDataPaths to store my mods.

 

So would be a good practice to package my mod like:

 

 

binaries/system/pyrogenesis -mod=mod -mod=public -mod=my_custom_mod -archivebuild="~/.local/share/0ad/mods/my_custom_mod"  -archivebuild-output="my_custom_mod.pyromod" -archivebuild-compress

Or does the "-archivebuild" parameter expect a relative path? 

 

Thank you!

VP

Link to comment
Share on other sites

On 07/11/2023 at 4:23 PM, vpereira said:

I transformed this command in a github action that I'm using in a mod that I was trying to improve. I think people could use it while preparing their releases: https://github.com/vpereira/Macedonia_0ad/blob/master/.github/workflows/release.yml

@andy5995 already wrote something for it https://github.com/0ADMods/ponies-ascendant/blob/master/.github/workflows/ponies-ascendant.yml

The advantage is that it is lighter to load cause it's using a custom mod of mine with what you need from public

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Stan` said:

@andy5995 already wrote something for it https://github.com/0ADMods/ponies-ascendant/blob/master/.github/workflows/ponies-ascendant.yml

The advantage is that it is lighter to load cause it's using a custom mod of mine with what you need from public

Thanks Stan, I found it today, under https://github.com/0ad-matters/gh-action-build-pyromod, and I will probably give it a shot! Looks like many devs come up with similar solutions to the same problems!

 

  • 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...