News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[PATCH] Powerline Tunnels

Started by kierongreen, September 04, 2008, 01:56:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kierongreen

Note - newer patch version available - see below.


Consider this an alpha patch (i.e. not ready for incorporating into the trunk yet) - there are numerous issues!
-Deleting powerlines underground doesn't remove the tunnel they are contained in.
-Powerline images on the tunnel entrance can get added if tunnel nearby is altered (should never be shown)
-I've managed to get crashes occurring with deleting and recreating tunnels in underground mode.
-No doubt many more I haven't noticed

Code is probably horribly messy too as usual.

Also to consider - should there be a way of supplying power to factories from underground (maybe by building transformer underneath factory?).

You'll need to add an entry like this to pak/config/menuconf.tab):
#specialtools
...
toolbar[8][7]=tunnels(128)
...
(renumbering the other menu entries following)

Comments, suggestions, improvements welcome....

IgorEliezer

#1
Ah, interesting. It will be very useful for megalopolises where you want to supply energy to "in-city" factories.

It'd be interesting too if I could see a screen in underground view. 8) Sorry for my curiosity. ::)

kierongreen

Quote from: IgorTekton on September 04, 2008, 02:55:47 AM
Ah, interesting. It will be very useful for megalopolises where you want to supply energy to "in-city" factories.
That's the idea...

Quote from: IgorTekton on September 04, 2008, 02:55:47 AMIt'd be interesting too if I could see a screen in underground view. 8) Sorry for my curiosity. ::)
Here's one - though it's nothing to write home about...

wipi35

I wonder if there is a place anywhere in the world where underground powerlines exist. Never heard of it.
Of course there are electric cables, underground and on the bottom of the sea, but that's a different item.

kierongreen

Quote from: wipi35 on September 04, 2008, 09:18:10 AM
I wonder if there is a place anywhere in the world where underground powerlines exist. Never heard of it.
Of course there are electric cables, underground and on the bottom of the sea, but that's a different item.
The current limitations of the simutrans code mean that way images below ground are the same as those above ground. Just think of them as cables despite looking like powerlines...

sojo

Can wayobjects build over powerlines?

If yes. You can paint an wayobject and build it over the powerlines.
"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

wipi35

Quote from: kierongreen on September 04, 2008, 09:26:59 AM
Just think of them as cables despite looking like powerlines...

I'll remember when I'm going to use them.  ;)

whoami

Quote from: wipi35 on September 04, 2008, 09:18:10 AM
I wonder if there is a place anywhere in the world where underground powerlines exist.
They exist in big cities, where there is no space for them overground. For example, I saw a documentary about some in Berlin, where they reconnect the two halves of the city after its re-unification - their conductive core is made out of plastics(!), not metal.

wipi35

Quote from: whoami on September 04, 2008, 11:37:45 AM
They exist in big cities, where there is no space for them overground. For example, I saw a documentary about some in Berlin, where they reconnect the two halves of the city after its re-unification
I think they mentioned cables, not High Voltage lines.
Quote from: whoami on September 04, 2008, 11:37:45 AM
their conductive core is made out of plastics(!), not metal.
Find it hard to believe,  conductive plastic exists but AFAIK the conductivity is abt 800 times lower than copper, so not applicable for high power applications.

Ashley

This is a very useful addition, since powerlines take up an entire tile supplying in-city industries is a somewhat destructive task. I'd definitely vote for having underground transformers, or being able to build a transformer above ground on top of an underground powerline.

Shame that pipelines never made it into the game, imagine the underground view filled with pipes, cables and underground railways...
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

whoami

Quote from: wipi35 on September 04, 2008, 12:24:49 PM
Find it hard to believe, conductive plastic exists but AFAIK the conductivity is abt 800 times lower than copper, so not applicable for high power applications.
Maybe I misremember, or the journalists got something wrong.

prissi

#11
When included, the transformer must be overground, imho. Because otherwise there would be no indication that power is supplied and letters will appear without apparent reason. YOu might built it into a slope though, to have a tunnel exit.

In reality (apart from wealthy central Europe) most high power lines are aboveground with or without house below them.

kierongreen

With regards transformers:
I've considered overground transformers - however additional logic with coding this means more headaches (namely that power networks would be linked to other networks on the same tile=more logic).
Underground transformers have the disadvantage (as pointed out by prissi) that they don't show if an industries powered or not. Additionally it might not be immediately obvious in underground view whether a tile is underneath a factory.

For the moment I'm going to concentrate on stabilising the core functionality before considering adding transformers - just thought I'd see what peoples opinion was so that if/when I add them I don't end up wasting time coding behaviour that's not wanted...


In the UK most powerlines in cities, towns and even villages are underground. You have to go out into the countryside before you see powerlines normally. Yes exceptions exist for high powerlines - but these would only directly supply large power intensive industries (e.g. steel mill, aluminium smelter) - petrol stations and chemists (naming two examples of in-town industries) are supplied underground.
That said underground powerlines will be expensive so use should be confined to when it is really necessary...

isidoro

