Forum posts

i'm doing some custom animations for my models, and this "sequence "name_of_the_sequence" is greater than 64K" error has been bothering me for the past hours, i tried removing this limit from the source code, but it resulted in one of the animations being completely corrupted(bones flying everywhere) so i wanted to know if there's any way to bypass this 64k sequence size limit without having to change the animations?
i want to make a walking animation for my model, but both LX and LY command don't work, i don't know what im doing wrong.

$sequence "walk" {
"anims\walk"
ACT_WALK 1
{ event 1004 1 "common/npc_step1.wav" }
{ event 1004 10 "common/npc_step3.wav"}
fps 24
loop
LX
}
i used LY since my model faces the Y axis in blender, but it doesn't matter since neither LX, LY or LZ work on my animation.

here's the full .qc file:

// Created by Crowbar 0.71

// Stored modelname (without quotes): "valve/models/hungry_pumpkin.mdl"
$modelname "hungry_pumpkin.mdl"
$cd "."
$cdtexture "."
$cliptotextures
$scale 1.0

$bodygroup "studio"
{
studio "hungry_pumpkin"
}

$flags 0

$eyeposition 0 0 63

$cbox 0 0 0 0 0 0

$bbox 0 0 0 0 0 0

$sequence "walk" {
"anims\walk"
ACT_WALK 1
{ event 1004 1 "common/npc_step1.wav" }
{ event 1004 10 "common/npc_step3.wav"}
fps 24
loop
LX
}
im trying to upscale the blood decals that appears when you shoot a npc, but as i expected, the size of the decals doubled, but i don't know how to resize it, i looked through the source code but it didn't help me much.
i didn't know about that method until now so thanks! i tried using ripent, but when it tries to read my .wad file it gives "File read failure", it recognizes the path and name of the wad but for some reason can't read it, tried both 32 and 64 bit versions of ripent but no luck, even with the original halflife.wad it spews this error out. here's the log below:
Command line: ripent -textureimport "C:\Users\Alex\Documents\xash port\valve\maps\c1a0.bsp"
Arguments: -textureimport "C:\Users\Alex\Documents\xash port\valve\maps\c1a0.bsp"

-= Current ripent Settings =-
Name | Setting | Default
-------------------|-----------|-------------------------
chart [ off ] [ off ]
max texture memory [ 33554432 ] [ 33554432 ]
max lighting memory [ 50331648 ] [ 50331648 ]

mode [ N/A ] [ N/A ]
parse [ off ] [ off ]
texture mode [ Import ] [ N/A ]
texture parse [ off ] [ off ]
write extent file [ off ] [ off ]
delete rad textures [ off ] [ off ]

Reading C:\Users\Alex\Documents\xash port\valve\maps\c1a0.wad.
Error: File read failure

----- END ripent -----
I know the convar "r_wadtextures 1" is an option, but my texture's dimensions are pretty big and because of that, this error comes up:
"TEX_LoadLump: texture lump "texture file name" too large to load"
So i wanted to know how i could replace embedded textures in existing bsp maps to avoid that error?
So, i'm trying to make a new float value in weaponinfo.h so i can add a delay in my code, when i first added m_flNextUse (which is just a new m_flNextPrimaryAttack but for the use key) the game just kept crashing once i equipped any weapon for a small amount of time, visual studio didn't give any warnings or errors. After a bit of researching and debugging, i tried to add m_flNextUse in delta.lst, hoping for the crash to be over, but now when i launch my half life mod, i stumble into another error:

Fatal error; Couldn't find offset for m_flNextUse!!!

