Menu jumping (v1; r12805)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Menu jumping (v1; r12733)

Post by Frostregen »

About hiding all signs:

Would it be possible to hide only signs which parse into numbers,
and only use those to switch locations?

This would allow us to still use signs where wanted.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Menu jumping (v1; r12733)

Post by zypa »

Why are visible signs necessary in the title screen?
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Menu jumping (v1; r12733)

Post by Frostregen »

Some scenarios feature signs for geological features, such as mountains, forests, rivers, lakes.

I think this looks nice.

Since we jump between different scenes, there may be some scenes with less action,
which could benefit from signs.

I would even suggest to make the jumping delay configurable by the sign, not by patch setting.
Format could be "ID_TICKSVISIBLE". (ex.: "01_10", "02_150")

This would give some more control to titlescene creators.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Re: Menu jumping (v1; r12733)

Post by zypa »

The "ID_TICKSVISIBLE" time sounds quite cool.

To the see some signs.
I guess this would require some work with the sign mechanism. Atm you can just switch all off or all on. Changing this would make this patch more complex and it would interact with more other patches. (At leatst I think so)

However, maybe it is possible to get the behaviour you want with this procedure:

The patch switches to a sign,
saves the location and name in a local variable,
deletes the sign
When it comes to switching locations, it recreates the sign.

@Roujin: Is that possible? What do you think about the ID_TICKSVISIBLE idea?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Menu jumping (v1; r12733)

Post by Roujin »

I'm sorry guys, but in my opinion this would make things too complicated.

I rediffed the patch for r12805. Also changed a little code that I suspect some compilers (Ammler's for sure) don't like.
Attachments
menu_jumping_v1_r12805.diff
menu jumping for r12805
(7.97 KiB) Downloaded 173 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 171
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Menu jumping (v1; r12805)

Post by Ben1338 »

Hey. I've just tried including your .dat file into OTTD but the background isn't changing.

I've just downloaded it and put it into the directory of OTTD. It didn't ask me to replace anything.

Did I do something wrong?

And how do I make my own .dat file?

By the way. Thanks for making this hopefully possible.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Menu jumping (v1; r12805)

Post by Wolf01 »

You need a patched version of OTTD to use the jumping feature, the opntitle.dat does nothing alone, it is a standard savegame
To make your own opntitle.dat you can simply rename a savegame from *.sav to opntitle.dat and you are served :)
Don't use too big saves and the location they show is the last one you viewed when saving it
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Menu jumping (v1; r12805)

Post by Roujin »

Furthermore, the opntitle.dat goes into the /data folder, not the main openttd folder. There is already one there by default, so if you put it there it should ask you if you want to overwrite it. Oh and you shouldn't overwrite it, but rename the old one to something else before, so you have a backup ;)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 171
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Menu jumping (v1; r12805)

Post by Ben1338 »

Wolf01 wrote:You need a patched version of OTTD to use the jumping feature
Ok. What is this patch of OTTD?
Wolf01 wrote:the opntitle.dat does nothing alone, it is a standard savegame
So it is possible to convert the default picture into a save same?
Wolf01 wrote:To make your own opntitle.dat you can simply rename a savegame from *.sav to opntitle.dat and you are served :)
Don't use too big saves and the location they show is the last one you viewed when saving it
Ok.
Roujin wrote:Furthermore, the opntitle.dat goes into the /data folder, not the main openttd folder. There is already one there by default, so if you put it there it should ask you if you want to overwrite it. Oh and you shouldn't overwrite it, but rename the old one to something else before, so you have a backup ;)
Ok.

Thanks guys. :bow: :)
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Menu jumping (v1; r12805)

Post by Yexo »

Ben1338 wrote:
Wolf01 wrote:You need a patched version of OTTD to use the jumping feature
Ok. What is this patch of OTTD?
Look at the first post of this topic. If you don't know what to do with the patch file, read the sticky topic in the development forum.
User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 171
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Menu jumping (v1; r12805)

Post by Ben1338 »

Right. I've followed the instructions on the applying site. I think that I've applied the patch. Now how to you make the camera change positions?
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Menu jumping (v1; r12805)

Post by Roujin »

If you have applied the patch and compiled, the resulting binary should have a new option in "advanced settings" (or was it still called "patch settings" back in that revision?), named "delay for main menu jump". Set it to some value (in game days).
The second thing you need is an appropriate opntitle.dat file. The default file you normally see in the menu won't jump anywhere because it doesn't have any signs in it. You can use the opntitle.dat I provide in my first post in this thread, or create one yourself by just renaming a savegame of your choice from xyz.sav to opntitle.dat (yes, just change the extension like that). If the savegame has any signs in it, the view in the menu will jump from one to the next alphabetically.
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Ben1338
Traffic Manager
Traffic Manager
Posts: 171
Joined: 17 Nov 2007 17:23
Skype: ben313371

Re: Menu jumping (v1; r12805)

Post by Ben1338 »

Ok. so you name it 1,2 etc and it should center the screen on it?
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: Menu jumping (v1; r12805)

Post by Lord Aro »

would this work for 0.7.2?
it sounds really cool! :))

it would be even better if you could jump to different save games, e.g. one in all the different climates
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
pi1985
Engineer
Engineer
Posts: 107
Joined: 16 May 2013 08:22
Location: Ukraine

Re: Menu jumping (v1; r12805)

Post by pi1985 »

Updated to r26336.
Attachments
MenuJumping_r26336.patch
(6.36 KiB) Downloaded 68 times
opntitle_mod.dat
Modified title savegame from 1.3.x
(56.78 KiB) Downloaded 70 times
Image
Image
Image.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests