Jump to content

How to Load a Local Mod in 0 AD (Snap Version)


lilypoppy
 Share

Recommended Posts

Hey!

I’m diving into making my own AI bot and want to start by copying the Petra bot, then renaming it so I can experiment with it. The catch? I’m running 0 AD via Snap on Linux, so paths are a bit tricky.

I’ve tried putting my mod in ~/snap/0ad/657/.config/0ad/mods/public/, but the game doesn’t detect it.

Anyone here worked with local mods on Snap? How do you launch the game with a custom mod using -mod or other tricks so it actually loads?

Also, any tips for safely copying Petra’s bot to start tinkering would be awesome.

Really appreciate any help—I just want to play with bot AI!

Link to comment
Share on other sites

To continue, here are my tests 

 

/home/felix/snap/0ad/657/.config/0ad/mods/public/FelixBot/
├── mod.json
└── simulation/
    └── ai/
        └── felixbot.js
 

mod.json (minimal valid example):

{ "name": "FelixBot", "title": "Felix-bot", "version": "1.0", "description": "Custom AI bot for 0 AD by Félix", "author": "Félix", "requires": [] }
 
snap run 0ad -- -mod=public -mod=FelixBot
TIMER| InitVfs: 332.118 us
FILES| Main log written to '/home/felix/snap/0ad/657/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/felix/snap/0ad/657/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 2.54065 ms
Sound: AlcInit success, using OpenAL Soft
FILES| Hardware details written to '/home/felix/snap/0ad/657/.config/0ad/logs/system_info.txt'
TIMER| write_sys_info: 16.674 ms
FILES| UserReport written to '/home/felix/snap/0ad/657/.config/0ad/logs/userreport_hwdetect.txt'
TIMER| RunHardwareDetection: 6.27691 ms
TIMER| InitRenderer: 48.9268 ms
TIMER| ps_console: 2.4843 ms
TIMER| ps_lang_hotkeys: 1.28745 ms
TIMER| pregame/mainmenu.xml: 73.157 us
TIMER| common/modern/setup.xml: 114.106 us
TIMER| common/modern/styles.xml: 125.51 us
TIMER| common/modern/sprites.xml: 860.851 us
TIMER| modmod/styles.xml: 32.384 us
TIMER| modmod/modmod.xml: 10.4945 ms
TIMER| common/modern/setup.xml: 101.322 us
TIMER| common/modern/styles.xml: 133.014 us
TIMER| common/modern/sprites.xml: 880.314 us
TIMER| modmod/styles.xml: 30.226 us
TIMER| incompatible_mods/incompatible_mods.xml: 843.469 us
TIMER| shutdown Renderer: 351.773 us
TIMER| shutdown SDL: 8.589 ms
TIMER| shutdown UserReporter: 4.32417 ms
TIMER| shutdown ConfigDB: 76.396 us
TIMER| resource modules: 231.48 ms
TIMER TOTALS (7 clients)
 

Capture d’écran du 2025-11-11 18-49-03.png

Link to comment
Share on other sites

Your mod is incompatible because you need to set a version that it runs in. For example: “requires”: [0.27.0]. This should fix your problem.

I modded Petra a few months ago, here are some tips: before you do anything to it, use Find and Replace to replace anything that says PETRA with FELIX, and anything that says petra or petrabot with felix or felixbot. Then, start messing around by changing numbers and values.

Link to comment
Share on other sites

Quote

I’ve tried putting my mod in ~/snap/0ad/657/.config/0ad/mods/public/, but the game doesn’t detect it.

I installed a mod in ~/snap/0ad/657/.local/share/0ad/mods/<name>. Then it was detected automatically when launching the game and I enabled it via the mod settings in the UI. I am running Ubuntu 24.04 and installed 0ad via snap.

Link to comment
Share on other sites

[SOLUTION]

My solution was to use ~/snap/0ad/657/.local/share/0ad/mods and I renamed all my variables from petra to felixbot.

Here is my branch

 

~/snap/0ad/657/.local/share/0ad/mods

├── FelixBot
│   ├── FELIXBOT.zip
│   ├── mod.json
 

Thank you !

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