Ammo Support for Equipment

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

Ammo Support for Equipment

Post by Schallfalke »

Hi all,

may I ask for support for ammo-consuming type of active defense equipment?
Currently, it is possible to have fuel slots for equipment burners (like vehicle fuel cells in my Schall Tank Platoon mod). I would like to have something like ammo slots for active defense equipment as well, if they are consuming ammo.

I now have "borrowed" the electricity (energy) settings to simulate the ammo counter (like what I did as gun pods in my Schall Gun Pod mod), which needs some special scripts to handle to handle ammo loading/reloading/unloading. Having ammo slots on equipment will make these a lot simpler.

Another request is to have an extra event "on_pre_player_removed_equipment", which is executed right BEFORE an equipment is removed from the grid, when the player tries to click on (remove) an existing equipment. The event will return that specific equipment in event handler, including stats like remaining shield, energy, etc.
The advantages include modders can know the name, energy, shield of the equipment being removed. So modders can interact with it, such as modifying the energy level, discard removal based on name to "lock" a certain type of equipment in place.
To me, such event will allow me able to implement the "ammo unload" feature in my mod on an automatic way as well, rather than relying on my hotkey script to handle the unload.

I would be greatly appreciated if either of the above requests will be implemented in future version API. Either of these will make my gun pods working in a better way. :D

Thanks for your attention,
Schall

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Ammo Support for Equipment

Post by bobingabout »

I didn't actually read anything you wrote, but I agree with the title.

it would be good if support was added for grid equipment to consume ammo, instead of only grid electricity.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Modding interface requests”