VAMPIRES & UNDEAD PACK

(Including spells)

By General Barron
aw_barron@hotmail.com
8/23/04

EDITORS: KEEP THIS README FOR FUTURE REFERENCE!!!


IMPORTANT! There are a couple things you must do to use these units properly--read the "quick start" instructions before using the units.

This addon adds a number of vampires and other undead (skeletons and hellhounds) to the game. They are found under "EAST / GENB Vamps" in the editor. The vampires use the BIS models; the skeletons use Wizzywig's H_W_Skinny model, and the hellhound uses teaCup's animated dog. Those addons aren't needed though.

Normally, these units rely on hand-to-hand combat to damage their enemies. However, if you give them weapons, they will use those to fight, instead of hand-to-hand. The vampires can throw cars and fireballs, and leap at their enemies, regardless of whether they have weapons or not. And all units are much tougher than regular troops, making them deadly with or without weapons.

This addon also adds in some weapons for the undead, or for those who hunt the undead. There are a few fireballs, which are like weak grenades, and there is a special weapon: Holy Water. Holy water only hurts the units in this addon (or you can add other units to be hurt by it; see the editing section for details). Mission designers can adjust how much damage holy water will do.

You can also make the player a vampire or other unit, and he will get actions to allow him throw cars, jump, etc. Members of his squad will also have these actions, and will only run after enemies alone if they are in "STEALTH" mode, to give the player maximum control over these units.

This addon also makes a number of spells available to the mission designer, some of which are extremely powerful. The mission designer has full control over what spells he gives to the player, and can adjust how long it takes to recover from casting spells, making them more or less scarce in the mission, as he sees fit.

This addon is not tested in MP, and likely WILL NOT work in MP games. Future releases may fix this problem. If anyone can help me make the code MP compatable, please let me know.


QUICK START

1) Under the "game logic->GENB Vamps" catagory, you will find a unit called a "*Initialize Undead*". Place one on the map (it doesn't matter where).

2) Make an array of units called "GENB_hunters". These units will be considered 'enemies' by the units in this addon. OR You can place some units found under "Resistance->GENB Vamps", and these units will automatically be put into this array for you.

For example, if you want the player's squad to be the hunters, put this in the player's init field:

GENB_hunters = units group this

If you want all the west units on the map to be the hunters, put down a trigger covering the whole map, make it activated by "west present", and put this in its "on activation" field:

GENB_hunters = thisList

3) Place some units from this addon (found under "East->GENB Vampires")

4) It will take about 2 seconds at the beginning of the mission for the vampires to initialize. After that, they will begin to attack any enemies in sight.



THE UNITS

Vampires--

Vampires have super-human perception abilities, making them able to easily detect units even at night. When unarmed, they will run after opponents and hit them with powerful punches. Vampires can leap through the air, quickly closing the distance between them and their opponent. They can also throw cars and other vehicles at their opponents to crush them. Check under the editing section to see how to define what vehicles they can throw. By default, they can only throw the BIS civillian cars.

As the vampire number increases, the vampire can take more damage. For example, Vampire 1 can take 5 hits from an m16 before death; Vampire 5 can take 11 hits, and so on.

Female Vampires--

Female vampires are the same as male vampires, except the following: they cannot throw cars, but instead they can throw fireballs. Vampire (Female) 1 has 1 fireball, Vampire (Female) 2 has 2 fireballs, and so on. Like male vampires, their amount of armor increases with their number, with Vampire (Female) 1 having the same amount as Vampire 1, and Vampire (Female) 5a-b having the same amount as Vampire 9a-e.

Hell Hounds--

These are flaming hounds that hurt enemies simply by touching them with their fiery hides. Their perception abilities are even better than vampires. They take about 6 hits to kill with an m16.

Skeletons--

Relatively weak undead warriors who can take about 4 hits from an m16. If they are unarmed, they can punch like vampires, but they DON'T have enhanced perception, or the ability to throw cars or jump.

Fire Skeletons--

Fire burns in the ribs of these skeletons. They can take 7 hits from an m16. They have fireballs, like a female vampire, and in addition to punching, they can burn nearby victims like a hell hound. This makes them extremely deadly in close-combat.

Vampire Hunters--

