This wiki is archived from 2021-09-05

Creating Your First Planetary Annihilation Mod: Difference between revisions

From Planetary Annihilation: TITANS and Classic PA Wiki
Jump to navigation Jump to search
mNo edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Modding]]
[[Category:Modding]]
= [[File:Titans-icon.png|50px]] Creating Your First Planetary Annihilation Mod =
= Creating Your First Planetary Annihilation Mod =


Released mods are typically installed and downloaded automatically using in-game using [[Planetary Annihilation Community Mods|Community Mods]].
Released mods are typically installed and downloaded automatically using in-game using [[Planetary Annihilation Community Mods|Community Mods]].
Line 6: Line 6:
During mod development and testing local filesystem mods are used.
During mod development and testing local filesystem mods are used.


== [[File:platinum-rank-icon.png|50px]] Mod Identifiers ==
== Mod Identifiers ==


{{Mod Identifiers}}
{{Mod Identifiers}}
Line 12: Line 12:
To avoid conflicts with your released version use a different identifier for your development or test versions. eg com.pa.mikeyh-some-mod-name-dev
To avoid conflicts with your released version use a different identifier for your development or test versions. eg com.pa.mikeyh-some-mod-name-dev


== [[File:platinum-rank-icon.png|50px]] Mod Directory Structure ==
== Mod Directory Structure ==


Local filesystem mods are installed in the [[Planetary Annihilation Data Directory]] based on the type of mod:
Local filesystem mods are installed in the [[Planetary Annihilation Data Directory]] based on the type of mod:
Line 20: Line 20:


Every mod must be contained in a single top level directory with a modinfo.json JSON file as documented in [[Mod Structure]].
Every mod must be contained in a single top level directory with a modinfo.json JSON file as documented in [[Mod Structure]].
PLEASE DO NO ADD EXTRA PROPERTIES THAT YOU SEE IN DOWNLOADED ZIPS.


A new game lobby UI client mod would be installed as a filesystem client mod using:
A new game lobby UI client mod would be installed as a filesystem client mod using:
Line 32: Line 36:
******* new_game.js
******* new_game.js


== [[File:gold-rank-icon.png|50px]] Testing Your Mod ==
== Testing Your Mod ==


Filesystem mods with a valid modinfo.json installed in the filesystem mod directories will automatically appear in the installed tab of Community Mods in PA.
Filesystem mods with a valid modinfo.json installed in the filesystem mod directories will automatically appear in the installed tab of Community Mods in PA.


If your mod does not appear check the following:
If your mod does not appear check the following:
* modinfo.json is valid JSON with all mandatory properties as documented in [[Mod Structure]]
* modinfo.json is valid JSON with all mandatory properties as documented in [[Mod Structure]] (no extra properties)
* mod directory is in the correct mod directory for its context
* mod directory is in the correct mod directory for its context


Line 44: Line 48:
Other file changes typically require a restart of PA.
Other file changes typically require a restart of PA.


== [[File:gold-rank-icon.png|50px]] Submitting Your Released Mod ==
== Example Mods ==
 
Here is a list of example mods to get you started:
Before submitting your mod create a forum post in the appropriate forum:
* [[Example Mod Custom Skybox]]
* Titans Released Mods: https://forums.uberent.com/forums/released-mods.102/
* [[Example Mod Bigger Boom Bot]]
* Titans Work-In-Progress Mods: https://forums.uberent.com/forums/work-in-progress-mods.103/
* [[Example Mod Chat Alert]]
* Classic PA Released Mods: https://forums.uberent.com/forums/released-mods.86/
* Classic PA Work-In-Progress Mods: https://forums.uberent.com/forums/work-in-progress-mods.87/
 
Update your modinfo.json with your forum post URL.
 
For released mods please create a post on steam discussions:
 
* Titans: http://steamcommunity.com/app/386070/discussions/
* Classic: http://steamcommunity.com/app/233250/discussions/
 
Mods are currently still submitted to the old PAMM server using your GitHub account via: http://pamm-mereth.rhcloud.com/mod
 
The PAMM server requires a downloadable URL to a ZIP archive of your top level directory with a unique version number for each update in the zip filename and modinfo.json.
 
