Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue May 22, 2018 5:48 pm

All times are UTC




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Subsidies for cargodist
PostPosted: Thu Nov 16, 2017 11:46 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
I wonder why subsidies are generating only if cargo distribution setting is manual one.
Are there any important reasons? I read discussions "should be transferred cargo count to subsidy", my answer is "no", just cargo generated in A and delivered to B is subsidy claim A-B payment. Cargodist is just automated transfers, you cannot have subsidy from cargo delivered from C to B via A in original TTD, is it true? So no need to touch this.

I have idea of simple patch, which would allow to generate subsidies if there is cargodist enabled, additionally to omit maximal percent of transported cargo check in such case.
Currently cargodist is counter-productive, there is less profit from large network then from several p2p services.
Original subsidies tend to promote abandoned industries/towns, which also doesn't make sense if cargodist is enabled.
But subsidies, generated also for already served towns, can act as bonus points to the large network (smaller amount of p2p cargo, but much higher chance to catch subsidy between existing stations, if many stations are connected, in contrary to separate p2p services).

EDIT: patch is here: viewtopic.php?f=33&t=77282&p=1194207#p1194207

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Last edited by McZapkie on Tue Nov 21, 2017 10:08 pm, edited 1 time in total.

Top
   
PostPosted: Thu Nov 16, 2017 3:20 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4612
Location: home
Does cargo picked up at A, brought to B for transfer to another train count as "delivered"?

The problem is not whether you can pick an answer and implement it, but whether general community members would also come to the same conclusion (that is, the other options must be "wrong enough" not to be selected as valid answer). If they don't you get an endless debate and stream of bug reports "foo should count as subsidy".

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
PostPosted: Thu Nov 16, 2017 4:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
Alberth wrote:
Does cargo picked up at A, brought to B for transfer to another train count as "delivered"?
And how it work when you make it intentionally when cargodist is disabled?
Rhetoric question, it work as it should be. Only cargo produced in A and finally delivered to B is subsidised.
And I don't expect different behaviour in case of cargodist enabled.
The only issue is, that subsidy system work for abandoned places, it have sense in case of standard game (to lure player to make new p2p services), but is bad feature in case of cargodist. Omitting transported percentage check in case of cargodist should work better - minimal distance should also be ignored.

Quote:
The problem is not whether you can pick an answer and implement it, but whether general community members would also come to the same conclusion (that is, the other options must be "wrong enough" not to be selected as valid answer). If they don't you get an endless debate and stream of bug reports "foo should count as subsidy".
So the only reason to ban cargodist subsidies is to avoid discussion?
Well, I need to add setting switch when.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Top
   
PostPosted: Thu Nov 16, 2017 5:46 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4612
Location: home
McZapkie wrote:
Rhetoric question, it work as it should be. Only cargo produced in A and finally delivered to B is subsidised.
That means you may not be able to fulfil some of the subsidies, as cargodist may decide the cargo you deliver should move to another destination (if you happen to move the same cargo from B to elsewhere).

While you may not have a problem with that, others will. At the very least it's counter-intuitive.

McZapkie wrote:
And I don't expect different behaviour in case of cargodist enabled.
Except you don't control cargodist, thus it may interfere with your intentions, as its mind-reading service has not been implemented.

Instead of patching the game, you can also make a gamescript, or use eg Bee Award.

McZapkie wrote:
So the only reason to ban cargodist subsidies is to avoid discussion?
Well, I need to add setting switch when.
It's not explainable that cargo-dist interferes, and messes with the subsidy, and there is no good solution for it.

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
PostPosted: Fri Nov 17, 2017 12:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
Alberth wrote:
That means you may not be able to fulfil some of the subsidies, as cargodist may decide the cargo you deliver should move to another destination...

But it is intrinsic behaviour of cargodist. If someone doesn't like such behaviour, he can play without cargodist.
Additionally, I provided setting to switch off cargodist subsidies, by default off.

I started this thread because I was curious, if there are any real problems behind subsidies, but if there is only a psychological problem, it is a good news. We can work on it in a group ;-)

Alberth wrote:
While you may not have a problem with that, others will. At the very least it's counter-intuitive.

I don't follow such argumentation. Local government tends to subsidy his own citizens (and voters :) rather than tourists.

I agree, that current state of art of TTD subsidies doesn't mix with automatic cargo destinations, because subsidies are assigned only to not (or poor) served towns/industries, and there is rather no chance to catch subsidy or have any revenue from it, if new station is attached to linkgraph, due to long time of linkgraph update compared to short term of subsidy offer or contract.

