I can only edit .fgd's half way ?! Created 19 years ago2004-09-04 17:16:57 UTC by Slasher_101 Slasher_101

Created 19 years ago2004-09-04 17:16:57 UTC by Slasher_101 Slasher_101

Posted 19 years ago2004-09-04 17:16:57 UTC Post #56569
I am making my first MOD, and I wanted to have the normal
Half-Life weapons, but with a few OpFor weapons like (my personal favorite) the Desert Eagle or Sniper Rifle.

I've never tried this before, or read a tutorial on it, so I opened the
Half-Life.fgd and the OpFor.fgd with 'Notepad' and copied the
Desert Eagle weapon and pasted it into the Half-Life.fgd under weapons.

I saved it, and ran WorldCraft/Hammer and I could place a
Desert Eagle entity. When I compiled the map, everything went normally and I played the map, but the Desert Eagle wasn't there.

Can someone tell me how to proparly edit .fgd's ?
Posted 19 years ago2004-09-04 18:32:23 UTC Post #56575
If you want other/new weapon from any mod in your mod, you need to code it using Half-Life's SDK. The SDK is writting in C++ so you need some experience on this. If you don't, then you might ask someone to code it for you. C++ is a difficult programming language.

A fgd file only contains entity data, like the color, size and entity properties.

The way how entities works is specified in the game code and the game dll files (hl.dll and client.dll).

Adding new entities in the fgd file only adds a new entity in the entity list. But it won't do anything when you place the entity in your map because the required code is missing.
The Mad Carrot The Mad CarrotMad Carrot
Posted 19 years ago2004-09-05 02:12:58 UTC Post #56621
The FGD is just a mapper's convenience.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2004-09-06 01:14:34 UTC Post #56856
Game code does not go into the .fgd. The .fgd only refers to entities defined in the game code. Changing the .fgd does not affect the game in any way, only the way you create a map. When CS does not support nightvision starting up at the beginning of a round, then there's no way to change that. Unless you want to recode CS. Wich makes it another mod instead of CS...
Posted 19 years ago2004-09-06 03:09:09 UTC Post #56863
There is - add a game_player_equip, switch smartedit off and add weapon_nightvision 1. It might be item_nightvision, not entirely sure there.
Dont forget to add other weapons too as they will be left out if you dont.
Posted 19 years ago2004-09-06 04:23:31 UTC Post #56885
weapon_nightvision used to work, but it appears not to anymore.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2004-09-06 04:51:42 UTC Post #56887
tbh with you, i don't think it worked since 1.2/1.3, if it ever worked at all; nightvision cannot be equipped
Posted 19 years ago2004-09-06 09:22:10 UTC Post #56912
The way how entities works is specified in the game code and the game dll files (hl.dll and client.dll).
What if I copy/pasted something from OpFor's .dll into HL's .dll ? AND from OpFor .fgd to HL .fgd ?

Would the weapon appear in the game/mod then ?

Or is this SDK thing the only way ? :
Posted 19 years ago2004-09-06 10:14:29 UTC Post #56924
I wish I knew how to code :(
Posted 19 years ago2004-09-06 11:23:32 UTC Post #56932
The SDK is the code for the DLLs.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 19 years ago2004-09-06 12:53:42 UTC Post #56961
Oh, copying something from another dll into another one? And how would you do that? You need the source code as dll's can't be decompiled, and as far as I know, we only have acces to Half-Life's source code, and perhaps some other mods that have gone open-source. Even then, it wouldn't be simply copy'n'paste... it requires some programming knowledge to get it right.

But after all, a lot of things are possible once you know how to do it. :)
You must be logged in to post a response.