Page 1 of 1

Adding --mods command line parameter

PostPosted: Fri Aug 21, 2015 23:29
by FreeLikeGNU
Hello,
I would like to know if a --mods parameter to running minetest on the command line would be helpful to the community.

Currently you can
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
screen minetest --gameid carbone-ng --world carbone-ng-world --port 30010


To start a game using carbone-ng subgame. Which is cool! But what if I wanted to use this same subgame with a few additional mods?

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
screen minetest --gameid carbone-ng --world carbone-ng-world-with-mods --port 30020

Should I:
  • Put some mods in games/carbone-ng/mods ? -- That would mess up the subgame folder for the world I just created.
  • Copy carbone-ng subgame folder to carbone-ng-with-mods and then put the mods in /games/carbone-ng-with-mods/mods? -- That's ok but now I have another copy of the subgame to maintain with updates and the I cant use the mods, that I have to maintain separately in that folder with other subgames....

Running the game with a GUI I can select a subgame and mods I want to use with it if I choose. The mods stay in mods/ and the subgames stay in games/.

But what if I'm trying to run on a headless (no display) server!? :o

Wouldn't it be cool if we could:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
screen minetest --gameid carbone-ng --world carbone-ng-world-with-mods --mods path-to/some_mods_list.txt --port 30020


I could have a little text file outside of my games/ and mods/ folders with a list of modids I want to use with whatever subgame I wish.
When I update my subgame it would be nice and clean. When I update my mods, I only have to do it once!

What do you think?

I put up a feature request here: https://github.com/minetest/minetest/issues/3065

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 01:39
by BrandonReese
Put the mods in your mods folder. After you start the server once and shut it down. Go to the folder for the world you just started the server with and there will be a world.mt file. In that file you can enable or disable any mods in your mods folder for that world specifically.

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 02:58
by FreeLikeGNU
BrandonReese wrote:Put the mods in your mods folder. After you start the server once and shut it down. Go to the folder for the world you just started the server with and there will be a world.mt file. In that file you can enable or disable any mods in your mods folder for that world specifically.


Does that work when one is using a mapgen mod? From what I understand, a mapgen mod should be set when the server is created.

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 03:04
by benrob0329
You could also upload a world that you set up locally (in singleplayer)

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 07:56
by rubenwardy
FreeLikeGNU wrote:
BrandonReese wrote:Put the mods in your mods folder. After you start the server once and shut it down. Go to the folder for the world you just started the server with and there will be a world.mt file. In that file you can enable or disable any mods in your mods folder for that world specifically.


Does that work when one is using a mapgen mod? From what I understand, a mapgen mod should be set when the server is created.


If there's no players, no MapBlocks are generated. A standalone server has no players until they join.

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 20:33
by Sokomine
FreeLikeGNU wrote:Copy carbone-ng subgame folder to carbone-ng-with-mods and then put the mods in /games/carbone-ng-with-mods/mods? -- That's ok but now I have another copy of the subgame to maintain with updates and the I cant use the mods, that I have to maintain separately in that folder with other subgames....

That's similar to how I do it: Create a new game in games/ with a minimal game.conf and add a mods/ folder. That mods/ folder now gets symlinks to all the mods and modpacks you're intrested in.

Re: Adding --mods command line parameter

PostPosted: Sat Aug 22, 2015 21:22
by rubenwardy
you could use world/worldmods/