[MOD 0.14.2] Wireless Charging

Topics and discussion about specific mods
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Optera »

mknejp wrote:
Optera wrote:I traced the bug down to me running a modified version of wireless_charging under different namespace when placing those stations. :oops:
What did you modify? Maybe it could be part of the main mod.
I tried to get stations and coils working with players power armor too.
apart from that I only tweaked some things around:
- changed lo-power-induction-coil and hi-power-induction-coil to 2x2 grid size
- lo-power-induction-rail uses lo-power-induction-coil instead of lo-power-induction-station
- removed the tier 2 modules from hi-power-induction-coil
- removed substation from hi-power-induction-station and hi-power-induction-rail

Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Ratzap »

mknejp wrote:But it starts with 0.3.2?
Yes, it did. We haven't even built any electric vehicles, we're just getting teched up.

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

Ratzap wrote:
mknejp wrote:But it starts with 0.3.2?
Yes, it did. We haven't even built any electric vehicles, we're just getting teched up.
Oh man I just noticed that's an electric-vehicles-lib error. I was looking in the wrong mod the whole time ripping my hair out because of an impossible error. Fixed in EV 0.3.3

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

Optera wrote:I tried to get stations and coils working with players power armor too.
apart from that I only tweaked some things around:
- changed lo-power-induction-coil and hi-power-induction-coil to 2x2 grid size
- lo-power-induction-rail uses lo-power-induction-coil instead of lo-power-induction-station
- removed the tier 2 modules from hi-power-induction-coil
- removed substation from hi-power-induction-station and hi-power-induction-rail
Some of those are now part of the mod.

Have you managed to get your save working again?

Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Ratzap »

mknejp wrote:
Ratzap wrote:
mknejp wrote:But it starts with 0.3.2?
Yes, it did. We haven't even built any electric vehicles, we're just getting teched up.
Oh man I just noticed that's an electric-vehicles-lib error. I was looking in the wrong mod the whole time ripping my hair out because of an impossible error. Fixed in EV 0.3.3
Sorry if this was the wrong place to post. The sever has started up ok now and I'm logged in.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Optera »

mknejp wrote:
Optera wrote:I tried to get stations and coils working with players power armor too.
apart from that I only tweaked some things around:
- changed lo-power-induction-coil and hi-power-induction-coil to 2x2 grid size
- lo-power-induction-rail uses lo-power-induction-coil instead of lo-power-induction-station
- removed the tier 2 modules from hi-power-induction-coil
- removed substation from hi-power-induction-station and hi-power-induction-rail
Some of those are now part of the mod.

Have you managed to get your save working again?
In the most crude way possible.
- I made sure no train is on top of the broken rails
- saved & restarted without wireless charging
- saved and restarted again with the mod
I had to research and build all up again but now it works.
Overall it probably was cleaner and quicker than trying to merge the data from an older save into the broken save.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Optera »

Wireless Charging lib uses ~0.8 UPS per charging wagon/locomotive which sums up pretty fast to unplayable UPS in large rail networks.
My first guess is the many for loops and two calls to find entities are responsible. Can't you simplify the whole process by rotating the BoundingBox according to entity.direction?

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

Optera wrote:Wireless Charging lib uses ~0.8 UPS per charging wagon/locomotive which sums up pretty fast to unplayable UPS in large rail networks.
My first guess is the many for loops and two calls to find entities are responsible. Can't you simplify the whole process by rotating the BoundingBox according to entity.direction?
Trains only do a charging station search the moment they stop, not every frame. Once they're charging there is no searching involved. This is contrast to cars and players for which there is no stopped/moving event. Trains also don't have a useful direction property as it always returns 0. They do however have a 360 orientation property and it's on my list to make use of it. For more info see viewtopic.php?f=34&t=31799

I do have ideas on how to flatten a few data structures and reduce the number of indirections but it's not based on guesses but rather measurements.

torsteinr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 05, 2016 6:46 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by torsteinr »

Is this supposed to work?
http://imgur.com/6hgqSve

I just upgraded power, so don't know why it's blinking red.

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

torsteinr wrote:Is this supposed to work?
http://imgur.com/6hgqSve

I just upgraded power, so don't know why it's blinking red.
I also don't know why it's blinking red. It's a condition I am still unable to reproduce. No setup I ever try on my game does that if the grid has electricity.

However I can tell you that charging your two MK2 batteries with a low power coil will take 400 seconds, about 6 minutes 30 seconds total so don't expect that battery indicator to go up quickly.

torsteinr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 05, 2016 6:46 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by torsteinr »

mknejp wrote: However I can tell you that charging your two MK2 batteries with a low power coil will take 400 seconds, about 6 minutes 30 seconds total so don't expect that battery indicator to go up quickly.
That's dissapointing. The high power coils are too expensive for me now. I'm not making modules yet. When i get to that stage i probably have enough for mk2 power armor and fusion core, which seems superior. I really like the idea of this mod. But i have to agree with other posters that the balance is a bit off.

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

