Forum posts

Posted 6 years ago2018-03-04 20:37:22 UTC
in Half-Life Tools Backup Post #338940
Do you mean things like this: http://web.archive.org/web/20010308202415/http://www.vlatitude.com:80/resources.php

That might still be recoverable.
Posted 6 years ago2018-03-04 17:16:09 UTC
in Half-Life Tools Backup Post #338938
I've made a website that hosts backups of old Half-Life tools. Most of this is from Slackiller and a Gamefront mirror, but i'll add more stuff as needed. All files are hosted on Github.

https://samvanheer.github.io/Half-Life-Tools-Backup/

Credits to Shepard for making the HLEnhanced website, which i've used as a base for this.

Currently hosted are the Slackiller HL Programs page and all the Half-Life SDKs that i could find.

This includes SDKs 1.0, 2.0, 2.1, 2.2 and 2.3, including separate releases of files.

An interesting thing to note is that the early SDK releases required the signing of an NDA prior to allowing the creation of a mod. Mods also had to be hosted on an FTP server in order to be made visible to the Custom Game browser.

I'm currently going through the list of utilities on the Gamefront mirror (https://gamefront.online/files/listing/pub2/Half_Life/Tools_and_Utilities) to mirror anything useful.

I also took the various SDK source codes and made branches that show the evolution of the multiplayer and single player codebases:
Multiplayer codebase: https://github.com/SamVanheer/Half-Life-Tools-Backup/commits/hl1_src_mp
Singleplayer codebase: https://github.com/SamVanheer/Half-Life-Tools-Backup/commits/hl1_src_sp
Difference between the multiplayer and singleplayer codebases in 2.3: https://github.com/SamVanheer/Half-Life-Tools-Backup/commits/hl1_src_2.3_diff

I didn't catch most of the file removals (if any), just the removal of the "dedicated" directory in 2.4 (Github release).
Posted 6 years ago2018-03-03 12:49:35 UTC
in New material sounds Post #338931
The file you're looking for is sound/materials.txt, it assigns materials to each texture. The file contains an explanation as to how it works.

Codewise you need to consider a few things:
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_shared.c#L191
https://github.com/ValveSoftware/halflife/blob/master/dlls/sound.cpp#L1539

The same code is in 2 places, the former is used by physics code on both the client and server side, the latter is only used on the server side to handle things like crowbar hitting a wooden box sort of thing.

Adding new materials is a bit clunky, bear with me:
First you need to define a constant used to identify it, that's done in 2 places:
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_materials.h#L21
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_shared.c#L92

You also need to define a constant that this first one gets converted to so it can be used more easily:
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_shared.c#L104

Converted in this function:
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_shared.c#L441

Now you need to handle the actual sound playback. This time it's in 3 places:
https://github.com/ValveSoftware/halflife/blob/master/pm_shared/pm_shared.c#L322
https://github.com/ValveSoftware/halflife/blob/master/dlls/sound.cpp#L1687
https://github.com/ValveSoftware/halflife/blob/master/cl_dll/ev_hldm.cpp#L156

All are identical but use different ways to do it due to different engine interfaces.

Yes, it sucks, it should be easier, but this is GoldSource.

If you need help i can quickly clean this up and make it use a single definition for everything, and bypass the hardcoded limits too if you need it.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 6 years ago2018-02-17 00:01:27 UTC
in Post your screenshots! WIP thread Post #338843
Oh no, own goal!
Posted 6 years ago2018-02-07 22:46:00 UTC
in Overview maps outside Observer mode, pos Post #338802
Posted 6 years ago2018-02-01 19:41:59 UTC
in Limit npc attack to only enemy in front Post #338756
BOOL CTrolley::CheckMeleeAttack1( float flDot, float flDist )
{
// ALERT(at_aiconsole, "CheckMelee(%f, %f)\n", flDot, flDist);

if (flDot >= 0.7)
{
if (flDist <= 50)
return TRUE;
}
return FALSE;
}
Anything within 50 units and in front of the trolley gets ammo every time it attacks. The conditions for attacks is based on how much ammo they've got, however you return R_AL in IRelationship if they have enough ammo, which can cause the AI to still consider it. Return R_NO instead, see if that changes anything.

