Feature #2245

An idea wrt running costs and NuTracks

Added by DJNekkid almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:2011-02-04
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

I could use VarAction2 Variable 4A (http://wiki.ttdpatch.net/tiki-index.php?page=VarAction2Vehicles#Info_about_current_rail_type_for_trains_4A_) to check what railtype the engine/train is running on, and adjust costs accordingly. Especially usefull for 'higher' speed trains running on 'lower speed' tracks, as it would not need ot use all of its available power to overcome airdrag and such.

Psuedocode:

While "typecheck";
Railtype = Low, low cost
Railtype = Med, Med cost
Railtype = High, high cost
Railtype = Very high, very high cost

While "speedcheck"
Speed = 0, ultralow cost
Speed > 0, typecheck

Note that a 'low' engine wont get 'high' cost, it will contain its low cost, but a 'high' engine get a 'medium' cost if it runs on thoose tracks

Yey or ney?

code.txt Magnifier (1011 Bytes) DJNekkid, 2011-02-09 12:12

Associated revisions

Revision 740:a2fc70c614b1
Added by DJNekkid almost 9 years ago

Change: Move the generic MU-stuff into a separate file, in preparation for #2245 (will not build)

Revision 741:0edce4feee46
Added by DJNekkid almost 9 years ago

Feature: #2245 for MU's. Engines remains

Revision 742:908d38c796c4
Added by DJNekkid almost 9 years ago

Feature: #2245 now also for engines. Close #2245

History

#1 Updated by Voyager1 almost 9 years ago

IMO, yey :D

You could remove the feature if it proves bad, couldn't you?

#2 Updated by DJNekkid almost 9 years ago

ofcourse :)

#3 Updated by EmperorJake almost 9 years ago

Seems like a great idea to me

#4 Updated by Purno almost 9 years ago

I'm fine with it, as long as running costs are never higher than they display in the depot list when you buy vehicles.

#5 Updated by Voyager1 almost 9 years ago

Purno, they could be higher if you're running some wagons over their design speed. That additionally increases running costs but that's a different feature. For single (uncoupled with anything) vehicles should be like you've said.

#6 Updated by DJNekkid almost 9 years ago

had some free time at work, and here is most likely the code. The first line might need some adjusting. Use some other tricks, do a 81-40 with 00 to FE as range, or 80-03 with 00 - 02 as range

#7 Updated by DJNekkid almost 9 years ago

btw, to be inserted around line 83 in e.g. line 83 in sprites/nfo/templates/emu_normal.tnfo, or i probably should add it in the ..templates/common-dir as a 'procedure'

#8 Updated by DJNekkid almost 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset 908d38c796c4.

Also available in: Atom PDF