Men who, for one reason or another, have made it their purpose in life to destroy the foul undead. These units are found under the resistance side. They are basically blackops with various weapon loadouts, but nothing else really special about them (except the one with the shotgun, who has unlimited ammo). They make it easy for you to play with the units, since these units automatically are added to the GENB_hunters array, and start out with special weapons from this addon (holywater, and more to come).


PLAYING AS THE UNITS

You can play as the units too. In this case, you get actions in your action menu to throw cars or jump, if they can do so. Here are some tips:

If you get close to an enemy, you will automatically punch them. When throwing cars, they will be thrown in the direction you are facing. How far you throw the car depends on your speed when you use the action. If you are leading these units, to get your men to run up close to enemies on their own, and throw cars/jump on their own, order them into "STEALTH" mode. When playing as a hellhound, just being close to an enemy will damage him. The "Charge" action just lets you get closer to him quicker.


EDITING WITH THE UNITS

I STRONGLY recommend mission designers using this addon read this section.


GAME LOGIC "PATCHES"

Under "Logic->GENB Vamps" there are a number of game logics that you can place to easily customise your missions. Simply place one anywhere on the map, and it will do what is described below.

*Initialize Undead*--
This patch MUST be placed for the units in this addon to function properly. It initializes all the scripts used in this addon.

Weaker Undead/Weaker Undead--
These will make the undead units stronger or weaker than they are by default. How often they hit, how much damage they do, and how effective holywater is against them are all affected. Alternatively, you could set all these variables yourself, for more control. See "global variables list" below.

Player Magic (High/Medium/Low)--
These will automatically give the player the ability to cast spells. The number of each spell and the recharge time depend on which patch is chosen. Alternatively, you can personally set these things yourself. See "implementing spells" below.

Arm Vampires/Arm Skeletons--
These will automatically give ALL skeletons or vampires on the map a random weapon loadout. The loadouts are generally eastern-bloc/blackmarket style weapons (AK's, Uzi's, etc), with 4-6 magazines, and a chance of having 1 grenade, or (less likely) an RPG. There are also rarer special loadouts: machinegun, kozolice w/unlimited ammo, or hunting rifle.

Alternatively, you can manually give a unit a random loadout by putting this in his init field: this exec "\GENB_vamps\randomWeapons.sqs". If this is run on the player, he will always be given the same loadout. WARNING: To mix armed and unarmed undead in the same group, special steps must be taken. Read below for details.

Daytime Override--
The units in this addon have been given enhanced eyesight, which allows them at night to see as if they were wearing NVG's. Using these units during daylight hours (or close to them) will give these units unrealistic, super eyesight ability. To prevent this, a hint will be displayed and scripts will not be run. However, if you are sure that you want to use these units in such a situation, you can place this patch. Then the hint will not be displayed and the scripts will be run.

Armed/Unarmed Workaround--
In order for unarmed undead to run after targets to attack, their group must be in "careless" mode. However, this would obviously cause problems if you had armed units in the same group, who would also be in "careless" mode. If you place groups that have mixes of unarmed and armed (meaning they have a primary weapon) undead, you will get a warning hint, and scripts won't be run, unless you separate the units, or place this patch. NOTE: This does NOT occur when the player is in such a group.

This patch runs a scripted workaround for this problem. What happens is the unarmed undead are removed from the armed undead's group, and placed into a new group. They then follow the armed group (their old group) around via 'move' commands. The unarmed group stops following when they engage in combat, and start following again when combat is over. If everyone in the old (armed) group is killed, the unarmed group is joined back into the old group, to (hopefully) keep waypoints working properly.

IMPORTANT NOTE: This workaround may have unexpected effects on your mission, especially if you are using external scripts involving that group.

 

 


GLOBAL VARIABLES LIST

Below are all the global variables that you can set to adjust the units and weapons in this addon. If you do not adjust them, they will set themselves to their default values. To set a variable, just put this in your init.sqs: VARNAME = value