Also, your conditions aren't correct, if the player has exactly 100 ammo it relies on default relationship settings. Change the
if ( pTarget->ammo_9mm > 100 )
to
if ( pTarget->ammo_9mm >= 100 )
I'm assuming your code correctly updates ammo_9mm, which is SDK behavior. If it does not, you should correct that.
Posted 6 years ago2018-01-31 17:16:13 UTC
in A bug with player viewangles based on se Post #338746
Then you should try setting fixangle to 1 right after that, it should tell the engine to set exactly that angle.
Posted 6 years ago2018-01-31 14:35:57 UTC
in ../half-life/hunger/custom: permision de Post #338743
Why are you using the WON version? Most mods were made with the Steam version in mind, so they may have surpassed the limits of the older engine build.
Posted 6 years ago2018-01-31 13:13:00 UTC
in Limit npc attack to only enemy in front Post #338741
Yeah, the QC file should tell us what's up. Make sure to list which animations are used.
Posted 6 years ago2018-01-30 23:34:56 UTC
in Limit npc attack to only enemy in front Post #338737
Which animation has the event, and when is it used, as in which act is it associated with? ACT_MELEE_ATTACK1/2 or something else? It might be triggering for all players at all times, so the act itself may need changing.
Posted 6 years ago2018-01-30 20:51:48 UTC
in Limit npc attack to only enemy in front Post #338735
Replace CBasePlayer with CBaseEntity, it'll work.
Try using m_hEnemy != NULL instead of just m_hEnemy, so:
if( m_hEnemy != NULL && m_hEnemy->IsPlayer() )
Posted 6 years ago2018-01-30 16:38:15 UTC
in A bug with player viewangles based on se Post #338733
How are you setting the angles on the server side? You need to use pev->fixangle to force the engine to set a particular angle, and both pev->angles and pev->v_angle need to be set to be correct.
Posted 6 years ago2018-01-30 16:09:58 UTC
in Limit npc attack to only enemy in front Post #338732
CTrolley is a monster, and i'm assuming TROLL_AE_ATTACK_RIGHT is an event in an animation triggered as a melee attack on a player.

