Electricity, Power Lines, and Industries

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

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

Re: Electricity, Power Lines, and Industries

Post by supermop » 15 Nov 2012 18:58

Interesting that there is all this talk of game scripts to do this (my preferred method), but no one yet writing one. How hard is it to write one? Can I do it? Do I need to install anything (can't at work...)? Can I organize a team to write one? I glanced at some squirrel stuff on the wiki, and I couldn't make much sense of the documentation (I can't even use html). Should I try to learn some C before talking this? If I write out an outline for a GS could I reasonably expect someone to help me?


I think we are well beyond the point of say 'electricity would be neat', and 'it can and should be done via GS' - most people here are agreeing on that already. No one seems to be saying 'let's write a GS then!', which seems like the next step. So I say: 'let's do this!'. As it is via GS, we don't even have to agree on the specifics - there can be different scripts and parameters for different ideas about the role power should play!


As for power for traction, I am not opposed, and actually like the idea, but I feel it would be best as a separate thing - perhaps a different GS (can GS alter vehicle availability, horsepower, or running costs?). There are a lot of neat ways to do it, and I would love to flesh out my own ideal world implementation, but let's look at a super basic power to town growth script first!

Best,

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13188
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Electricity, Power Lines, and Industries

Post by Hyronymus » 15 Nov 2012 19:12

I too think the focus should be on getting electricity wired up in OpenTTD and preferably not as a cargo that must be transported by a player company but by a gamescript.

Juanjo
Engineer
Engineer
Posts: 124
Joined: 06 Aug 2011 15:51
Location: Spain

Re: Electricity, Power Lines, and Industries

Post by Juanjo » 15 Nov 2012 19:25

I prefer the aforesaid effect: modify the growth rate of a town (and production of industries on that town) like water and food supply do when supplied to a town. It is simple and adds to gameplay, as trying to make a town grow as fast as possible can be your goal (GS-controlled goal or just your company strategy).

Also, building a power line (or oil pipe, water pipe, ore pipes, phone wires or whatever) increases the challenge of building railway or roadway lines next to them as there are less free tiles near towns.

Power lines should also get some attention from time to time, just to check you didn't break any line or to check that towns are supplied with enough power to grow (same as with water supply on tropical climate).

The last thing I can think of is that a new disaster type can be added for power lines: wire is damaged.

That is not really a breakthrough on gameplay, but ships (implemented already) are less challenging than power lines will.
supermop wrote:I think we are well beyond the point of say 'electricity would be neat', and 'it can and should be done via GS' - most people here are agreeing on that already.
Not me. I prefer the idea of each company building their own electricity transport network. I see a poll coming :wink:

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: Electricity, Power Lines, and Industries

Post by michael blunck » 15 Nov 2012 19:36

Transportman wrote:
DanMacK wrote: The availability of electric traction dependent on electricity is a good idea. Not sure if it can coincide with availability of the first power pland or maybe the proximity of at least one station to a power plant or substation...
A downside is the first vehicle, how does that get its power? Should that be a steam/diesel train or other vehicle delivering coal to the power plant? Then where does that vehicle gets its coal/diesel/other from?
Read here:
mb wrote: we could assume a de-facto standard for the early years (no electricity available; but water and coal/wood is implicitly delivered to depots, included in "maintenance costs"), and only in later years, after introducing "electricity", electric traction may be usable.
[...]
- early game stages are simplified to get a smooth start (with steam locomotives)
Juanjo wrote:
supermop wrote: I think we are well beyond the point of say 'electricity would be neat', and 'it can and should be done via GS' - most people here are agreeing on that already.
Not me. I prefer the idea of each company building their own electricity transport network.
Seconded.

regards
Michael
Image

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13188
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Electricity, Power Lines, and Industries

Post by Hyronymus » 15 Nov 2012 19:40

The beauty of adding electricity as a gamescript is that multiple approaches can be worked out (over time), of which one that allows player companies to build their own electricity grid is one. To be honest I don't know who in real life owns the power lines between substations for electrified track and power stations.

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5517
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Electricity, Power Lines, and Industries

Post by wallyweb » 15 Nov 2012 20:54

Hyronymus wrote:of which one that allows player companies to build their own electricity grid is one.
If this is an option available within GS then I like it, especially if it avoids the necessity of Industry Set authors to revise their GRFs.
To be honest I don't know who in real life owns the power lines between substations for electrified track and power stations.
In most cases the utility (power company) has responsibility for delivery up to the gate of the industry (electrified railroad), with the later assuming responsibility within it's own fences.

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: Electricity, Power Lines, and Industries

Post by michael blunck » 15 Nov 2012 20:55

Hyronymus wrote: [...] To be honest I don't know who in real life owns the power lines between substations for electrified track and power stations.
In Germany, it´s DB Energy. Mind you that in Germany, the majority of electrified track uses 15kV 16 2/3 Hz AC, which is quite different from the public electric power supply.

I.e., would make sense in a game: a transportation company producing its own electrical energy. :cool:

regards
Michael
Image

User avatar
SquireJames
Tycoon
Tycoon
Posts: 1867
Joined: 07 Aug 2004 11:56
Skype: squirejames5
Location: Stoke-on-Trent
Contact:

Re: Electricity, Power Lines, and Industries

Post by SquireJames » 15 Nov 2012 21:12

Is there any way via a GS to, I suppose the best word is 'measure' the electricity produced and control whether a locomotive can be purchased? That way it would nicely show some of the limitations of electrification. Right now, it's just drag and drop, bish bash bosh you just electrified your whole network. If you had to weigh the pros and cons of whether a line needed to be electrified, whether more power would need to be generated to run a network that large etc.

It could be modelled either as "Sorry you don't have enough electricity to run another electric engine" or "Sorry, you don't have enough electricity to electrify more track" whatever is easier to implement and more realistic (I suspect the second in both cases)
Image

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: Electricity, Power Lines, and Industries

Post by michael blunck » 15 Nov 2012 21:28

SquireJames wrote: It could be modelled [...] as [...] "Sorry, you don't have enough electricity to electrify more track" [..]
ATM we have "maintenance costs" which is a nice addition in itself. But again, it´s only the money what counts. The need for power supply when building an electrified railway network would add a totally different challenge to this task.

O/c, there are people only interested in passenger transportation, but the need to "produce" electricity would be made optional by an advanced setting.

regards
Michael
Image

Eddi
Tycoon
Tycoon
Posts: 7387
Joined: 17 Jan 2007 00:14

Re: Electricity, Power Lines, and Industries

Post by Eddi » 15 Nov 2012 23:20

SquireJames wrote:Is there any way via a GS to, I suppose the best word is 'measure' the electricity produced and control whether a locomotive can be purchased?
current game scripts can detect how much cargo is delivered, so if you can qualify in a GRF-agnostic way what an "energy" cargo is, the "measuring" should be possible.

influencing engine purchase has afair not been considered yet, so there would need to be development effort for an api to override the default availability/purchase mechanism. this could at the same time enable other ideas that were floating around:
  • "research&development" - engines get available earlier or later depending how well your company performs or which vehicle types you used in the past
  • "second hand market" - some time after vehicle introduction, vehicles will get cheaper (especially after a successor has been introduced), but get lower lifetime
  • engine factory production capacities - at each point, there will be a maximum number of vehicles you can buy in a short period
  • testing an engine prototype may get feedback-effects on any of the above
  • ...
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
prissi
Chief Executive
Chief Executive
Posts: 645
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Electricity, Power Lines, and Industries

Post by prissi » 16 Nov 2012 10:18

Another relevant question: Do similar games like Simutrans implement powerlines and electricity transport? If so, how do they do it?
The are actually two way of simutrans using electricity, since there are two branches. In the main branch you can use electricity for powering factories to increase their production. The increase of factory production denpends of course on the factories. Forest will not grow faster. In simutrans-experimental also twons will grow faster with electricity. A substation in a city will also supply all factories in the city.

In both variants you will earn money. The electricity production is balanced in such a way that the number of power plants production is a fixed percentage of the total poroduction, i.e. you cannot connect every factory to the grid or the production increase of factories will be much lower.

Technically all connected lines form a grid (like a rail block). This grid can only hold a certain capacity, which is fed in resp. demand per game step. Extra power is lost.

BTW: If one is about realism in TTD ;) i.e. factories should not increase production by electricity, why on earth produces a form more livelstock the bigger its connected station is? Imho increasing production by electricity is rather a game choice and better not seen too much through the "realism" glasses.
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com

User avatar
kamnet
Moderator
Moderator
Posts: 6629
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Electricity, Power Lines, and Industries

Post by kamnet » 09 Jun 2013 00:28

prissi wrote:BTW: If one is about realism in TTD ;) i.e. factories should not increase production by electricity, why on earth produces a form more livelstock the bigger its connected station is? Imho increasing production by electricity is rather a game choice and better not seen too much through the "realism" glasses.
A factory can produce a limited amount of goods when it has to produce its own electrical power to do so (think diesel generators, wind turbines, hydro turbines, etc.). When a factory is connected to a grid that has clean, reliable and consistent power, it can connect more equipment and run longer operations, which will vastly increase production.