torsteinr wrote:That's dissapointing. The high power coils are too expensive for me now. I'm not making modules yet. When i get to that stage i probably have enough for mk2 power armor and fusion core, which seems superior. I really like the idea of this mod. But i have to agree with other posters that the balance is a bit off.
Then make a suggestion. It is easy to point out something's broken but if you can't provide an alternative it's kind of pointless. What is balanced?

I know I can't please everybody and everybody has a different opinion on what is "balanced" but the impression I get from most posters here is they want an instant-charge solution so they don't have to care about powering equipment at all ever again. I have yet to see a proposal that doesn't reduce charging to a triviality. I partly blame the existence of fusion reactors. They are *too* convenient and a terrible decision from a game design point of view but unfortunately they exist and as I described earlier it is impossible to compete with portable fusion reactors in their current form.

torsteinr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 05, 2016 6:46 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by torsteinr »

You are probably right. I wanted a convenient way to charge my armor before fusion core (since solar panels suck). A quick read through the description made me think this mod would be the solution. I then naively set up a modular armor setup i felt was reasonable, and when it didn't work as expected i was a bit dissapointed and cried imbalance.

I don't have full insight in your mod, I have just tried the low power coils. I also haven't done any math on battery capasity. It's hard to make good suggestions without full knowledge. But i can try to explain my expectation.

As i said earlier i wanted a way to charge up some batteries in my modular armor, plug in some combination of shields/legs/roboports (max 3 shields, 3 robos, or 1 shield/robo + 1 leg). And then run around for at least 20-30 mins before having to go back to charge again. And since i like to have fun i wanted the charging to be reasonably quick (max 20 sec).
Maybe i can achieve this by using regular batteries instead of mkII, and they would charge quick enough? dunno, I havent done the math on how long the batteries would last. But i feel 1 sec of charging should equal 1 min of usage (ofc this is dependant of usage, but in my low-tech case the usage is pretty small).


The disadvantages of charging are many:
I have to build charging stations.
I have to worry about battry capacity, and need to come back to a charging station once in a while.
I have to have enough power buildt in my factory to charge a suit (that would normally be "free" because of fusion core).
I appearantly have to idle on the charging station for a long time.

The three first ones I'm okay with.

The advantages of charging should be (and is to a certain degree, depending on batteries) space-efficiency. The fusion core is big. In my modular armor i can't fit a fusion core. Big advantage to charging.

For me to want use this mod the advantage/disadvantage have to be close. Charging have to feel like a reasonable alternative.


Edit: Some naive suggestions:
Increase charge rate, to reduce the fourth disadvantage. Ofc still costing real power. I wouldn't mind getting a blackout if i use this functionality in a dumb way.
Decrease size of the coil to 2x1, to increase the space-efficiency advantage of charging.
For lategame add a battery mkIII to keep up with increasing power usage without losing the space-efficiency advantage. Decreases the second disadvantage late game.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Earendel »

I think this mod would be much better if it was paired with a mod that makes fusion a lot more complicated and expensive. Are there any mods that do that?

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

torsteinr wrote:You are probably right. I wanted a convenient way to charge my armor before fusion core (since solar panels suck). A quick read through the description made me think this mod would be the solution. I then naively set up a modular armor setup i felt was reasonable, and when it didn't work as expected i was a bit dissapointed and cried imbalance.

I don't have full insight in your mod, I have just tried the low power coils. I also haven't done any math on battery capasity. It's hard to make good suggestions without full knowledge. But i can try to explain my expectation.

As i said earlier i wanted a way to charge up some batteries in my modular armor, plug in some combination of shields/legs/roboports (max 3 shields, 3 robos, or 1 shield/robo + 1 leg). And then run around for at least 20-30 mins before having to go back to charge again. And since i like to have fun i wanted the charging to be reasonably quick (max 20 sec).
Maybe i can achieve this by using regular batteries instead of mkII, and they would charge quick enough? dunno, I havent done the math on how long the batteries would last. But i feel 1 sec of charging should equal 1 min of usage (ofc this is dependant of usage, but in my low-tech case the usage is pretty small).


The disadvantages of charging are many:
I have to build charging stations.
I have to worry about battry capacity, and need to come back to a charging station once in a while.
I have to have enough power buildt in my factory to charge a suit (that would normally be "free" because of fusion core).
I appearantly have to idle on the charging station for a long time.

The three first ones I'm okay with.

The advantages of charging should be (and is to a certain degree, depending on batteries) space-efficiency. The fusion core is big. In my modular armor i can't fit a fusion core. Big advantage to charging.

For me to want use this mod the advantage/disadvantage have to be close. Charging have to feel like a reasonable alternative.


