Capacity-cost multiplers for vehicles(Split from MB's Thread

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by thgergo » 20 Aug 2007 22:29

By Ottdcoop request, I have coded a capacity/price multiplication tool for your newships grf, Michael Blunck.
You need to place this grf after the newships.grf to take effect on the capacities, price modifications are always executed

-It detects MB`s newships, and modifies default ships too, if newships.grf is not loaded.

-After v4, you need to put the multiplers as modulos, so more shooth alterations are possible :mrgreen:

1st parameter:

-multiples capacity, and loading speed

-uses value 500%, when this parameter is not set. (default multiplication)

2nd parameter:

-multiples the puchase cost and running cost

-uses the value of the first parameter, when this parameter is not set.

-you need to start a new game to have effect on these costs.

And the maximum multiplication is 6400%, any parameters bigger than 6400 will be recuded to 6400.

Happy massive cargo shipping!

An example paremeter setting: "600 75"
This setting will multiply the capacity with 6, so the new capacities will be 600% of the original!
But the price, and the runningcost will be lower, it will be 75% of the original, three quarters part of the original value.
So per example, the MPS passanger ferry costs 36618$, and carries 100passangers without any modifications. But with the multiplications, it will cost only 27508$ and will carry up to 600 passangers!

And a thing to notice: Price, and runningcost modifications are not perfect, its an inaccuration of the TTD`s price calculations, the division with remainder.
If you do the calculation 36618$*0.75=27463,5$, it doesnt looks like 27508$.
edit:
-adjustments only are *2, *4, *8 and so on... -fixed in 2.0version
-add support for default ships also:) -added in 3.0 version
-a namechange to "shiptool.grf"
-modulo based multiplications
Attachments
shiptoolv4.grf
v4
(4.74 KiB) Downloaded 3785 times
Last edited by thgergo on 30 Nov 2007 23:10, edited 14 times in total.
Image
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Michael Blunck's new graphics [http://www.ttdpatch.de/]

Post by wallyweb » 20 Aug 2007 23:21

thgergo wrote:You need to place this grf upon the newships.grf to take effect on the capacities, price modifications are always executed
This would be better phrased as follows:
"You need to place this grf after the newships.grf to take effect on the capacities, price modifications are always executed"
"upon" implies "before" and when I tried it, the capacities did not work.
When I placed newshipsmod.grf after newships.grf, it proved to be a very nice mod. :wink:
Well done. :D

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Michael Blunck's new graphics [http://www.ttdpatch.de/]

Post by thgergo » 21 Aug 2007 08:41

fixed:) Thanks for that notice
add 2.0 version
Image
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Michael Blunck's new graphics [http://www.ttdpatch.de/]

Post by wallyweb » 10 Sep 2007 19:28

thgergo wrote:You need to place this grf after the newships.grf to take effect on the capacities, price modifications are always executed
This feature is great for what it does however there are a few side effects that some of us might find problematic.
1. It affects not only ships but all transportation.
2. If it is placed before those transports (rail, RV, etc.) that one does not want to be affected, the purchase cost of the transport in question will revert to normal
3. If it is placed before those transports (rail, RV, etc.) that one does not want to be affected, the running costs of the transport in question are still affected.

The creators of the newer sets have, mostly, gone to considerable effort to balance purchase costs and running costs and these really should not be affected. Unfortunately, they are, and the running costs are affected no matter how the grf's are ordered in the cfg.

Is it possible to add another parameter to determine which transportation types will be affected? As it currently exists, the running costs parameter, which is good for ships, renders my other transport sets useless.

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Michael Blunck's new graphics [http://www.ttdpatch.de/]

Post by thgergo » 10 Sep 2007 20:48

wallyweb wrote:
thgergo wrote:You need to place this grf after the newships.grf to take effect on the capacities, price modifications are always executed
This feature is great for what it does however there are a few side effects that some of us might find problematic.
1. It affects not only ships but all transportation.
2. If it is placed before those transports (rail, RV, etc.) that one does not want to be affected, the purchase cost of the transport in question will revert to normal
3. If it is placed before those transports (rail, RV, etc.) that one does not want to be affected, the running costs of the transport in question are still affected.

