Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Sep 21, 2017 7:36 pm

All times are UTC




Post new topic  Reply to topic  [ 159 posts ]  Go to page Previous 14 5 6 7 8
Author Message
 Post subject:
PostPosted: Sat Jan 27, 2007 7:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1102
Location: Paris, France
As I thought, it work fine.

Just replace in "ExtChangeIndustryProduction(Industry *i)" located in industry_cmd.cpp :
Code:
            if (mag >= 10) {
               SetDParam(2, mag);
               SetDParam(0, _cargoc.names_s[i->produced_cargo[j]]);
               SetDParam(1, i->index);
               AddNewsItem(
                  percent >= 0 ? STR_INDUSTRY_PROD_GOUP : STR_INDUSTRY_PROD_GODOWN,
                  NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY, 0),
                  i->xy + TileDiffXY(1, 1), 0
               );
            }


by

Code:
            mag = abs(percent);
            if (mag >= 10 && (HASBIT(i->town->have_ratings, _local_player) || i->town->exclusivity == _local_player)) {
               SetDParam(2, mag);
               SetDParam(0, _cargoc.names_s[i->produced_cargo[j]]);
               SetDParam(1, i->index);
               AddNewsItem(
                  percent >= 0 ? STR_INDUSTRY_PROD_GOUP : STR_INDUSTRY_PROD_GODOWN,
                  NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_TILE, NT_ECONOMY, 0),
                  i->xy + TileDiffXY(1, 1), 0
               );
            }


Here is a patch file :

http://magicsite.manga-torii.com/files/ ... cities.zip


Top
   
 Post subject:
PostPosted: Sat Jan 27, 2007 8:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
I'm glad you like the patch. :D

Yes, the numerous messages tend to be very annoying, to me too...
Usually I just turn the economy messages OFF (under the "Message Settings").

I thought about making the messages of only player-used industries to be visible to a certain player but I'm not really sure how I'd go about it. :)
I'll look some more at the source, but please be patient, as my programming knowledge is quite basic. :)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
 Post subject:
PostPosted: Sat Jan 27, 2007 8:22 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
Wow - thank you - looks like you have posted a new message while I was still typing the above one. :)

I'll try that and include it.

Thank you very much!

EDIT: I just may post it tomorrow (sunday) - it's evening here and I am sleepy - I'll rather get at it tomorrow and also update the other patches.

Thanks again. :D

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
 Post subject:
PostPosted: Sat Jan 27, 2007 8:38 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1102
Location: Paris, France
SirkoZ wrote:
Wow - thank you

Thank you very much!

Thanks again. :D

No problem, I did it for me ;)


Top
   
 Post subject:
PostPosted: Sun Jan 28, 2007 7:40 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
Well I'm sure other players will appreciate it. ;)

:arrow: Anyways here's version 2.8 of the patch - that message filtering deserves a revision upgrade.


Attachments:
File comment: diff
smooth_economy_sz_v2-8_r8435_mini-IN.patch [1.95 KiB]
Downloaded 286 times
File comment: diff
smooth_economy_sz_v2-8_r8435_NS.patch [6.28 KiB]
Downloaded 366 times

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!
Top
   
PostPosted: Sun Jul 29, 2007 12:16 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
Mainly different approach.....here's the v3.0 (2.9 was a non-release although fully functional):

EDIT: the 0% transported behaviour was too radical in 3.0 - so it's fixed now - 3.0c
(also chances are a bit higher now):


Attachments:
File comment: diff
smooth_economy_sz_v3-0c_r10774_simple.patch [2.04 KiB]
Downloaded 161 times
File comment: diff
smooth_economy_sz_v3-0c_0-5-3-RC2_simple.patch [1.77 KiB]
Downloaded 148 times
File comment: txt
sz_ind_patch_comments_v3-0c.txt [4.94 KiB]
Downloaded 171 times

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!
Top
   
PostPosted: Fri Oct 19, 2007 3:00 pm 
Offline
Engineer
Engineer

Joined: Thu Oct 18, 2007 11:46 am
Posts: 4
It there has a chance to see it in the trunk?

_________________
Sorry for my little english....


Top
   
PostPosted: Fri Oct 19, 2007 7:01 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4290
Skype: george-vb
Location: SPb, Russia.
Sorry for a question, but
Can industry prop 13 (var 93) have values other than 00, 04, 08, 10, 20, 40, 80?

_________________
Image Image Image Image


Top
   
PostPosted: Fri Oct 19, 2007 8:13 pm 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
George wrote:
Can industry prop 13 (var 93)

Industry prop 13 is cargo-specific.
Industry variable 93 is not cargo-specific.

Of which do you speak?

_________________
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser


Top
   
PostPosted: Fri Oct 19, 2007 8:28 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
clark17 wrote:
It there has a chance to see it in the trunk?