Edit: Some naive suggestions:
Increase charge rate, to reduce the fourth disadvantage. Ofc still costing real power. I wouldn't mind getting a blackout if i use this functionality in a dumb way.
Decrease size of the coil to 2x1, to increase the space-efficiency advantage of charging.
For lategame add a battery mkIII to keep up with increasing power usage without losing the space-efficiency advantage. Decreases the second disadvantage late game.
I mean I could just ditch the low power coils and make everyone use the 20 MW ones (and make them cheaper of course), but then people come complaining that charging is too power hungry and blacks out their factory.

Just to give you a perspective: If you wanted to charge your 200 MJ of batteries in your armor using a high power coil fed from accumulators to make sure your factory doesn't black out you'd need to have 40 fully charged accumulators ready when stepping on the platform, but on the bright side it would only take 10s. Actually, no it wouldn't because accumulators can only empty at 300 kW so those 40 accumulators can only empty at a total rate of 12 MW. You trade speed versus space. It actually takes 67 accumulators to supply a single high power charging station/rail. Hmm that makes me think maybe I should take that as a point of reference. But I feel like double-digit quantities of accumulators is not something the average factory is concerned with at the modular armor stage.

But the ultimate question remains: one charging tier or multiple and how powerful should each be? The current values are 500 kW and 20 MW. This is the single most important number for balancing, adjusting the recipes is far less controversial.

Anyway the power density of equipment is incredible and it feels like it is not balanced against being coupled to the stationary power grid. You would imagine that a hundred steam engines can create enough power to run a few servos or electronics in your armor, but...
Last edited by mknejp on Tue Sep 27, 2016 6:35 pm, edited 2 times in total.

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

Earendel wrote:I think this mod would be much better if it was paired with a mod that makes fusion a lot more complicated and expensive. Are there any mods that do that?
Agreed, but who would voluntarily use such a mod? :)

torsteinr
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jul 05, 2016 6:46 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by torsteinr »

mknejp wrote: Anyway the power density of equipment is incredible and it feels like it is not balanced against being coupled to the stationary power grid. You would imagine that a hundred steam engines can create enough power to run a few servos or electronics in your armor, but...
I think you are onto something here. That my two batteries can store as much enery as 40 accumulators is a bit absurd. Also that the content of my example armor (1 leg + 1 shield) use more energy than a refinery seems strange. These two seperate power networks are imbalanced in the base game, and your mod is making the existing imbalance obvious.

A solution could be to do a conversion when charging. Draw some amount of power from the powergrid, and charge the suit with a bigger amount. Perhaps 10 times as much, it seems a lot, but... I looked up some earlier versions of equipment on the wiki, and it seems the power consumption has been multiplied by 10 since the wiki was created https://wiki.factorio.com/index.php?tit ... _equipment 20kw vs 200kw on the legs. https://wiki.factorio.com/index.php?tit ... on_reactor 75kw vs 750kw on the fusion core.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2919
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Optera »

torsteinr wrote: A solution could be to do a conversion when charging. Draw some amount of power from the powergrid, and charge the suit with a bigger amount. Perhaps 10 times as much, it seems a lot, but... I looked up some earlier versions of equipment on the wiki, and it seems the power consumption has been multiplied by 10 since the wiki was created https://wiki.factorio.com/index.php?tit ... _equipment 20kw vs 200kw on the legs. https://wiki.factorio.com/index.php?tit ... on_reactor 75kw vs 750kw on the fusion core.
Seems like a hack to work around the real issue.
A power rebalance mod, reducing all grid power levels by 10 or more (including the fusion reactor) would be better.

User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 358
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by Philip017 »

hello, im trying to use your latest version 3.3 and put it in my power armor and it does nothing? bug maybe?

i tried the LP in my train and was like ??? what why isnt it charging, but 500kw of power is just too little, switching the HP version helped, but it might as well be a 4x4 as it will eat what a fusion reactor will in space.

suggest that the LP version at least be 5MW, then you can use 4 of them to get the equivalent of the HP version.

i have plenty of power >600 accumulators and > 20MW solar but i still know when my train comes in, it will suck down some power - but only for a bit

mknejp
Fast Inserter
Fast Inserter
Posts: 154
Joined: Wed Apr 27, 2016 8:29 pm
Contact:

Re: [MOD 0.14.2] Wireless Charging

Post by mknejp »

Philip017 wrote:hello, im trying to use your latest version 3.3 and put it in my power armor and it does nothing? bug maybe?
You have to wear the armor and be standing on a charging station/rail.
Philip017 wrote:i tried the LP in my train and was like ??? what why isnt it charging, but 500kw of power is just too little, switching the HP version helped, but it might as well be a 4x4 as it will eat what a fusion reactor will in space.

suggest that the LP version at least be 5MW, then you can use 4 of them to get the equivalent of the HP version.
You can't use 4 because that would require the vehicle to have 4 charging stations in very close proximity for which none of the builtin vehicles are big enough.

Post Reply

Return to “Mods”