Page 1 of 2

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

Posted: 20 Aug 2007 22:29
by thgergo
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

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

Posted: 20 Aug 2007 23:21
by wallyweb
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

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

Posted: 21 Aug 2007 08:41
by thgergo
fixed:) Thanks for that notice
add 2.0 version

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

Posted: 10 Sep 2007 19:28
by wallyweb
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.

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

Posted: 10 Sep 2007 20:48
by thgergo
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.

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

Posted: 10 Sep 2007 23:32
by wallyweb
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.

Re: Offtopic from MB's Graphics Thread

Posted: 11 Sep 2007 03:34
by Raichase
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:

Re: Offtopic from MB's Graphics Thread

Posted: 11 Sep 2007 11:04
by wallyweb
@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:

Re: Offtopic from MB's Graphics Thread

Posted: 11 Sep 2007 16:30
by thgergo
@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.

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

Posted: 14 Sep 2007 18:41
by Two5Kid
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.

Re: Offtopic from MB's Graphics Thread

Posted: 14 Sep 2007 19:22
by wallyweb
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?

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

Posted: 14 Sep 2007 20:31
by thgergo
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...

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

Posted: 14 Sep 2007 21:54
by thgergo
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:)

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

Posted: 14 Sep 2007 22:44
by wallyweb
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

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

Posted: 15 Sep 2007 01:32
by DaleStan
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.

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

Posted: 15 Sep 2007 05:35
by OzTrans
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 ...

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

Posted: 15 Sep 2007 10:38
by wallyweb
Someone be sure to let Oracle know. I suspect he will want to do the same for the US Set. :wink:

Errors!

Posted: 19 Sep 2007 09:00
by kyanit
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...

Re: Errors!

Posted: 19 Sep 2007 10:11
by wallyweb
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).

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

Posted: 19 Sep 2007 10:23
by kyanit
so sorry me for vasting your time - I did not read last posts...