hzqst / MetaHookSv

MetaHook (https://github.com/nagist/metahook) porting for SvEngine (GoldSrc engine modified by Sven-Coop)
MIT License
149 stars 37 forks source link

[CaptionMod] HLSDK Merge #80

Open edgarbarney opened 3 years ago

edgarbarney commented 3 years ago

Hello.

I know this is a MetaHook project but I was wondering if you're planning to merge this with HLSDK for modders? Ditching the Meta and "Injecting", I mean.

https://github.com/ValveSoftware/halflife - Original, outdated https://github.com/SamVanheer/halflife-updated - Modern, mostly used

I was going to work on it myself but I couldn't figure out how engine-injector communications work much. If you don't have plans for this, could you give me tips about how the injector calls engine functions?

Thanks.

hzqst commented 3 years ago

Are you planning to merge VGUI2 code into HLSDK? the VGUI2 code in this repo are mostly from Source2007, only part of them are reversed-engineered from GoldSrc hw.dll and vgui2.dll (like ISurface)

edgarbarney commented 3 years ago

Some mods ( even Counter-Strike 1.6 which is made by Valve ) using VGUI2. Also, non-reverse engineered sources of the VGUI2 are published with Source 2013 so it's not impossible in my opinion. Apart from that; If it's possible with injections, why wouldn't it be possible working with DLLs themselves? I mean, we can write a whole new renderer for Goldsrc.

And apart from that, we're not using a different engine; we're still on Valve's Half-Life platform. Since even FWGS is alive today, I don't think using VGUI2 in a Goldsrc mod shouldn't -and wouldn't- be a problem.

EDIT: I can even configure tmp64/hl1_source_sdk to use as a basic static library. Possibilities are here.

hzqst commented 3 years ago

Using VGUI2 components in HLSDK is definitely possible. All you need is to acquire VGUI2 interface from vgui2.dll and hw.dll like what DrAbcrealone did in his HUD mod.

Metahook is basically an util toolset that helps modder to locate non-export vars and functions, installing hook into whatever function they like, giving critical engine interface like gEngfuncs to client dll (or plugin dll in metahook), etc. You don't really need metahook in this condition.