I honestly don't know.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Fri Oct 19, 2007 8:29 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
George wrote:
Sorry for a question, but
Can industry prop 13 (var 93) have values other than 00, 04, 08, 10, 20, 40, 80?

No clue - DaleStan is the one to tell you the grf specifics. I only deal with the behaviour, not grf compatibility.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
PostPosted: Fri Oct 19, 2007 8:57 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4290
Skype: george-vb
Location: SPb, Russia.
DaleStan wrote:
George wrote:
Can industry prop 13 (var 93)

Industry prop 13 is cargo-specific.
Industry variable 93 is not cargo-specific.
Of which do you speak?
Sorry for not clean question
51766 [36][5A] Industry array (+90 entries), locations within each entry follow:
Offset Size Meaning
13 B Production multiplier, always either 00 (which means the industry has announced imminent closure) or an integer power of 2. 10 is the default, 04 is the minimum, 80 is the maximum.

_________________
Image Image Image Image


Top
   
PostPosted: Fri Oct 19, 2007 9:01 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Tue Apr 05, 2005 1:48 am
Posts: 1507
Location: Deep down the deepest blue
I think it is only a powerof 2, indeed.
I'll check when i can

_________________
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: Sat Oct 20, 2007 6:06 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4290
Skype: george-vb
Location: SPb, Russia.
belugas wrote:
I think it is only a powerof 2, indeed.
I'll check when i can
It may be useful to use other values to indicate for the GRF that the value is smooth.

_________________
Image Image Image Image


Top
   
PostPosted: Sun Oct 21, 2007 3:57 am 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
George wrote:
51766 [36][5A] Industry array (+90 entries), locations within each entry follow:
Offset Size Meaning
13 B Production multiplier, always either 00 (which means the industry has announced imminent closure) or an integer power of 2. 10 is the default, 04 is the minimum, 80 is the maximum.

Absolutely everything GRF-accessible that listed in that document is a variable. *EVERYTHING!* Stop calling them properties. They aren't.

Properties are the things you put in an action 0.

_________________
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser


Top
   
PostPosted: Sun Oct 21, 2007 5:09 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Apr 16, 2003 4:09 pm
Posts: 4290
Skype: george-vb
Location: SPb, Russia.
DaleStan wrote:
George wrote:
51766 [36][5A] Industry array (+90 entries), locations within each entry follow:
Offset Size Meaning
13 B Production multiplier, always either 00 (which means the industry has announced imminent closure) or an integer power of 2. 10 is the default, 04 is the minimum, 80 is the maximum.

Absolutely everything GRF-accessible that listed in that document is a variable. *EVERYTHING!* Stop calling them properties. They aren't.
Properties are the things you put in an action 0.
Sorry
Back on topic. Values in var 93 could take a more wide range of values in OTTD. GRFs could use it. What do you think?

_________________
Image Image Image Image


Top
   
PostPosted: Mon Nov 26, 2007 1:42 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
Newsflash - since r11500 - my smooth_economy patch has been included in the trunk, although not 3.0c but 3.0w - its behavior is still the same old good one that was known for my patches but it's really simple and "clean".

Of course as always, there can be improvements, de-coupl-ings and such, but it's in and it's behaving, that's the most important.

Thank you to all that have helped me through the years with your suggestions/advices for this small but useful patch. And of course - thank you, Belugas, who reviewed and approved it.


Attachments:
File comment: diff
smooth_economy_sz_v3-0w_r11399_simple.patch [1.41 KiB]
Downloaded 243 times

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!
Top
   
PostPosted: Mon Nov 26, 2007 6:40 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon May 01, 2006 9:57 pm
Posts: 122
SirkoZ wrote:
Newsflash - since r11500 - my smooth_economy patch has been included in the trunk, although not 3.0c but 3.0w - its behavior is still the same old good one that was known for my patches but it's really simple and "clean".

Of course as always, there can be improvements, de-coupl-ings and such, but it's in and it's behaving, that's the most important.

Thank you to all that have helped me through the years with your suggestions/advices for this small but useful patch. And of course - thank you, Belugas, who reviewed and approved it.


Well Done !!

it might be thought to add [in trunk] in the main post of this topic and update this page of the OpenTTD Manual : http://wiki.openttd.org/index.php/Economy :)

And what's the difference with this another project branch : http://wiki.openttd.org/index.php/New_E ... _Balancing ?

8)

_________________
:arrow: OpenTTD Suggestions
:arrow: OpenTTD and TTDPatch Features Comparative


Top
   
PostPosted: Tue Nov 27, 2007 1:11 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1493
Location: The sunny side of Alps
Yes, I will update that wiki page tomorrow and also the title here.

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 159 posts ]  Go to page Previous 14 5 6 7 8

All times are UTC


Who is online

Users browsing this forum: Google Feedfetcher and 4 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.