This means that m_hEnemy (https://github.com/ValveSoftware/halflife/blob/master/dlls/basemonster.h#L40) is the player. Use that member variable to give ammo to the correct player, in other words GiveAmmo should look like this:
int CTrolley :: GiveAmmo( CBasePlayer* pPlayer, int iCount, char *szName, int iMax )
{
if (pPlayer->ammo_9mm <= 100)//limite de munición para que te recargue

{
pPlayer->GiveAmmo(600,"9mm",600);
return TRUE;

}

return FALSE;
}
And HandleAnimEvent should do this:
if( m_hEnemy && m_hEnemy->IsPlayer() )
{
CBasePlayer* pPlayer = static_cast<CBasePlayer*>( static_cast<CBaseEntity*>( m_hEnemy ) );
GiveAmmo( pPlayer, 600,"9mm",600 );
}
I should note that GiveAmmo ignores the values you're giving it and is always giving those amounts, so make sure you update it to use the input values if you want that to work correctly.
Posted 6 years ago2018-01-30 10:41:33 UTC
in Limit npc attack to only enemy in front Post #338730
You need to show the code that calls GiveAmmo, also this should only ever give ammo to the player with the lowest entity index, regardless of distance.
Posted 6 years ago2018-01-21 16:32:56 UTC
in HL2 mod Post #338708
Just tell us which version you're using and what kind of errors you're getting. This isn't helping.
Posted 6 years ago2018-01-21 14:06:39 UTC
in editing 256 colour .bmp files Post #338705
Wally can edit palettes: http://www.slackiller.com/hlprograms/wally_155b.exe

Sidenote: somebody really needs to back up slackiller's site before it goes down, that stuff is getting hard to find.
Posted 6 years ago2018-01-21 11:23:59 UTC
in playing with model_t Post #338701
If studiohdr_t::textureindex is 0 then the textures were loaded from a T.mdl, which is apparently stored in model_t::texinfo.

This is an mtexinfo_t pointer, but actually stores a model_t*, and contains the texture data. You need to call Mod_Extradata on this model to get the studiohdr_t* that contains the texture data.

Unfortunately, it seems that Mod_LoadStudioModel doesn't save the actual texture data.
It only copies the model data up to where the texture data starts (texturedataindex is a byte offset into the file, effectively the size of the file up until the texture data), so even if you do get the texture header it'll still crash if you try to use it.

You'll have to manually load the file again if you want the texture data.
Posted 6 years ago2018-01-20 20:10:37 UTC
in HL2 mod Post #338692
Which version are you using? Like VS 2015 Community, or VS 2015 Enterprise, etc. The community edition should never expire.
Posted 6 years ago2018-01-20 19:44:27 UTC
in HL2 mod Post #338690
What exactly are you having trouble with when getting Visual Studio to work?
This post was made on a thread that has been deleted.
Posted 6 years ago2018-01-15 19:53:52 UTC
in zombie is eating - scripted_sequence - h Post #338648
IIRC you need to use multiple scripted sequences, and play around with the idle and action animations so that it loops the animation you want until you trigger the script you want to play.
Posted 6 years ago2018-01-14 20:36:25 UTC
in Help me Post #338645
That's because of social media and modern tv/web only showing people when they're successful, not when they fail.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
This post was made on a thread that has been deleted.
Posted 6 years ago2018-01-03 13:04:57 UTC
in Post your screenshots! WIP thread Post #338548
Posted 6 years ago2018-01-01 14:06:35 UTC
in Post your screenshots! WIP thread Post #338542
Yes, shaders rely on what is referred to as shader programs, which are comprised out of multiple shaders (vertex, fragment, compute shaders to name a few examples).
Overall it's called retained mode, as opposed to immediate mode. (retain state from before, like model data as opposed to uploading it every frame).

Shaders can be used on embedded systems (OpenGL ES), but it's not exclusive to that, you can use it anywhere that the OS provides support for it, usually through drivers provided by GPU manufacturers.
Posted 6 years ago2017-12-28 13:32:27 UTC
in Black Mesa Post #338516
That's not a glitch it's just another teleporter meant to take you into the chessboard realm.
Posted 6 years ago2017-12-28 11:32:38 UTC
in Sledge (Hammer Alternative) Alpha Build Post #338514
I've had similar things happen in Hammer, it would leave behind the other entity with an infinitely large brush when i merge 2 entities.
Posted 6 years ago2017-12-22 13:50:19 UTC
in Old HL1 mapping tutorial sites? Post #338473
Counter-Map is a good resource for CS specific stuff: http://countermap2.com/

I think that may be a mirror though.
Posted 6 years ago2017-12-14 21:30:32 UTC
in win10 is the most retarded os i ever see Post #338381
He didn't even mention C#...
Posted 6 years ago2017-12-08 10:08:50 UTC
in Questions surrounding entity limit Post #338348
That can happen what you're using entities that can spawn other entities, like respawning weapons, monstermakers, multi_managers with the multithreaded flag set, etc.

Also, please try to use the edit button instead of double posting.
Posted 6 years ago2017-12-07 22:24:06 UTC
in Questions surrounding entity limit Post #338343
If your map is already pushing the limit then it will definitely go above the limit when people start playing it. Every player is an entity, every weapon they pick up is another entity, etc.
The game also changes behavior when the number of entities gets too low, so item spawning logic will be different.

Multiplayer maps made for vanilla games probably shouldn't be too heavy on the number of entities for that reason.
Posted 6 years ago2017-12-07 22:00:31 UTC
in Questions surrounding entity limit Post #338341
I wouldn't try to go for a specific maximum because new entities can still be created while playing. Just use 2048, it's the maximum and it won't make any real difference.
Remember, this engine is 19 years old, even at its worst it won't really tax modern computers.
Posted 6 years ago2017-12-04 12:18:10 UTC
in Startmovie doesn't ouput wav file Post #338303
Check this: https://steamcommunity.com/app/70/discussions/0/864975399699995140/

You may need to specify some additional options.
Posted 6 years ago2017-12-04 12:16:16 UTC
in Model Artist support requested. Post #338302
Well that was the plan to begin with, i am going to make some breaking changes so any maps you're making will stop working once that's done.
The tool i spoke of before to update existing maps should be enough to fix this, assuming i can get the various file format specs to implement it.

I got the files, but i haven't downloaded them yet. I'm currently taking care of some college work first, then i'll have time to work on mod stuff.
Posted 6 years ago2017-12-04 12:13:38 UTC
in Questions surrounding entity limit Post #338301
Be careful when turning complex brushwork into func_pushable, the physics in this game is pretty simple and won't work that well with it, it'll clip through walls and other objects.

IIRC You can sort of cheat by using 1 unit high clip brushes on the ground to fit to the physics mesh for the object, it'll visually bump into objects when you do that.
Posted 6 years ago2017-12-03 14:53:36 UTC
in Sledge (Hammer Alternative) Alpha Build Post #338287
I noticed that somebody posted part of the RMF file format spec on the VDC (https://developer.valvesoftware.com/wiki/Rich_Map_Format), so i checked to see if Sledge supports it too.

Apparently you figured it out quite well, with a few unknowns though: https://github.com/LogicAndTrick/sledge/blob/feature/simplification-project/Sledge.Providers/Map/RMF22.txt

I did a little digging and found that the unknown field in the RMF format is the camera tool version number.

I have to support RMF operations myself at some point when i get to work on a tool to update map data, so it's nice to see that somebody already figured it out.

It looks like you can find the rest of the unknown fields in the Source 2003 leak, but i suppose that'd be illegal.
Posted 6 years ago2017-12-01 20:52:42 UTC
in Questions surrounding entity limit Post #338274
All -chart does is give you information, it doesn't fix anything.
Posted 6 years ago2017-12-01 19:52:00 UTC
in Questions surrounding entity limit Post #338270
%..Warning: Illegal Brush (edge without opposite face): Entity 1270, Brush 0

.80%...90%.Warning: Illegal Brush (edge without opposite face): Entity 853, Brush 0
Should probably fix this. If there are any warnings or errors during compilation then it probably won't work properly anyway.
This post was made on a thread that has been deleted.
Posted 6 years ago2017-12-01 07:29:07 UTC
in Questions surrounding entity limit Post #338260
Named lights count toward the limit, unnamed lights do not.

You can increase the maximum number of entities to 2048 with the command line parameter -num_edicts 2048, or by editing liblist.gam and adding this:
"edicts" "2048"
Note that anyone that plays your map will also have to add this.

There is no way to check how many entities above the limit you're at, since entities spawned by other entities also count, and the game doesn't check how many are left when this error occurs.
Posted 6 years ago2017-11-30 16:53:28 UTC
in Model Artist support requested. Post #338253
The filename and path doesn't have to be "mapname/name.txt", that's only for Sven Co-op's model replacement stuff. Conversely this means the name in worldspawn should include all directory names, starting in the mod directory (e.g. models/mapname/female_sci_gmr.txt).

Note that it's being updated to use XML, that change should be available for use in the next couple of weeks. I'll need to make sure to document this stuff on the wiki so it's clear how it works.

It'll look something like this (i don't have the code handy atm):
<xml version="1.0" standalone="no"/>
<replacement_map>
<keyvalue key="models/scientist.mdl" value="models/female_scientist.mdl"/>
</replacement_map>
Not that different, but it'll eliminate any issues with long names, since the original parsing code uses fixed size buffers.

Per-entity replacements aren't supported yet but that'll be added eventually, the essentials are already there.