After i click ok, the game just closes and visual studio doesn't give any warnings once again. Anyone knows how to fix this error?
i don't have the materials for the model yet as my priority is to get the model and bodygroups ready. here is the .qc and crowbar log below:
https://pastebin.com/zx7jXdhn
im also using a modified version of studiomdl since my model has more than 32 materials and original studiomdl only supported 32 materials.
yea i wanted the weapon to play a walking animation when the player walks in any direction, and maybe a jumping animation when the player jumps, it isn't anything related to viewmodel bobbing but related to the animation, i know how to modify the bobbing (kinda) but i wanted something a lil different and smoother so i wanted the weapon to move when walking
i wanted a weapon to play a walking animation to the gun when the player is walking but i dont know how to make it since i dont know how to state the speed of the player
i tried EMIT_SOUND(ENT(pev) but it didn't work
User posted image
here's what i tried
hmm thanks for the info man! thats gonna help me alot
i know they used 3ds max or maya but i dont know which software is the right one for the engines
i am making a mod that improves hl1 gun animations, and i got a problem with the 357 reload animation that it ends around frame 71 instead of frame 87, i searched around the 357 gun codes and i can't find where i can make the animation end at the frame its suppost to end.

in-game reload animation

reload animation in half-life model viewer

any help would be appreciated
well i have checked the folder where the qc file is in and the reference.smd is in the same folder of the qc. i tried removing the .smd of the qc file but nothing changes.
also if i try skipping reference and gunreference all the other files like walk.smd gives the same error.
im compiling with the crowbar program.
here is the .qc file

`// Created by Crowbar 0.67

$modelname "valve/models/hgrunt.mdl"

$bodygroup "body"
{
studio "reference.smd"
}
$bodygroup "weapons"
{
studio "gunreference.smd"
}

$sequence "walk1" {
"hgrunt_anims\walk1.smd"
fps 30
loop
LX
}
$sequence "walk2" {
"hgrunt_anims\walk2.smd"
fps 30
loop
LX
}
$sequence "run" {
"hgrunt_anims\run.smd"
fps 30
loop
LX
}
$sequence "diesimple" {
"hgrunt_anims\diesimple.smd"
fps 30
X
}
$sequence "dieforward" {
"hgrunt_anims\dieforward.smd"
fps 30
X
}
$sequence "crouch" {
"hgrunt_anims\crouch.smd"
fps 30
}
$sequence "standup" {
"hgrunt_anims\standup.smd"
fps 30
}
$sequence "crouching" {
"hgrunt_anims\crouching.smd"
fps 30
}
$sequence "crawl" {
"hgrunt_anims\crawl.smd"
fps 30
loop
LX
}
$sequence "smflinch" {
"hgrunt_anims\smflinch.smd"
fps 30
}
$sequence "fire_grenade" {
"hgrunt_anims\fire_grenade.smd"
fps 30
}
$sequence "notarget" {
"hgrunt_anims\notarget.smd"
fps 30
}
$sequence "idle1" {
"hgrunt_anims\idle1.smd"
fps 30
loop
}
$sequence "idle2" {
"hgrunt_anims\idle2.smd"
fps 30
loop
}
$sequence "reload" {
"hgrunt_anims\reload.smd"
{ event 1 43 }
fps 30
loop
}
$sequence "shootcycle" {
"hgrunt_anims\shootcycle.smd"
{ event 2 4 }
fps 30
loop
}
$sequence "frontkick" {
"hgrunt_anims\frontkick.smd"
{ event 3 14 }
fps 30
}
$sequence "swim" {
"hgrunt_anims\swim.smd"
fps 30
loop
}
$sequence "signal" {
"hgrunt_anims\signal.smd"
fps 30
}
$sequence "180L" {
"hgrunt_anims\180L.smd"
fps 30
}
$sequence "180R" {
"hgrunt_anims\180R.smd"
fps 30
}
$sequence "strafeleft" {
"hgrunt_anims\strafeleft.smd"
fps 40
loop
LX LY
}
$sequence "straferight" {
"hgrunt_anims\straferight.smd"
fps 40
loop
LX LY
}
`
i am trying to compile a hl1 alpha model and everytime i try to compile it, it gives this error:

` ********** ERROR **********
/reference.smd.smd doesn't exist
CROWBAR: Deleted empty temporary compile folder "C:\Users\Alexandre\Downloads\Half-Life_Alpha.1\Half-Life Alpha\valve\models\valve".
... Compiling ".\hgrunt.qc" finished. Check above for any errors.`

i tried editing the .qc file with notepad but nothing seems to fix it.
Posted 3 years ago2020-06-26 16:01:46 UTC
in hl1 weapon coding bug Post #344468
thanks! now my problem is fixed, sorry for my late response i've been busy with other things.
Posted 3 years ago2020-06-19 21:28:31 UTC
in hl1 weapon coding bug Post #344431
i also have a bug in which the weapon doesn't play the idle animation, but when i press the reload key or the right mouse key the idle animation plays.
Posted 3 years ago2020-06-19 21:12:20 UTC
in hl1 weapon coding bug Post #344430
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "weapons.h"
#include "nodes.h"
#include "player.h"
#include "gamerules.h"

enum fuckfinger_e {
FUCKFINGER_IDLE = 0,
FUCKFINGER_SHOOT1,
FUCKFINGER_SHOOT2,
FUCKFINGER_RELOAD,
FUCKFINGER_RELOAD_NOSHOOT,
FUCKFINGER_DRAW,
FUCKFINGER_SHOOT_EMPTY,
FUCKFINGER_EMPTY_IDLE
};

LINK_ENTITY_TO_CLASS(weapon_fuckfinger, CFuckfinger);

void CFuckfinger::Spawn()
{
pev->classname = MAKE_STRING("weapon_fuckfinger");
Precache();
m_iId = WEAPON_FUCKFINGER;
SET_MODEL(ENT(pev), "models/w_fuckfinger.mdl");

m_iDefaultAmmo = FUCKFINGER_DEFAULT_GIVE;

FallInit();// get ready to fall
}

void CFuckfinger::Precache(void)
{
PRECACHE_MODEL("models/v_fuckfinger.mdl");
PRECACHE_MODEL("models/w_fuckfinger.mdl");
PRECACHE_MODEL("models/p_fuckfinger.mdl");

m_iShell = PRECACHE_MODEL("models/shell.mdl");// brass shell

PRECACHE_SOUND("items/9mmclip1.wav");

PRECACHE_SOUND("items/9mmclip1.wav");
PRECACHE_SOUND("items/9mmclip2.wav");
PRECACHE_SOUND("weapons/pl_gun3.wav");

m_usFireFuckfinger1 = PRECACHE_EVENT(1, "events/fuckfinger.sc");
m_usFireFuckfinger2 = PRECACHE_EVENT(1, "events/fuckfinger2.sc");
}

int CFuckfinger::GetItemInfo(ItemInfo *p)
{
p->pszName = STRING(pev->classname);
p->pszAmmo1 = "ammo_45";
p->iMaxAmmo1 = _45_MAX_CARRY;
p->pszAmmo2 = NULL;
p->iMaxAmmo2 = -1;
p->iMaxClip = FUCKFINGER_MAX_CLIP;
p->iSlot = 1;
p->iPosition = 3;
p->iFlags = 0;
p->iId = m_iId = WEAPON_FUCKFINGER;
p->iWeight = FUCKFINGER_WEIGHT;

return 1;
}

BOOL CFuckfinger::Deploy()
{
return DefaultDeploy("models/v_fuckfinger.mdl", "models/p_fuckfinger.mdl", FUCKFINGER_DRAW, "onehanded");
}

void CFuckfinger::SecondaryAttack(void)
{

void;

}

void CFuckfinger::PrimaryAttack()
{
// don't fire underwater
if (m_pPlayer->pev->waterlevel == 3)
{
PlayEmptySound();
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.4;
return;
}

if (m_iClip <= 0)
{
if (!m_fFireOnEmpty)
Reload();
return;
}

m_pPlayer->m_iWeaponVolume = NORMAL_GUN_VOLUME;
m_pPlayer->m_iWeaponFlash = NORMAL_GUN_FLASH;

m_iClip--;

int flags;
#if defined( CLIENT_WEAPONS )
flags = FEV_NOTHOST;
#else
flags = 0;
#endif

m_pPlayer->pev->effects = (int)(m_pPlayer->pev->effects) | EF_MUZZLEFLASH;

// player "shoot" animation
m_pPlayer->SetAnimation(PLAYER_ATTACK1);

Vector vecSrc = m_pPlayer->GetGunPosition();
Vector vecAiming = m_pPlayer->GetAutoaimVector(AUTOAIM_5DEGREES);

Vector vecDir;
vecDir = m_pPlayer->FireBulletsPlayer(1, vecSrc, vecAiming, VECTOR_CONE_FUCKFINGER, 8192, BULLET_PLAYER_45, 0, 0, m_pPlayer->pev, m_pPlayer->random_seed);

PLAYBACK_EVENT_FULL(flags, m_pPlayer->edict(), m_usFireFuckfinger1, 0.0, (float *)&g_vecZero, (float *)&g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0);

if (!m_iClip && m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0)
// HEV suit - indicate out of ammo condition
m_pPlayer->SetSuitUpdate("!HEV_AMO0", FALSE, 0);

m_flNextPrimaryAttack = 0.4;
m_flTimeWeaponIdle = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}

void CFuckfinger::Reload(void)
{
if (m_pPlayer->ammo_45 <= 0)
return;

int iResult;

if (m_iClip == 0)
iResult = DefaultReload(9, FUCKFINGER_RELOAD, 1.5);
else
iResult = DefaultReload(9, FUCKFINGER_RELOAD_NOSHOOT, 1.5);

if (iResult)
{
m_flTimeWeaponIdle + UTIL_SharedRandomFloat(m_pPlayer->random_seed, 10, 15);
}
}

void CFuckfinger::WeaponIdle(void)
{
ResetEmptySound();

m_pPlayer->GetAutoaimVector(AUTOAIM_10DEGREES);

if (m_flTimeWeaponIdle > UTIL_WeaponTimeBase())
return;

// only idle if the slid isn't back
if (m_iClip != 0)
{
int iAnim;
float flRand = UTIL_SharedRandomFloat(m_pPlayer->random_seed, 0, 1);

if (flRand <= 0.5)
{
iAnim = FUCKFINGER_IDLE;
m_flTimeWeaponIdle + 70.0 / 30.0;
}
else if (flRand <= 0.7)
{
iAnim = FUCKFINGER_IDLE;
m_flTimeWeaponIdle + 60.0 / 16.0;
}
else
{
iAnim = FUCKFINGER_IDLE;
m_flTimeWeaponIdle + 88.0 / 30.0;
}
SendWeaponAnim(iAnim, 1);
}
}

class CFuckfingerAmmo : public CBasePlayerAmmo
{
void Spawn(void)
{
Precache();
SET_MODEL(ENT(pev), "models/w_9mmarclip.mdl");
CBasePlayerAmmo::Spawn();
}
void Precache(void)
{
PRECACHE_MODEL("models/w_9mmarclip.mdl");
PRECACHE_SOUND("items/9mmclip1.wav");
}
BOOL AddAmmo(CBaseEntity *pOther)
{
if (pOther->GiveAmmo(AMMO_FUCKFINGERCLIP_GIVE, "ammo_45", _45_MAX_CARRY) != -1)
{
EMIT_SOUND(ENT(pev), CHAN_ITEM, "items/9mmclip1.wav", 1, ATTN_NORM);
return TRUE;
}
return FALSE;
}
};
LINK_ENTITY_TO_CLASS(ammo_fuckfingerclip, CFuckfingerAmmo);
Posted 3 years ago2020-06-19 17:11:16 UTC
in hl1 weapon coding bug Post #344426
so i recently created a new hl1 weapon, and everything seems to work properly, but i have a strange bug that sometimes when i press the reload button the reload animation doesn't play and the weapon reloads. how do i fix that?