Thinking further on this, I think a nice combination would be a GS which towns must receive electricity in order to grow, and an AI can deliver that to help grow the town and build the eyecandy infrastructure. I think WmDOT would be a great candidate, it could build the infrastructure along with the roads and then generate its own income from delivering power. Players could have it on for the eyecandy and not worry about it competing with it to deliver other goods or services.

User avatar
kamnet
Moderator
Moderator
Posts: 6629
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Electricity, Power Lines, and Industries

Post by kamnet » 07 Jul 2013 07:50

Played with WIRES for a few hours in a new game now, some thoughts.

WIRES has no problem running alongside FIRS as far as I can tell. No weird industry outputs or errors. Profitability seems to be fairly decent. With three different systems, one of them running to two substations, I spent about $40,000 in infrastructure, and in a month and a half time I've already recovered that amount. As it is currently written, WIRES power stations produce electricity on their own, and while they can accept coal, they don't need it. This works for me in FIRS as I can still use the coal for other industries that need it, so less competition that was is good. If I want to step up the challenge, then I can source coal mines for electricity production, all a win for me.

The eyecandy aspects could be improved. Chief among them, signals need to be visible. I dunno how you fix this, though. Station tiles could be useful as well. I have a couple of NewGRFs that provide various ground tiles that look okay-ish (CHIPS, PGS Bare Station Tiles), but one that blends in better with the power plants and substations wold be nice, as well as some non-track tiles. Tunnels and bridges don't look good either, as they include the default rail graphics. You'd probably need to write something special for this so that they look better, but then you're probably going to get conflicts with at least the bridge NewGRFs.

