The International Simutrans Forum

 

Author Topic: maglev_track ???  (Read 12861 times)

0 Members and 1 Guest are viewing this topic.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
maglev_track ???
« on: August 25, 2008, 06:46:10 PM »
I just decided to play with Simutrans 100 instead of 99.18.

In dat files of all MLM dev. objects, I replaced "monorail_track" by "maglev_track".

Nothing in error.txt after creating objects but when I include them in pak128, they don't appear in the game.

I need urgent help because I unvolontary removed pak128 of 99.18.

I use makeobj 49.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #1 on: August 25, 2008, 06:50:16 PM »
You have to edit your menu files as well.

Maglev tracks (as well as wayobjects, depots, stations, etc.) will not appear under "Monorail Tools", unless modified by you.

BUT in my testing neither narrowgauage_track nor maglev_track worked correctly - so I suggest you wait before you change anything.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #2 on: August 25, 2008, 09:38:59 PM »
Quote
You have to edit your menu files as well.

Can you explain ?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #3 on: August 25, 2008, 11:13:20 PM »
I'll try...

1.) The menus in ST (all the icons on top and the toolbars they open) are no longer hardcoded, but can be configured via a file called menuconf.tab (located in pak\config\)

2.) waytype=maglev_track is not a double for monorail_track - it's going to be a completely different (new) waytype.

3.) The standard toolbars, as provided by the paksets, do not (yet) include the tools&icons for maglev_track - just rail, monorail, tram, road, ship and air.

So you'd need to edit your menuconf.tab in a way that makes the maglev_track icons and toolbars visible in game.

You can do that in 2 ways:
1) The long and elegant (and probably "correct") way is to insert a new toolbar for the maglev-waytype tools somewhere between the others. That requires quite a bit of shuffling, since all these entries are numbered and have to be kept in correct order (=so that the index numbers always increase). That means, you can't just insert the new item somewhere in the middle - you can insert it and then increase the index number of all following toolbars. Example:
A(1)
B(2)
C(3)
D(4)
E(5)

if you want to enter Z between B and C, you can do so - but you hav to work over C, D and F then.
A(1)
B(2)
Z(3)
C(4)
D(5)
E(6)

This can be quite tedious, and errors are easily made.

2.) The other way is the quick and dirty method - not really correct and not well suited for long-term-use, but surely good enough for testing:
Search for the section that looks like this
Code: [Select]
# monorailtools (waytype 5)
toolbar[3][0]=ways(5,0)
toolbar[3][1]=ways(5,1)
toolbar[3][2]=bridges(5)
toolbar[3][3]=tunnels(5)
toolbar[3][4]=wayobjs(5)
toolbar[3][5]=signs(5)
toolbar[3][6]=general_tool[17],18,,5
toolbar[3][7]=buildings(33,5)
toolbar[3][8]=buildings(34,5)
toolbar[3][9]=buildings(35,5)
and add the following lines:
Code: [Select]
toolbar[3][10]=-
toolbar[3][11]=ways(6,0)
toolbar[3][12]=ways(6,1)
toolbar[3][13]=bridges(6)
toolbar[3][14]=tunnels(6)
toolbar[3][15]=wayobjs(6)
toolbar[3][16]=signs(6)
toolbar[3][17]=general_tool[17],18,,6
toolbar[3][18]=buildings(33,6)
toolbar[3][19]=buildings(34,6)
toolbar[3][20]=buildings(35,6)
The first line gives you a blank icon as border and then all tools from monorail (waytype 5) are replicated just with waytype 6 (=maglev).

That way, when you open your monorails tools in ST, the toolbar will show you all monorail tools, then a balnk icon, and then all maglev tools.
« Last Edit: August 25, 2008, 11:15:40 PM by DirrrtyDirk »

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #4 on: August 26, 2008, 11:31:25 AM »
I tried the first way but ...

I added these lines between monorail tools and tramtools :
Quote
# maglevtools (waytype 6)
toolbar[3][0]=ways(6,0)
toolbar[3][1]=ways(6,1)
toolbar[3][2]=bridges(6)
toolbar[3][3]=tunnels(6)
toolbar[3][4]=wayobjs(6)
toolbar[3][5]=signs(6)
toolbar[3][6]=general_tool[17],17,,6
toolbar[3][7]=buildings(33,6)
toolbar[3][8]=buildings(34,6)
toolbar[3][9]=buildings(35,6)

and changed this :
Quote
toolbar[0][3]=toolbar[1],0,,SLOPETOOLS,slopetools.txt
toolbar[0][4]=toolbar[2],1,,RAILTOOLS,railtools.txt
toolbar[0][5]=toolbar[3],2,,MONORAILTOOLS,monorailtools.txt
toolbar[0][6]=toolbar[4],3,,TRAMTOOLS,tramtools.txt
toolbar[0][7]=toolbar[5],4,,ROADTOOLS,roadtools.txt
toolbar[0][8]=toolbar[6],5,,SHIPTOOLS,shiptools.txt
toolbar[0][9]=toolbar[7],6,,AIRTOOLS,airtools.txt
toolbar[0][10]=toolbar[8],7,,SPECIALTOOLS,special.txt

