Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Dec 19, 2018 12:51 pm

All times are UTC




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Aug 23, 2007 5:51 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4304
Skype: george-vb
Location: SPb, Russia.
http://wiki.ttdpatch.net/tiki-index.php ... nalAction2
Wiki wrote:
Industry founder information (A7)
Since TTDPatch 2.0.1 alpha 74, this byte contains the ID of the company that funded the industry, or 10h if the industry was generated randomly. If the industry was built using an earlier TTDPatch version or with newindustries turned off, this field is 10h.

And would it be possible to get the colour(s) of this player?
If not, could we have one more field in the industry structure - the colour of the company that it had when it have built the industry?

_________________
Image Image Image Image


Top
   
PostPosted: Thu Aug 23, 2007 10:30 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Nov 25, 2002 4:30 pm
Posts: 1202
Location: Tiszavasvári, Hungary
George wrote:
And would it be possible to get the colour(s) of this player?

Yes, it would be easy to return the first (and if present, the second) company color, or a random color if the industry has no owner.
George wrote:
If not, could we have one more field in the industry structure - the colour of the company that it had when it have built the industry?

You don't need a second field for that - industries already have a "color" field. We'd just need a new flag in property 1A that makes sure the color of the founder company gets written to this field instead of a random value. You wouldn't even need to care about any details; just enable recoloring without specifying a recolor sprite number, and you get the correct color. You couldn't use the second company color with this, though.

You just need to decide what would be better for you - an industry that changes color when your company changes color, and reverts to a random color on bankrupt, or an industry that gets its color from your current company, but never changes it later.

_________________
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick


Top
   
PostPosted: Thu Aug 23, 2007 4:29 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4304
Skype: george-vb
Location: SPb, Russia.
Csaboka wrote:
George wrote:
And would it be possible to get the colour(s) of this player?
Yes, it would be easy to return the first (and if present, the second) company color, or a random color if the industry has no owner.
George wrote:
If not, could we have one more field in the industry structure - the colour of the company that it had when it have built the industry?
You don't need a second field for that - industries already have a "color" field. We'd just need a new flag in property 1A that makes sure the color of the founder company gets written to this field instead of a random value. You wouldn't even need to care about any details; just enable recoloring without specifying a recolor sprite number, and you get the correct color. You couldn't use the second company color with this, though.
You just need to decide what would be better for you - an industry that changes color when your company changes color, and reverts to a random color on bankrupt, or an industry that gets its color from your current company, but never changes it later.
Never change it later.

_________________
Image Image Image Image


Top
   
PostPosted: Thu Aug 23, 2007 7:14 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Nov 25, 2002 4:30 pm
Posts: 1202
Location: Tiszavasvári, Hungary
This should be possible now, thanks to DaleStan for industry variable 45 and me for callback 14A. I've decided a new callback is better than a bit in property 1A because it allows more things. For example, you can now limit the list of available colors if your industry wants to use random colors, but doesn't look right in all the 16 colors possible. You don't get second company color support, though. (I'm not sure this would be needed at all.)

_________________
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick


Top
   
PostPosted: Thu Aug 23, 2007 8:45 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4304
Skype: george-vb
Location: SPb, Russia.
Csaboka wrote:
This should be possible now, thanks to DaleStan for industry variable 45 and me for callback 14A. I've decided a new callback is better than a bit in property 1A because it allows more things. For example, you can now limit the list of available colors if your industry wants to use random colors, but doesn't look right in all the 16 colors possible. You don't get second company color support, though. (I'm not sure this would be needed at all.)
Thank you :)
I'll try to test it tomorrow

_________________
Image Image Image Image


Top
   
PostPosted: Thu Aug 23, 2007 11:30 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Tue Apr 05, 2005 1:48 am
Posts: 1507
Location: Deep down the deepest blue
George, if you can excuse a blunt request, i would be interested testing my own implementation (almost written) of this with your tester :)

_________________
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones


Top
   
PostPosted: Fri Aug 24, 2007 5:34 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4304
Skype: george-vb
Location: SPb, Russia.
belugas wrote:
George, if you can excuse a blunt request, i would be interested testing my own implementation (almost written) of this with your tester :)
I hope I'll make one today evening

_________________
Image Image Image Image


Top
   
PostPosted: Fri Aug 24, 2007 9:15 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4304
Skype: george-vb
Location: SPb, Russia.
Take a test version here
viewtopic.php?f=26&t=30188&p=620930#p620930

_________________
Image Image Image Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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-2018 phpBB Limited

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