Thanks for the help big fella!

CBarney
class and overriding the methods those are different for your CCustom
class.barney.cpp
from the source code, then renamed everything to the name of my custom monster. I took care to make sure that everything was using the right case (i.e. CBarney
vs. BARNEY_AE_DRAW
vs. monster_barney
), that the file paths were correct, and that the code still made sense. Even though it compiles fine and I can't see what I did wrong, I get the error message Can't init monster_custom
in the console. This is the code I used (you can see at this point I've just replaced "barney" with the name of the monster): models/custom.mdl
and sound/custom/...
are real files and directories and have the expected contents.LoadFileForMe
, but I don't want to load the model files at that point, just check for their existence. I also don't know the lifetime of the buffer returned by this function, is the engine smart enough to not load this file again when it is precached the next round, or would I waste memory, how to ask the engine to free it if I need to.ALLOC_STRING()
would redundantly allocate the same strings for the same player models over time and I don't know when these strings get freed. So I felt like this is the only way to control the lifetimes of these strings, but I'm curious for better ideas.game_text
entity to allow for custom font sizes. I implemented the custom parameter fontSize
, but the next step is getting the HUD message system to display my text. I was able to find this cryptic-looking code which writes a message to be displayed on the HUD, and implemented my custom parameter:
void UTIL_HudMessage( CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage )
{
if ( !pEntity || !pEntity->IsNetClient() )
return;
MESSAGE_BEGIN( MSG_ONE, SVC_TEMPENTITY, NULL, pEntity->edict() );
WRITE_BYTE( TE_TEXTMESSAGE );
WRITE_BYTE( textparms.channel & 0xFF );
WRITE_SHORT( FixedSigned16( textparms.x, 1<<13 ) );
WRITE_SHORT( FixedSigned16( textparms.y, 1<<13 ) );
WRITE_BYTE( textparms.effect );
WRITE_BYTE( textparms.r1 );
WRITE_BYTE( textparms.g1 );
WRITE_BYTE( textparms.b1 );
WRITE_BYTE( textparms.a1 );
WRITE_BYTE( textparms.r2 );
WRITE_BYTE( textparms.g2 );
WRITE_BYTE( textparms.b2 );
WRITE_BYTE( textparms.a2 );
WRITE_SHORT( FixedUnsigned16( textparms.fadeinTime, 1<<8 ) );
WRITE_SHORT( FixedUnsigned16( textparms.fadeoutTime, 1<<8 ) );
WRITE_SHORT( FixedUnsigned16( textparms.holdTime, 1<<8 ) );
WRITE_SHORT( textparms.fontSize ); // my code
if ( textparms.effect == 2 )
WRITE_SHORT( FixedUnsigned16( textparms.fxTime, 1<<8 ) );
if ( strlen( pMessage ) < 512 )
{
WRITE_STRING( pMessage );
}
else
{
char tmp[512];
strncpy( tmp, pMessage, 511 );
tmp[511] = 0;
WRITE_STRING( tmp );
}
MESSAGE_END();
}
I was able to trace the MESSAGE_BEGIN()
macro to "enginecallback.h", where the macro is defined to call a function in "eiface.h", which is defined as this:void (*pfnMessageBegin) (int msg_dest, int msg_type, const float *pOrigin, edict_t *ed);
void pfnMessageBegin(int, int, float, edict_t)
that the pfnMessageBegin
pointer in "eiface.h" was referencing. How do I change this code to use my custom data?LoadBlob.cpp
. If they get rid of the redundant load calls this problem should be solved altogether, but it appears the asserts are already disabled so it shouldn't happen anymore.At the very least, as long as the triggers exists in the BSP you should be able to read their data using Ripent or a viewer like BspGuy, but they should also show up when using a decompiler.I tried decompiling with bsp2map, and the triggers were just not there at all, and crafty's object viewer to view the bsp, where the textures where white and no models or triggers were showing up.
You said you already tried decompiling and using a viewer. Which were they? Did any entities show up or was it just the trigger that didn't show up?
Perhaps a compo with func_vehicle?Great idea
$modelname "/player/skelepuncher/skelepuncher.mdl"
$cd "../player/"
$cdtexture "../dmatch/highcount/skelepuncher" //texture look in folder
$cliptotextures
$scale 1.0
$origin 0 0 36
// whole body
$bodygroup body
{
studio "../dmatch/lowcount/skelepuncher/skelepuncher-low" //remove this whole line if not using this feature
studio "../dmatch/highcount/skelepuncher/skelepuncher-high"
}
$include "../player/player_shared.qc"
5. Now open your preferred 3D application and import the mesh in the "high" folder. This will import the mesh and skeleton. Usually for playermodels you just delete the existing mesh and rig your new mesh/make your new mesh. Now since this is dependant on what 3D program you are using and I need to explain a lot, Ill pass this onto this tutorial: https://the303.org/tutorials/gold_mdl.htmError
, and good to check for Warning
as well as it might tell you about issues that didn't prevent compile but might affect the map nonetheless.steam_legacy
branch to develop, test and play mods..clang-format
file from Half-Life Updated and format all files (script in the Unified SDK or a Visual Studio extension can do this among other tools). Needed to avoid massive amounts of merge conflicts caused by whitespace and newline changesError: Entity 5, Brush 0: SKY brushes not allowed in entityFind the brush entity that has a SKY texture and correct it.
Error: Brush type not allowed in entity
----- END hlbsp -----There was a problem compiling the map.
Check the file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\maps\new_map_terrain_test3_out.log for the cause.
----- END hlvis -----There was a problem compiling the map.
Check the file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\maps\new_map_terrain_test3_out.log for the cause.
----- END hlrad -----There was a problem compiling the map.
Check the file C:\Program Files (x86)\Steam\steamapps\common\Half-Life\valve\maps\new_map_terrain_test3_out.log for the cause.
func_vehicle
, I want to host them on my server!