News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Wayobject appearing as invisible

Started by passengerpigeon, August 18, 2019, 11:44:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

passengerpigeon

Dear community,
Once again I have had problems with pakfiles, this time with a railway electrification wayobject that I created which is invisible whenever I apply it to track. I have attached the data files here. Does anybody know what is causing the issue?
Thank you,
Passengerpigeon.

An_dz

If you run makeobj you'll notice that all image lines were ignored, that's because you need to use backimage and frontimage. Take a look on the wiki as well.

passengerpigeon

Quote from: An_dz on August 19, 2019, 02:47:17 AM
If you run makeobj you'll notice that all image lines were ignored, that's because you need to use backimage and frontimage. Take a look on the wiki as well.
I tried it before using backimage on all of the rotations, and that didn't work. However, an earlier third rail wayobject with which I tried the same thing did work, and I have posted the .dat files for that here.

passengerpigeon

Also, I tried to run Makeobj again today with the two third rail objects and two more newly-created station objects, and all four of them failed to pack. I noticed that the specific problem with the third rails was that I needed to "check my spelling". What did I misspell? With the two station buildings, I got the error "No data in [garbled string of repeated letters]". Thanks in advance for your help.
Edit: OK, I just realised that there's an extraneous word "enables" in the canal dock datafile, but that isn't the only cause of the problems.

Leartin

The extra "enables" is probably what causes makeobj to tell you to check your spelling, because it is a nonexistent parameter. Another cause would be the underscore in the top, if you want to keep them as a seperator, comment them out. Though I'd expect it to just throw a warning and ignore those lines.

For the station buildings, my guess is that brackets in the name cause serious issues. In fact, object names should be restricted to lower letters, numbers and underscores; no spaces. You can change the displayed name in a seperate translation file.


Care to tell how you use makeobj? Via console, or with some additional tool?

An_dz

On canaldocks.dat line 3 and platform-wood-footbridge.dat line 35 there are dash symbols instead of hyphens. Makeobj has no support for dash parameters.

On thirdrail-el.dat the images should be BackImage as I already said AND they don't take those second arguments
  • [/tt].

    Also, draw_as_ding is only used by ways and not way-objects.

passengerpigeon

#6
I tried all your suggestions - removing the argument
  • [/tt] and using Backimage for the third rail, removing draw-as-ding, commenting out the separators and renaming the platforms without brackets - and the third rail still throws up the same error, whilst the platforms and docks don't return any errors but still don't show up in game.

    Edit: OK, never mind, the footbridge platform and canal docks are both working. I forgot to set the correct introduction date.

An_dz

Quote from: passengerpigeon on August 22, 2019, 01:27:03 PM
[...] the third rail still throws up the same error
What error? It's working fine here, it's hard to see in-game but it's definitely working.

passengerpigeon

Quote from: An_dz on August 23, 2019, 12:12:07 AM
What error? It's working fine here, it's hard to see in-game but it's definitely working.

The "check spelling" error, in Makeobj. What do you mean by "definitely working"; have you tried packing the files yourself?

An_dz

Yes, they pack perfectly fine after the changes I highlighted. And those are not errors, as makobj points it's a warning, errors don't produce pak files, warning merely ignore or assume something.

canaldocks.dat

#BackImage[Layout][x Position][y Position][Height][Phase]
#FrontImage[Layout][x Position][y Position][Height][Phase]
-------------------------
Obj=building
Name=Passenger and mail river wharf
# must be 1*1
type=stop
copyright=Passengerpigeon
waytype=water
enables_pax=1
enables_post=1
NoInfo=1
Dims=1,1,2
allow_underground=2
intro_year=1920
level=2
BackImage[0][0][0][0][0][0]=canaldocks.0.2
FrontImage[0][0][0][0][0][0]=canaldocks.0.3
BackImage[1][0][0][0][0][0]=canaldocks.0.1
FrontImage[1][0][0][0][0][0]=canaldocks.0.0
icon=> canaldocks.0.4
cursor=canaldocks.0.5
--------------------


platform-wood-footbridge.dat

---------------------------------
Obj=building
Name=Wooden platform with footbridge (Left side)
type=stop
waytype=track
enables_pax=1
needs_ground=1
# must be 1*1
Dims=1,1,2
NoInfo=1
Level=2
BackImage[0][0][0][0][0]=platform-wood-footbridge.0.0
BackImage[1][0][0][0][0]=platform-wood-footbridge.0.2
FrontImage[0][0][0][0][0]=platform-wood-footbridge.2.0
FrontImage[1][0][0][0][0]=platform-wood-footbridge.2.2
icon=> platform-wood-footbridge.3.0
cursor=platform-wood-footbridge.4.0
---------------------------------
Obj=building
Name=Wooden platform with footbridge (Right side)
type=stop
waytype=track
enables_pax=1
needs_ground=1
# must be 1*1
Dims=1,1,2
NoInfo=1
Level=2
BackImage[0][0][0][0][0]=platform-wood-footbridge.0.1
BackImage[1][0][0][0][0]=platform-wood-footbridge.0.3
FrontImage[0][0][0][0][0]=platform-wood-footbridge.2.1
FrontImage[1][0][0][0][0]=platform-wood-footbridge.2.3
icon=> platform-wood-footbridge.3.1
cursor=platform-wood-footbridge.4.0
----------------------------------