Therefore I created patch, which not only allow subsidies in cargodist, but also provide different behaviour:
    if cargodist for given cargo group is enabled and cargodist subsidies are enabled,
  • subsidies are generated regardless of percentage of transported cargo
  • maximal subsidy distance is scaled with map size (70 tiles for 256x256 and smaller, 210 for 512x512, 280 for 512x1024 etc)
Such approach allow to change strategy, instead of checking subsidy window and hasty making new connections, player can expand his network on his own and catch subsidies like additional bonus points. The larger network is, the higher chance that subsidy will hit two stations already connected by linkgraph. Of course, overall income would be small if not negligible, because only small amount of cargo will fulfil such subsidy, but it is balanced by higher chance of any subsidy obtained without any effort.
Another strategy is to build many p2p services - singular subsidy would provide high revenue because all cargo count, but probability that given pair is chosen, is much smaller, seems that both strategies give same net profit, however cargodist network is usually more efficient in terms of station rating.

Of course if cargo distribution is in manual mode, subsidies works as usual.

Quote:
Instead of patching the game, you can also make a gamescript, or use eg Bee Award.

Unfortunately there is only one gamescript slot.
By the way, how often players are using subsidies? In my opinion, it is rather useless feature, especially in case of complex economy, large map or hard settings, because short subsidy terms are not worth either invested money or just effort to make new connection. Players usually prefer to focus on expanding their own transport network instead and doesn't like being interrupted by side tasks.
My approach is to reuse subsidies to add bonuses for people using cargodist, which by now is counter-productive in comparison to single p2p service.
Currently I'm testing this patch, and by now it work fine. I just get not only neighbouring town subsidies, but also subsidy from town A to D with passengers going trough B and C. I will publish it after more tests.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Top
   
PostPosted: Sat Nov 18, 2017 2:39 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
Subsidy patch attached.
Mostly subsidy.cpp is changed, and of course setting and version bump added.

If cargo distribution is set to manual, subsidy system work as usual.
In case of automatic cargo distribution, if "Allow subsidies...For manual or automatic cargo distribution" option is not choosen, subsidies are not generating as usual.
If given cargo group distribution is symmetric/asymetric and cargodist subsidies are allowed, they would appear regardless of percentage of cargo transported from source, while maximal distance between source and drain depend on map size and "distance effect on demand" linkgraph setting.


Attachments:
File comment: Cargodist subsidy v.2 patched on r27930
subsidy2.patch [12.24 KiB]
Downloaded 21 times

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Last edited by McZapkie on Tue Nov 21, 2017 10:08 pm, edited 1 time in total.
Top
   
PostPosted: Sun Nov 19, 2017 11:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
IRC chat gave me idea of more general subsidy setting, with 3 states:
no subsidies, subsidies only in manual distribution mode, subsidies for all distribution modes.
I wonder, where I should insert such settings, in difficulty or economy settings?


Top
   
PostPosted: Mon Nov 20, 2017 6:36 am 
Offline
Director
Director
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 558
Location: London (South West)
I think it'd be appropriate to put it under economy.


Top
   
PostPosted: Mon Nov 20, 2017 11:41 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4612
Location: home
Gwyd wrote:
I think it'd be appropriate to put it under economy.
+1

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
PostPosted: Tue Nov 21, 2017 10:25 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1034
I uploaded ver.2 of subsidy patch in original post, now subsidy setting have three options - no subsidies at all, subsidies for manual cargo distribution only (standard) and subsidies also for automatic cargo distribution.

I tested this patch with 512x256 map, 32 towns, two independent networks (6 town interconnected in each one), effect of distance on demand 255, subsidy multiplier x4.
Without subsidies, I got 317kGPB after 10 years, with cargodist subsidies it was 395kGPB - at least one subsidy was captured during blind run. Of course such difference is small, but not negligible.
Larger network would be more effective, but it depend also on other settings.

I was testing also with two large networks and few p2p services, I never captured subsidy for these p2p services, while passenger and mail subsidies were claimed for networks (it works fine even if passengers must change trains/buses, of course amount of subsidized passengers with many hops is very low, but if you have such subsidy year by year, it is very satisfactory :)

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


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

All times are UTC


Who is online

Users browsing this forum: FLHerne, jfs, Wolf01 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.