VARIABLE DEFAULT VALUE DESCRIPTION
GENB_hitChance 0.8 % chance that a punch from a vampire/skeleton will cause damage.
GENB_hitManDmg 0.2 Damage done to men from a vampire/skeleton punch. Actual damage can be up to 2x this. 0.2 = 20% of a unit's max life.
GENB_hitCarDmg 0.1 Damage from punches done to vehicles (excluding tanks).
GENB_hitArmorDmg 0.05 Damage from punches done to tanks/APCs.
GENB_fireManDmg 2 Minimum time (seconds) touching a hellhound/fire skeleton that will kill a man. Actual time can be up to 2x this.
GENB_fireCarDmg 5 Min time to destroy vehicles (excluding tanks).
GENB_fireArmorDmg 20 Min time to destroy tanks.
GENB_hwaterDmg 0.4 Damage done to undead by holywater. Actual damage can be up to 2x this. 0.4 = 40% of a unit's max life.
GENB_hwExclude See description Array of classes that will be immune to holywater. By default, all vampire 8's and female vampire 5's are in this array.
GENB_throwables See description Array of vehicle types that can be thrown by vampires. I HIGHLY suggest you overwrite this variable with only the vehicles placed in your map, to reduce lag. IMPORTANT NOTE: Only enterable vehicles can be thrown. Static objects and units cannot be thrown, even if they are defined in this array. Default value is all BIS civillian cars:
["JeepPolice","SkodaBlue","SkodaGreen","SkodaRed","Skoda","Bus","Rapid","RapidY","Trabant","Mini"]

 


IMPLEMENTING SPELLS

Giving the Player Spells to Cast--

Spells can only be given to the player. To use them, you must first assign a number of castings to each spell in your init.sqs. See the spells listing for a complete list of the variables associated with each spell. If you don't define a value for a particular variable, it will default to 0. For example, to give the player 5 castings of the shockwave spell, put this in your init.sqs:

GENB_spell_shockwave = 5

Next, put the following line in the player's init field to allow him to cast the spells:

[this] exec "\GENB_vamps\spell_caster.sqs"

Adjusting the recharge time for spells (optional)--

You can adjust the default length of time each spell recharges, by adjusting the value of the variable "GENB_spell_xtime". This variable gets multiplied by the default recharge time for all spells to get their new recharge time. It's default value is 1. For example, to make all spells take 3 times as long to recharge, put this in your init.sqs:

GENB_spell_xtime = 3

Displaying spell radius on the map (optional)--

Simply place a marker on the map called "GENB_spell", and it will automatically be placed and sized to show the player the radius he can click on for spells like Holy Strike and Fire Rain. Make sure it is a circular marker, not an icon.

 

 


MAGAZINES

Here are the magazines in this addon. They are given to units using the "unit addmagazine {type}" command.

IMPORTANT NOTE: Only the units in this addon, and the units put in the "GENB_hunters" array have the proper eventhandlers and weapons added to them to use these magazines correctly. See below to allow other units to use these.

GENB_Fireball--
These are the fireballs thrown by the female vamps and the fire skeletons. Essentially they are weak grenades.

GENB_Head--
A decapitated head, that is essentially a more powerful fireball. Great fun :).

GENB_HolyWater--
A special scripted weapon that will only hurt units in the "GENB_undead" array. It take a certain percentage of an enemies life, no matter how much armor he has. For example, it could be set to take around 50% of an enemy's maximum life, no matter if it is a weak or a strong vampire.

 




ALLOWING OTHER UNITS TO USE THESE MAGAZINES

To allow units not from this addon and not in the GENB_hunters array to use these magazines, simply put this line in their init field:

this addweapon {GENB_Vampthrow}; this addeventhandler [{fired},{_this exec {\GENB_vamps\scripts\firedEH.sqs}}]

 

 


ALLOWING HOLYWATER TO DAMAGE OTHER UNITS

Holywater will only damage units in the "GENB_undead" array. All undead units in this addon are automatically added to this array. If you wanted to make units from other addons able to be hurt by the holywater, add them to the GENB_undead array: IMPORTANT NOTE: You CANNOT do this from an init field! You must add them to the array after a 2 second delay, to allow the array to be created first.

 

 


INCLUDED ANIMATIONS

These animations are included in the addon, and can be used by the "unit switchmove {animation}" command:

GENB_SpellA--
A spell-casting animation that is performed from the standing combat position (holding a rifle).

GENB_SpellB--
A spell-casting animation that is performed from the standing civillian position (unarmed).

GENB_Slash--
A two-handed attack animation used by the vampires and skeletons in this addon.

 

 


WHAT NOT TO DO (AKA TROUBLESHOOTING)

