Question about GT lightning rod

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Shakie666

New Member
Jul 29, 2019
768
0
0
It says on the wiki the chance of the rod being struck by lightning depends on the height of the rod. Does this mean it depends on the height of the top of the rod, or simply the length of the rod. In other words, should I build this on top of a mountain or at bedrock level?
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Then put iron fencing on top, reaching as high as possible.

Keep in mind this will output large, very short bursts of EU. Its not mean't to be a full time power source, more like a backup or boost.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
In case anyone else reads this thread and decides to not read the first post fully: Shakie666 is asking if lightning rods are more efficient if they have more iron bars connected to them, or if they are higher in elevation.

The difference being that the most efficient designs would be building your lightning rod at the highest possible point with a single iron bars, versus building your lightning rod at the lowest possible point with as much iron bars you can put on it.

I do not have an answer, but my assumption would be that it will likely be related to the amount of iron bars used as it'd be fairly easy to just tack the system up at the max. height, and run a line of cables down using transformers to keep from losing energy.
 

MrZwij

New Member
Jul 29, 2019
452
0
0
I've seen this done with a cage of iron fences at the top. Does that make any difference?
 

MilConDoin

New Member
Jul 29, 2019
1,204
0
0
According to the code:
Block at bedrock, uninterrupted line of iron fences to the height limit gives max benefit.
Above the block only on uninterrupted line of iron fences is allowed. Above that line there may only be air. Any block above that (this includes other iron fences after a break) will completely nullify the chance for energy.
If you want energy in rain, the tip of the iron rods must be above height 127, below that only thunderstorms work.
Thunderstorms are ten times as efficient as rain.
 
  • Like
Reactions: Guswut and MrZwij

KirinDave

New Member
Jul 29, 2019
3,086
0
0
To answer the question in English, it appears that what matters is the length of the lightning rod, meaning how many fenceposts are above it. In total the height of the rod and it's height from the ground need to be > 128 squares in order for any lightning to strike.

Oh and also it would appear that the tickupdate is linear on the size of this lightning rod and its y coordinate, making it a damn lagbeast on slower servers. So, with that in mind, build your lightning rods both high up and long. Maybe a length of 50 well above the 128 mark. Don't start at bedrock with many of these or you will murder your server as each one iterates up the entire lightning rod assembly each time, and unless Greg's optimized it since it does a LOT of useless math.

Code rant:
FFS Greg, who the fuck modulos on a power of two on something in an event loop? Grow a brain cell or three. And I like how instead of forgoing the expensive entropy pulls, he blindly does the comparison even if he's explicitly disabled it rather than using an if statement.

I sort of got the impression Greg was a spud when it came to coding, but this is really really bad.
 
  • Like
Reactions: Lambert2191

KirinDave

New Member
Jul 29, 2019
3,086
0
0
If you want energy in rain, the tip of the iron rods must be above height 127, below that only thunderstorms work.
Thunderstorms are ten times as efficient as rain.

To be even more precise, the code checks for a lightning event every 12.8 seconds (every 256 ticks, 20 ticks a second). In thunderstorms, there is a 100% chance of the lightning test. In rain, there is a 1/10 chance of the event firing. The actual event probability is (length^2+length*height)/1088576.

I wonder how this interacts with flux from Thaumcraft...
 

MilConDoin

New Member
Jul 29, 2019
1,204
0
0
Disclaimer: I haven't played around with TC3.
Does flux produce a vanilla minecraft thunderstorm? Does it just produce lightining effects (like mystcrafts symbol, or some bees)? If the former: it works.
Forestry rainmaker comes to mind...
 

noskk

New Member
Jul 29, 2019
599
0
0
You still need to start from bedrock+1 to 256 for maximum chance, and I believe that's 1048576 ..

Although going up a few blocks to ground won't change much of the chance..
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
You still need to start from bedrock+1 to 256 for maximum chance, and I believe that's 1048576 (4096*256)..
You're right, it's a typo.

Although I think that you can't actually build there so it's a bit less than that.

But be really careful doing that. You will get tick spikes on your world if you do that. It literally iterates to the sky with no caching for each lightning rod if it's that long, which is super expensive in the timeframe tick updates should fire. Having multiples will ruin slower servers.
 

Xakthos

New Member
Jul 29, 2019
81
0
0
To be even more precise, the code checks for a lightning event every 12.8 seconds (every 256 ticks, 20 ticks a second). In thunderstorms, there is a 100% chance of the lightning test. In rain, there is a 1/10 chance of the event firing. The actual event probability is (length^2+length*height)/1088576.

I wonder how this interacts with flux from Thaumcraft...

To be honest most mods could set a professional coder (or even those of us who are formally trained in coding but do other IT stuff) on edge. It is a hobbist sport, can't hold it to same standards. Street basketball compared to NBA. Least that is what I keep telling myself as I read through the code to figure out why something isn't working way I expect.
 

KirinDave

New Member
Jul 29, 2019
3,086
0
0
It is a hobbist sport, can't hold it to same standards. Street basketball compared to NBA. Least that is what I keep telling myself as I read through the code to figure out why something isn't working way I expect.

I think asking programmers to know not to modulo a power of two is not an unfairly high standard. :\ Don't do that. Also it's pretty well known even to someone who has never written a mod that you should not iterate to the sky in your tick updates.