Hi,
Basically what I'm trying to do is to find someway to change the return value of the profit callback of a cargo with respect to the cargo's delivery location. E.g. extra profit for transporting a cargo to a snowy mountain town or something like that. However I can't for the life of me think of anyway to do it. I'm still new to NML so is there something obvious I'm missing or is it impossible?
Thanks
Extracting Position from Cargo Type Scope in NML
Moderator: Graphics Moderators
Re: Extracting Position from Cargo Type Scope in NML
No, it's not possible. You can change payment based on time and distance travelled, but there's no way to determine where on the map a cargo is delivered to.
Re: Extracting Position from Cargo Type Scope in NML
Awww, that's a shame. Thank you though.
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: Extracting Position from Cargo Type Scope in NML
I looked, there's no parent scope for cargo varaction 2.
That means the callback can only access the variables for the cargo, and those listed explicitly for the callback.
https://newgrf-specs.tt-wiki.net/wiki/V ... nalAction2
Cargo payment rates that can change (e.g. per town) would be a nice pony to have. I wouldn't expect it any time soon though
That means the callback can only access the variables for the cargo, and those listed explicitly for the callback.
https://newgrf-specs.tt-wiki.net/wiki/V ... nalAction2
Cargo payment rates that can change (e.g. per town) would be a nice pony to have. I wouldn't expect it any time soon though

FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: Extracting Position from Cargo Type Scope in NML
for example..
GScript ,,+ Subsidy ((Town)),, ≈ 3* profit
GScript ,,+ Subsidy ((Town)),, ≈ 3* profit
Who is online
Users browsing this forum: Brickblock1 and 18 guests