A new game lobby UI client mod would be submitted as a downloadable URL to:
 
* com.pa.mikeyh.some-mod-name_v1.0.0.zip
** modinfo.json
*** ui
**** mods
***** com.pa.mikeyh.some-mod-name
****** new_game.js
 
GitHub projects with download links to releases are preferred.
 
If using Dropbox links they must end with dl=1 to be downloadable.
 
Check the status of your mod at: https://palobby.com/community-mods/
 
== [[File:gold-rank-icon.png|50px]] Updating Your Released Mod ==


Update your modinfo.json version and zip filename then resubmit to PAMM.
{{Submitting and Updating Your Mod}}


For each update of your mod please post a new comment to your forum and steam discussions posts with any changes then update your original posts.
{{ New Mod Submission Offline }}

Latest revision as of 10:44, 9 September 2021

Creating Your First Planetary Annihilation Mod

Released mods are typically installed and downloaded automatically using in-game using Community Mods.

During mod development and testing local filesystem mods are used.

Mod Identifiers

Every mod must have a unique identifier.

The required format is lowercase reverse domain name notation.

eg com.palobby.some-mod-name

If you don't have your own domain or prefer to use your forum / game handle then prefix with com.pa.handle.some-mod-name

eg com.pa.mikeyh.some-mod-name

My personal preference is dashes (-) over underscores (_) for readability.

To avoid conflicts with your released version use a different identifier for your development or test versions. eg com.pa.mikeyh-some-mod-name-dev

Mod Directory Structure

Local filesystem mods are installed in the Planetary Annihilation Data Directory based on the type of mod:

  • Client Mods: client_mods (might be mods on very old installs from alpha / beta)
  • Server Mods: server_mods

Every mod must be contained in a single top level directory with a modinfo.json JSON file as documented in Mod Structure.


PLEASE DO NO ADD EXTRA PROPERTIES THAT YOU SEE IN DOWNLOADED ZIPS.


A new game lobby UI client mod would be installed as a filesystem client mod using:

Testing Your Mod

Filesystem mods with a valid modinfo.json installed in the filesystem mod directories will automatically appear in the installed tab of Community Mods in PA.

If your mod does not appear check the following:

  • modinfo.json is valid JSON with all mandatory properties as documented in Mod Structure (no extra properties)
  • mod directory is in the correct mod directory for its context

You can edit modinfo.json then reload file system mods to update your mod info without restating PA.

Other file changes typically require a restart of PA.

Example Mods

Here is a list of example mods to get you started:

Submitting Your Mod

Before submitting your mod ensure that it is not outputting any errors to either the game's client or server logs.

You must create a forum post in the appropriate forum and link it in your modinfo file:

For released mods please create a post on steam discussions with prefix [MOD]:

The Community Mods server requires a downloadable URL to a ZIP archive of your top level directory containing your modinfo.json and mod files.

A new game lobby UI client mod would be submitted as a downloadable URL to:

  • com.pa.mikeyh.some-mod-name.zip
    • modinfo.json
      • ui
        • mods
          • com.pa.mikeyh.some-mod-name
            • new_game.js

GitHub projects with static download links to a release branch are preferred for auto updating.

eg https://github.com/user/com.pa.mod/archive/release.zip

You can exclude files from the zip using .gitattributes:

.gitattributes export-ignore
.gitignore export-ignore

If using Dropbox links they must end with dl=1 to be downloadable.

Check the status of your mod at: https://palobby.com/community-mods/

Updating Your Mod

Existing mods will update automatically if you update the existing zip without changing the URL or mod identifier. GitHub will do that automatically.

When changing your mod please remember to update the date and version.

For each update of your mod please post a new comment to your forum and steam discussions posts with any changes then update your original posts.

Check the status of your mod at: https://palobby.com/community-mods/

New Mod Submission

Join the official discord: https://discord.gg/pa and ask to be added to the #mod-submissions channel.

Post the URL to your zip mod in the #mod-submissions channel.

This can't be a link to a download page, it must be a direct link to the zip file.

Existing mods will update automatically if you update the existing zip without changing the URL or mod identifier.

Links to GitHub are preferred.