News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

maglev_track ???

Started by gauthier, August 25, 2008, 06:46:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gauthier

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.

DirrrtyDirk

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.
  
***** PAK128 Dev Team - semi-retired*****

gauthier

QuoteYou have to edit your menu files as well.

Can you explain ?

DirrrtyDirk

#3
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
# 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:
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.
  
***** PAK128 Dev Team - semi-retired*****

gauthier

#4
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 :
Quotetoolbar[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
Quotetoolbar[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

DirrrtyDirk

#5
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
  
***** PAK128 Dev Team - semi-retired*****

gauthier

I made this but it doesn't work again  :'(

DirrrtyDirk

  
***** PAK128 Dev Team - semi-retired*****

Frank

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

DirrrtyDirk

Yep, that's what I just found as well.
  
***** PAK128 Dev Team - semi-retired*****

gauthier

It works but I have to create a depot  :-\

thanks.

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

DirrrtyDirk

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.
  
***** PAK128 Dev Team - semi-retired*****

prissi

use the very latest nightly, r1966 or later, may work.

DirrrtyDirk

I would - but I have no idea how to compile, and the nightly page stopped working after 1957.  :(
  
***** PAK128 Dev Team - semi-retired*****

gauthier

The wiki doesn't indicate what are picture parameter.

Is it
Quotefrontimage[N]=image.0.1
...

or
Quotefrontimage[0]=image.0.1
...

or other ?

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

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

DirrrtyDirk

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)

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

  
***** PAK128 Dev Team - semi-retired*****

gauthier

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  :'(

DirrrtyDirk

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.
  
***** PAK128 Dev Team - semi-retired*****


gauthier

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

Frank

BackstationsMLM[1][0][0][0][0]=stationsMLM.0.0
FrontstationsMLM[8][0][0][0][0]=stationsMLM.1.0


BackImage and FrontImage

gauthier

I used replace function of text editor ("bloc-notes" in French, I don't know in English)  :-X
I become used to st100 :


Frank

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)

DirrrtyDirk

Oh yes, much better. In other words: it seems to work!  :D
  
***** PAK128 Dev Team - semi-retired*****

gauthier

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.

DirrrtyDirk

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.
  
***** PAK128 Dev Team - semi-retired*****

gauthier

 :-\
QuoteIn 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