The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: deecardenas on March 05, 2025, 03:37:27 AM

Title: How I can create mods for Simutrans?
Post by: deecardenas on March 05, 2025, 03:37:27 AM
Hello,
I wanted to ask how to create mods for Simutrans, to see if anyone could help me out. I've been wanting to modify some things in the game for a while now. It's a bit confusing and I can't find much information. Thanks you!
Title: Re: How I can create mods for Simutrans?
Post by: Leartin on March 05, 2025, 09:23:40 AM
Depends on what you understand as mods.

Objects in Simutrans (buildings, vehicles, ways,...) are called paks. A pak is created from a .png and a .dat. It's easiest to see how it works if you take a look at some open source repository, eg. Pak192.comic (https://github.com/Flemmbrav/Pak192.Comic) - just take something that's close to what you want to create and play around with it. To actually create the pak, you need makeobj - from Sourceforge (https://sourceforge.net/projects/simutrans/files/makeobj/) - it's a command line tool, so you can't run it like a program, you need to call via your cmd or powershell.
(I know this is not enough for you to know what to do, but it gives you the vocabulary you need to find the information.)

Apart from paks and settings, the game logic cannot be changed. Simutrans is open source, but not mod-friendly - you'd  need to touch the source code directly: https://github.com/simutrans/simutrans


Title: Re: How I can create mods for Simutrans?
Post by: danivenk on March 06, 2025, 09:42:54 PM
Quote from: Leartin on March 05, 2025, 09:23:40 AMApart from paks and settings, the game logic cannot be changed. Simutrans is open source, but not mod-friendly - you'd  need to touch the source code directly: https://github.com/simutrans/simutrans

That of course completely depends on your programming skills in C++ and your imagination. Will say figuring out where is what is quite a thing to do due to the big code base but if you use the right programs to search the files for things or go directly to definitions you should be fine.
Title: Re: How I can create mods for Simutrans?
Post by: Andarix on March 07, 2025, 05:35:55 AM
English Development Index (https://simutrans-germany.com/wiki/wiki/en_Devel_Index)

Squirrel Scripting (https://simutrans-germany.com/wiki/wiki/en_squirrel_scripting)

The documentation of the newly added toolkit is currently only available in German.

Squirrel Toolkit (https://simutrans-germany.com/wiki/wiki/de_squirrel_script_tools_toolkit)

Quote from: danivenk on March 06, 2025, 09:42:54 PMThat of course completely depends on your programming skills in C++ and your imagination. Will say figuring out where is what is quite a thing to do due to the big code base but if you use the right programs to search the files for things or go directly to definitions you should be fine.

Simutrans Code Documentation (https://simutrans-germany.com/wiki/wiki/en_code_docu?page_ref_id=1832)
Title: Re: How I can create mods for Simutrans?
Post by: prissi on March 07, 2025, 12:11:54 PM
As written, indeed, quite some things can be achieved nowadays with squirrel scripting. And you can always try do post an extension request or ask for advice or explanation of the code.
Title: Re: How I can create mods for Simutrans?
Post by: Andarix on March 07, 2025, 12:50:17 PM
The documentation of the newly added toolkit is currently only available in German.

Squirrel Toolkit (https://simutrans-germany.com/wiki/wiki/de_squirrel_script_tools_toolkit)
Title: Re: How I can create mods for Simutrans?
Post by: Matthew on March 07, 2025, 07:30:43 PM
Quote from: Andarix on March 07, 2025, 12:50:17 PMThe documentation of the newly added toolkit is currently only available in German.

Squirrel Toolkit (https://simutrans-germany.com/wiki/wiki/de_squirrel_script_tools_toolkit)

There is also a dedicated English website (https://dwachs.github.io/simutrans-sqapi-doc/) with a lot of information about Squirrel for Simutrans.
Title: Re: How I can create mods for Simutrans?
Post by: Andarix on March 07, 2025, 08:17:07 PM
Quote from: Matthew on March 07, 2025, 07:30:43 PMThere is also a dedicated English website (https://dwachs.github.io/simutrans-sqapi-doc/) with a lot of information about Squirrel for Simutrans.

This is out of date.

The current version is linked in my post #3 (https://forum.simutrans.com/index.php?msg=210149).
Title: Re: How I can create mods for Simutrans?
Post by: FLN on March 11, 2025, 10:49:15 AM
Quote from: deecardenas on March 05, 2025, 03:37:27 AMHello,
I wanted to ask how to create mods for Simutrans, to see if anyone could help me out. I've been wanting to modify some things in the game for a while now. It's a bit confusing and I can't find much information. Thanks you!
I just thaught of the configuration file, simuconf.tab, wich does hold game changing possibilities to modify the gameplay too. Just in case you're looking for milder modifications to take.
Title: Re: How I can create mods for Simutrans?
Post by: makie on March 12, 2025, 12:24:19 AM
It's nice how you all want to help, but my feeling tells me the thread starter was a bot.
Title: Re: How I can create mods for Simutrans?
Post by: Isaac Eiland-Hall on March 12, 2025, 05:10:10 PM
Possibly, although they did log in on at least the 10th of March, so we'll see :)

In fairness, creating mods for Simutrans is not very easy for many, so they may have seen answers and decided not to try.
Title: Re: How I can create mods for Simutrans?
Post by: Roboron on March 12, 2025, 07:03:24 PM
They have a spam link in their signature... so makie is right.
Title: Re: How I can create mods for Simutrans?
Post by: Isaac Eiland-Hall on March 13, 2025, 01:50:03 AM
Thank you whoever deleted their account. I wonder if the link was added after the account creation? I often (not as much as I should) try to check newly registered users for such things. I wonder if the spam bots come back and add them several days later. Clever if so. meh.

It's tempting to turn off signatures entirely, but I know some folks use them.

Actually, lemme see if that's a permission we could grant - could turn that off for normal users, as well as the URL in the profile, which is the other thing people abuse.

edit: I have unchecked "edit signature" permissions (and other things) for general members. If someone manages to get into a group, they can edit their signature since that is on by default for the various groups.

If someone wants that access and we trust them, we can add them to the "can PM" group which should also grant signature access - and basically we should trust them for either in such a case anyway...
Title: Re: How I can create mods for Simutrans?
Post by: Leartin on March 13, 2025, 05:56:24 AM
Quote from: Isaac Eiland-Hall on March 13, 2025, 01:50:03 AMI wonder if the link was added after the account creation?

Can confirm, I checked the account before answering and while I assumed it was most likely a bot (due to being female) I found nothing malicious at the time, so I figured answering wouldn't hurt.
Title: Re: How I can create mods for Simutrans?
Post by: makie on March 13, 2025, 06:36:43 AM
Quote from: Isaac Eiland-Hall on March 13, 2025, 01:50:03 AMI wonder if the spam bots come back and add them several days later.
This is the normal behave of a modern bot. Post something like "Thank You" in a old thread and wait some days until the tread is forgotten. Then change the post into the spam, or add a link.

Title: Re: How I can create mods for Simutrans?
Post by: Isaac Eiland-Hall on March 14, 2025, 03:19:31 PM
Aye, but their use of AI has definitely escalated things. This thread is reasonably on topic specifically to Simutrans. We've seen years of generic "I love your post!" type things, but it takes human effort or AI effort to post something like this one. It's sort of impressive in a way. lol
Title: Re: How I can create mods for Simutrans?
Post by: Matthew on March 20, 2025, 10:22:03 PM
Quote from: makie on March 12, 2025, 12:24:19 AMIt's nice how you all want to help, but my feeling tells me the thread starter was a bot.

I just discovered that the OP is almost identical to a Reddit post (https://www.reddit.com/r/simutrans/comments/1ifakhk/help_how_i_can_create_mods_for_simutrans/) from a month earlier. The Reddit account is almost certainly genuine, because it's such an eclectic range of topics and language, and the user is a Chilean, which fits with the Hispanic name on the account here. I replied to them there, encouraging them to look for information here.

I think that makes it more likely that the original post was genuine. If it is a bot, it means it's doing something ... not necessarily less sophisticated .... but different, e.g. searching Reddit for links to external fora and then reposting Reddit content as spam. (It's like a bot version of a Buzzfeed journalist  ;) !!).
Title: Re: How I can create mods for Simutrans?
Post by: Oldie on March 21, 2025, 12:28:06 AM
Quote from: Isaac Eiland-Hall on March 13, 2025, 01:50:03 AMThank you whoever deleted their account. I wonder if the link was added after the account creation? I often (not as much as I should) try to check newly registered users for such things. I wonder if the spam bots come back and add them several days later. Clever if so. meh.

It's tempting to turn off signatures entirely, but I know some folks use them.

Actually, lemme see if that's a permission we could grant - could turn that off for normal users, as well as the URL in the profile, which is the other thing people abuse.

edit: I have unchecked "edit signature" permissions (and other things) for general members. If someone manages to get into a group, they can edit their signature since that is on by default for the various groups.

If someone wants that access and we trust them, we can add them to the "can PM" group which should also grant signature access - and basically we should trust them for either in such a case anyway...

It's a shame that the righteous majority have functionality removed because of a minority of criminals.
In a way, if it was a baddie, it was successful in that it achieved a denial of functionality to the majority of users that behave properly.
Title: Re: How I can create mods for Simutrans?
Post by: Isaac Eiland-Hall on March 21, 2025, 05:01:33 AM
Quote from: Oldie on March 21, 2025, 12:28:06 AMIt's a shame that the righteous majority have functionality removed

I admit that the word may be hard to spread, but I did make a post in the Announcements board or somewhere for folks to request signature permissions. So *default* access has theoretically been removed (although I've got to figure out if there's a bug because after I did that, a spammer added something to their signature... so it's probably some permission error and some group overriding what I set), but there is a thread where anyone can request signature permission.


Ah, no, I put it in the Forum board so people looking for forum help might find it: https://forum.simutrans.com/index.php/topic,23441.0.html