[OTTD] 2cc TrainsInNML

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

How do you use the regional parameters?

Only one region enabled
18
15%
Multiple regions (but not all) enabled
36
30%
All regions enabled
68
56%
 
Total votes: 122

User avatar
supermop
Tycoon
Tycoon
Posts: 1047
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: [OTTD] 2cc TrainsInNML

Post by supermop » 24 Aug 2016 21:00

NekoMaster wrote:Too bad there wasn't a way to code Cogwheel locomotives to increase TE when climbing a steep hill (ie multiple rail tails on an incline with no flat spots to make the line less difficult for regular locomotives to climb)

Well Technically a cog locomotive will always have a high TE on any rack rail, even if flat. Usually engineers will not build significant lengths of flat rack rack though if the train has adhesion drive as well. You could simply give rack locomotives huge TE, then set slope steepness such that no regular locomotive can reliably climb a steep hill while cogwheels can. If you want a prettier means at arriving at same solution at the cost of a rail type, have a separate rack railtype that gives TE boost to rack locomotives, but not to regular. (You could also set regular to unpowered on rack or vis versa, but that is probably just annoying gameplay).


A patch solution would be to have a train calculate the average slope over a certain number of tiles (maybe realistic acceleration already does that?), so that you don't have regular trains struggling to climb a single height level. What you ultimately are trying to simulate is not that 'it's harder to climb a steep slope' but rather 'adhesion traction breaks down at steeper angles'. This patch would then need to reduce effective TE for each increment average slope increases. Almost certainly not worth the effort.

User avatar
Valle
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 15 May 2007 11:35
Location: Germany

Re: [OTTD] 2cc TrainsInNML

Post by Valle » 25 Aug 2016 16:32

The separate railtype that boosts cogwheeled locomotives would probably give the most realistic results if applied correctly. A simple boost in TE may result in abuse, like with the HGe 4/4 II that has 230 + 280 kN and can hit 100 km/h. Some players might see the tractive effort and decide to use it for heavy freight trains on flat ground, where it should not have this performance. A possible workaround is avoiding vehicles with cogwheel capability that can hit significant speeds.

The dedicated railtype that is useable by all normal trains but only gives a boost to cogwheel-equipped ones could enforce the drastically lower top speed for cogwheel sections, too. Cogwheel sections on flat ground can exist, but usually those are only found near canals for towing ships.

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 25 Aug 2016 18:31

Valle wrote:A simple boost in TE may result in abuse, like with the HGe 4/4 II that has 230 + 280 kN and can hit 100 km/h. Some players might see the tractive effort and decide to use it for heavy freight trains on flat ground, where it should not have this performance.
I would just leave it to the player to use or abuse certain vehicles.
The dedicated railtype that is useable by all normal trains but only gives a boost to cogwheel-equipped ones could enforce the drastically lower top speed for cogwheel sections, too. Cogwheel sections on flat ground can exist, but usually those are only found near canals for towing ships.
When cogwheel vehicles are added, they will be coded as regular engines, without special railtype treatment. I think it does not add much gameplay-wise, and complicates things unnecessary.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 30 Oct 2016 16:17

Shameless double post from me, but I need some help. Recently an issue has been reported, that AIs do not have cargo engines to select as the ai_special_flag for all engines say that it is a passenger engine. This is an issue I want to fix before the next release, but it is quite a big issue to do all by myself, as there are something like 350-400 vehicles (steam, diesel and electric engines) for which the flag needs to be checked if it is correct or should be set to Cargo.

You can help by making a list of vehicles for which the ai_special_flag should be changed (based on the list of vehicles in the repo, documentation is a bit out of date with the additions for the 2.0 releases), or even grab the source, modify the files for which the flag is incorrect and send those files to me.

If people can help me out, even if it is with just one of the vehicle types (or even a part of one of the types), that would be greatly appreciated. Just drop a message here which part of the list you want to help out with, so that others do not also are going to do that.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3945
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainsInNML

Post by NekoMaster » 31 Oct 2016 00:49

Transportman wrote:Shameless double post from me, but I need some help. Recently an issue has been reported, that AIs do not have cargo engines to select as the ai_special_flag for all engines say that it is a passenger engine. This is an issue I want to fix before the next release, but it is quite a big issue to do all by myself, as there are something like 350-400 vehicles (steam, diesel and electric engines) for which the flag needs to be checked if it is correct or should be set to Cargo.

