Lately there have been a lot of coders, including myself, that have been making addons that require integrating animations for all player models to use. As it stands, integrating animations into all player models globally requires someone to $IncludeModel them into the default m/f/z_anm.mdl files. Due to many different people wanted to integrate different animations, this leads to a lot of overwriting and compatibility issues.
By creating this base I’m hoping to fix this problem. With this animation base, clients will be able to easily choose which animations they want integrated with their players actively, and allows modelers/developers to make extensions that don’t conflict with each other. Another big note is that the client will not have to restart the game anymore to have these integrations take effect. The only time they will have to restart is when initially downloading the addon. After that, all the extension slots are pre-included by the base and they can simply go through the workshop, download an extension, and have it take effect once it’s done downloading. Servers will be able to push their own extensions, and developers can update their extensions actively.
Developers/Modelers will have to compile their model into these extension slots. This will allow the system that I mentioned previously. There are 20 slots pre-included, and I have added my own official ones that won’t take up any slots. If someone would want their extension made official they just need to contact me and I’ll put it in.
Ironically yes, this is another m/f/z_anm.mdl recompilation, so it will have conflicts with previously integrated systems. If you want a particular animation set functioning on the base, post it here or message me on steam and I’ll have a look at what I can do. The developer will also be able to fix it themselves if they choose.
Information for Developers
If you’re going to make an extension, I recommend you compile your animations into a separate model and $IncludeModel it into a separately compiled extension. This’ll make it a lot easier for me to make it an official extension. Compiling the extension is extremely easy, with the QC following this format:
$modelname player/wiltos/anim_extension_modX.mdl // Where X is a number from 1 to 20
$IncludeModel "YOUR ANIMATION MODEL PATH HERE"
and an example QC here:
$modelname player/wiltos/anim_extension_mod5.mdl // The extension name
$IncludeModel "player/dod_player_shared.mdl" // Includes all shared DOD:S Player animations
Easy stuff and I’m sure if you’re making your own animations you probably know how to do this anyway.
Custom Hold Types
If you want to make your own hold types, create a file in
lua/wos/anim_extension/holdtypes
with the following format
local DATA = {}
DATA.Name = "Melee Combination" -- Overall name of the hold type
DATA.HoldType = "melee-combo" -- String used when defining within a SWEP
DATA.BaseHoldType = "melee2" -- The base hold type ( All non-modified ACT entries will be inherited from this )
DATA.Translations = {}
-- DATA.Translations[ ACT_MP_STAND_IDLE ] = 2680
-- DATA.Translations[ ACT_MP_WALK ] = 2683
-- DATA.Translations[ ACT_MP_RUN ] = 2685
DATA.Translations[ ACT_MP_CROUCH_IDLE ] = ACT_HL2MP_IDLE_CROUCH_KNIFE
DATA.Translations[ ACT_MP_CROUCHWALK ] = ACT_HL2MP_WALK_CROUCH_KNIFE
-- DATA.Translations[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = 2688
DATA.Translations[ ACT_MP_ATTACK_CROUCH_PRIMARYFIRE ] = ACT_HL2MP_GESTURE_RANGE_ATTACK_KNIFE
-- DATA.Translations[ ACT_MP_RELOAD_STAND ] = IdleActivity + 6
-- DATA.Translations[ ACT_MP_RELOAD_CROUCH ] = IdleActivity + 6
-- DATA.Translations[ ACT_MP_JUMP ] = 3160
-- DATA.Translations[ ACT_MP_SWIM ] = IdleActivity + 9
-- DATA.Translations[ ACT_LAND ] = ACT_LAND
wOS.AnimExtension:RegisterHoldtype( DATA )
You can set up your ACT translations in the following formats:
DATA.Translations[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = ACT_HL2MP_GESTURE_RANGE_ATTACK_KNIFE -- ACT ENUM
DATA.Translations[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = 1132 -- ACT ID number
DATA.Translations[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = "wos_judge_attack" -- Sequence Name
You can set up an ACT to randomly cycle through animations by doing the following:
DATA.Translations[ ACT_MP_ATTACK_STAND_PRIMARYFIRE ] = { "wos_sequencename1", "wos_sequencename2", ACT_EXAMPLE, 1142 } -- Can be done in any combination of the previously mentioned formats
The existence of a holdtype can be checked by searching this table:
wOS.AnimExtension.HoldTypes
and it will return all data in the format of the DATA table I put at first.
Information for Clients
Once you install the animation base you will need to let it download and restart your game. Once you do that, you should be able to open the context menu and see a new widget “wiltOS Viewer”. I’ve included this so you can check which animations are being applied to your model and find the sequence names.
Download
You can get it on the workshop here: http://steamcommunity.com/sharedfiles/filedetails/?id=757604550
Collection of official extensions are here: http://steamcommunity.com/workshop/filedetails/?id=848978803
I’ll probably make a collection of unofficial extensions as well, but since we don’t have any yet, can’t work with that
**DISCLAIMER: **I’ve personally not seen how many sequences are allowed on a model before the game panics. If anyone has any information on that it’d be greatly appreciated.
I also incorrectly tagged this as a C++ module. This is not one.