I think that if one of the town grown GameScripts included (but didn't require) support for WIRES, that would be an excellent reason to use this for a little more than just eyecandy fun or a new way to rack up profit. I have enjoyed building out the electrical lines and finding ways to route them around and over both the natural terrain and other infrastructure.

Supercheese
Tycoon
Tycoon
Posts: 1660
Joined: 16 Dec 2007 22:24
Location: Idaho, USA

Re: Electricity, Power Lines, and Industries

Post by Supercheese » 07 Jul 2013 21:39

Well, I'd have a hard time doing custom stations, as NML does not support stations at the moment -- same goes for bridges. Signals could be possible, but what graphics to use?
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects

"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton

User avatar
kamnet
Moderator
Moderator
Posts: 6629
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Electricity, Power Lines, and Industries

Post by kamnet » 07 Jul 2013 23:53

A simple yellow or orange sign on a post would be sufficient I think.

chuggles
Engineer
Engineer
Posts: 107
Joined: 26 Sep 2012 23:19

Re: Electricity, Power Lines, and Industries

Post by chuggles » 08 Jul 2013 03:53

It's been suggested that signals could be pylons.

I like the idea of bringing electricity into the game. I enjoyed using pipe for oil, although I did find myself not bothering to transport oil/chemicals/petrol using anything but pipe after a while.

User avatar
kamnet
Moderator
Moderator
Posts: 6629
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Electricity, Power Lines, and Industries

Post by kamnet » 08 Jul 2013 04:28

Pylons/transmission towers would be way too large, and you have only a sliver of space to work with. I'd rather stick to something more recognizable as a signal.

User avatar
kamnet
Moderator
Moderator
Posts: 6629
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Electricity, Power Lines, and Industries

Post by kamnet » 08 Jul 2013 08:45

Oh, just found one very big issue: AIs can select road vehicles to transport electricity if transport by trains are disabled. Apparently Long Vehicles can automatically haul electricity. Now, this might be neat if we use the Toyland vehicles with battery sprites on the back of them, but this probably isn't a desirable outcome.

Eddi
Tycoon
Tycoon
Posts: 7387
Joined: 17 Jan 2007 00:14

Re: Electricity, Power Lines, and Industries

Post by Eddi » 09 Jul 2013 11:56

this seems to be a cargo class issue.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
skippern
Traffic Manager
Traffic Manager
Posts: 199
Joined: 30 Oct 2013 13:57

Re: Electricity, Power Lines, and Industries

Post by skippern » 29 Nov 2013 00:41

I like the concept of "energy", and IMO this should be one key for city growth (together with passenger, mail, goods, food). The modules I have played so far is either too easy to get city growth, or too damn difficult (pardon my french).

Houses should accept energy (at least those larger than "cottage")

Substations to distribute the energy, small 1x1, 1x2 or as large as 2x2

Power lines should either handle pulses (believe not supported by the game engine), but AC is really a wire leading to the house and another leading from, so a road type is more appropriate than rail type

Have fuel depot transform fuel and wood to energy (for the sake of city growth)

Power plants transform cargo input to energy, which can be fed through wires

Sprite for the energy going through the wires should be a cold blue spark
Skippern
OpenTTD Mac user

Post Reply

Return to “Graphics Development”

Who is online

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