News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Introducing modman, script to manage simutrans paksets

Started by ojii, December 25, 2013, 05:45:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ojii

Hi everyone,


I'm often playing around with paksets and pakset addons. The problem is, while it's not exactly hard to install paksets and their addons, uninstalling addons is non-trivial since it's hard to know which files belong to the main pakset or what addon.


To make this easier, I wrote a little command line tool. This tool should be considered early alpha and may cause loss of files on your local file system.


It's written in Python (version 3, should work on 2.7 as well but wasn't tested) and can be installed with pip: pip install modman


Once installed, run it using modman. Not giving it any options should show you how to use it, but to get yourself started quicker, here's an example workflow:



modman add game simutrans /path/to/my/simutrans/installation/ # configure modman to know the game named 'simutrans' is at '/path/to/my/simutrans/installation/'
modman add mod pak128.japan http://pak128.jpn.org/souko/pak128.japan.112.0b.cab # tell modman where the mod 'pak128.japan' can be downloaded from
modman add mod pak128.japan-keikyu http://pak128.jpn.org/souko/addon_keikyuu.cab modman.contrib.simutrans.pak_addon pak128.japan # tell modman where the mod 'pak128.japan-keikyu' can be found, and to install it using the pak_addon installer with the argument 'pak128.japan'
modman install test pak128.japan # install pak128.japanmodman install test pak128.japan-keikyu # install pak128.japan-keikyu
# play some simutrans

modman uninstall test pak128.japan-keikyu # remove pak128.japan-keikyu




The important bit is that if you're installing a sub-addon, you should use the installer modman.contrib.simutrans.pak_addon with the pakset name as installer option.


Would love to get some feedback, and enjoy simutrans!

An_dz

That's why it's better to install addons in your user folder. It's easier to manage.

ojii

Quote from: An_dz on December 26, 2013, 01:17:42 AM
That's why it's better to install addons in your user folder. It's easier to manage.

could you explain what you mean by that? I install simutrans in ~/simutrans/<version> so they're in my "user folder". My problem is installing mostly uninstalling sub-paks as it's not clear which files in the pakset folder belong to which sub-pak.

Ters

I guess the right thing to do is to not install "sub-paks" into the pak set directory, but into it's own add-on directory. I haven't tried using add-ons, but I believe that is how Simutrans' add-on directory works.

Vladki

Pakset goes to ~/simutrans/pakXY
Addons go to ~/simutrans/addons/pakXY

Sent from my GT-I9000 using Tapatalk 2


ojii

Quote from: Vladki on December 26, 2013, 11:05:46 AM
Pakset goes to ~/simutrans/pakXY
Addons go to ~/simutrans/addons/pakXY

Sent from my GT-I9000 using Tapatalk 2

been playing simutrans forever now but never knew that's how it works.

Ters

Quote from: Vladki on December 26, 2013, 11:05:46 AM
Pakset goes to ~/simutrans/pakXY
Addons go to ~/simutrans/addons/pakXY

Can pak sets be installed in user directory now? Or should the first line be <program dir>/pakXY?

But there is still use for an add-on manager if all add-ons for XY are just thrown together in ~/simutrans/addons/paxXY.

Vladki

Quote from: Ters on December 26, 2013, 12:56:37 PM
Can pak sets be installed in user directory now? Or should the first line be <program dir>/pakXY?

Oh, yes. Pak sets go to <program dir>/pakXY. Sorry for mistake.

ojii

Just to be clear, "sub" paks should go into "<program-dir>/addons/<basepak>/<subpak>", right? (basepak being something like "pak128" or "pak128.japan" etc)

Ters

Quote from: ojii on December 29, 2013, 07:13:52 AM
Just to be clear, "sub" paks should go into "<program-dir>/addons/<basepak>/<subpak>", right? (basepak being something like "pak128" or "pak128.japan" etc)

No, it's ~/simutrans/addons/..., where ~ is the user home directory (typically c:\users\<username> on Windows and /home/<username> on *nix). I'm not sure about the subpak part.