Cargo Payment & Decay Override

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

scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Cargo Payment & Decay Override

Post by scitor »

Ultimate Cargo Payment Override
a payment balance addon (on BaNaNaS, source)

Image

This can change all 64 cargo payment rates, no matter the industry... Does NOT change the decay, only the initial payout. (check below)

There already are some payment changing NewGRFs on bananas, not a complete one though (or I didn't find it).
SPI(1.32) Cargo Payment Rates works pretty well, but it's designed for a specific set, so cargoes often don't match by name.
Maybe it's not recommended to mix Industries, but sometimes the only problem is balance (e.g. when adding tourists or extras, etc), this NewGRF tries to solve that part.

Howto:
[+] Spoiler
- place as last NewGRF
- toggle console ~ or ` or (?)
- type dump_info cargotypes
- find all the cargo IDs to change
- set Game Options to British Pounds (GBP) for easy reading

Usually its
00 PASS
01 COAL
02 MAIL

etc...

Set your desired cargo payment directly, for MAIL it would be "ID02" etc ...
Image

TLDR;
[+] Spoiler
"Ultimate" since I was thinking 64 cargoes is the max the game currently can handle, so there won't be a better one :D you set the payment directly, not the percentage (mostly cuz I couldn't figure out how..)
I don't even know if you can actually use all 64 cargoes, or maybe id 63 is reserved and it doesn't make sense to provide that option, etc...
I did see id 62 tho and tested it worked (waste/recyclables from wr extra industries I believe, the very reason I made this NewGRF).

Anyway, this was one of my first (check out paxWorkers) NewGRF and I learned a lot... I found out the parameter limit is 64 as well, so that made it even more final. I was hoping to add a second option for decay, but that would need to be its own NewGRF (maybe in the same style).

For now this was enough and I can finally tune down those pesky tourists :D hope you have fun with it as well

Source: Self-hosted (for now, will mirror it on GitHub for ez sharing later. I'm not too sure about the license as well)
Version 2 includes the default payment list (thanks luk3Z)



==================
Simple Cargo Decay Override
a payment decay balance addon (on BaNaNaS, source)

Image

This NewGRF changes the time it takes, until cargo payment starts decaying. Settings work the same as above NewGRF
[+] Spoiler
Image

Source: Self-hosted
Last edited by scitor on 01 Mar 2022 16:35, edited 3 times in total.
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Ultimate Cargo Payment Override

Post by luk3Z »

Great addon.
I'm wondering if I can try Ultimate Cargo Payment Override alongside Simple Cargo Profit. I'll try it today.
https://github.com/krisives/openttd-simple-cargo-profit (disables time taken or distance travelled as part of the cargo profit equation for all cargo types except passengers and mail).

Edit:
I've just tried Ultimate Cargo Payment Override alongside Simple Cargo Profit. It's working - both grf disregards distance & time, but keep in mind that Simple Cargo Profit change default cargo values.

Simple Cargo Profit:
https://bananas.openttd.org/package/newgrf/4b490101
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

Awesome, thanks for testing!
Actually I didn't mention this one but I did use it already myself, while looking for a way to control the rate :D and it's very useful indeed!

My NewGRF only touches the price_factor variable (if its set !=0), so as I understand this it should work with most stuff... hopefully :D

[Edit} I just noticed Simple Cargo Profit only affecting the first ~20 ids, so you can't use it with more advanced industry sets. Would be cool if that could be extended to all the bits as well :D
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Ultimate Cargo Payment Override

Post by luk3Z »

I did few tests. Initial cargo payment (default values in £) https://wiki.openttd.org/en/Manual/Game ... ment-rates

Passengers: 39
Coal: 72
Mail:55
Oil: 54
Livestock: 53
Goods: 75
Grain: 58
Wood: 61
Iron Ore: 62
Steel: 69
Valuables: 91

Arctic specific :
Wheat: £58
Paper: £66
Gold: £71
Food: £69

Tropical specific:
Rubber: £54
Fruit: £51
Maize: £53
Tropical Wood: £97
Copper Ore: £59
Water: £57
Diamonds: £71

My pics represent values from 1930 (default values in £).

OTTD default cargo payment graph (without any grfs):
Image

I put that values as parameters in Ultimate Cargo Payment Override (UPDATED above values * 2 = default OTTD cargo payment):
Image

Ultimate Cargo Payment Override + Simple Cargo Profit cargo payment graph:
Image

Ultimate Cargo Payment + Simple Cargo Profit gameplay income (the same profit as you can see (with inflation) - distance & time is not accounted in Simple Cargo Profit grf):
Image

Ultimate Cargo Payment + Simple Cargo Profit income graph:
Image
(steady but rising with inflation - I think too steady we need to more variable cargo payment so there is a need to take time into account at least)

May I suggest to put the rest default OTTD bits to description in NEWGRF Settings 03 to 11 (it will be easier set the parameters) ?
BTW how would you determine optimal parameters in Ultimate Cargo Payment Override ? If you want to have almost default OTTD cargo payment values with Ultimate Cargo Payment Override you need to put above values manually. Ultimate Cargo Payment Override changing default OTTD cargo payment values even if factors are = 0 (anyway I don't know formula for it).
Last edited by luk3Z on 27 Feb 2022 18:54, edited 9 times in total.
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

luk3Z wrote: 27 Feb 2022 13:05 I did few tests. Initial cargo payment (default values in £) https://wiki.openttd.org/en/Manual/Game ... ment-rates

Passengers: 39
...
Those values are ... wrong :D or at least you can't just take them like that, the description says its the price for 100 units and 1 tile.
The graph shows values for 10 units after 20 tiles, so you need to double it: (100x1 = 10x10 != 10x20)
luk3Z wrote: 27 Feb 2022 13:05 ...
OTTD default cargo payment graph (without any grfs):
[+] Spoiler
Image
This is interesting, my graph looks different already:
[+] Spoiler
Image
luk3Z wrote: 27 Feb 2022 13:05 I put that values as parameters in Ultimate Cargo Payment Override so ingame graph looks like this:
[+] Spoiler
Image
Image
When I put in 39, it will be 39, but as I wrote earlier you need to double the value (2x39 = 78 ), that produces following graph (which changes slightly when setting, but keeps the same value)
[+] Spoiler
Image
luk3Z wrote: 27 Feb 2022 13:05 Ultimate Cargo Payment Override + Simple Cargo Profit cargo payment graph:
[+] Spoiler
Image
Ultimate Cargo Payment + Simple Cargo Profit gameplay income:
[+] Spoiler
Image
Ultimate Cargo Payment + Simple Cargo Profit income graph:
[+] Spoiler
Image
(steady but rising with inflation - I think too steady we need to more variable cargo payment so there is a need to take time into account at least)
I dont think real inflation works like the mechanics ingame, thats why I don't play with this on. I don't think this has an effect tho, other than inflating the values..
For testing the values I'd disable this, otherwise you need to calulate it every time or we need to agree on some year to compare the values...

Keep in mind, this NewGRF only changes the price_factor variable (if set), and DOES NOT touch single_penalty_length or penalty_lowerbound, which are (afaik) responsible for cargo decay.
I was looking into creating a second addon tackling those, but didn't see the need for this yet.
luk3Z wrote: 27 Feb 2022 13:05 May I suggest to put the rest default OTTD bits to description in NEWGRF Settings 03 to 11 (it will be easier set the parameters) ?
I actually don't know what you mean, what is "NEWGRF Settings 03".
The NewGRF is made with NML, I don't actually hardcode any bits/settings myself.
You can check the code yourself :) as far as NML goes, no other options/settings are changed.
luk3Z wrote: 27 Feb 2022 13:05 BTW how would you determine optimal parameters in Ultimate Cargo Payment Override ?
I think there is a slight "misalignement of expectations" :D
This NewGRF does NOT compute optimal parameters by itself (despite the first picture maybe making the impression, im sorry).
You need to know what you want and set it up, manually.

As for what values you would actually use in a balanced game depends very much on the way you want to play, the mods you have, the settings you have, the difficulty you want, etc...
I like high cost / rewards, that way you CAN make millions, but need to be careful about what you build. Even later on in game there can be fatal mistakes, I don't like the point where no matter what you do you're too fat to die, thats the end of my games usually... so it very much depends on what you want to play :) there is no one "optimal setup"
luk3Z wrote: 27 Feb 2022 13:05 If you want to have almost default OTTD cargo payment values with Ultimate Cargo Payment Override you need to put above values manually.
If you want to have almost default OTTD cargo payment, dont use this override :D
unless your want to get the original values back because some other NewGRF changed it...
luk3Z wrote: 27 Feb 2022 13:05 Ultimate Cargo Payment Override changing default OTTD cargo payment values even if factors are = 0 (anyway I don't know formula for it).
Thats strange, I have tested this case and it worked (as in, it didnt change anything unless set)... it also wouldn't make any sense. Can you send a savegame?

If the setting is 0 there is no formula, but an if-statement. If that thing is 0, its as if the mod wasnt loaded...
Unless the NML-compiler puts some default stuff in the NewGRF, which would be extremly surprising and annoying and probably is not the case..
Last edited by scitor on 28 Feb 2022 13:26, edited 2 times in total.
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Ultimate Cargo Payment Override

Post by luk3Z »

scitor wrote: 27 Feb 2022 15:07 (...)
luk3Z wrote: 27 Feb 2022 13:05 Ultimate Cargo Payment Override changing default OTTD cargo payment values even if factors are = 0 (anyway I don't know formula for it).
Thats strange, I have tested this case and it worked (as in, it didnt change anything unless set)... it also wouldn't make any sense. Can you send a savegame?

If the setting is 0 there is no formula, but an if-statement. If that thing is 0, its as if the mod wasnt loaded...
Unless the NML-compiler puts some default stuff in the NewGRF, which would be extremly surprising and annoying and probably is not the case..
My bad. I have set other than 0 parameters and they are different than default OTTD cargo payment values :oops: .
I can confirm that if factors are = 0 cargo payment values are default OTTD.
scitor wrote: 27 Feb 2022 15:07
luk3Z wrote: 27 Feb 2022 13:05 I did few tests. Initial cargo payment (default values in £) https://wiki.openttd.org/en/Manual/Game ... ment-rates

Passengers: 39
...
Those values are ... wrong :D or at least you can't just take them like that, the description says its the price for 100 units and 1 tile.
The graph shows values for 10 units after 20 tiles, so you need to double it: (100x1 = 10x10 != 10x20)

(...)
Thanks for the info - you right. Initial cargo payment * 2 = you get default OTTD values (in Ultimate Cargo Payment Override).
Now it is possible subtract several values from default ones to make game more harder. Great ! :D
scitor wrote: 27 Feb 2022 15:07 (...)

This is interesting, my graph looks different already:
[+] Spoiler
Image
I've just checked it. My game started in 1930 this is why values are different.
scitor wrote: 27 Feb 2022 15:07
luk3Z wrote: 27 Feb 2022 13:05 May I suggest to put the rest default OTTD bits to description in NEWGRF Settings 03 to 11 (it will be easier set the parameters) ?
I actually don't know what you mean, what is "NEWGRF Settings 03".
The NewGRF is made with NML, I don't actually hardcode any bits/settings myself.
You can check the code yourself :) as far as NML goes, no other options/settings are changed.
I mean NEWGRF Settings windows when you start the game and want to set parameters.
Description of this grf in this window.
scitor wrote: 27 Feb 2022 15:07 (...)
luk3Z wrote: 27 Feb 2022 13:05 BTW how would you determine optimal parameters in Ultimate Cargo Payment Override ?
I think there is a slight "misalignement of expectations" :D
This NewGRF does NOT compute optimal parameters by itself (despite the first picture maybe making the impression, im sorry).
You need to know what you want and set it up, manually.

As for what values you would actually use in a balanced game depends very much on the way you want to play, the mods you have, the settings you have, the difficulty you want, etc...
I like high cost / rewards, that way you CAN make millions, but need to be careful about what you build. Even later on in game there can be fatal mistakes, I don't like the point where no matter what you do you're too fat to die, thats the end of my games usually... so it very much depends on what you want to play :) there is no one "optimal setup"
I know I can only manually change something but I need to know what is your idea about changes ?
I'll rather try to change it to almost default values and then from all subtract -10~20 and check it how hard the game is.
I need to check few combinations anyway. Simple Cargo Profit disregards also time which is not what I want.
Thanks for fast replay.
Last edited by luk3Z on 27 Feb 2022 16:34, edited 1 time in total.
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

luk3Z wrote: 27 Feb 2022 15:37 [...]
My bad. I have set other than 0 parameters and they are different than default OTTD cargo payment values :oops: .
I can confirm that if factors are = 0 cargo payment values are default OTTD.
You dont know how often I changed the value when testing, but then didn't "Apply" and wondered why it didn't work... :lol:
luk3Z wrote: 27 Feb 2022 15:37 [...]
I mean NEWGRF Settings windows when you start the game and want to set parameters.
Description of this grf in this window.
Now I get it, you want to have the default values from OTTD in the description, for easy reference, thats a good idea, will do that!
I just need to check if different climates re-use the same IDs with different prices, but thats just a minor issue.
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Ultimate Cargo Payment Override

Post by luk3Z »

scitor wrote: 27 Feb 2022 16:08
luk3Z wrote: 27 Feb 2022 15:37 [...]
My bad. I have set other than 0 parameters and they are different than default OTTD cargo payment values :oops: .
I can confirm that if factors are = 0 cargo payment values are default OTTD.
You dont know how often I changed the value when testing, but then didn't "Apply" and wondered why it didn't work... :lol:
luk3Z wrote: 27 Feb 2022 15:37 [...]
I mean NEWGRF Settings windows when you start the game and want to set parameters.
Description of this grf in this window.
Now I get it, you want to have the default values from OTTD in the description, for easy reference, thats a good idea, will do that!
I just need to check if different climates re-use the same IDs with different prices, but thats just a minor issue.
Cool. I confirm that default OTTD is initial cargo payment * 2 (default values in £).

ID00 Passengers: 39 * 2 = 78
ID01 Coal: 72 * 2 = 144
ID02 Mail:55 * 2 = 110
ID03 Oil: 54 * 2 = 108
ID04 Livestock: 53 * 2 = 106
ID05 Goods: 75 * 2 = 150
ID06 Grain: 58 * 2 = 116
ID07 Wood: 61 * 2 = 122
ID08 Iron Ore: 62 * 2 = 124
ID09 Steel: 69 * 2 = 138
ID10 Valuables: 91 * 2 = 182

Arctic specific :
Wheat: £58 * 2 = 116
Paper: £66 * 2 = 132
Gold: £71 * 2 = 142
Food: £69 * 2 = 138

Tropical specific:
Rubber: £54 * 2 = 108
Fruit: £51 * 2 = 102
Maize: £53 * 2 = 106
Tropical Wood: £97 * 2 = 194
Copper Ore: £59 * 2 = 118
Water: £57 * 2 = 114
Diamonds: £71 * 2 = 142

Toyland specific:
Sugar: £54 * 2 = 108
Toys: £68 * 2 = 136
Batteries: £53 * 2 = 106
Sweets: £75 * 2 = 150
Toffee: £58 * 2 = 116
Cola: £59 * = 118
Candyfloss: £61 * 2 = 122
Bubbles: £62 * 2 = 124
Plastic: £54 * 2 = 108
Fizzy Drinks: £76 * 2 = 152

Toyland to Mars (Toyland2Mars):
Dunno probably the same as Toyland
https://wiki.openttd.org/en/Community/N ... Conversion
http://george.zernebok.net/newgrf/t2m/newtoyland.html

To make the game more harder I just need to subtract from every ID for example -10~50 & check game difficulty ! Great :D
I've just updated my previous posts.
@scitor Can you add that values to readme file ? That could be easy to check OTTD default values.
Last edited by luk3Z on 27 Feb 2022 17:21, edited 5 times in total.
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

luk3Z wrote: 27 Feb 2022 15:37 [...]
I know I can only manually change something but I need to know what is your idea about changes ?
I'll rather try to change it to almost default values and then from all subtract -10~20 and check it how hard the game is.
I need to check few combinations anyway. Simple Cargo Profit disregards also time which is not what I want.
Thanks for fast replay.
THAT by itself is a whole can of worms :D actual playable balance.

The normal Play-To-Win strategy in (o)ttd would be, build a long route with express freight, just to cheat the system for "distance delivered"...
The game tries to model the real world, by givin an incentive to transport stuff far away (thus the companies paying a lot to get it there) but ignoring all facts about the target location of said factory, or the source industry. Maybe they have a resource just nearby?
In real what would happen is: You bring your coal to the other half of the planet and want a fortune? The people there will laugh at you and just go to their local mine...

Supply/Demand doesn't work like that but the game ignores that so you can play and actually make money, without a complicated survey on each and every location you would deliver to :D But the payment is actually inversed.

Real cargo decays, but only if the cargo itself gets bad. Coal doesn't care if it sits for 4 weeks in a hopper (it didn't care the 500mio years earlier being in the ground, did it). But if a company would have ordered the coal, there would be penalties for delivering it late etc. THATs what the game tries to model ... Plus in real, your Fruit WOULD go bad and the game should reduce the amount of cargo in your trains with time (if it was exact). It doesn't do that, instead it gives you less money, which is kinda the same, so thats fine, I guess...

But distance doesn't increase the payout directly irl. This forces people to build actually lucrative/shorter routes, to reduce cost and maximise payout.
Now imagine a food factory in one corner and a farm in another. This Food Factory would pay a fortune to get this stuff, only if there is no other way. But the game doesn't check that, it just checks how far you have brought it and assumes there was no better way, then giving you the bonus, even if there was a farm nearby.
In real life there wouldn't be a factory in the first place, since they would need to pay that much for their resources... But it was forced there by the worldgen, and thats what they deal with :D
Thats why distance is in the payout in the first place. And unless the game starts paying for each factory individually depending on their overall situation on the map, we're stuck with that as well... so idk
luk3Z wrote: 27 Feb 2022 16:39 [...]
To make the game more harder I just need to subtract from every ID for example -10~50 & check game difficulty ! Great :D
I've just updated my previous posts.
@scitor Can you add that values to readme file ? That could be easy to check OTTD default values.
I'll add those to the readme / grf description to have the default values at hand :thumbsup:

Since I started without the payment override I settled for higher prices / higher payment.. Imho reducing payments will only work at near range, but not scale with distance: your costs will be so much higher the longer your route gets...
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Ultimate Cargo Payment Override

Post by luk3Z »

scitor wrote: 27 Feb 2022 16:58 (...)
luk3Z wrote: 27 Feb 2022 16:39 [...]
To make the game more harder I just need to subtract from every ID for example -10~50 & check game difficulty ! Great :D
I've just updated my previous posts.
@scitor Can you add that values to readme file ? That could be easy to check OTTD default values.
I'll add those to the readme / grf description to have the default values at hand :thumbsup:

Since I started without the payment override I settled for higher prices / higher payment.. Imho reducing payments will only work at near range, but not scale with distance: your costs will be so much higher the longer your route gets...
Great. So, like in the reality we should build only shortest routes ! I like it. I really hate that spam with railtracks everywhere on the Multiplayer servers.
This is not fair when you're trying to exploit the game engine by distance :wink:
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

Well, it's a way to play :D and if you just want a massive network and not care about economy, its a game after all.
You also can set Override to 1000% and be happy with overflowing integers haha...

When in (public) multiplayer you'll always see the lowest common denominator .. if one can do it, it will be done :D why? "because we can" ... but thats just the internet, nothing unusual

When you want to do real economy you need to keep in mind, you always pay double for a longer route, since
1. more actual track to build and maintain, and
2. the distance is higher so trains will take longer or more trains, which all costs more...

I think it should be possible to build long lucrative routes in the game. But not from the start. Stuff should be expensive but fair and you wont get millionaire within a day :D but with the right management you will get there eventually and it will work..
thats a good balance imho BUT thats only one way to play it, theres 8bil others :D and from time to time I also like to relax. When you're used to playing hard, playing on normal is like holiday haha
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Cargo Payment & Decay Override

Post by scitor »

I've added the decay mod I had tested with as well (check fist post).
This works differently than Simple Cargo Profit as it does not touch the profit function but a variable used by the default function.
I think with this (and the other override) you can customize to your hearts content now :) hf
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Cargo Payment & Decay Override

Post by luk3Z »

scitor wrote: 28 Feb 2022 00:34 I've added the decay mod I had tested with as well (check fist post).
This works differently than Simple Cargo Profit as it does not touch the profit function but a variable used by the default function.
I think with this (and the other override) you can customize to your hearts content now :) hf
Again good job. Decay Override grf will be useful for set decaying of the following cargo:
Livestock, Grain, Passengers, Mail, Wheat, Food, Fruit, Maize, Water.
Mineral resources don't need to be decayed as fast as food and other living organisms. I hope it is clear what I mean :P
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Cargo Payment & Decay Override

Post by scitor »

Yeah, the neat thing about the addons is you can decide yourself case-by-case...

Bulk freight generally can be lower priced and not decay too fast.

I'd like to try tuning down the first tier materials so you NEED to produce 2nd tier to make any money at all...
Like in real, the wood itself doesn't have value, but the furniture does x100 ;)

Could be a bit much though butmaybe worth a try :D
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Ultimate Cargo Payment Override

Post by scitor »

luk3Z wrote: 26 Feb 2022 17:32[...]
https://github.com/krisives/openttd-simple-cargo-profit (disables time taken or distance travelled as part of the cargo profit equation for all cargo types except passengers and mail).
[...]
I was just looking at the code, now it seems that it does modify pass and mail as well (and ingame confirms that).
The cargotable they define misses PASS and MAIL but that doesn't mean anything.

Line 46 and 58 overrides PASS and MAIL, by chosing 0 and 2 as their ids.
The names they use (simple_COAL, simple_LVST) dont matter, what matters is the last number.
They should leave out those ids, as they dont want to modify them...
But it is still useful, you need to test it tho
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Cargo Payment & Decay Override

Post by 3iff »

I was looking to do something like this for use with other industry sets (thanks for noticing SPI !) but I didn't really get anywhere. FIRS later versions multi-used cargo numbers for different cargos and I couldn't get it to work as I wanted.

If this is NML, is there any chance I could get the code?
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Cargo Payment & Decay Override

Post by scitor »

Thats interesting, I tested this even with XIS and it was behaving like expected, and they use almost all of them

Its NML and the code is available here :)
(mostly generated tho)

[edit] This works with any industry set, as the game doesn't care about the names, only the ids
scitor
Engineer
Engineer
Posts: 15
Joined: 06 Mar 2006 23:38
Location: Germany
Contact:

Re: Cargo Payment & Decay Override

Post by scitor »

Simple Cargo Decay Override just got updated to v3!

There is a way now to have payment decay based just on time, not distance (or both)
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Cargo Payment & Decay Override

Post by 3iff »

Scitor,

Thanks for the code, I look forward to dissecting it...
User avatar
luk3Z
Traffic Manager
Traffic Manager
Posts: 197
Joined: 25 Dec 2005 17:42
Location: Kielce, Poland (Mars sometimes)

Re: Cargo Payment & Decay Override

Post by luk3Z »

Thanks to this GRF it is possible now to simulate 20% or 35% tax from income (Initial cargo payment -20%):
viewtopic.php?p=1252878
Find new graphics easier:
GRFCrawler -> http://grfcrawler.tt-forums.net
BaNaNaS -> https://bananas.openttd.org/
32 bit gfx in OTTD (32bpp) -> https://wiki.openttd.org/en/Community/N ... 20graphics
TTDPatch 2.6 -> viewtopic.php?f=19&t=67694
How to subtract tax from income (workaround) -> viewtopic.php?t=89763&start=20
How to ban distance from income -> Simple Cargo Decay Override
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Amazon [Bot], le_harv and 20 guests