Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Jun 27, 2017 3:44 am

All times are UTC




Post new topic  Reply to topic  [ 34 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Fri Jun 04, 2010 12:59 pm 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
Hi

I want to make a Openttd server cause most of the time I doesnt have time when one of friends has and vica versa. So now I want to make a server so everybody can log in when they want to.
I've set up the server and everything is working.

Now one year is about 15 minutes. So from 1950 to 2050 is about 25 hours. Now because I want to leave the server running for a couple of weeks it would be fun if I could change introduction dates of the trains and such, so when you log in after a week you still cant build all trains.

I've tried to change introduction dates with Grfmaker, but you can only change them in the range of 1920 to 2070.

So my question, is there an other way to do this? Or is there a way to let a year take more time (instead of 15 minutes, like 3 hours or something) (ofcourse while everything moves at normal speed)


Top
   
PostPosted: Fri Jun 04, 2010 1:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 09, 2008 4:20 pm
Posts: 2041
Skype: yes
Location: Slovakia
Advanced settings - Vehicles - Vehicles never expire.

EDIT: Sorry, I don't read carefully :oops: It's not possible to change time speed in OpenTTD without fast time button.

_________________
Image

Only dumb people quote themselves, and only the truest retards put such quotes in their forum signatures
-Drury


Top
   
PostPosted: Fri Jun 04, 2010 5:01 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Dec 18, 2004 5:35 pm
Posts: 14729
Location: Stockholm, Sweden
There are daylength patches around, but to use this online would mean that all clients would need the same patch

_________________
Image
OpenTTD Scenarios:
Archipiélago Hermoso
(Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91) 2016-06-23


Top
   
PostPosted: Sat Jun 05, 2010 10:53 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6909
kamikaze_fish wrote:
I've tried to change introduction dates with Grfmaker, but you can only change them in the range of 1920 to 2070.

what you need here is the Long format introduction date which can handle dates up to year 5.000.000

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Mon Jun 07, 2010 10:36 am 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
Eddi wrote:
kamikaze_fish wrote:
I've tried to change introduction dates with Grfmaker, but you can only change them in the range of 1920 to 2070.

what you need here is the Long format introduction date which can handle dates up to year 5.000.000


Ok now I've tried to make this work.

I've made a grf using grfmaker with only a grfID and an action 0.
I have left the grfID as it is only changed the action 0

Now for to test if it works I tried to get the maglev lev 4 chimaera in 1920.

action 0 : 2 * 11 00 00 01 01 57 00 2a 51 B3 0A 00

But now when I use the GRF the introduction date is 1976. When I put two 00 between the vehicleID and the prop (2a), the date is 1949.

What am I doing wrong?


Top
   
PostPosted: Mon Jun 07, 2010 10:48 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9012
Location: Sol d
kamikaze_fish wrote:
Eddi wrote:
kamikaze_fish wrote:
I've tried to change introduction dates with Grfmaker, but you can only change them in the range of 1920 to 2070.

what you need here is the Long format introduction date which can handle dates up to year 5.000.000


Ok now I've tried to make this work.

I've made a grf using grfmaker with only a grfID and an action 0.
I have left the grfID as it is only changed the action 0

Now for to test if it works I tried to get the maglev lev 4 chimaera in 1920.

action 0 : 2 * 11 00 00 01 01 57 00 2a 51 B3 0A 00

But now when I use the GRF the introduction date is 1976. When I put two 00 between the vehicleID and the prop (2a), the date is 1949.

What am I doing wrong?

Uhm... the property value always follows the property byte. And the property value for a long introduction date is a double word value, thus the four bytes following the 2A (51 B3 0A 00). Further I do recommend to use the proper escape sequences for dates:
-1 * 11 00 00 01 01 57 00 2A \date1920-01-01
http://wiki.ttdpatch.net/tiki-index.php ... nsDetailed

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Mon Jun 07, 2010 10:53 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6909
likely the 00 before the 2a is wrong...

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Mon Jun 07, 2010 1:26 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9012
Location: Sol d
For simplicity's sake I anyway would propose to code such simple thing using NML (download, link totrain properties in absense of proper documentation, line 35ff) and have a look at OpenGFX+ for a brief view how such thing looks like: [url]grf initialization[/url] and vehicle properties. Easily readable and no need to worry about property sizes, sprite length etc pp.

And Eddi might be right, I didn't check the bytes before 2A.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Mon Jun 07, 2010 7:55 pm 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
I put in the 00 because it gave a pseudo sprite error in openttd.

"Long format introduction date (2A)

Set the vehicle introduction date, in days since the year 0. This takes account of leap years; dividable by 4, but not 100 unless 400. A start date of 1920-01-01 is obtained with a value of 701265 (51 B3 0A 00). This property must be set after property 00 to take effect. In TTDPatch, dates after 2044 will be limited to 2044."

I'll look at the program and doc tomorrow planetmaker, thx for the reply anyway!


Top
   
PostPosted: Mon Jun 07, 2010 8:18 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9012
Location: Sol d
Setting a property also means assigning a value to it:

Code:
-1 * 0 00 00 \b02 \b01 57 // train: 2 properties for one ID, starting with ID 0x57
00 \w0                    // short introduction date: days since January 1 1920
2A \date1920-01-01        // long introduction date: 1920


You can assign any (word) value to the short introduction date as it will be over-written by the long introduction date defined in property 2A

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Mon Jun 07, 2010 10:23 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6909
kamikaze_fish wrote:
This property must be set after property 00 to take effect

yes, but then you must assign an actual value to property 00, not leave it simply blank... Property 00 takes 2 bytes, so in your example it consumes the bytes "2A 51" [which explains your 1976], then you have another property "B3" whatever that means, which consumes the bytes "04 00". so you need to add another two bytes so it reads "00 00 00 2A ..."

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Jun 08, 2010 11:33 am 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
Ok!:D I got it to work.

I got the maglev in the year 3800 now.

Code I used:

action 0
2 * 13 00 00 02 01 57 00 00 00 2a ae 2d 15 00

First it didnt work, but I had to set that I changed 2 props, so now it works. Thx for all the help!


Top
   
PostPosted: Tue Jun 08, 2010 12:12 pm 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
I've also managed to get the escape values working. I had the wrong version of grfcodec (0.9.10).
But I still havent figured out how many bytes such an escape value is.

I used

2 * 16 00 00 02 01 57 00 00 00 2a \d1-1-3800

Is it of no importance the value you give for the amount of bytes? (16 in this case)


Top
   
PostPosted: Tue Jun 08, 2010 2:30 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9012
Location: Sol d
kamikaze_fish wrote:
I've also managed to get the escape values working. I had the wrong version of grfcodec (0.9.10).
But I still havent figured out how many bytes such an escape value is.

I used

2 * 16 00 00 02 01 57 00 00 00 2a \d1-1-3800

Is it of no importance the value you give for the amount of bytes? (16 in this case)


It depends. If you use nforenum to check the grf for sanity it doesn't matter - simply for the reason that nforenum writes the proper value there. But if you don't use it (against recommendation), you must put the correct value. Or you most probably would get something like "read beyond end of sprite" or alike.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Tue Jun 08, 2010 6:59 pm 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
Ok I made my grf to change introduction dates. Also all trains ingame are available. Last train is introduced in the year 4223:P

Thx eddi and planetmaker for all the advice to get this grf working!


Attachments:
Long Vehicle Introduction Datew v1.grf [996 Bytes]
Downloaded 179 times
Top
   
PostPosted: Tue Jun 08, 2010 9:51 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4530
Location: /home/sweden
If you want to make it available through the in-game content service you can do that here: http://bananas.openttd.org/

Go to manage, create an account, log-in (you'll get a page that says that the page does not exist. Ignore that and then go to http://bananas.openttd.org/ again and click on the manage button and follow the on-screen instructions)

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Wed Jun 09, 2010 12:47 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6909
kamikaze_fish wrote:
But I still havent figured out how many bytes such an escape value is.

that's easy... "b" is one byte, "w" is two byte, and "d" is four byte... occasionally, you have "b*", which may be 1 or 3 bytes...

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Fri Jun 11, 2010 1:55 pm 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
Uploaded it to bananas:D


Top
   
PostPosted: Fri Apr 20, 2012 7:09 am 
Offline
Engineer
Engineer

Joined: Thu Dec 17, 2009 1:34 pm
Posts: 33
In version 1.5 the grf is working fine. But in version 1.2 it sais the grf is not compatible with this version of openttd. How can I fix this and still use version 1.2?

In the wiki it sais it isn't supported, did the devs take it out of the supported attributes?
Wiki long format introduction date
(in the top of the page is sais it IS supported)


Top
   
PostPosted: Fri Apr 20, 2012 8:32 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6909
that message usually means that you screwed up the reported language (NOT YOUR GRF!!!) version in the action 8.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 34 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.