The creators of the newer sets have, mostly, gone to considerable effort to balance purchase costs and running costs and these really should not be affected. Unfortunately, they are, and the running costs are affected no matter how the grf's are ordered in the cfg.

Is it possible to add another parameter to determine which transportation types will be affected? As it currently exists, the running costs parameter, which is good for ships, renders my other transport sets useless.
Strange, this grf should modify the ships cost/runningcost factors, it should leave other vehicles unchanged. (What costs are can be changed by factors.)
As you can see there is factors for every vehicle type there, which can be altered by giving factors for those costs(*2, *4, *8....).
Anyway I dont know why ttdpatch applying ship cost factors for other vehicles ?( , when they arent called in the grf. :evil:

Anyway this wasnt tested with ttdpatch, in OTTD I havent expirenced those strange effects.
Maybe you need to define your newgrfs before the game not ingame. This was a problem in OTTD, maybe it appears in ttdpatch too.
Image
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Michael Blunck's new graphics [http://www.ttdpatch.de/]

Post by wallyweb » 10 Sep 2007 23:32

thgergo wrote:Anyway this wasnt tested with ttdpatch, in OTTD I havent expirenced those strange effects.
Maybe you need to define your newgrfs before the game not ingame. This was a problem in OTTD, maybe it appears in ttdpatch too.
I guess I'm the TTDPatch tester then. :wink:
In the Patch grf's are automatically pre-loaded into the game by the newgrf.cfg unless a grf is deactivated with an "!". That said, I did notice the issue with a saved game. I will try a new game to see what happens. Still, according to that page you linked to and what you said, only ships should be affected irregardless. I'll report back here, possibly as late as tomorrow, my new game observations.

User avatar
Raichase
Moderizzle
Moderizzle
Posts: 11597
Joined: 15 Dec 2002 00:58
Location: Sydney, Australia. Usually at work in the underground railway station...
Contact:

Re: Offtopic from MB's Graphics Thread

Post by Raichase » 11 Sep 2007 03:34

I'm pleased that my request for no more off-topic in MB's graphics thread, and my request for people to PM me if they want to continue discussion was heeded. I received no such PM, and instead the off topic continued.

I've now split the posts off into their own topic, and merged other posts in the same vein in as well.

Thank for your co-operation.

:roll:
Posted by Raichase. Visit my Flickr! Gallery, Blog (get a feed of everyone at once at Planet TT-Forums).
Raichase - Perfect timing, all the time: [13:37] * Now talking in #tycoon
ImageImage
Official TT-Dave Worley Fan Club
Official TT-Andel-in-a-pink-hat Fan Club

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Offtopic from MB's Graphics Thread

Post by wallyweb » 11 Sep 2007 11:04

@Raichase: Sorry about that. I guess because the grf in question was designed to affect Michael's ships we considered it to be on topic. However, upon reflection, and the fact that thgergo's code has potential for use with other vehicle types, the split makes perfectly good sense. :)

@thgergo: Now that your topic has its own thread, how about changing the title to something more descriptive of your grf? :wink:

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Offtopic from MB's Graphics Thread

Post by thgergo » 11 Sep 2007 16:30

@Raichase: Thanks for the split, I will maintain all of my multipler-type grf there by now:)

@wallyweb: Sure this had started as a simple capacity modification tool for the newships , capacities are way too low compared to long trains, but after a while ottdcoop and me was began to complain about the prices too:) Ammler has made a modification tool for the planes, this is only a price changer. http://openttdcoop.ppcis.org/wiki/index.php/Airmod.nfo
As for making this tool for more sets, this requies knowing and setting the properities manually, unfortunetly the properities of a vehicle cannot be got. Maybe introducing an another newgrf action, which peeks data like capacity/speed/cost/etc... and saves into a variable. Something opposite to action0.

And I used to test my grfs with ttdpatch too, but after my new windows installation my ttdpatch have been deleted somehow...

Currently my primary target in this subject is to completing this ship mod, to have support for original ships too.
Image
Image

User avatar
Two5Kid
Director
Director
Posts: 624
Joined: 26 Feb 2007 07:10
Location: Kota Bharu, Malaysia

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by Two5Kid » 14 Sep 2007 18:41

Erm..., what about the speed? Anything to increase their speed. I hope that they could go double the current speed. Especially for the good/freight related ships.
Any dream worth having,
Is a dream worth fighting for!

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Offtopic from MB's Graphics Thread

