lilypoppy Posted 1 hour ago Report Share Posted 1 hour ago 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! Quote Link to comment Share on other sites More sharing options...
lilypoppy Posted 1 hour ago Author Report Share Posted 1 hour ago 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) Quote Link to comment Share on other sites More sharing options...
lilypoppy Posted 1 hour ago Author Report Share Posted 1 hour ago Sorry, I hadn’t noticed the Development & Technical section. Quote Link to comment Share on other sites More sharing options...
Perzival12 Posted 51 minutes ago Report Share Posted 51 minutes ago 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.