The International Simutrans Forum

PakSets and Customization => General Resources and Tools => PakSet Maintainers and Artists Corner => Topic started by: Fabio on February 17, 2009, 12:34:10 PM

Title: Sidewalks references
Post by: Fabio on February 17, 2009, 12:34:10 PM
Can anybody explain to me the meaning of images 1, 2, 4, 5, 7, 8, 10, 11 in sidewalk dat?
what do they mean, and why are they "-"?

Obj=misc
Name=Sidewalk
copyright=Napik
Image[0]=ls-sidewalks-128.0.4
Image[1]=-
Image[2]=-
Image[3]=ls-sidewalks-128.0.2
Image[4]=-
Image[5]=-
Image[6]=ls-sidewalks-128.0.3
Image[7]=-
Image[8]=-
Image[9]=ls-sidewalks-128.0.1
Image[10]=-
Image[11]=-
Image[12]=ls-sidewalks-128.0.0


Also the foundations have some dashes:
Obj=ground
Name=Basement
copyright=Napik
# West
Image[0][0]=-
Image[1][0]=ground-newfoundation-128.0.0
Image[2][0]=-
Image[3][0]=ground-newfoundation-128.0.1
Image[4][0]=ground-newfoundation-128.0.2
Image[5][0]=ground-newfoundation-128.0.3
Image[6][0]=-
Image[7][0]=ground-newfoundation-128.0.4
Image[8][0]=ground-newfoundation-128.0.7
Image[9][0]=-
Image[10][0]=-
# North
Image[11][0]=-
Image[12][0]=ground-newfoundation-128.1.0
Image[13][0]=-
Image[14][0]=ground-newfoundation-128.1.1
Image[15][0]=ground-newfoundation-128.1.2
Image[16][0]=ground-newfoundation-128.1.3
Image[17][0]=-
Image[18][0]=ground-newfoundation-128.1.4
Image[19][0]=ground-newfoundation-128.1.7
Image[20][0]=-
Image[21][0]=-


what are those entries supposed to do?
Title: Re: Sidewalks references
Post by: Dwachs on February 17, 2009, 01:00:45 PM
Quote from: fabio on February 17, 2009, 12:34:10 PM
Can anybody explain to me the meaning of images 1, 2, 4, 5, 7, 8, 10, 11 in sidewalk dat?
what do they mean, and why are they "-"?

Obj=misc
Name=Sidewalk
copyright=Napik
Image[0]=ls-sidewalks-128.0.4
Image[1]=-
Image[2]=-
Image[3]=ls-sidewalks-128.0.2
Image[4]=-
Image[5]=-
Image[6]=ls-sidewalks-128.0.3
Image[7]=-
Image[8]=-
Image[9]=ls-sidewalks-128.0.1
Image[10]=-
Image[11]=-
Image[12]=ls-sidewalks-128.0.0

these entries are not used internally. '-' means no image is assigned. I dont know, what happens if you write an image there, at least it will be not visible inside the program. The meaningful numbers represents the slopes in simutrans (0=flat, 3=1+2, 6=2+4, 12=4+8, 9=8+1 - since slopes are represented by bit-values). Maybe there was once support for double-heights.

Quote
Also the foundations have some dashes:
Obj=ground
Name=Basement
copyright=Napik
# West
Image[0][0]=-
Image[1][0]=ground-newfoundation-128.0.0
Image[2][0]=-
Image[3][0]=ground-newfoundation-128.0.1
Image[4][0]=ground-newfoundation-128.0.2
Image[5][0]=ground-newfoundation-128.0.3
Image[6][0]=-
Image[7][0]=ground-newfoundation-128.0.4
Image[8][0]=ground-newfoundation-128.0.7
Image[9][0]=-
Image[10][0]=-
# North
Image[11][0]=-
Image[12][0]=ground-newfoundation-128.1.0
Image[13][0]=-
Image[14][0]=ground-newfoundation-128.1.1
Image[15][0]=ground-newfoundation-128.1.2
Image[16][0]=ground-newfoundation-128.1.3
Image[17][0]=-
Image[18][0]=ground-newfoundation-128.1.4
Image[19][0]=ground-newfoundation-128.1.7
Image[20][0]=-
Image[21][0]=-


