The International Simutrans Forum

 

Author Topic: Introduction and asking for help and criticizing modding documentation  (Read 170 times)

0 Members and 1 Guest are viewing this topic.

Offline Ughduty

  • *
  • Posts: 2
Hello Everyone

I'm sorry that with my introduction I already have some critique. Please don't take it personal. I am trying to help.  :)

I'm new to Simutrans modding but an experienced modder. I started modding games some 20 years ago. And I already put my hands on Simutrans some 8 years ago and created a few small graphics like buildings and trees for the pak128.german. I never published them because they where just made for personal use. However, Simutrans is giving me a very hard time this time around. I spend the whole weekend just trying to figure out how to cut and compile one building. Later more about this.

First critique is that the forum ate my first try at this post just because an attachment was bigger than allowed. On the website I landed after the error message I was greeted by a plank "Start new topic"-Page. All content gone! This second try on the post is therefore much shorter. Maybe that is better anyways.  ;)

Second critique is the more important one and is related to the documentation for content creators in the forums and the Wiki. Because I have a problem creating a factory for the game I tried to find information about how to use in this example the tilecutter but all I found was more or less outdated or made my head explode. I am talking about things like the following example from the wiki which is the first sentence on the page that tries to explain what the BackImage is and how to use it:
Code: [Select]
"BackImage[A][B][C][D][E]=Filename without extension.row in Image file.column in Image file" What?  :o
A simple step by step guide on how to create a somewhat complex tile with tile cutter and how the dat file for it has to be made would help much more than anything I was able to find! I still don't know what a Frontimage is or what it is used for and when. Because I was just not able to find sufficient explanations.
Because a game like Simutrans would not exist without it's creators and still needs them for it's own survival I think that it is critical that this is addressed. At least if you plan for survival beyhond your own interests.

However, if you could help me firgure out how to solve my issues with content creation I would be grateful. I have a factory image from the pak192.comic I repainted. The original is from Leartin. I hope he doesn't mind  ;D. I tried to cut it with tilecutter but when I try to create the pak file with makeobj it always gives me the error message: "ERROR: image_writer_t:  cannot open ./Gelddruckerei.png".  UPDATE: This error has been solved by taking off the bandage I obviously had my eyes covered with ;-) and I was able to create the pak file but unfortunately the resulting building ingame looks completely scrambled.

Summer image:
 
Winter image:

What the tilecutter created from it:


