News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

How I can create mods for Simutrans?

Started by deecardenas, March 05, 2025, 03:37:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deecardenas

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!

Leartin

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



danivenk

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.

Andarix

#3
English Development Index

Squirrel Scripting

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

Squirrel 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

prissi

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.

Andarix

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

Squirrel Toolkit

Matthew

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

There is also a dedicated English website with a lot of information about Squirrel for Simutrans.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Andarix

Quote from: Matthew on March 07, 2025, 07:30:43 PMThere is also a dedicated English website with a lot of information about Squirrel for Simutrans.

This is out of date.

The current version is linked in my post #3.

FLN

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.

makie

It's nice how you all want to help, but my feeling tells me the thread starter was a bot.

Isaac Eiland-Hall

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.

Roboron

They have a spam link in their signature... so makie is right.

Isaac Eiland-Hall

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

Leartin

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.

makie

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.


Isaac Eiland-Hall

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

Matthew

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 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  ;) !!).
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Oldie

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.

Isaac Eiland-Hall

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