DO NOT make these units board vehicles, or unexpected results may ensue (unless they are in the player's group).
DO NOT let the player order a hellhound to board a vehicle, because it will look really funky.
DO NOT use these units or scripts in MP, as they are untested in MP, and likely to not work properly.
DO NOT put units from this addon into the GENB_hunters array. If you do, they will attack themselves!
DO NOT expect skeletons and vampires to start running after people to hit if they start out with a weapon, and drop it later.
DO NOT join these units into the player's group after the game has started! They won't be properly initialized. You have to spawn (createUnit) them into the player's group instead.
DO NOT let the player start out in a squad of these units (not the leader), and then become the leader later (if the leader dies). The rest of the squad won't be properly initialized. Either make the player start out as the leader, or make him the lowest ranking member of the squad.

 


SPELLS LISTING

Spells are cast from your action menu. Once a spell is cast, you must wait a certain amount of time (the spell's "recharge time") before casting any other spell again. The recharge times listed below can be adjusted by the mission designer. You also have a limited number of times you can cast each spell, as indicated in your action menu. Below is a list of all the spells included in this addon, their descriptions, recharge times, and their variable names (set by editor to tell the game how many of that spell you get).

Float (GENB_spell_float)

Recharge Time: 2 sec
Range: Caster
Duration: 5 seconds

The caster will fly up into the air, then float above the ground for a while, then float softly back down to the ground. The caster will move in the same direction and speed as he was the moment he cast the spell, for the duration of the flight. You must first be on the ground to cast this spell.

Teleport (GENB_spell_teleport)

Recharge Time: 20 sec
Range: 75-150 meters
Duration: N/A

The caster will teleport the above range, in the direction he is facing when the spell is cast.

Armor (GENB_spell_armor)

Recharge Time: 2 min
Range: Caster
Duration: 10-15 seconds

Makes the caster become nearly invulnerable to bullets/grenades/etc for the duration of the spell.

Shockwave (GENB_spell_shockwave)

Recharge Time: 10 sec
Range: 150-200 meters
Duration: N/A

Creates an explosive shockwave, about 15 meters wide, that travels in the direction the caster is facing. Sure death to all men in its path, but not very damaging to armored vehicles.

Slow (GENB_spell_slow)

Recharge Time: 15 sec
Range: Caster
Duration: 15 sec

Slows down time around the caster, allowing him more time to react to events, take quicker aim, etc.

Heal (GENB_spell_heal)

Recharge Time: 25 sec
Range: Caster
Duration: N/A

Heals all wounds the caster has suffered.

Magic Missle (GENB_spell_missle)

Recharge Time: 30 sec
Range: By weapon
Duration: 30 sec

After casting this, the next shot the caster shoots will become a powerful, fiery ball of magic energy; able to destroy all but the most powerful tanks in one shot. The magic missle travels at 1/4th the speed of the original projectile. If the caster doesn't shoot before 30 seconds, the spell will end. IMPORTANT NOTE: Due to an OFP bug, this spell will NOT work in the editor if you press "retry". You must abort the mission and start it again, or the spell will not work. This only happens in the editor.

Fire Rain (GENB_spell_rain)

Recharge Time: 45 sec
Range: 500 meters
Duration: 13-18 sec

This spell is targeted by clicking on the map. At the targeted location, numerous explosive beams will spawn from a rift above the ground, ravaging about a 50 meter radius on the ground below. This spell is deadly to the men in the impact area, but not as powerful against armored vehicles.

Holy Strike (GENB_spell_meteor)

Recharge Time: 5 min
Range: 1000 meters
Duration: 35-45 sec

This spell is also targeted by clicking on the map. At the targeted location, a fiery storm will erupt hundreds of meters in the air. Huge, powerful meteors will fall from the sky, exploding from the impact as they hit the ground below. This spell completely devastates about a 125 meter radius around the target, killing nearly every man in the area, and damaging or destroying heavily armored vehicles.


THE LAST WORD

Have fun with the units, and please email me if you make a good mission using them. I'd love to try it. Also, if you want to see how the units work, feel free to de-pbo the addon, and look in its "scripts" folder. You're welcome to take the scripts in there and use them for your own needs, but keep in mind, they reference sounds and animations included in this addon. Happy editing!

-General Barron