Last the dat content:
Code: [Select]
Obj=factory
Name=moneyprint
copyright=Leartin
Location=city
DistributionWeight=30
MapColor=207
#-----
InputGood[0]=paper
InputCapacity[0]=200
InputFactor[0]=100
InputGood[1]=ink
InputCapacity[1]=200
InputFactor[1]=20
OutputGood[0]=notes
OutputCapacity[0]=200
OutputFactor[0]=100
#-----
Productivity=100
Range=50
expand_probability=100
expand_minimum=30
expand_range=20
expand_times=7
#-----
electricity_amount=200
passenger_demand=30
mail_demand=50
electricity_boost=300
passenger_boost=300
mail_boost=500
#-----
dims=3,2,4
needs_ground=1
BackImage[0][0][0][0][0][0]=Gelddruckerei.0.0
BackImage[0][0][1][0][0][0]=Gelddruckerei.0.1
BackImage[0][0][2][0][0][0]=Gelddruckerei.0.2
BackImage[0][1][0][0][0][0]=Gelddruckerei.0.3
BackImage[0][1][1][0][0][0]=Gelddruckerei.0.4
BackImage[0][1][2][0][0][0]=Gelddruckerei.0.5
BackImage[0][0][0][0][0][1]=Gelddruckerei.0.6
BackImage[0][0][1][0][0][1]=Gelddruckerei.0.7
BackImage[0][0][2][0][0][1]=Gelddruckerei.0.8
BackImage[0][1][0][0][0][1]=Gelddruckerei.0.9
BackImage[0][1][1][0][0][1]=Gelddruckerei.1.0
BackImage[0][1][2][0][0][1]=Gelddruckerei.1.1
BackImage[0][0][0][0][0][2]=Gelddruckerei.1.2
BackImage[0][0][1][0][0][2]=Gelddruckerei.1.3
BackImage[0][0][2][0][0][2]=Gelddruckerei.1.4
BackImage[0][1][0][0][0][2]=Gelddruckerei.1.5
BackImage[0][1][1][0][0][2]=Gelddruckerei.1.6
BackImage[0][1][2][0][0][2]=Gelddruckerei.1.7
BackImage[0][0][0][0][0][3]=Gelddruckerei.1.8
BackImage[0][0][1][0][0][3]=Gelddruckerei.1.9
BackImage[0][0][2][0][0][3]=Gelddruckerei.2.0
BackImage[0][1][0][0][0][3]=Gelddruckerei.2.1
BackImage[0][1][1][0][0][3]=Gelddruckerei.2.2
BackImage[0][1][2][0][0][3]=Gelddruckerei.2.3
BackImage[1][0][0][0][0][0]=Gelddruckerei.2.4
BackImage[1][0][1][0][0][0]=Gelddruckerei.2.5
BackImage[1][1][0][0][0][0]=Gelddruckerei.2.6
BackImage[1][1][1][0][0][0]=Gelddruckerei.2.7
BackImage[1][2][0][0][0][0]=Gelddruckerei.2.8
BackImage[1][2][1][0][0][0]=Gelddruckerei.2.9
BackImage[1][0][0][0][0][1]=Gelddruckerei.3.0
BackImage[1][0][1][0][0][1]=Gelddruckerei.3.1
BackImage[1][1][0][0][0][1]=Gelddruckerei.3.2
BackImage[1][1][1][0][0][1]=Gelddruckerei.3.3
BackImage[1][2][0][0][0][1]=Gelddruckerei.3.4
BackImage[1][2][1][0][0][1]=Gelddruckerei.3.5
BackImage[1][0][0][0][0][2]=Gelddruckerei.3.6
BackImage[1][0][1][0][0][2]=Gelddruckerei.3.7
BackImage[1][1][0][0][0][2]=Gelddruckerei.3.8
BackImage[1][1][1][0][0][2]=Gelddruckerei.3.9
BackImage[1][2][0][0][0][2]=Gelddruckerei.4.0
BackImage[1][2][1][0][0][2]=Gelddruckerei.4.1
BackImage[1][0][0][0][0][3]=Gelddruckerei.4.2
BackImage[1][0][1][0][0][3]=Gelddruckerei.4.3
BackImage[1][1][0][0][0][3]=Gelddruckerei.4.4
BackImage[1][1][1][0][0][3]=Gelddruckerei.4.5
BackImage[1][2][0][0][0][3]=Gelddruckerei.4.6
BackImage[1][2][1][0][0][3]=Gelddruckerei.4.7
BackImage[2][0][0][0][0][0]=Gelddruckerei.4.8
BackImage[2][0][1][0][0][0]=Gelddruckerei.4.9
BackImage[2][0][2][0][0][0]=Gelddruckerei.5.0
BackImage[2][1][0][0][0][0]=Gelddruckerei.5.1
BackImage[2][1][1][0][0][0]=Gelddruckerei.5.2
BackImage[2][1][2][0][0][0]=Gelddruckerei.5.3
BackImage[2][0][0][0][0][1]=Gelddruckerei.5.4
BackImage[2][0][1][0][0][1]=Gelddruckerei.5.5
BackImage[2][0][2][0][0][1]=Gelddruckerei.5.6
BackImage[2][1][0][0][0][1]=Gelddruckerei.5.7
BackImage[2][1][1][0][0][1]=Gelddruckerei.5.8
BackImage[2][1][2][0][0][1]=Gelddruckerei.5.9
BackImage[2][0][0][0][0][2]=Gelddruckerei.6.0
BackImage[2][0][1][0][0][2]=Gelddruckerei.6.1
BackImage[2][0][2][0][0][2]=Gelddruckerei.6.2
BackImage[2][1][0][0][0][2]=Gelddruckerei.6.3
BackImage[2][1][1][0][0][2]=Gelddruckerei.6.4
BackImage[2][1][2][0][0][2]=Gelddruckerei.6.5
BackImage[2][0][0][0][0][3]=Gelddruckerei.6.6
BackImage[2][0][1][0][0][3]=Gelddruckerei.6.7
BackImage[2][0][2][0][0][3]=Gelddruckerei.6.8
BackImage[2][1][0][0][0][3]=Gelddruckerei.6.9
BackImage[2][1][1][0][0][3]=Gelddruckerei.7.0
BackImage[2][1][2][0][0][3]=Gelddruckerei.7.1
BackImage[3][0][0][0][0][0]=Gelddruckerei.7.2
BackImage[3][0][1][0][0][0]=Gelddruckerei.7.3
BackImage[3][1][0][0][0][0]=Gelddruckerei.7.4
BackImage[3][1][1][0][0][0]=Gelddruckerei.7.5
BackImage[3][2][0][0][0][0]=Gelddruckerei.7.6
BackImage[3][2][1][0][0][0]=Gelddruckerei.7.7
BackImage[3][0][0][0][0][1]=Gelddruckerei.7.8
BackImage[3][0][1][0][0][1]=Gelddruckerei.7.9
BackImage[3][1][0][0][0][1]=Gelddruckerei.8.0
BackImage[3][1][1][0][0][1]=Gelddruckerei.8.1
BackImage[3][2][0][0][0][1]=Gelddruckerei.8.2
BackImage[3][2][1][0][0][1]=Gelddruckerei.8.3
BackImage[3][0][0][0][0][2]=Gelddruckerei.8.4
BackImage[3][0][1][0][0][2]=Gelddruckerei.8.5
BackImage[3][1][0][0][0][2]=Gelddruckerei.8.6
BackImage[3][1][1][0][0][2]=Gelddruckerei.8.7
BackImage[3][2][0][0][0][2]=Gelddruckerei.8.8
BackImage[3][2][1][0][0][2]=Gelddruckerei.8.9
BackImage[3][0][0][0][0][3]=Gelddruckerei.9.0
BackImage[3][0][1][0][0][3]=Gelddruckerei.9.1
BackImage[3][1][0][0][0][3]=Gelddruckerei.9.2
BackImage[3][1][1][0][0][3]=Gelddruckerei.9.3
BackImage[3][2][0][0][0][3]=Gelddruckerei.9.4
BackImage[3][2][1][0][0][3]=Gelddruckerei.9.5

