Jump to content

Launching game via terminal


coworotel
 Share

Recommended Posts

Hello,

I'm trying to experiment with the AI. I made a folder inside the mods folder and basically copied Petra and changed one or two lines. It works ok when I open the mod via the UI, but I'm trying to launch a match directly using the mod via terminal. I tried:

pyrogenesis -mod=mymod -autostart="random/mainland" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=1:pedra -autostart-ai=2:pedra -autostart-player=-1

Instead of opening the match (as it does without the -mod=mymod part) it just goes to the mod settings screen. Am I doing something wrong?

Any help is welcome.

  • Like 1
Link to comment
Share on other sites

13 minutes ago, elexis said:

Didn't check, but you might have to launch with -mod=public and -mod=mymod

That loaded the game, but I think my mod wasn't loaded. Maybe I have to install it somehow? If I enable it via mod settings UI and "start mods" it works fine.

13 minutes ago, elexis said:

you might mean petra and not pedra

Pedra is my bot :)

It means "stone" in portuguese, just as petra in latin. Appropriate since it's just a small modification of Petra.

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

I created the folder mymod in /home/myuser/.local/share/0ad/mods

Inside this folder I have the mod.json with:

{
	"name": "mymod",
	"version": "0.0.1",
	"label": "A Mod",
	"description": "A mod",
	"dependencies": ["0ad=0.0.23"]
}

Then in simulation/ai/pedrabot I have basically a copy of petrabot (data.json and many js files) just with the names changed from "petra" to "pedra" wherever they occur. I put a warning in the initialization of the AI to know if it's working and when launched via UI it displays the warning and units behave just like they should (after all it's still Petra code). But when launched via terminal it doesn't show the warning and the units don't move at all.

Link to comment
Share on other sites

I put it in /usr/share/games/0ad/mods/ but the result is exactly the same. I don't know now if it is because of permissions or something like that since I have to copy with sudo, or has to do with the fact that all other mods I see are in zip files and mine is just the plain directories and js files.

Link to comment
Share on other sites

  • 2 weeks later...

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