what are those entries supposed to do?

The same here: 0 is an unused entry. The other numbers would have been in action with double-height slopes, so unused now.
Title: Re: Sidewalks references
Post by: Fabio on February 17, 2009, 02:34:08 PM
Thank you!

Another thing:
can sidewalks have a winter image?

in slopes, what does the second index
Title: Re: Sidewalks references
Post by: Dwachs on February 17, 2009, 03:44:55 PM
Quote from: fabio on February 17, 2009, 02:34:08 PM
Thank you!

Another thing:
can sidewalks have a winter image?

imho no

Quote
in slopes, what does the second index
  • mean? animation? climates? summer/winter?
This value refers to "artificial wall" (eg bricks, concrete) or "natural wall", I do not know, which one is indicated by [ 0] and [ 1].
Title: Re: Sidewalks references
Post by: Fabio on February 17, 2009, 04:55:47 PM
Quote from: Dwachs on February 17, 2009, 03:44:55 PM
This value refers to "artificial wall" (eg bricks, concrete) or "natural wall", I do not know, which one is indicated by [ 0] and [ 1].

Very interesting! and when does the program use the artificial walls or the natural ones?

It would also be nice to have a kind of timeline for them, to use concrete till the 60s and concrete from then on...
Title: Re: Sidewalks references
Post by: VS on February 17, 2009, 05:22:39 PM
Well, I can't shed much light on this, but let's try.

Since the object type (ground) is the same for a number of very different things, it is possible that second index is required just because it is needed for some other ground type thing.

Empty images could be there because of backward compatibility. If the particular feature started as using all indexes and later some were dropped, it was easier to remove the unused images at some positions. And the positions (and order) needed to stay the same since most things have hardcoded order. (iirc vehicles are an instance of such absolute chaos - literally on one pile are constraints as fake vehicles, smoke references, images and all that, recognized by ordering)

Alternatively, these could be used for a rotation or view that does not make sense, because it is easier to calculate something like ribi+rotation*height and leave out a few images in between that are never "targeted" by such formula.

Once you stray aside from "mass production" objects like vehicles and city houses, the interpretation of various image indexing and orders is completely up to the program, and in case of special handling where the object type is just an umbrella category (extreme example is "misc"), it is probably best to refer to code itself...
Title: Re: Sidewalks references
Post by: Dwachs on February 17, 2009, 07:12:58 PM
here http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_GroundDef (http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_GroundDef) are the parameters explained.

The gaps in the indices above are due to
(a) not all slopes are suitable for sidewalks (only slopes where a way can be built), these slopes are internally represented by the number 0,3,6,9,12
(b) for the artificial walls, the gaps were left for the double-height code, which once was developed but never made it into the official releases.

I have to research under which circumstances what kind of wall is shown.
Title: Re: Sidewalks references
Post by: Fabio on February 18, 2009, 08:18:52 AM
Thank you!
THat one is a real wiki! I'll bookmark it now...
Title: Re: Sidewalks references
Post by: Dwachs on February 18, 2009, 08:40:09 AM
The German version of this wiki is sometimes more complete / up-to-date. If you have trouble with German things - ask. The maintainer of this wiki is Frank.
Title: Re: Sidewalks references
Post by: prissi on February 18, 2009, 09:41:10 AM
And the japanese version is also very much up to date  too, only the english is lacking ...
Title: Re: Sidewalks references
Post by: Fabio on February 18, 2009, 09:46:11 AM
thank you!
the english wiki is painfully useless as a reference to create new objects :(
Title: Re: Sidewalks references
Post by: Frank on February 18, 2009, 03:20:25 PM
@fabio

you speak italian, then see http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=it_GroundDef (http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=it_GroundDef)

The Dat reference ( development section ) in german wiki is prepared for 19 additional languages.

The translations are still missing.