I tried several different settings in tilecutter but the resulting error was always the same.

Have fun!
« Last Edit: Yesterday at 04:27:32 PM by Ughduty »

Offline Vladki

  • Devotee
  • *
  • Posts: 3656
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
I have already reported the same problem with tilecutter here https://forum.simutrans.com/index.php/topic,20149.msg192484.html#msg192484
But got no answer ;-(

Regarding Front and BackImage. Those are most commonly used for stations or wayobjects (like overhead electrification).  BackImage is drawn first, then any vehicles, and then the FrontImage.
For houses or factories this does not make any difference, but can be used for animation. Put everything static as BackImage, and just the animated part as Frontimage. A nice example is the benevolent dictators fried birds fast food (aka SFC) in pak128.  https://sourceforge.net/p/simutrans/code/HEAD/tree/pak128/factories/simutrans_fried_chicken.dat?force=True

Is that helpful?

Offline Ughduty

  • *
  • Posts: 2
@Vladki Thank you very much this little piece of information about the Front and BackImage helped me a lot in understanding what the FrontImage is good for.  :thumbsup:

And I solved the problem with the PAK creation and have the building now ingame but it looks completely scrambled.

Offline Vladki

  • Devotee
  • *
  • Posts: 3656
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Yeah there is apparently a bug in tilecutter, that it "cuts" somehow inverted.  On the image you shared, the white areas should be the building, and vice-versa.

Offline Leartin

  • Oh no, not him again!
  • Devotee
  • *
  • Posts: 1539
  • PAK-DEV P192C
  • Languages: DE, EN
I have a factory image from the pak192.comic I repainted. The original is from Leartin. I hope he doesn't mind  ;D.
Not as long as you honor the license in case you publish it. ;)

Code: [Select]
BackImage[A][B][C][D][E]=Filename without extension.row in Image file.column in Image fileWhat?  :o
It's really not the best rendition, confused me a bit as well. Maybe a bit clearer if everything that needs to be substituted is in brackets.
"BackImage[<A>][<B>][<C>][<D>][<E>][<F>]=<path/name>.<r>.<c>,<x>,<y>"
Substitute the following:
<A> : The rotation of the building
<B> : "Row" of the building tiles (considering top-right edge to be the top)
<C> : "Column" of the building tiles (considering top-right edge to be the top)
<D> : Height level (Usually only used on first row/column)
<E> : Animation step
<F> : Season (buildings can have 1 (always summer), 2 (summer, snowy), or 5 (summer, fall, winter, spring, snowy) seasons)
<path/name> : the image file and it's path relative to the .dat-file, but without file extension (.png) - eg. if the image is in a subfolder "images", and called "my_image.png", you'd write "./images/my_image". If makeobj can't find the image, more often than not it's the path that's wrong, at least in my experience.
<r> : Row the specific graphic is in the image file (start counting at 0)
<c> : Column the specific graphic is in the image file (start counting at 0)
<x> : Offset on the x axis the graphic is displayed at in the game (can be negative)
<y> : Offset on the y axis the graphic is displayed at in the game (can be negative)