You can help by making a list of vehicles for which the ai_special_flag should be changed (based on the list of vehicles in the repo, documentation is a bit out of date with the additions for the 2.0 releases), or even grab the source, modify the files for which the flag is incorrect and send those files to me.

If people can help me out, even if it is with just one of the vehicle types (or even a part of one of the types), that would be greatly appreciated. Just drop a message here which part of the list you want to help out with, so that others do not also are going to do that.
I could help with the North American stuff, I at least know a bit of code so I can change the AI_FLAG myself for the USA/Canadian stuff.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 31 Oct 2016 18:44

NekoMaster wrote:I could help with the North American stuff, I at least know a bit of code so I can change the AI_FLAG myself for the USA/Canadian stuff.
Thanks, it would be really great if you could do that.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

Lionic
Traffic Manager
Traffic Manager
Posts: 170
Joined: 02 Jun 2014 09:13

Re: [OTTD] 2cc TrainsInNML

Post by Lionic » 15 Nov 2016 09:04

I might check Eastern or Northern Europe if it still makes sense. Just one question--what to do with universal service engines?

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 15 Nov 2016 18:51

Lionic wrote:I might check Eastern or Northern Europe if it still makes sense. Just one question--what to do with universal service engines?
That would be much appreciated.

Universal service engines are indeed a bit difficult, but based on the code from trunk posted, I think it would be safe to set them as cargo, as the last return would then always return true. It might also be why the original set just set it all to cargo.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3945
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainsInNML

Post by NekoMaster » 17 Nov 2016 19:54

If anything, for universal service engines I think that anything that has any bit of speed could be flagged as passenger. Slower trains like 120km\h or slower could be set as cargo.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 19 Nov 2016 13:52

That is also possible, I leave it up to the person that classifies them as to how they classify it.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

Lionic
Traffic Manager
Traffic Manager
Posts: 170
Joined: 02 Jun 2014 09:13

Re: [OTTD] 2cc TrainsInNML

Post by Lionic » 27 Nov 2016 20:26

NekoMaster wrote:Slower trains like 120km\h
Not in XIX century or Latin America :lol:

I have completed my list of North European locomotives. Now if someone would be so kind as to show where exactly to put this data?

BTW class DSB E has power of 1014 hp, while wikipedia claims it to be 1529 hp.
Attachments
north europe.xls
(18.5 KiB) Downloaded 56 times
Last edited by Lionic on 28 Nov 2016 19:48, edited 1 time in total.

User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3945
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainsInNML

Post by NekoMaster » 28 Nov 2016 16:35

I've been looking into my code and templates recently for the NARS Addon set, and then looking at the code for the 2cc Train Set I noticed theres only one template for most engines no matter the size, be it a 8/8 Locomotive or 6/8 locomotive, both end up using the same engines_general template.

How does one make a template that works for all sizes without gaps so long as the coder punches in the right length in the Item file.

This would really help speed up things for me if I could figure out how to make such a template code
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 28 Nov 2016 17:26

Lionic wrote:
NekoMaster wrote:Slower trains like 120km\h
Not in XIX century or Latin America :lol:

I have completed my list of North European locomotives. Now if someone would be so kind as to show where exactly to put this data?
Thank you very much. Here is fine, I will add the list to the correct issue and update those vehicles at a later moment (probably next weekend).
BTW class DSB E has power of 1014 hp, while wikipedia claims it to be 1529 hp.
I will create an issue for it to update the value.
NekoMaster wrote:I've been looking into my code and templates recently for the NARS Addon set, and then looking at the code for the 2cc Train Set I noticed theres only one template for most engines no matter the size, be it a 8/8 Locomotive or 6/8 locomotive, both end up using the same engines_general template.

How does one make a template that works for all sizes without gaps so long as the coder punches in the right length in the Item file.

This would really help speed up things for me if I could figure out how to make such a template code
It works because the difference between lengths is done by the artist. The artist has to move the sprite in the blue box to the correct position, instead of using the correct template. The Dutch Trainset has that system, a different template for each length. As your addon has the same license, there is no problem lifting the template code from either set for use in your addon.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

User avatar
Voyager One
Tycoon
Tycoon
Posts: 11161
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainsInNML

Post by Voyager One » 28 Nov 2016 18:26

NekoMaster wrote:How does one make a template that works for all sizes without gaps so long as the coder punches in the right length in the Item file.
Are you thinking of this...
Attachments
Base.PNG
Base.PNG (3.96 KiB) Viewed 2281 times
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield

Lionic
Traffic Manager
Traffic Manager
Posts: 170
Joined: 02 Jun 2014 09:13

Re: [OTTD] 2cc TrainsInNML

Post by Lionic » 28 Nov 2016 19:49

I have updated attached file in my previous post with Eastern Europe locos.

User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3945
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainsInNML

Post by NekoMaster » 29 Nov 2016 05:05

Voyager One wrote:
NekoMaster wrote:How does one make a template that works for all sizes without gaps so long as the coder punches in the right length in the Item file.
Are you thinking of this...
Yes, I was thinking of something like that, I made a sprite sheet set up to accommodate the largest sprites I might end up using (12/8 size using invisible articulated parts), though I want to have my code compensate some how for each size locomotive like 2cc set does without having to make a new template for every size (which I can never seem to get right btw).

I do know that for larger stuff I will need to make code to make them "articulated" like the larger engines in the 2cc set, but I'd like it if everything from 8/8 size and downwards would work like the 2cc set.

EDIT : I'd also like to mention that I've been trying to go for a standardised template since I started my NARS ADDON set, because I wanted coding and sprite sheet work to be easier and simpler.

Heres what I'm using now that I'd like to use later. Mind you its currently set up for 12/8 length sprites but I've already figured out how much to shorten the lengths to get what I need.
Attachments
NekoMasters Sprite Template.png
NekoMasters Sprite Template.png (5 KiB) Viewed 2248 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!

Transportman
Tycoon
Tycoon
Posts: 2706
Joined: 22 Feb 2011 18:34

Re: [OTTD] 2cc TrainsInNML

Post by Transportman » 17 Dec 2016 14:40

Lionic wrote:
NekoMaster wrote:Slower trains like 120km\h
Not in XIX century or Latin America :lol:

I have completed my list of North European locomotives. Now if someone would be so kind as to show where exactly to put this data?

BTW class DSB E has power of 1014 hp, while wikipedia claims it to be 1529 hp.
Thanks for the list, they are now in, and I also updated the power of the DSB E.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML

Lionic
Traffic Manager
Traffic Manager
Posts: 170
Joined: 02 Jun 2014 09:13

Re: [OTTD] 2cc TrainsInNML

Post by Lionic » 19 Dec 2016 13:08

I may do other European regions as well.

User avatar
NekoMaster
Tycoon
Tycoon
Posts: 3945
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: [OTTD] 2cc TrainsInNML

Post by NekoMaster » 19 Feb 2017 21:33

With the recent nightlies like Nightly -r6224 the running costs for Locomotives are ridiculously low!

For example...

A $520,000 dollar high speed train may only cost $5,200 to run, but the passenger wagons will cost as much to run as they normally should.

If I try to use the parameters say, to increase the running costs by 8 times, I'll get something a little more proper for the locomotive running costs but then wagons cost 8 times more to run.

So a wagon that costs $5,000 to run normally may end up costing $45,000 a month to run with an 8 times multiplier.



I've provided a zip file with a bunch of screen shots to properly show what I'm talking about, I also included a picture of my grf list with only 2cc Trains loaded and the parameters.
I'm using american dollars for the currency.
Attachments
2cc Train Running Cost Issue.zip
Zip file with pictures to show the issue with running costs in 2cc Trains in NML
(3.35 MiB) Downloaded 56 times
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!

User avatar
Voyager One
Tycoon
Tycoon
Posts: 11161
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2cc TrainsInNML

Post by Voyager One » 20 Feb 2017 16:52

I must be honest I haven't been testing anything lately but these screenshots provided me some feedback info, cost related of course.

Comparing to other sets, running costs are pretty much there but purchase costs of engines are way off. Probably a foolish question from me given all these years of work on 2ccTS but did we always had costs this high? Strangely, I can't remember any more. If so, they should be lowered by a factor of 10 exactly, then they'd match other sets...

Nothe to myself: I think I'm getting too old and loosing my memory slowly... :lol:
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 16 guests