Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Aug 30, 2014 10:30 pm

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Feb 03, 2012 4:55 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Hey guys,

I'm working on a little branch for OpenTTD with the target to make the game more challenging and fun to play together online.

As a first step, I mingled around with subsidies and made them to be contracts. You will not get any money for any transportation what so ever unless you have a transport contract with the corresponding companies. They are offered monthly, and are like this:

5000t coal from XY coal mine to YZ power plant, first delivery by August 1980.

If you shift click on it, a dialog opens: "Accept contract?", it tells you more details:
Length of contract (48 month atm)
Total cargo
Locations
Contract Reward (if you complete the contract in time)
Contract Penalty (if you're too slow, or if you fail to make the first delivery).

If you accept you are granted the contract and can start building your network and transporting the goods (target is 60% of monthly production at the month of the contract offering).

--- Why?
This mod makes you rethink your building strategy. After 4 years, all your trains on that line will be useless, and the whole line might be in vain if you don't find other use for it. So you need to change the wagons on the train, and build some advances to your line to make best use of your investments. If you're doing everything smart enough, you'll be very successful.

--- Future
I have a lot more thing in mind, but this is how far I got so far. I'm currently testing it and if there's interest for it, I can post the patch as well.

Cheers,
SirOzlington


Screenshots:


Attachments:
File comment: Screenshot
subsidies.png [74.2 KiB]
Downloaded 4 times
Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 6:34 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 3002
Location: home
It sounds like a very nice NoGo goal script. Not sure whether it can do everything what you want though.


Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 6:56 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
I'm not really familiar, but from the little I read it seemed to be a no-go.


Top
 Profile  
 
PostPosted: Fri Feb 03, 2012 11:41 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 22, 2006 10:35 am
Posts: 7
Location: Dunedin , New Zealand
SirOzlington wrote:
Hey guys,
If you accept you are granted the contract and can start building your network and transporting the goods (target is 60% of monthly production at the month of the contract offering).
--- Why?
This mod makes you rethink your building strategy. After 4 years, all your trains on that line will be useless, and the whole line might be in vain if you don't find other use for it. So you need to change the wagons on the train, and build some advances to your line to make best use of your investments. If you're doing everything smart enough, you'll be very successful.
--- Future
I have a lot more thing in mind, but this is how far I got so far. I'm currently testing it and if there's interest for it, I can post the patch as well.
Cheers,
SirOzlington


I really like the sound of this as it will give a true incentive to be rational with networks


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 3:37 am 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Here's an example binary & language file for windows.


Last edited by planetmaker on Sat Feb 04, 2012 7:50 am, edited 1 time in total.
please only publish full bundles and also publish patches, if you publish binaries


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 7:49 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 8268
Location: Sol d
Please obey OpenTTD's license:

- provide the full bundle including license and credit information. See http://wiki.openttd.org/Microsoft_Visua ... ons#Bundle
- provide the source; i.e. at least publish the patch you used as soon as you publish binaries.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 10:18 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4377
Location: /home/sweden
Alberth wrote:
It sounds like a very nice NoGo goal script. Not sure whether it can do everything what you want though.


I think his framework could make sense as an addition to the goal framework if it is made customizable through a NoGo script. Eg NoGo can create contract offers using an API call.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 10:33 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Dec 20, 2006 1:31 pm
Posts: 796
Location: Aschaffenburg
NoGo can already do contract-like stuff via "goals" and "questions".
But NoGo cannot check what cargo you deliver from where :)

_________________
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 11:16 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1031
Location: Spain
Existing subsidies are constrained by the generator, but you could create subsidies over larger distances, with different time periods and so on with almost no changes to the existing subsidy code. IMO the best way to go is to give NoGo the ability to create subsidies (and probably disable the default subsidy generator), and to add events to NoGo such as "company M managed to get subsidy N" or "received subsidized cargo for subsidy N". NoGo would also need a way to modify what text is displayed in the subsidy window. Maybe NoGo already does some of these things, I still have to check what it can do :)

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 1:59 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Sorry about before, here's the whole bundle + patch. Note that I also patched in a few other patches: polyline building, conditional load and signals on tunnel/bridge

i hope the bundle is fine this time

also note please, that this version is not savegame compatible and has bugs etc. it's just a demo of the current point i'm at

EDIT: Updated


Attachments:
File comment: bundle feb5a
bundle.zip [5.62 MiB]
Downloaded 70 times
File comment: patch feb5a
contracts.patch [60.66 KiB]
Downloaded 92 times


