Admer456 said:BTW you should've created a new thread instead of bumping this one.It's just that my question was semi-related to this post, and I found it dumb creating a new one this short.
Admer456 said:BTW you should've created a new thread instead of bumping this one.It's just that my question was semi-related to this post, and I found it dumb creating a new one this short.
The Mad Carrot said:You can include definitions from one fgd file into another by adding the line ''@include "filename.fgd" (no quotes) as is explained here: https://developer.valvesoftware.com/wiki/FGD but I'm certain this applies to goldsource fgd files as well though I'm not 100% sure.That's for Source games only. This is why mod-based GoldSrc FGDs are simple forks of the original Half-Life file, rather than just have a base file of entities shared between said mods and then dedicated ones to complete the list of entities.
LOZ98 said:I figured it out (I guess) I modified the default Half-Life fgd by adding my monster to it instead of adding a separate fgd file. works fine now, It's probably not a perfect solution but it'll do for now.Sounds like a specified base wasn't defined in the FGD - just one of them being incomplete or if failing to be read will not show the entity in the list. In your case, it was either "Monster" or "Sequence", or even both. Quick example of how it should be:
//Note how I only added the bases required for your entity, as well as the bases required by said bases themselves. In short, a base that is then used by an entity or another base must've been defined previously.
// BaseClasses
//
@BaseClass = Angles
[
angles(string) : "Pitch Yaw Roll (Y Z X)" : "0 0 0"
]
@BaseClass = RenderFxChoices
[
renderfx(choices) : "Render FX" : 0 =
[
0 : "Normal"
1 : "Slow Pulse"
2 : "Fast Pulse"
3 : "Slow Wide Pulse"
4 : "Fast Wide Pulse"
9 : "Slow Strobe"
10 : "Fast Strobe"
11 : "Faster Strobe"
12 : "Slow Flicker"
13 : "Fast Flicker"
5 : "Slow Fade Away"
6 : "Fast Fade Away"
7 : "Slow Become Solid"
8 : "Fast Become Solid"
14 : "Constant Glow"
15 : "Distort"
16 : "Hologram (Distort + fade)"
]
]
@BaseClass base(RenderFxChoices) = RenderFields
[
rendermode(choices) : "Render Mode" : 0 =
[
0 : "Normal"
1 : "Color"
2 : "Texture"
3 : "Glow"
4 : "Solid"
5 : "Additive"
]
renderamt(integer) : "FX Amount (1 - 255)"
rendercolor(color255) : "FX Color (R G B)" : "0 0 0"
]
@BaseClass = Target
[
target(target_destination) : "Target"
]
@BaseClass = Targetname
[
targetname(target_source) : "Name"
]
@BaseClass base(Target, Targetname, RenderFields, Angles) color(0 200 200) = Monster
[
TriggerTarget(String) : "TriggerTarget"
TriggerCondition(Choices) : "Trigger Condition" : 0 =
[
0 : "No Trigger"
1 : "See Player, Mad at Player"
2 : "Take Damage"
3 : "50% Health Remaining"
4 : "Death"
7 : "Hear World"
8 : "Hear Player"
9 : "Hear Combat"
10 : "See Player Unconditional"
11 : "See Player, Not In Combat"
]
spawnflags(Flags) =
[
1 : "WaitTillSeen" : 0
2 : "Gag" : 0
4 : "MonsterClip" : 0
16 : "Prisoner" : 0
128 : "WaitForScript" : 0
256 : "Pre-Disaster" : 0
512 : "Fade Corpse" : 0
]
]
//
// Entities
//
@PointClass base(Monster, Sequence) size(-16 -16 0, 16 16 72) studio("models/npcs/pit_drone.mdl") = monster_pitdrone : "monster_pitdrone" []
Admer456 said:Quite simple:Thank you!
If it's a whole number, then integer. Candidates: 0, 1, 2, 3 etc.
If it's a real number (such as a delay in seconds), then string. Candidates: 0.1, 0.2, 2.0, 0.2948 etc.
String is rather used for alphanumerical values, but since there's apparently no floating point type in FGDs, we improvise.
Admer456 said:If you don't provide a value for a keyvalue, then that keyvalue won't be written into the .map file.One thing that I noticed (and was going to include it in the thread but left that one out) is that, when it's an integer and a value isn't entered into the FGD, it will be "0" in Hammer (rather than an empty field, even if it's still defaulted to "0" in-game).
As such, it's gonna default to 0 in-game.
Dr. Orange said:It is made by Valve, but it isn't officially supported as it was only released as a beta. I believe it was only ever released on the old VERC website, which has been defunct for years, which is why it can't be found "officially" anywhere anymore.Thanks a bunch!
Admer456 said:In the FGD entity definition, add studio().Alright, thank you.
@PointClass base(Target) studio() = env_something
Not sure if you gotta make the following change as well, but:
model(string) : "Model" should he changed to:
model(studio) : "Model"
Note: this is just an example, there is no env_something.
Hammer 3.4 doesn't support models, if I recall correctly. 3.5.2 beta does, however.
Bruce said:VHE 3.5 (the last official by Valve) supports it, and needs something in the .fgd like Admer mentionedI'm no expert, but it makes me wonder if 3.5 is actually a Valve product as it can't be found anywhere 'officially'.
The Mad Carrot said:Right.Is there something like an official hosting for Hammer 3.5?
In case you don't have Hammer 3.5 and the fgd file, here you go:
Hammer 3.5 (executable only)
Hammer 3.5 fgd file
Counter-Strike expert fgd file for Hammer 3.5
Jessie said:As Urby said, it's in the mod Spirit of Half-Life. In that it's just another attribute on a given entity. It's a fairly basic function, and doesn't work particularly well with anything more than the most simple movement.Never heard of that mod so by "Spirit of Half-Life" I initially understood it as a very old or obsolete function, or something like that. Thanks for clearing it out!
Bruce said:You could do it by having a second train with identical movement and you would use either an animated texture with additive rendering or the X Y Z rotation option. Another hack would be to add a custom keyvalue "model" with "models/heli.mdl" or soYet another great idea I didn't think of (the 'secondary brush entity' trick). Thanks a lot!
UrbaNebula said:I'm afraid that this would not be possible with the standard Goldsource engine. Spirit of Half-Life allows you to set a "Moves with" value which is a very primitive form of parenting. The only example I have seen of a helicopter in Goldsource made use of an animated rotor texture.Perhaps I'll be trying to use an animated texture but it already sounds like a lot of work besides making textures with transparency. But still, where can I find the "moves with" value?
potatis_invalid said:A laser with multiple same-name targets is a common method: https://twhl.info/wiki/page/Tutorial%3A_Random_entity_triggeringThanks a lot! Will see if I can replicate it all properly.
torekk said:Use another entity called multi_manager with it's "multithreaded" flag ticked and which basically calls itself, two env_renders, one which "shows" the entity, and one that "hides" it. E.g. if you have want to toggle an env_sprite, set the env_sprite's rendermode to "Glow" and the amount to e.g. "255", then for the env_render that shows it copy those values and for the one that hides it change the amount to "0".I kinda figured it out already that I need two different entities, one to Show and the other to Hide, but thanks again for the clarification and the env_render entity.
. . .
torekk said:env_renderThank you for answering, but can it do both Show and Hide? My intention is to continuously make an entity flicker, and I'd like to know if that's possible and a brief explanation on how to do it, because I never heard of / worked with that entity.
Bruce said:Texture scale and lightmap scale are locked together permanently in HL1. It is impossible to change. Your solution is to combine small and big scale textures for less important and more noticeable surfaces accordingly. Although scale of 1 is fine for most occasions if the texture is well made. Always make sure to export textures from Photoshop in 8-bit .bmp rather than .jpg to avoid quality loss.Thanks for the info - I was going to ask about other Hammer applications such as J.A.C.K., because I saw a few samples of it some time ago and it looked like it had some advanced features, and wanted to know whether it supports the modification of lightmap scales.
Admer456 said:You could technically use a very low-res texture and use an original-res detail texture. It's a trick used to achieve lower lightmap counts as well as less wpolys, but it may decrease the framerate, only slightly.Not sure what you refer to with "detail". All I want is downscale a texture that looks large at 100%, but doing so will result in a bigger filesize. The texture is a 128x128 file, and downscaling the file (not the texture in Hammer) to 32x32, which is the way it should actually look like, will make it look blurry/pixelated because it's such a small resolution. The "best" resolution in this case would be 64x64, which still forces me to also downscale the textures in Hammer to ".5", continuing to generate bigger filesizes but half the previous ones.
Admer456 said:You could technically use a very low-res texture and use an original-res detail texture. It's a trick used to achieve lower lightmap counts as well as less wpolys, but it may decrease the framerate, only slightly.Not sure what you refer to with "detail". All I want is downscale a texture that looks large at 100%, but doing so will result in a bigger filesize. The texture is a 128x128 file, and downscaling the file (not the texture in Hammer) to 32x32, which is the way it should actually look like, will make it look blurry/pixelated because it's such a small resolution. The "best" resolution in this case would be 64x64, which still forces me to also downscale the textures in Hammer to ".5", continuing to generate bigger filesizes but half the previous ones.
Windawz said:-notexscale 1I simply used "-notexscale" (without the Value because it's not necessary, according to the parameters), and although it decreases the compiling time, the filesize remains the same (oversized).
Windawz said:If you add the -notexscale 1 parameter to VRAD in your compile settings, texture scale will no longer affect lightmap resolution. This option applies to all brush faces in your map. This also means that the lightmap scale on faces with upscaled textures will be reset to normal as well.I shouldn't be asking this because I use Vluzacn's ZHLT modification, but still: is that a command only for non-Valve compilers?
Solokiller said:That has to do with lightmap scale, which is tied to texture scale in GoldSource. You'll have to scale the actual textures to avoid that.The thing is, the textures I'm using/downscaling are actually custom textures. This is what's going on:
Admer456 said:linkThanks a bunch!
There's some info in there. I hope it helps.
Solokiller said:The skybox does not have any clipnodes generated for it when using old compilers. Newer ones will generate them by default, but that can be disabled with -noskyclip. This thread has a bit more information: https://forums.svencoop.com/showthread.php/38059-ARCHIVE-Custom-ZHLT-by-vluzacn?p=478658&viewfull=1#post478658Thanks for the info!
MOCOLONI said:Yep, rolling back to the entities I initially used seems to have fixed the whole issue. multi_managers actually restart the cycle just fine, and there are no side-effects unlike when using regular Train entities (such as dying during a Train's trajectory will immediately teleport that Train to its destination on the next round, without firing targets specified on its final path_track).MistaX88 said:Now, it's very possible that you'll have to modify how the whole loop works because of how the trains are behaving. It won't be because the old loop wasn't working; it will be because func_trains are janky in CS and for some reason will only get triggered by a perfectly working loop on it's first cycle.Would rolling back to func_tracktrains help at something, if at all? I know Trains and Tracktrains are different entities but I just need either as a counterpart to Source's func_movelinear entity.
MistaX88 said:Now, it's very possible that you'll have to modify how the whole loop works because of how the trains are behaving. It won't be because the old loop wasn't working; it will be because func_trains are janky in CS and for some reason will only get triggered by a perfectly working loop on it's first cycle.Would rolling back to func_tracktrains help at something, if at all? I know Trains and Tracktrains are different entities but I just need either as a counterpart to Source's func_movelinear entity.
MOCOLONI said:Unless I'm doing something wrong, it doesn't seem to fix the problem; it still acts like it's yet another multi_manager, taking 16 seconds instead of 4 to re-activate the first one.Jessie said:What about having the trains trigger trigger_relays with a delay? I can’t test this at the moment, just throwing it out there.I yet have to test that.
MistaX88 said:On that example map, make 4 func breakables, name them train1, train2, train3, and train4. Set them all to "trigger only".I know they'll keep (randomly) breaking the already-broken breakable brushes; that's why I told Jessie in an above post to die at some point after activating the loop, so that all the Trains (except the one moving between rounds) would get on the ground, ready to be re-triggered again and see how wrong the looping goes.
I just did this, and what it showed that was the multi_managers keep looping. If a func_breakable is triggered again even after it already broke, it will make a sound and spawn gibs (and explode if you have that set) again. So it will go off every single time a multi_manager fires it, even if it is now a bunch of empty space.
Jessie said:What about having the trains trigger trigger_relays with a delay? I can’t test this at the moment, just throwing it out there.I yet have to test that. On a QuakeWiki article it's being stated that this entity is partially useless as entities can loop each other, but I guess a trigger_relay won't hurt as looping multi_managers using themselves is actually a problem for me right now.
Jessie said:Firstly, just for clarification (I don't know if it actually affects anything, but pays to know), which game is this supposed to be for? Half-Life, HL Deathmatch, Counter-Strike, etc.?The map is for Counter-Strike.
Secondly, what is the loop supposed to do? Maybe you cut it out of the file you uploaded, but retriggering those trains doesn't do anything.
Jessie said:The quick test map I threw together (now that I'm not in bed going to sleep) doesn't seem to have any problem with looping multi_managers. Nothing special going on.Here it is: https://drive.google.com/open?id=1_q9jpe9medPFf6roeFQpwzWYd181Lfgs
If you're still having trouble, maybe post your test .rmf.
MistaX88 said:Ah, I misunderstood the details and didn't see your 2nd post.Thank you for that tutorial, but I find it kinda complex to understand. I currently think I found a "fix" to the problem, especially for the needs in my map. If it all ends up working fine without side effects, I'll post the solution here, or at least how it works on my map since it's not a regular one.
I was always under the impression that a multi_manager loop couldn't target itself. There is an old tutorial about multi_manager looping. https://twhl.info/wiki/page/Tutorial:_Multi_manager_Looping_Made_Easy
MistaX88 said:Train entities are weird in counter-strike. Something about the way they reset isn't quite right and I can't figure it out.It's not the Train/Tracktrain entities, it's the multi_managers that don't "restart" properly.
Windawz said:Tracktrains may be the problem. I've already seen one person complaining that a path_track wouldn't fire its target when passed by a tracktrain. Try replacing tracktrains with usual trains, as well as path_tracks with path_corners.I replaced Tracktrains with Trains recently, as Tracktrains seemed to be an entity for even more features that I didn't actually need; all I wanted was a moving platform that would instantly go to its initial spot after a round restart, so a func_door wasn't suitable.
Jessie said:Well, a couple of things. Firstly, if the setup isn't too complex, consider compiling the four multi_managers into one ...Actually, there's a reason these managers aren't just one: I'm working on a map that has 60 func_tracktrains, 15 in each multi_manager and a 16th target that will fire the next multi_manager. The issue was found in that same map, so I recently made a small "test" map with only one target and one multi_manager ('the next') to see if the problem persists, which does. In the test map it's just 4 tracktrains, but the problem is still in there, as if the managers had some kind of a "Delay before resetting" (but they still use the time it takes for the whole process to end).
MistaX88 said:Alternatively, it wouldn't be that difficult to replace one of the 16 entities in a multi_manager with another multi_manager, and then have that new multi_manager trigger the other entity. You can have a branching tree of multi_managers.That's what I referred to with "creating a sub-multimanager", but instead of the 16th target being a multimanager, I thought of sub- one being the first, firing the "extra" target and then the multi_manager full of targets.
MOCOLONI said:In fact my upcoming map for a community uses breakable brushes and tracktrains guided by 4 multi_managers (the idea is using them to reach the Breakables and break them, as there isn't a logic_case counterpart [or is there one?]), and got to know that both these entities get restored on round restart. I also got to know that it only fires the last 16 targets (or basically 'just 16 targets') ...
MistaX88 said:If you're mapping for CS, forget everything you know about Source entities. Unfortunately, there are severe limitations. Goldsrc doesn't have the input/output system of Source and not many entities reset from round to round. It's just something you have to work around.Appreciate your reply a lot, especially for letting me know that a multithreaded multi_manager can cause problems.
func_door is your friend.
func_door resets every round. ...
Loulimi said:I know very little about the way rounds work in CS entity-speaking. However, what is it you don't understand about multi manager? I didn't get what your problem is.The multi_manager entity was just an example. If you know how Source mapping works, let's suppose that its counterpart, the logic_relay entity, fires targets with some delays; a round restart would also reset the logic_relay, but in GoldSrc/multi_manager's case, it doesn't happen and everything continues with the job until finishing.