Dummy Consumer with no lightning bolt warning

Place to get help with not working mods / modding interface.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Dummy Consumer with no lightning bolt warning

Post by Ranakastrasz »

For the mod I am currently working on, I need to be able to consume power from the energy network.
Other mods, like the Force Field Walls mod, compression chest, and others, used to use Accumulators to function. However, 12.0 altered accumulator logic, preventing them from allowing other accumulators to charge them. As a result, I need an alternate method.

Additionally, this entity needs to not show the lightning bolt warning when not connected to the power network. It is attached to the player, invisible and following them, and while it gives benefits to the player in a power field, when outside it doesn't, but that is not actually a problem that requires a warning. That, and having a flashing lightning warning is highly distracting and irritating.

I managed to get it to sort of work, by making the model a nil model (got that from Landfill) and setting the selection size to 0.0001, which seems to work intermittently. Seemingly saved games screw with it somehow.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Adil »

Roboport uses:

Code: Select all

energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      input_flow_limit = "2MW",
      buffer_capacity = "48MJ"
    }
Laser turrets have usage_priority = "primary-input" (actually, pretty much every power consumer now has "-input" attached to its usage priority.)
try something similar in your accumulator definition.

You can suppress no network warning by dragging around a tiny pole, which would only cover the accumulator.

Also, I was under impression that you can set selection size to be outright zero.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Ranakastrasz »

I am pretty sure that Electric poles on their own won't suppress the message unless its connected to a power source as well. So that plus a dummy solar panel with zero output should work.

A zero selection size works, but have a zero success rate of hiding the bolt. a almost zero value sometimes managed it.

Accumulators have the same data entry, except it also has the energy flow output.
The problem is that Accumulator type appears to work differently from other types, and I don't think I can just arbritrarally add that data entry to something without secondary characteristics I don't want.

Assembler requires recipie stuff
Wall has a ton of graphics stuff
Etc.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Adil »

You can set all the ton of graphic stuff to a dingle pixel transparent image. (in fact there's empty.png in core/graphics ready for use.)

Have you tried leaving output flow nil for you accumulators?

There's a bunch of buildings that can have inner energy buffer. (in fact my guess would be you can define it for any electric energy consumer, though I won't be able to test that anytime soon.)
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Ranakastrasz »

I would prefer not lose the warning message for all the other buildings, but I know that part would be rather easy.

I could use some other consumer, and buffer might work. You cannot add energy source to any entity that doesn't actually normally support it. Buffer might not actually work in some cases, I haven't tested it yet.

I haven't tried nil outflow. I've only set it to zero so far.
Leaving it blank gives an error, for it being missing.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Adil »

Ranakastrasz wrote:I would prefer not lose the warning message for all the other buildings, but I know that part would be rather easy.
I meant graphics for walls.

Also, I've tried adding energy buffer to inserter. It compiled but the inserter didn't get any internal storage above the natural one. Speaking of which, inserters already have energy buffer in them which is dependent on their energy_per_rotation/extension. I remember someone already using that before for scripted consumer.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Dummy Consumer with no lightning bolt warning

Post by Ranakastrasz »

Adil wrote:
Ranakastrasz wrote:I would prefer not lose the warning message for all the other buildings, but I know that part would be rather easy.
I meant graphics for walls.

Also, I've tried adding energy buffer to inserter. It compiled but the inserter didn't get any internal storage above the natural one. Speaking of which, inserters already have energy buffer in them which is dependent on their energy_per_rotation/extension. I remember someone already using that before for scripted consumer.
Really? that might work. I was concerned that it wouldn't be possible to prevent it from picking stuffz up. Also, I've never messed with inserters before...
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Post Reply

Return to “Modding help”