thirdrail-el.dat

#ELEVATED
obj=way-object
name=Third rail for elevated track
copyright=Passengerpigeon, based on images by Fabio Gonella
waytype=track
own_waytype=electrified_track
cost=1500
maintenance=40
topspeed=100
intro_year=1895
icon=> thirdrail-el.0.6
cursor=thirdrail-el.0.7
#SUMMER
BackImage[-]=thirdrail-el.1.0
BackImage[N]=thirdrail-el.1.1
BackImage[S]=thirdrail-el.1.2
BackImage[E]=thirdrail-el.1.3
BackImage[W]=thirdrail-el.1.4
BackImage[NS]=thirdrail-el.1.5
BackImage[EW]=thirdrail-el.1.6
BackImage[NSE]=thirdrail-el.1.7
BackImage[NSW]=thirdrail-el.2.0
BackImage[NEW]=thirdrail-el.2.1
BackImage[SEW]=thirdrail-el.2.2
BackImage[NSEW]=thirdrail-el.2.3
BackImage[NSE1]=thirdrail-el.2.4
BackImage[NSW1]=thirdrail-el.2.5
BackImage[NEW1]=thirdrail-el.2.6
BackImage[SEW1]=thirdrail-el.2.7
BackImage[NSEW1]=thirdrail-el.3.0
BackImage[NSE2]=thirdrail-el.3.1
BackImage[NSW2]=thirdrail-el.3.2
BackImage[NEW2]=thirdrail-el.3.3
BackImage[SEW2]=thirdrail-el.3.4
BackImage[NSEW2]=thirdrail-el.3.5
BackImage[NE]=thirdrail-el.3.6
BackImage[SE]=thirdrail-el.3.7
BackImage[NW]=thirdrail-el.4.0
BackImage[SW]=thirdrail-el.4.1
BackImageUp[3]=thirdrail-el.4.2
BackImageUp[6]=thirdrail-el.4.3
BackImageUp[9]=thirdrail-el.4.4
BackImageUp[12]=thirdrail-el.4.5


thirdrail.dat

------------------------------------
Obj=way-object
Name=Third Rail
cost=1500
maintenance=40
topspeed=100
intro_year = 1895
waytype=track
own_waytype=electrified_track
cursor=thirdrail.2.5
icon=> thirdrail.2.4
BackImage[-]=thirdrail.0.2
BackImage[N]=thirdrail.1.8
BackImage[S]=thirdrail.1.6
BackImage[E]=thirdrail.1.7
BackImage[W]=thirdrail.1.9
BackImage[NS]=thirdrail.0.0
BackImage[EW]=thirdrail.0.1
BackImage[NSE]=thirdrail.1.3
BackImage[NSW]=thirdrail.1.1
BackImage[NEW]=thirdrail.1.2
BackImage[SEW]=thirdrail.1.4
BackImage[NSEW]=thirdrail.1.0
BackImage[NSE1]=thirdrail.3.0
BackImage[NSW1]=thirdrail.3.1
BackImage[NEW1]=thirdrail.3.2
BackImage[SEW1]=thirdrail.3.3
BackImage[NSEW1]=thirdrail.3.4
BackImage[NSE2]=thirdrail.4.0
BackImage[NSW2]=thirdrail.4.1
BackImage[NEW2]=thirdrail.4.2
BackImage[SEW2]=thirdrail.4.3
BackImage[NSEW2]=thirdrail.4.4
BackImage[NE]=thirdrail.0.4
BackImage[SE]=thirdrail.0.6
BackImage[NW]=thirdrail.0.5
BackImage[SW]=thirdrail.0.3
BackDiagonal[NE]=thirdrail.2.1
BackDiagonal[SE]=thirdrail.2.3
BackDiagonal[NW]=thirdrail.2.2
BackDiagonal[SW]=thirdrail.2.0
BackImageUp[3]=thirdrail.0.9
BackImageUp[6]=thirdrail.0.10
BackImageUp[9]=thirdrail.0.8
BackImageUp[12]=thirdrail.0.7
------------------------------------

passengerpigeon

Thanks, I will try that. The elevated track third rail was packing before and caused track to become electrified when used in game, but Makeobj always said it was ignoring all of the images.