by this
Quote
toolbar[0][3]=toolbar[1],0,,SLOPETOOLS,slopetools.txt
toolbar[0][4]=toolbar[2],1,,RAILTOOLS,railtools.txt
toolbar[0][5]=toolbar[3],2,,MONORAILTOOLS,monorailtools.txt
toolbar[0][6]=toolbar[4],3,,MAGLEVTOOLS,maglevtools.txt
toolbar[0][7]=toolbar[5],4,,TRAMTOOLS,tramtools.txt
toolbar[0][8]=toolbar[6],5,,ROADTOOLS,roadtools.txt
toolbar[0][9]=toolbar[7],6,,SHIPTOOLS,shiptools.txt
toolbar[0][10]=toolbar[8],7,,AIRTOOLS,airtools.txt
toolbar[0][11]=toolbar[9],8,,SPECIALTOOLS,special.txt
« Last Edit: August 26, 2008, 11:34:57 AM by gauthier »

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #5 on: August 26, 2008, 12:12:27 PM »
Yes method 1 is complicated - in other words: you are not done yet.  :)

Now you have two definitions of toolbar[3]. Once the original monorail, and you entered maglev as toolbar[3] as well...
here:

# maglevtools (waytype 6)
toolbar[3][0]=ways(6,0)
toolbar[3][1]=ways(6,1)
toolbar[3][2]=bridges(6)
toolbar[3][3]=tunnels(6)
etc.

This won't work.

It needs to be [4].

...as you did (correctly) here:
toolbar[0][6]=toolbar[4],3,,MAGLEVTOOLS,maglevtools.txt

But you have to change the former 4 to 5, the former 5 to 6, the former 6 to 7 and so on... just as you did here:
toolbar[0][8]=toolbar[6],5,,ROADTOOLS,roadtools.txt
toolbar[0][9]=toolbar[7],6,,SHIPTOOLS,shiptools.txt
toolbar[0][10]=toolbar[8],7,,AIRTOOLS,airtools.txt
toolbar[0][11]=toolbar[9],8,,SPECIALTOOLS,special.txt

Make sure the defintions of each match with that list.

E.g.

# roadtools (waytype 1)
toolbar[5][0]=ways(1,0)
...

must become

# roadtools (waytype 1)
toolbar[6][0]=ways(1,0)
...

and so on.
------------------------