Post by wallyweb » 14 Sep 2007 19:22

thgergo wrote:Currently my primary target in this subject is to completing this ship mod, to have support for original ships too.
That is good, however as it exists now, under TTDPatch, it affects not only ships but also the running costs of trains. RV's do not seem to be affected. This is with both new and existing games. Can the running cost effect be turned off?

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by thgergo » 14 Sep 2007 20:31

I still dont understand how come ttdpatch can make this behaviour, becouse this grf does nothing with other costs... I will make some tries to find out whats wrong here in ttdpatch...
Image
Image

User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by thgergo » 14 Sep 2007 21:54

I have tested my grf with ttdpatch, it works properly with my copy, a recent nightly with original vehicles+newships... It doesnt changes the costs of other vehicles at all... Or is it unique?
Also it works with UKRS set too...
Two5Kid wrote:Erm..., what about the speed? Anything to increase their speed. I hope that they could go double the current speed. Especially for the good/freight related ships.
Maybe that should come with a newer version, everything should be defined in percents to make possible to set lower values:)
Image
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by wallyweb » 14 Sep 2007 22:44

thgergo wrote:I have tested my grf with ttdpatch, it works properly with my copy, a recent nightly with original vehicles+newships... It doesnt changes the costs of other vehicles at all... Or is it unique?
Also it works with UKRS set too...
You are right ... it is unique. I have tested it with the following sets:
Did not affect - DBSetXL, Serbian Set, UK Set, Canadian Train Set v0.2h
Affected - US Set and the set that I am currently testing. Unfortunately I can't name the set that I am testing but I will contact the coder and bring it to his attention.

*EDIT* The unnamed set that I am testing has been fixed.
Also, if you are using Canadian Train Set v0.2g, you should go to here to upgrade to v0.2h
Last edited by wallyweb on 19 Sep 2007 00:16, edited 1 time in total.

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by DaleStan » 15 Sep 2007 01:32

USSet (and, presumably, the unnamed set) use the wrong running cost bases for the trains. That's Oracle's and the unnamed coder's fault.
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

User avatar
OzTrans
Tycoon
Tycoon
Posts: 1507
Joined: 04 Mar 2005 01:07

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by OzTrans » 15 Sep 2007 05:35

DaleStan wrote:USSet (and, presumably, the unnamed set) use the wrong running cost bases for the trains ...
Correct ... in the early days (prior to 2.5 alpha 40) it was not possible to increase running costs as it is now, so another cost base was used - the ship purchase price.

As for the CanSet, that shall be fixed in due course ...

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by wallyweb » 15 Sep 2007 10:38

Someone be sure to let Oracle know. I suspect he will want to do the same for the US Set. :wink:

User avatar
kyanit
Engineer
Engineer
Posts: 18
Joined: 28 Jun 2004 07:32
Contact:

Errors!

Post by kyanit » 19 Sep 2007 09:00

Hi, I´ve found some errors in this grf (I have parametres 2 2):

1) some incompatibility with aviators aircraft set (how can it "block" new airplane?)
2) it multipy also train running cost (I am using US train set)

see pictures with capacity-cost multiplyier on/off...
Attachments
multiplyier error.JPG
multiplyier error.JPG (108.36 KiB) Viewed 24456 times

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5512
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Errors!

Post by wallyweb » 19 Sep 2007 10:11

Hello kyanit,
The errors are not with the capacity-cost multiplier.
kyanit wrote: 2) it multipy also train running cost (I am using US train set)
If you read my posts above you will see that the problem is with the USSet and not with the capacity-cost multiplier.
kyanit wrote: 1) some incompatibility with aviators aircraft set (how can it "block" new airplane?)
There is a good chance the problem is with aviators aircraft, especially if it bases its costs upon ships as was the case with the Canadian Train Set (fixed) and the USSet (not fixed).

User avatar
kyanit
Engineer
Engineer
Posts: 18
Joined: 28 Jun 2004 07:32
Contact:

Re: Capacity-cost multiplers for vehicles(Split from MB's Thread

Post by kyanit » 19 Sep 2007 10:23

so sorry me for vasting your time - I did not read last posts...

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 7 guests