[not yet released] enhanced electric rails
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 116
- Joined: 20 May 2004 17:21
[not yet released] enhanced electric rails
In short: Electric trains need power supply, add power transformers to your track to ensure that they get power, otherwise perfomance is dramatic.
This patch will be on top of the physics patch already available, since i maintain my own copy of that patch it may be slightly different (but will also be supplied when release time comes).
(mostly) done:
- Make duplicate waypoint with default graphics.
- Create memory pool to store information in.
- Expand train properties to allow storage of energy (so it can be given back once it's out of range).
- Create dynamic power(and tractive effort, currently linear to powerloss) of train based on available power.
- Treat trains individually regardless if it's first or not.
- Release power if halted.
- Release power when sold.
- Release power when crashed.
todo:
- Finetuning.
- Extensive testing.
- Expand savegame to store additional transformer(special form of waypoint) information.
- Allow old savegames (including the startup screen) to be loaded.
- Let coal supply to nearby powerplant influence power availability.
(possible) bugs:
- There may still be a power leak somewhere.
- Reaction to custom waypoint graphics untested.
Currently each transformer has 10000 power units(which can be used for trains), the map is devided in 8x8 squares, the square plus those around it (9 squares) have full power. The 16 squares around that have 80% power, while draining the full amount. The rest has 10% power(which is not "drained" anywere but given).
Don't expect a release soon, i may even release it together with the (yet-to-be-made) variable running costs system if i can manage to make that. Feedback will be appreciated, but keep in mind that am a novice c coder and this has already required considerable time and effort (there have been many very broken versions).
I have hit a bug i can't find, expect it to take longer.
This patch will be on top of the physics patch already available, since i maintain my own copy of that patch it may be slightly different (but will also be supplied when release time comes).
(mostly) done:
- Make duplicate waypoint with default graphics.
- Create memory pool to store information in.
- Expand train properties to allow storage of energy (so it can be given back once it's out of range).
- Create dynamic power(and tractive effort, currently linear to powerloss) of train based on available power.
- Treat trains individually regardless if it's first or not.
- Release power if halted.
- Release power when sold.
- Release power when crashed.
todo:
- Finetuning.
- Extensive testing.
- Expand savegame to store additional transformer(special form of waypoint) information.
- Allow old savegames (including the startup screen) to be loaded.
- Let coal supply to nearby powerplant influence power availability.
(possible) bugs:
- There may still be a power leak somewhere.
- Reaction to custom waypoint graphics untested.
Currently each transformer has 10000 power units(which can be used for trains), the map is devided in 8x8 squares, the square plus those around it (9 squares) have full power. The 16 squares around that have 80% power, while draining the full amount. The rest has 10% power(which is not "drained" anywere but given).
Don't expect a release soon, i may even release it together with the (yet-to-be-made) variable running costs system if i can manage to make that. Feedback will be appreciated, but keep in mind that am a novice c coder and this has already required considerable time and effort (there have been many very broken versions).
I have hit a bug i can't find, expect it to take longer.
-
- Engineer
- Posts: 116
- Joined: 20 May 2004 17:21
After rewriting most of the code related to controlling power(about 300 lines) i figured out what problem i had. The code is cleaner now and about 50 lines shorter. I also fixed the custom waypoint graphics issue. Does noone like the idea or do people only respond when there is something to download or complain about .
- Born Acorn
- Tycoon
- Posts: 7595
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
-
- Engineer
- Posts: 116
- Joined: 20 May 2004 17:21
In real life you can put many locomotives together, but not many electric locomotives. I chose this because adapting path finders to detect nearby locomotives was probably going to be more resource intensive. And yes it's micromanagement, that's precisely the point, electric engines loose some of their edge compared to other types (my next idea, if possible to implement is variable running costs, which i may use to rebalance train types a bit).
Who is online
Users browsing this forum: Google [Bot] and 18 guests