Another error you made (actually it's not necessarily an error, but if you want to have it that way even more work is required) is the icon number.

The original entry was:
toolbar[0][6]=toolbar[4],3,,TRAMTOOLS,tramtools.txt
and you made this:
toolbar[0][6]=toolbar[4],3,,MAGLEVTOOLS,maglevtools.txt

Icon #3 shows the tram symbol (otherwise it would not have been used there) so your entry would still show the tram symbol - but open maglev tools (and the road icon would open tram tools, ship icon for road tools, etc...) Unfortunately these numbers cannot be changed in a config-file, but they are part of menu.BarTools.pak

Didn't I say method #1 is the longer, being tedious and prone to errors? ;D Now you see what I mean...

I'll try if there's a way to get a single icon added without having to redo the whole menu.BarTools.pak file. Will be back in a few minutes.
------
EDIT: No, won't work. So you have the choice: use an existing icon (twice) or redo menu.BarTools.pak
« Last Edit: August 26, 2008, 12:25:42 PM by DirrrtyDirk »

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #6 on: August 26, 2008, 03:41:02 PM »
I made this but it doesn't work again  :'(

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #7 on: August 26, 2008, 03:59:41 PM »
I'll have a look.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: maglev_track ???
« Reply #8 on: August 26, 2008, 04:08:14 PM »
toolbar[0][11]=toolbar[9],7,,SPECIALTOOLS,special.txt
toolbar[0][12]=general_tool[1]
toolbar[0][13]=-
toolbar[0][14]=dialog_tool[3]
toolbar[0][15]=toolbar[9],8,,LISTTOOLS,list.txt


toolbar[9][11]=toolbar[10],24,,EDITTOOLS,edittools.txt

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #9 on: August 26, 2008, 04:10:21 PM »
Yep, that's what I just found as well.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #10 on: August 26, 2008, 07:14:53 PM »
It works but I have to create a depot  :-\

thanks.

I have an other question : what is the station type for maglev ?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #11 on: August 26, 2008, 08:46:58 PM »
Maglev station should be (only for makeobj 49 and ST 100.0 and later)

obj=building
type=stop
waytype=maglev_track

...

the rest should be same as usual

see german wiki (http://de.wiki.simutrans-forum.de/wiki/tiki-index.php?page=de_BuildingsDef&bl=y)

But just as I said: when I tried, maglev (as well as narrowgauge) didn't work properly yet.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10636
  • Languages: De,EN,JP
Re: maglev_track ???
« Reply #12 on: August 26, 2008, 08:49:43 PM »
use the very latest nightly, r1966 or later, may work.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #13 on: August 26, 2008, 08:57:46 PM »
I would - but I have no idea how to compile, and the nightly page stopped working after 1957.  :(

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #14 on: August 26, 2008, 09:24:32 PM »
The wiki doesn't indicate what are picture parameter.

Is it
Quote
frontimage[N]=image.0.1
...

or
Quote
frontimage[0]=image.0.1
...

or other ?

I think I have to write these lines :
Quote
type=depot
waytype=maglev_track
???

I used german wiki for signals and ways but it seems to be not very handbook for buildings ...

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #15 on: August 26, 2008, 09:34:22 PM »
Oh for the depot I used this - although it doesn't work (don't know if it's the pak or the program - see below)

Code: [Select]
-----------------------
obj=building
name=MAGLEV_Depot
type=depot
waytype=maglev_track
Dims=1,1,4
FrontImage[0][0][0][0][0][0]=maglevdepot.0.0
FrontImage[1][0][0][0][0][0]=maglevdepot.0.1
FrontImage[2][0][0][0][0][0]=maglevdepot.0.2
FrontImage[3][0][0][0][0][0]=maglevdepot.0.3
icon=> maglevdepot.0.4
cursor=maglevdepot.0.5
-----------------------

It PAK'ed without error (makeobj49), ST started without problems, and the depot was shown correctly in the toolbar - but when I try to place it, ST crashes (r1957).


Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #16 on: August 26, 2008, 09:48:40 PM »
I have some other problems with st100, I adapted MLM stations for it, they are shown correctly but when I place them, they don't appear.
I have many errors for removing a track, remove tool sometimes not works and when I use maglev remove tool, st crashs.

I hesitate to play 99.18 instead of 100 but I couldn't create a st100 version of MLM devlopements  :'(

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #17 on: August 26, 2008, 09:55:53 PM »
Let's wait for werniemann's return so we can benefit from prissi's continuing work. After all there's already sourcecode for r1972 - and my guess is that there have been some problems already solved.

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: maglev_track ???
« Reply #18 on: August 27, 2008, 05:40:06 AM »
« Last Edit: August 28, 2008, 05:23:09 PM by Frank »

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #19 on: August 27, 2008, 11:03:38 AM »
I tried nightly 100.1, remove tool works well but maglev remove tool make st crash ... I'm waiting.
I can't uderstand why my stations don't appear.
« Last Edit: August 27, 2008, 11:06:04 AM by gauthier »

Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: maglev_track ???
« Reply #20 on: August 27, 2008, 04:08:38 PM »
BackstationsMLM[1][0][0][0][0]=stationsMLM.0.0
FrontstationsMLM[8][0][0][0][0]=stationsMLM.1.0


BackImage and FrontImage

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #21 on: August 27, 2008, 08:25:36 PM »
I used replace function of text editor ("bloc-notes" in French, I don't know in English)  :-X
I become used to st100 :


Offline Frank

  • Inactive/Retired
  • *
  • Posts: 1431
  • Languages: DE
Re: maglev_track ???
« Reply #22 on: August 28, 2008, 05:12:08 PM »
FIX: (z9999) maglev and narrowgauge for everything, addional line symbols (MaglevStop, NarrowgaugeStop, ... ) for linemanager optional

r1973_win_dotNET.zip 680 kb - is required .net Framework (compiled MS VC++ EE 2005)

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #23 on: August 28, 2008, 06:06:01 PM »
Oh yes, much better. In other words: it seems to work!  :D

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #24 on: September 06, 2008, 10:48:40 AM »
How to create a new icon for maglev toolbar ? I think I have to change a pak.file but I don't know how to do it.

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: maglev_track ???
« Reply #25 on: September 06, 2008, 11:15:24 AM »
You'd have to add it to menu.bartools.pak (and by adding I mean add to the source files - which you probably don't have and then repak the pak file).

In other words: that's probably more of a job for pak128-team, then for you as add-on creator. But of course you can create your own version - just look at the pak64 sources at sourceforge (icons in 64 and 128 are the same size, so they will work - although some of them look different.) So take the .png and .dat from there, edit them and then create your new menu file.

Offline gauthier

  • Devotees (Inactive)
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: maglev_track ???
« Reply #26 on: September 06, 2008, 01:01:55 PM »
 :-\
Quote
In other words: that's probably more of a job for pak128-team, then for you as add-on creator.
so I will leave it for dev-team  ;D