New cards for the SlotMachine roulette: your own monster, message and picture
The SlotMachine roulette mutator (MutSlotMachine with the SlotsAddOn add-on) hands players random "cards", including monster cards. On the killingfloor.ru forum Flame showed how to add your own card to the roulette, using the sheriff Patriarch from the 2011 Halloween event as the example. You need to know how to compile packages.
A separate SlotsAddOn2 package
MutSlotMachine and SlotsAddOn keep textures and other resources inside their .u packages, so Flame put the new cards into a separate SlotsAddOn2 package: create a SlotsAddOn2 folder with a Classes folder inside and put the new files there.
The monster
Take the boss code from the patch with the previous year's event or from the Event Zeds mutator (Flame left only the .u packages and the Halloween 2011 resources in it; everything else is in the base game files). You need four files, the Patriarch and his severed limbs:
ZombieBoss_HALLOWEEN.uc
SeveredArmPatriarch_HALLOWEEN.uc
SeveredHeadPatriarch_HALLOWEEN.uc
SeveredLegPatriarch_HALLOWEEN.uc
In ZombieBoss_HALLOWEEN, change the limb references to point to the new package, for example:
DetachedArmClass=Class'SlotsAddOn2.SeveredArmPatriarch_HALLOWEEN'
and the same for SeveredHeadPatriarch_HALLOWEEN and SeveredLegPatriarch_HALLOWEEN.
The card
Modelled on the other monsters' cards:
Class HalloweenPatCard extends MonsterSpawnCard;
defaultproperties
{
SpawnMessage=Class'SlotsAddOn2.HalloweenPatMessage'
MonsterClass=Class'SlotsAddOn2.ZombieBoss_HALLOWEEN'
NumMonsters=1
Desireability=0.500000
CardMaterial=Texture'SlotsAddOn2_T.I_HalloweenPat'
}
| Parameter | Meaning |
|---|---|
SpawnMessage | the class holding the message shown when the monster appears |
MonsterClass | the monster class |
NumMonsters | number of monsters |
Desireability | the card's "weight": the mutator adds up all card weights and divides this card's weight by the total, which gives its drop probability |
CardMaterial | the card texture |
The message
Also modelled on the other monsters:
class HalloweenPatMessage extends ToxicMessage;
defaultproperties
{
Message="New sheriff in town! Hide!"
DrawColor=(B=50,G=50,R=255)
}
The card picture
Flame opened the Patriarch mesh in KFEd, cut out a portrait, touched it up in an image editor and resized it to 128x128. Then in KFEd: the textures tab → import the tga file into the SlotsAddOn2_T.utx package, set bAlphaTexture to true for transparency, and save. You can convert the picture to DXT3, for example, to make it smaller.
Hooking it up
Compile the package and add this to MutSlotMachine.ini:
CardClasses=SlotsAddOn2
A Patriarch that does not heal
A question from the same thread: Сеня added the roulette Patriarch to the PHW mutator, and there were far too many Patriarchs, because they heal and every heal added 5 more. Flame advised replacing the KnockDown state in the Patriarch's code, so that he no longer heals:
state KnockDown
{
Begin:
GotoState('');
}