Safety Switch;//name--------------------------------------- 1002;//identifier 0;//item class 0.000000;//weight Command: Disables/Enables Weapon Types. Each weapon has an (S) number. Press this number with the safety switch selected to disable or enable it.;//short description none;//first pick up text 0.250000;//size on map 0;//show on radar 0=does not show, 1=show on scanner, 2=show even without scanner -1;//particle to shown on radar 1;//visible in inventory 0=no (can only be used via quick keys), 1=yes qgmarble.png;//texture name -1;//wielded script,-1=nothing, only applicable for wieldable items -1;//wielded item disabling script, -1=nothing, this script is only checked for conditions while the item is wielded, if the conditions prove false, the item is unwielded 0;//show help text for conditions begin_wield_slots; end_wield_slots; begin_effects_block; Unarmed Strikes Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 1;//use key -1;//quick key begin_conditions; 0;//condition 32.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 32.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Unarmed Strikes Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 1;//use key -1;//quick key begin_conditions; 0;//condition 32.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 32.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Material Weapons Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 2;//use key -1;//quick key begin_conditions; 0;//condition 33.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 33.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Material Weapons Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 2;//use key -1;//quick key begin_conditions; 0;//condition 33.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 33.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Basic Combat Abilities Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 3;//use key -1;//quick key begin_conditions; 0;//condition 34.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 34.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Basic Combat Skills Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 3;//use key -1;//quick key begin_conditions; 0;//condition 34.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 34.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Melee Weaponry Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 4;//use key -1;//quick key begin_conditions; 0;//condition 35.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 35.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Melee Weaponry Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 4;//use key -1;//quick key begin_conditions; 0;//condition 35.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 35.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Archery Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 5;//use key -1;//quick key begin_conditions; 0;//condition 36.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 36.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Archery Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 5;//use key -1;//quick key begin_conditions; 0;//condition 36.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 36.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Pistols disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 6;//use key -1;//quick key begin_conditions; 0;//condition 37.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 37.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Pistols Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 6;//use key -1;//quick key begin_conditions; 0;//condition 37.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 37.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Energy Weapons Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 7;//use key -1;//quick key begin_conditions; 0;//condition 39.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 39.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Energy Weapons Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 7;//use key -1;//quick key begin_conditions; 0;//condition 39.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 39.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Special Weapons Disabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 8;//use key -1;//quick key begin_conditions; 0;//condition 38.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 38.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Special Weapons Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 8;//use key -1;//quick key begin_conditions; 0;//condition 38.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 38.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Grenades Disabled;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 9;//use key -1;//quick key begin_conditions; 0;//condition 40.000000;//condition parameter0 0.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 40.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; Grenades Enabled.;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 9;//use key -1;//quick key begin_conditions; 0;//condition 40.000000;//condition parameter0 1.000000;//condition parameter1 0;//condition 41.000000;//condition parameter0 0.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 40.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 16;//effect number 41.000000;//parameter1 1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 1;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 2;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 3;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 4;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 5;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 6;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 7;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 8;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; none;//event text none;//event failure text none;//sound, none for nothing 0;//vanishes after event, 0=no, 1=yes 9;//use key -1;//quick key begin_conditions; 0;//condition 41.000000;//condition parameter0 1.000000;//condition parameter1 end_conditions; begin_effects; 16;//effect number 41.000000;//parameter1 -1.000000;//parameter2 0.000000;//parameter3 0.000000;//parameter4 end_effects; end_effects_block; begin_combinations; end_combinations;
It took 18kb of text for just a single item, but here it is in all its glory, the Safety Switch. It's actually a bit bigger, since on top of this there's the nine tokens and the tenth Hold-Up token.
In action, all weapons with (S#) check for the presence of a related safety token, if it's present, then the weapon cannot be equipped.
To allow a binary toggle, a tertiary token is required, the Hold-Up token. Since effects are resolved in order on use, without the hold-up token the toggle would happen in the same item use, switching the safety on and off again. This hold-up token is then removed by a final duplicate set of item commands at the very end of the item uses, one for each toggle key, removing the hold-up and allowing further uses of the switch.
As with everything else I'm doing, people are welcome to use it for their own insanely complicated mod plans.
I also set up the flashlight. It's currently a pretty dinky light, which I'm tempted to stick with since I always found the Default light to be too bright where it was pointing. This smaller light behaves a little better.
Next up, once I've finished attaching the conditions to all the weapons, I'll be going through items.dat implementing some of the unfinished items. I'll move on to item spawning and the new maps when I get finished with some of the key entries (bows and arrows and Ether/cooking probably), and that should probably be it for version 0.2 unless anyone has any specific requests for me to get onto; as ever, let me know.
EDIT - Update: The scripting around equipment "stat" bonuses has been optimised. Now it's both impossible to abuse the system, and the actual enforcement is instant for reequipping.
Goggles and related features quick-key remapped to Night (V)ision. I'm leaning against any picking up of creatures (being carried by, sure, picking up, not so much). Instead, Turrets shall be deactivatable, converting them back into an itemised state, probably with Z. This will convert it into an item - there will be one per 25% health state - Full, 75%, 50%, 25%, and 0% (which, if reactivated, will spawn with only 1 HP). Naturally the best time to deactivate a turret is when they're on full health.
There'll be more on this line of thought when I start working on turrets and friendlies in a version or so.
|