I like the idea very much.  One question, though: can these underground power lines cross underground ways at the same level?

kierongreen

Currently underground power lines can cross underground ways in the same way as on the surface (or did when I last checked) - this will most likely be disabled...

New patch version - all known issues solved (though I hadn't actually checked about ways crossing powerlines underground, there may be bugs here regarding deletion...).

robofish

Quote from: kierongreen on September 05, 2008, 11:33:29 PM
Currently underground power lines can cross underground ways in the same way as on the surface (or did when I last checked) - this will most likely be disabled...
Why should it be disabled? As powerlines aren't that big i think reserving an underground layer just for them is a bit unnecessary. Also it might be cunfusing for new users.

kierongreen

Well surface powerlines reserve a height level (you can't build them under bridges) so why shouldn't powerline tunnels reserve a height level also?

Václav

Powerlines in underground? May it be way for electrification of places what are places after water - but more useful patch could for building powerlines across any wide water areas.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

IgorEliezer

Quote from: wipi35 on September 04, 2008, 09:18:10 AM
I wonder if there is a place anywhere in the world where underground powerlines exist. Never heard of it.

Using towers? It is impossible. But powerlines using underground ducts, yes.

kierongreen

Quote from: VaclavMacurek on September 09, 2008, 11:05:24 AM
Powerlines in underground? May it be way for electrification of places what are places after water - but more useful patch could for building powerlines across any wide water areas.
There have been powerline bridges for a while now. Though they might not be in pak128 yet - I haven't really looked...

IgorEliezer

#20
A suggestion:

I thought of a special graphic for Powerline Tunnels. More precisely, powerline ducts. It wouldn't make any sense seeing towers in underground view.

I found a tunnel for electric cables in a construction site of underground train (metro) in São Paulo City/Brazil.





http://www.metro.sp.gov.br/ingles/index.asp

vilvoh

Have I heard the word graphics?? ....:D....Now, talking seriously, it seems easy to paint. Some basic forms based on cubes. You even could do it transparent, so you can show the inside, that would consist of a bunch of wires. If you want to, I could try to paint something

Escala Real...a blog about Simutrans in Spanish...

Ashley

I think the problem at the moment is that the game doesn't support different graphics for underground ways verses above ground ones, would be a nice change if it did however (especially for tunnels in underground mode for road/rail etc.)

You could probably do it as a way-object, but masking the pylons would be an ugly hack to achieve this effect...
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

prissi

By the way, is this patch now considered ready for intergration?

IgorEliezer

Quote from: Timothy on September 19, 2008, 01:48:37 PM
I think the problem at the moment is that the game doesn't support different graphics for underground ways verses above ground ones

Please, don't stone me.  :o

What about a flag Underground=1 in dat file?

Ashley

Well given that you build underground ways using the tunnel icon, it might be better to just give tunnels a full set of way graphics of their own which hopefully could include a frontimage. That way tunnel graphics could be applied appropriately. It'd be very nice graphically to be able to have a different graphic for tunnel portals underground too, as well as a way to configure whether the default underground ground tiles were shown or not, to prevent having to mask them with the underground way image.

But that's just what I dream for :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

VS

Seconded - full set of level graphics (tunnels don't have slopes) would be great!

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

kierongreen

QuoteSeconded - full set of level graphics (tunnels don't have slopes) would be great!
I wouldn't assume that tunnels will never have slopes.....

QuoteBy the way, is this patch now considered ready for intergration?
The second version is stable (I haven't managed to crash it anyway). The main thing I got stuck on was the behaviour when powerlines crossed ways underground and when these were deleted. But that can be solved later.

QuoteWell given that you build underground ways using the tunnel icon, it might be better to just give tunnels a full set of way graphics of their own which hopefully could include a frontimage.
Seconded, the current system was basically a quick way of getting tunnels in without having to draw additional graphics.

IgorEliezer

#28
If there's no graphic for powerline tunnel... I found pipelines graphics.

I think some changes will make it perfect for powerline tunnel.


DirrrtyDirk

Quote from: kierongreen on September 19, 2008, 10:47:16 PM
I wouldn't assume that tunnels will never have slopes.....

That little teaser went almost unnoticed... or are you serious?
  
***** PAK128 Dev Team - semi-retired*****

kierongreen

Quote from: DirrrtyDirk on September 29, 2008, 05:08:03 PM
That little teaser went almost unnoticed... or are you serious?
Serious. Work in progress.

DirrrtyDirk

Oh wow - now you got me drooling on my keyboard.  ;D
  
***** PAK128 Dev Team - semi-retired*****

VS

Oh, wow.

I'd still like to remind everyone of the Locomotion rollercoaster-like hell with bridges, let's make sure Simutrans doesn't degenerate into that, too. Doesn't matter if it's under or overground...

On the other hand, it seems fair to let the users to decide how they want to play the game. I can remember thinking slopes "unfair" :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

Does by accident someone downloaded this patch with the matching graphcis?

IgorEliezer

BTW, the attachments are available at the 1st post, IF the patch had not been recovered.