Personal Transformer2


Allows you to charge your power armor from the electric network, and vice versa.

Content
25 days ago
1.1 - 2.0
3.05K
Armor Power

b Massive Lag when entering multiple unconnect networks

a month ago

Once you stand in 2 or more unconnected power grids (More grids more likely for the error to occur(near 100% with 3 grids)) a memory Leak occurs and you have a split second to Retreat/take off armor/turn off transformer input/output or you freeze up

https://imgur.com/a/Yk1H4g3

a month ago
(updated a month ago)

This is rather strange behavior. Especially as the mod doesn't interact with the network directly. It just uses some dummy invisible/hidden entities (essentially an accumulator and assembly machine) to handle it. As I don't have your exact hardware specs, would you be willing to run the same test but using an assembly machine and an accumulator to see if you get the same result? Also, does the issue (in the original test) happen with your input on, output on, both or neither?

a month ago
(updated a month ago)

i just tested it with 3 powered networks so its not only unpowered grid but when there are 3 or more overlapping but unconnected grids
for some reason the first grid requests the correct amount of power 200 kw but grids 2 and 3 are requesting 500kw and my armor has 1 personal transformer 1 in it so the max should be 200kw (wait this maybe due to the legendary bug(need to retest))
ok so the legendary bug is the reason for the 500kw but it is still requesting the power from all 3 grids at the same time

also confirmed it happens to all 3 tiers of transformers
also confirmed it happens with all 4 tiers of armor (tested with 3 bats and 1 personal transformer 1)

---would you be willing to run the same test but using an assembly machine and an accumulator to see if you get the same result
no memory leak, i added a photo of the set up but 1 accumulator providing power to assembly machines on 1 grid, 2 grids, and all 3 grids. no memory leak

---Also, does the issue (in the original test) happen with your input on, output on, both or neither?
Input, Output, and Both all 3 cause memory leak
Neither on, no issue

a month ago
(updated a month ago)

increasing the tick delay from 1 to 6 only slows the rate of the leak giving me more time to react

Also occurs to vehicles

a month ago

Hey, I appreciate the thorough testing. Though I am kinda at a loss as to what's causing it. Especially since PT doesn't directly interact with power networks. It uses two hidden entities for each PT equipment to produce/consume power to/from the network. If there's a memory leak, it would mean that I'm creating things and not deleting things properly in the code. And I got rid of all of that occurring in the main on_tick loop on the 1.0 release.
At any rate, I'll see what I can come up with, though I dunno if I'll be able to quickly get a fix out as I'm starting a new job here soon.

a month ago
(updated a month ago)

FIGURED IT OUT
it has to do with the teleporting the Input/Output Entities
when i disabled the Teleport function call the issue goes away
now the issue only happens if your constantly moving while standing in 3 unconnected overlapping electric grids
seem like base game does not like energy consumers/producers teleporting around
i Dropped a merge request in github but i fixed the teleport guard case cause it would always pass causing the Input/Output Entities to teleport even when there is no differece in Position data
so now the issue will only happen when constantly moving in 3 unconnected overlapping electric grids

a month ago

Interesting. That woulda taken me a while to iron out. It's amazing what a different perspective/approach will do for you. I'll take a look at it and get a new release out when I have more time later today. Awesome job! And thanks!

New response