There are a lot of parameters, and it gets even more complicated with shorthand dats (instead of writing one line for each image, it can be compressed into one line, as you probably saw in my money printer).
On the one hand, it would be easier to learn by ommitting most of them, reducing it to "BackImage[<A>][<B>][<C>]=<path/name>.<r>.<c>" - but on the other hand, that would cause even more confusion if someone looked at existing datfiles and wouldn't have a reference for what all of it is.

As Vladki mentioned, FrontImage is intended for objects that share a tile with vehicles to tell the game what's in front of the vehicle. Think of Depot roofs. For regular buildings, next to animations, it can also be used with an offset to have parts of a building hang into the next tile (eg. a wide treetop), or to get more out of lightcolors (the lightbulb you removed is an example of that - in the backimage, it's just the color that glows at night, and the Frontimage adds some semitransparent details to it). Not exactly a topic you need to know much for starting out, and it wasn't really intended for FrontImage to be used like that in the first place.


Because a game like Simutrans would not exist without it's creators and still needs them for it's own survival I think that it is critical that this is addressed. At least if you plan for survival beyhond your own interests.
If you adress it, you'll quickly find yourself in a blame game of where to document, how, and who should do it. The only agreement easily reached is that yes, indeed, there should be more documentation (and more translation). At this point, personally, I'd say just ask whatever you want to know and can't find easily using words that the next person would probably use to search for the same question.


Oh yeah... I can't access my regular PC at the moment, but I should still have Photoshop files for that building. With a bit of luck, changing colors could be as simple as applying an effect to a layer/group that contains the element. With less luck, at least the shadows are on a seperate layer, such that colors can be adjusted underneath it.

Offline Roboron

  • Devotee
  • *
  • Posts: 211
    • Las Gal├ícticas Aventuras de Komoyo Diga
  • Languages: ES, EN
First critique is that the forum ate my first try at this post just because an attachment was bigger than allowed.

Always copy your text before hitting any button. Tip valid also outside Simutrans forums ;-)

Second critique is the more important one and is related to the documentation for content creators in the forums and the Wiki

Your critique is valid, and I agree with you that the documentation can -and should- be improved. However, note that Simutrans is a project run by volunteers, in their spare time, so if documentation is lacking is because no one have the time (or the will) to do so. Now that you have joined you can help by improving the wiki with the things you are learning about Simutrans, so others don't suffer the same as you. Someone needs to be the first.

Offline Vladki

  • Devotee
  • *
  • Posts: 3656
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Always copy your text before hitting any button. Tip valid also outside Simutrans forums ;-)
I recommend firefox plugin "Textarea Cache" - saved me a lot of typing.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10464
  • Languages: De,EN,JP
Also it would be great in Leartin post could replace the wiki topic in question ...

Offline Andarix

  • *
  • Posts: 225
  • Languages: de
Also it would be great in Leartin post could replace the wiki topic in question ...

Do you mean this page?

https://simutrans-germany.com/wiki/wiki/en_BackImage
https://simutrans-germany.com/wiki/wiki/en_GraphicsCutting
https://simutrans-germany.com/wiki/wiki/en_doPak

offset is missing
The pages just need to be updated a little.


TileCutter Doku
https://github.com/An-dz/tilecutter/wiki



....
Second critique is the more important one and is related to the documentation for content creators in the forums and the Wiki. Because I have a problem creating a factory for the game I tried to find information about how to use in this example the tilecutter but all I found was more or less outdated or made my head explode. I am talking about things like the following example from the wiki which is the first sentence on the page that tries to explain what the BackImage is and how to use it:
...

Documentation has been neglected at Simutrans for ages. For many who have the knowledge there is simply no reason to document it for others. On the contrary, it is probably too much work for them and costs valuable time that they do not want to spend.
« Last Edit: Today at 09:20:58 AM by Andarix »