Page 1 of 1

[Request] Custom armor modules

Posted: Thu Jan 21, 2016 12:47 am
by Wulfson
Maybe I'm missing something, but it appears that any armor module must be a sub-type of an existing armor module, and generally includes either some side-effects or some requirements of those existing module types. I would like to be able to create a whole new module that doesn't have to inherit from one of the existing ones.

For example, my PocketRepair mod adds a new armor module that I would like to have a constant drain on armor power and a small internal capacitor. The only options I seem to have right now are to make its type either night-vision-equipment or movement-bonus-equipment. night-vision-equipment works the closest to what I'm looking for, but I'm required to add a "tint" property for this type, which makes no sense for my module. Further, even if I set the tint to all 0, it still ends up giving nightvision anyway, which I don't want. I ended up going with movement-bonus-equipment with the movement_bonus property set to 0, which ends up showing up on the tooltip, and only drains power when the player is moving (I.E., while they're standing still, the use of the module is "free").

Ideally, I think we should be able to define a custom equipment type that we can use as the "type" parameter for our prototypes. This custom type should allow us to flag which fields are required, and define the special properties for power drain/gain (Ex: drain: "while-moving", drain: "during-night", drain: "constant", gain: "during-day", etc). To make this even more flexible, it could allow us to define a script for those special properties, but I'd view that as a "nice to have" rather than a requirement.

Re: [Request] Custom armor modules

Posted: Sun May 29, 2016 2:15 am
by Ranakastrasz
I would seriously appreciate that. I had to script my power producing equipment, and it has to show "Produces 0 Power" on the tooltip.