Two newgrf features (for use in the Japan Set)

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

Post Reply
dandan
Route Supervisor
Route Supervisor
Posts: 414
Joined: 17 Feb 2008 23:01

Two newgrf features (for use in the Japan Set)

Post by dandan »

I would like to ask if any developer might be willing to implement one or both of the following two features in TTDPatch:

1) Support for vehicle property 14 (cargo capacity) via callback 36.

I asked about this in the problem section recently, because I was under the wrong impression that it was working already. Lakie said that there had been some coding problem. Of course, I have no idea how difficult this would be. In the Japan Set, we want bilevel cars but only for very few multiple unit trains. So adding an extra vehicle together with all the checks that allow attaching it to only those few trains, is not very appealing. More generally, the possibility to modify the capacity for individual trains would often be useful, and I imagine that other sets would profit from this feature, as well.


2) Running costs for wagons.

This has been suggested before. I know that, to a certain extent, it can already be achieved by changing the running cost of the engine via callback 36, and we will probably use this in the Japan Set for multiple unit trains. But for an ordinary, loco-hauled train, it would be much better if the cost could be set using the normal running cost property, for example because the amount would then be properly displayed in the purchase window.
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: Two newgrf features (for use in the Japan Set)

Post by Lakie »

Been a while since I looked at Callback 36, so this information may incorrect.

1) I've tried doing this before (even had Pikka write me test grfs to attempt it), however I could not get a reliable result and thus it was axed.

2) As far as I understand the running cost is calculated by adding the running cost of all the vehicles in the consist, are you sure it doesn't currently work?
As for the main window it may be TTD's code which stops it from getting a running cost I'm not sure. I'll take a look at it some time.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
dandan
Route Supervisor
Route Supervisor
Posts: 414
Joined: 17 Feb 2008 23:01

Re: Two newgrf features (for use in the Japan Set)

Post by dandan »

Lakie wrote: 2) As far as I understand the running cost is calculated by adding the running cost of all the vehicles in the consist, are you sure it doesn't currently work?
Yes, I'm sure it doesn't work. (By "it" I mean getting running costs for a wagon by changing vehicle properties 0D and 0E for that wagon.)
Lakie wrote: I'll take a look at it some time.
Great!
User avatar
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: Two newgrf features (for use in the Japan Set)

Post by Lakie »

I think I know why Wagons don't have running costs (there is an 'isengine' flag which is probably checked), but I don't think it is wise or logical to change that, as wagon running costs are nominal.
That and it would radically alter gameplay if you had to pay running costs for wagons, perhaps as an optional switch, but like I said I'm not sure what the implications could be.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
dandan
Route Supervisor
Route Supervisor
Posts: 414
Joined: 17 Feb 2008 23:01

Re: Two newgrf features (for use in the Japan Set)

Post by dandan »

Well, I don't want to imply that you should do everything OpenTTD does, but OpenTTD has running costs for wagons and I can see no disadvantages. All existing grfs that I am aware of have property 0E for wagons set to 00 which means no running costs. So adding support for running costs for all vehicles doesn't actually change anything until a grf makes use of it.

What I don't know is what this means for the difference between engines and wagons. You mentioned the isengine flag. As I understand it, OpenTTD bases this decision solely on the power setting. I have no idea whether this has any implications that you might consider undesirable.

But it is really only a detail, and if you don't like it from the gameplay point of view... Thanks for the consideration anyway.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Two newgrf features (for use in the Japan Set)

Post by krtaylor »

For what it's worth, I think these would be extremely valuable additions to the Patch feature-set. Obviously it should be parameter-settable though, as some people would not want to use it.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Two newgrf features (for use in the Japan Set)

Post by PikkaBird »

Lakie wrote:I think I know why Wagons don't have running costs (there is an 'isengine' flag which is probably checked), but I don't think it is wise or logical to change that, as wagon running costs are nominal.
That and it would radically alter gameplay if you had to pay running costs for wagons, perhaps as an optional switch, but like I said I'm not sure what the implications could be.
Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it. :roll:
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Re: Two newgrf features (for use in the Japan Set)

Post by krtaylor »

In the abstract, I think it would be good to have operating costs, not only of traincars, but indeed of track segments and everything else in the game that doesn't have it. This would have minimal effect at the beginning of the game, since you don't have much, but would grow over time. It might help reduce the wealth bulge that usually comes fairly quickly on in the game, where you have more money than you know what to do with.

A "profits tax" would be helpful as well. Basically, at the end of the year, if you show positive, you get charged 10% (or whatever) of that amount.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
dandan
Route Supervisor
Route Supervisor
Posts: 414
Joined: 17 Feb 2008 23:01

Re: Two newgrf features (for use in the Japan Set)

Post by dandan »

I totally agree that more different kinds of operational costs would make a very good addition to the game. Of course, that would also be a huge amount of work for the devs and much thought would have to go into balancing. But I didn't want to suggest any great scheme of this kind, rather the change I suggested is really very modest. Just one small step in that direction. It would give grf creators a bit more flexibility and improve compatibility with OpenTTD. And as I said, I don't even see why you would necessarily have to add a parameter, since it's entirely up to grfs to use it or not.
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 24 guests