Skip to content

Instantly share code, notes, and snippets.

@andythenorth
Last active December 29, 2020 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andythenorth/c9b0cbeea881859d091dc5a3c37a25c7 to your computer and use it in GitHub Desktop.
Save andythenorth/c9b0cbeea881859d091dc5a3c37a25c7 to your computer and use it in GitHub Desktop.

Locating industry types to make a nice map

Goal

  • distribute different kinds of industry to different parts of map
  • e.g.
    • 'farming region'
    • 'steel industry region'
    • 'mining region'

How much possible currently?

  • grf can check things like e.g. snowline height, water distance, desert
  • grf can check distance to industries of same type already on map
  • grf can check distance to industries of other types already on map
    • this is prone to deadlocking if too many types are checked
  • grf can use a town register to declare a 'type' of town
    • but no way for grf to group multiple nearby towns
    • no practical way for grf to distribute regions nicely across map
    • grf is very bad at 'whole map' type stuff

Changing payment rates per cargo, per town

Goal

  • set dynamic payment rate for each cargo, for each town
  • e.g. coal pays high in town 1, low in town 2
  • I don't have exact ideas for what changes payment rate, could be
    • over-supply
    • under-supply
    • purchase of exclusive transport rights
    • equivalent of subsidy
    • industry 'requests' more of a cargo delivered
    • industry 'requests' less of a cargo delivered
    • industry offers to pay more for a cargo to be transported away to specific destination
    • local recession
    • town is 'polluted' and 'taxes' certain cargos
    • town is 'expanding' and pays a premium for certain cargos
    • town is having a party and needs alcohol!
  • monthly update might be enough? Doesn't need to be 'real time'

How much possible currently?

  • nope
  • there is a grf callback for custom profit calculation, it has very limited access to vars

Changing cargodist demand per cargo, per town

Goal

  • extension of changing payment rates above, but allowing cargodist to apply weighting to some destinations

How much possible currently?

  • nope
  • cargodist has demand function, base on distance

Town requires certain cargos to be delivered to grow

Goal

  • towns require certain cargos to grow
  • delivering 'town cargos' like goods, alcohol, food etc kind of sucks as it has minimal benefit (other than getting paid, hurrah!). Except in Arctic above snowline, and Tropic in desert

How much possible currently?

  • 100% possible in GS
  • but actually the GS needs a list of 'town' cargos
    • 'town' cargos are defined by the grf
    • there's no good way for grf to indicate 'town cargo' on the cargo apart from setting 'town effect water' flag etc
    • setting cargo 'town effect' flags has side-effects in vanila Arctic and Tropic games which are hard to manage
  • GS authors can maintain a list of explicit cargos per industry grf (including silly grfs like FIRS which define multiple 'economies')
  • maintaining a GS against even one industry set is hard
  • grfs change version, versions change cargos
  • detecting grf versions from GS is...pffffff
  • a new release of the grf requires GS author to do a release
  • player may be using outdated GS anwyay...pffff
  • also also also
    • house cargo acceptance doesn't understand newgrf cargos very well
    • so GS can require a cargo to grow a town, but town has no buildings accepting it
    • industry grfs try to work around this by planting town industries (shops etc)
      • but industry grf cannot force industries into specific towns
    • GS can build industry
      • but has no way to understand about 'type' of industry unless author maintains against specific grfs

Energy Grid

Goal

  • regions of the map have varying levels of energy supply, e.g.
    • electricity
    • gas
  • town and industry behaviour is affected by energy supply
    • towns might grow or contract
    • towns above snowline or in desert need more energy
    • industries produce more if enough energy is available
  • energy is put into the grid by industries
  • to increase energy in the grid, keep the generating industries happy (deliver cargo or something)

How much possible currently?

  • can basically be done in grf per-town, using town registers
  • no way to aggregate across regions or whole map
  • no formal way to communicate which registers hold what, but a convention could be worked out between authors

Vehicle type influences station rating

Goal

  • station rating will be increased if certain vehicles are used
  • for example
    • trains with restaurant coaches, or extra-shiny coaches
    • fancy planes
    • boats with swimming pools
    • extra large mining trucks!

How much possible currently?

  • nope
  • there's just the lolz default station rating calculation, which can be exploited by constantly replacing vehicles and over-servicing stations

Nearby things influence station rating

Goal

  • adding shiny station tiles or objects increases the station rating
  • maybe per cargo?
    • add a bar-restaurant for higher passenger rating!
    • add strongroom for higher diamonds rating!
  • this is not my idea, but from https://www.tt-forums.net/viewtopic.php?f=33&t=88257

How much possible currently?

  • nope
  • can build a statue in town for higher rating though

Monorail!

Goal

How much possible currently?

  • I have NFI!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment