Modding and mapping are two sides to the same coin, particularly if the thread on executable code in maps had a true premise.
From what I've done on modding, typically, giving a non-Protoss unit shields would involve setting some sort of "enabler" box in an external data editor and specifying a value. This would loaded on map start from an overridden MPQ.
Last I remember, in the context of run-time, setting a unit's shielding would require a plugin with code specified to do so. When the code runs on a unit that does not have shields enabled (by any MPQ, vanilla or custom), the outcome is not as if the unit's shields are enabled and active.
Here is some of my speculation as to why the outcome as not as desired:
1) Shields must first be enabled. This is consistent given that if you /do/ give a unit some positive integer N for its shield cap, and the shield option is enabled, the shields will be properly set.
2) There is some sort of bounds checking code constantly running for resources that increment over time (e.g. HP in units that regenerate HP, energy, shields). As the unit does not have a legitimate shield cap, either on the same frame that the shield value is set by the plugin or the next frame, the shields disappear because the cap is set to 0 or the shield option is disabled.
3) Both of the above apply. When the shielding option is disabled, the cap for shielding is assumed to be zero. The option itself has no particular effect other than permitting the shield cap to be positive when enabled. Consistent given that the shield cap field has no effect in data editors. Consistent given that bounds-checking code would set any positive shielding back to zero.
I'll let you know if I found out any more.
EDIT:
Some more food for thought: enabling shields but providing a 0 as the shield cap will still cause the GUI to show the "0/0" shielding. IIRC bounds checking code does apply, so whenever the shield is above zero, it will be reset to the cap. For now, I'm done being useful.
Post has been edited 1 time(s), last time on Sep 3 2014, 4:09 pm by Sand Wraith.