Last edited by SirOzlington on Sun Feb 05, 2012 4:31 am, edited 1 time in total.
Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 8:06 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 208
I thought you have a neat idea, so I decided to give it a try. However, the game won't award me the subsidies, so I don't make any money :( The cargo is delivered fine, but I don't get paid. I've attached two savegames of the same game but at different points in time to illustrate my problem. I'm using the Windows executable you have posted just above.

A couple of other thoughts:
  • Playing the game the way you have it set up, I don't think you'll ever get any secondary industry production (and subsidies are based indirectly on production, right?). Perhaps the answer is to provide contracts for secondary industries, even if there isn't current production, or to have secondary industries produce even if they don't receive feedstock (the original Transport Tycoon used to work like this, maybe this should be done with a NewGRF...)
  • The amount of time a subsidy is available to claim (a year?) seems rather short. On short routes, it's probably not to much of an issue, but maybe the availability period should probably scale with distance. For a minimum amount of time, consider how long it would take for a ship to make the trip.


Attachments:
Brown & Co., 31st Aug 2051 (not awarded).sav [74.24 KiB]
Downloaded 55 times
Brown & Co., 15th Apr 2051 (not awarded).sav [72.16 KiB]
Downloaded 52 times

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v10 - An AI that doubles as your highway department
Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 8:29 pm 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
They aren't supposed to be awarded, you need to accept them by shift+clicking on them.

On feeder industries: my plan is to later give out contract smartly, for example if you feed a factory with livestock etc. the factory will offer a contract to deliver this somewhere else directly, and give your company a better deal than the others. But at the moment, yes, subsidies are rather random.

On amount of time: I changed the amount of time to 6 month per 100 tiles distance. So far this has shown to be a bit to much even.


Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 9:24 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 208
SirOzlington wrote:
They aren't supposed to be awarded, you need to accept them by shift+clicking on them.
Ok! :D Now I make money!

SirOzlington wrote:
On amount of time: I changed the amount of time to 6 month per 100 tiles distance. So far this has shown to be a bit to much even.
This seems like a good way to go.

I started playing again, however, it doesn't award me the contract for food from the Food Processing Plant to a town. Savegame attached.

With the display of awarded contracts, it isn't consistent with the units on liquids (ex: 4,343 of 4,560,000 liters) and you only give enough space for single digit days of the month.


Attachments:
Brown on Contract, 4th Nov 2052 (not food awarded).sav [79.27 KiB]
Downloaded 62 times
Brown & Co., 7th Aug 2051.png
Brown & Co., 7th Aug 2051.png [ 33.76 KiB | Viewed 3507 times ]

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v10 - An AI that doubles as your highway department
Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 10:17 pm 
Offline
Director
Director
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 535
Location: Fitzroy North - 96
Very fun so far!

I am having a similar problem. I had no trouble with the contract from a farm to a factory, and accepted a contract to take goods from that factory into a nearby town. However, delivering goods to the town nets no profit, and the subsidy window shows no progress towards the contract completed. In the attached savegame, train 2 has delivered two full loads to Savonmetsa, which accepts goods.

Thanks,


Edit:

Also, how are passengers handled? I have yet to see a passenger contract on offer, although I wouldn't mind if passengers were handled normally/differently. I have gone ahead and built stations in towns that my freight line passes through while they still like me, just in case I need to run a passenger service over the line in the future.


Attachments:
Hiekkasalo Transport, 1st Mar 1953.sav [230.58 KiB]
Downloaded 56 times
Top
 Profile  
 
PostPosted: Sat Feb 04, 2012 10:34 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Feb 01, 2011 12:41 pm
Posts: 208
supermop wrote:
Also, how are passengers handled?
Ditto for mail...

_________________
Alberta Town Names - 1500+ real names from 'Acme' to 'Zama City'
MinchinWeb's Random Town Name Generator - providing 2 million plus names...
WmDOT v10 - An AI that doubles as your highway department


Top
 Profile  
 
PostPosted: Sun Feb 05, 2012 3:08 am 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Subsidies to/from towns do not work yet, simply not coded, which is also why there are no passenger/mail subsidies so far. It didn't seem to make too much sense to me either to make contracts for pax/mail. From industry to town will be possible in a future release tho.

The glitch with the month is fixed and I also added a function that prevents loading from companies that aren't in an active subsidy for your company (prevents your train from filling partly from other producing industry with useless cargo)


Top
 Profile  
 
PostPosted: Sun Feb 05, 2012 4:31 am 
Offline
Director
Director
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 535
Location: Fitzroy North - 96
At least for now, I would suggest having passengers, and possibly other town cargoes operate as in standard ottd. You might want to disable these subsidies as in my first game I ended up bankrupt after agreeing to such a contract.

Some other thoughts after a couple games:

I have had at least one contract fail because the industry simply did not produce enough over the course of the four years to fulfill the contract. I understand there shoul be an incentive to grow production, but it is not always feasible for a new company to keep up a 100% rating on a brand new route. Also, some industries, like standard temperate oil wells will never grow, and will likely decrease production over the contract. I would suggest the contract amount be something like (this month's production)*(number of months in contract)*0.7 or so. This would allow players to complete on time even if they have good but not great service, and if they grow production, they can manage to finish sooner.

Along those lines, maybe more thought should go into what to do at the end of the contract. Is it better to let the player continue for the remaining time paying out the subsidized (or maybe standard) rate? Should the contract be offered for renewal? If not, then some maps may have their whole supply chains for some industries broken quite regularly. Currently their is little benefit to finishing early (maybe this is intended), as your infrastructure and vehicles become obsolete that much sooner.

Perhaps their should be varying difficulties of contract - maybe with a more demanding contract offered as a follow up upon successful completion. In addition to the existing time handicap for remote industries, maybe those contracts should also last longer on some scale. More difficult settings could perhaps have contractual monthly amounts, instead of or in addition to the four year total. (4800 crates over 48 months, with no fewer than 50 crates in a given month).

This could be fun in multiplayer - imagine UK style rail franchises - but currently I am not sure how well this is suited for that. One problem is that the first player to complete a contract will always be in a better situation to fulfill that contract the next time it is offered than any other player, as he likely has at least some infrastructure still in place, and possibly idle vehicles ready to use. Infrastructure sharing alleviates this to a degree, but still relies on the established player deciding not to pursue the contract and let someone else go after it. One way would be to have multiple contracts in place for large cities or high output industries, so that a smaller company could still get established. Any given contract would then never be for 100% of output, so as to allow room for new contracts to other players or destinations. Another option would be for some amount of cargo to be handled normally, outside of contract.

You might want to change the text from 'first train by' to 'first shipment by', unless you only want to subsidize trains. Along those lines, it could be fun to have vehicle specific subsidies - especially for passengers. this way a town could give out different contracts for bus and train service. A large or very remote town might request an airport connection.

I think it is an oversight to omit passengers, as it would be interesting to convert your disused freight lines to passenger service where appropriate. Contract-only passenger service might be difficult though. There would need to be some mechanism for distributing passengers based on which contracts a town has awarded, but cargodist and yacd miight not make sense.

It might be interesting to award contracts base on providing capacity rather than actual items moved, especially in the case of passengers.

Best,


Top
 Profile  
 
PostPosted: Sun Feb 05, 2012 4:43 am 
Offline
Engineer
Engineer

Joined: Fri Feb 03, 2012 4:42 pm
Posts: 20
Subsidies to towns should work now (cargo only, no mail/pax)

@other thoughts: a lot is planned, this obviously is not a finished patch yet

in detail:
atm it's 60% of the production in the month before the contract offer, so pretty close to ur suggestion

finishing a contract early allows you to get more money by continuing to transport more than in the contract (all is standard rate)

the difficulty, how and to whom they're offered, which routes etc. will all be determined by some kind of AI instead of like now by pure chance later on

passengers in general are suboptimal for this frame of reference. I want to solve it without contracts on the side like this:
every town creates randomly proportional to its size passengers that want to go to other cities proportional to the other cities size and their distance.
they will then buy tickets just like in real life, combining routes via transfer as well. I'm not 100% sure how far this is possible but I think it should be somewhat doable.

The faster your connection is, the more people will use it, but with relation to money. Optimally you can then set your ticket prices and control whether people use your or your competitors service, and by that there would finally be some direct competitive aspect to openttd. (for multiplayer)


Top
 Profile  
 
PostPosted: Sun Feb 05, 2012 8:05 pm 
Offline
Director
Director
User avatar

Joined: Sun Feb 21, 2010 12:15 am
Posts: 535
Location: Fitzroy North - 96
I would be wary of tackling too much, or trying to make passenger contracts too complicated. Both YACD and Cargodist have been working on a lot of those problems for awhile. I think it would be great to see parameters, or advanced settings to control how each type of cargo is handled, or to what degree contracts are involved. Competing on price may or may not be a good idea. While airlines and long distance trains might do this, commuter rail is often government subsidized as service - that is the town would be paying you to provide commuter service within the town and its neighbors, regardless of fare revenue. You would probably want a way to create demand both for long distance, fare based services, and short distance contract based services.


Top
 Profile  
 
PostPosted: Sat May 31, 2014 4:54 am 
Offline
Engineer
Engineer

Joined: Sat Oct 27, 2007 9:10 pm
Posts: 31
Sorry to bring this topic from the past.

Is this really dead? I think this idea is amazing!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.