Community => Simutrans Help Center => Topic started by: gauthier on August 25, 2008, 06:46:10 pm
Title: maglev_track ???
Post by: gauthier 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.
Title: Re: maglev_track ???
Post by: DirrrtyDirk 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.
Title: Re: maglev_track ???
Post by: gauthier on August 25, 2008, 09:38:59 pm
Quote
You have to edit your menu files as well.
Can you explain ?
Title: Re: maglev_track ???
Post by: DirrrtyDirk 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
Title: Re: maglev_track ???
Post by: DirrrtyDirk 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.
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
Title: Re: maglev_track ???
Post by: gauthier on August 26, 2008, 03:41:02 pm
I made this but it doesn't work again :'(
Title: Re: maglev_track ???
Post by: DirrrtyDirk on August 26, 2008, 03:59:41 pm
I'll have a look.
Title: Re: maglev_track ???
Post by: Frank on August 26, 2008, 04:08:14 pm
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).
Title: Re: maglev_track ???
Post by: gauthier 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 :'(
Title: Re: maglev_track ???
Post by: DirrrtyDirk 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.
Title: Re: maglev_track ???
Post by: Frank on August 27, 2008, 05:40:06 am
Title: Re: maglev_track ???
Post by: gauthier 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 :
(http://img1.imagilive.com/0808/st100.jpg)
Title: Re: maglev_track ???
Post by: Frank 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 (http://www.frankpenz.de/r1973_win_dotNET.zip) 680 kb - is required .net Framework (compiled MS VC++ EE 2005)
Title: Re: maglev_track ???
Post by: DirrrtyDirk on August 28, 2008, 06:06:01 pm
Oh yes, much better. In other words: it seems to work! :D
Title: Re: maglev_track ???
Post by: gauthier 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.
Title: Re: maglev_track ???
Post by: DirrrtyDirk 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.
Title: Re: maglev_track ???
Post by: gauthier 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.