Author Topic: Introducing modman, script to manage simutrans paksets  (Read 3392 times)

0 Members and 1 Guest are viewing this topic.

Offline ojii

Introducing modman, script to manage simutrans paksets
« on: December 25, 2013, 05:45:17 AM »
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:


Code: [Select]
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!

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Introducing modman, script to manage simutrans paksets
« Reply #1 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.

Offline ojii

Re: Introducing modman, script to manage simutrans paksets
« Reply #2 on: December 26, 2013, 06:29:12 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Introducing modman, script to manage simutrans paksets
« Reply #3 on: December 26, 2013, 09:39:31 AM »
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.

Offline Vladki

Re: Introducing modman, script to manage simutrans paksets
« Reply #4 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


Offline ojii

Re: Introducing modman, script to manage simutrans paksets
« Reply #5 on: December 26, 2013, 12:34:50 PM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Introducing modman, script to manage simutrans paksets
« Reply #6 on: December 26, 2013, 12:56:37 PM »
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.

Offline Vladki

Re: Introducing modman, script to manage simutrans paksets
« Reply #7 on: December 28, 2013, 09:11:33 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.

Offline ojii

Re: Introducing modman, script to manage simutrans paksets
« Reply #8 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)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4733
  • Total likes: 180
  • Helpful: 108
  • Languages: EN, NO
Re: Introducing modman, script to manage simutrans paksets
« Reply #9 on: December 29, 2013, 09:54:49 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.