Giter VIP home page Giter VIP logo

metahooksv's Introduction

MetaHookSv

This is a porting of MetaHook for SvEngine (GoldSrc engine modified by Sven Co-op Team),

Mainly to keep you a good game experience in Sven Co-op.

Most of plugins are still compatible with vanilla GoldSrc engine. please check each plugin's doc for plugin compatibility.

中文README

Compatibility (metahook loader only)

Engine
GoldSrc_blob (3248~4554)
GoldSrc_legacy (< 6153)
GoldSrc_new (8684 ~)
SvEngine (8832 ~)
GoldSrc_HL25 (>= 9884)

Download

GitHub Release

  • MetaHookSv-windows-x86.zip for most users.

  • MetaHookSv-windows-x86-blob-support.zip for legacy GoldSrc engine with buildnum < 4554.

Risk of VAC ?

There is no VAC ban reported yet.

The binaries or executables of Sven Co-op are not signed with digital signatures thus no integrity check from VAC would be applied for them.

FAQ

  1. Why the game process hangs up / freeze occasionally for few seconds when playing on legacy / pirated version of GoldSrc game ?

Q: This is because Valve uses gethostbyname with an non-existing hostname to query master servers. which is known to block the whole game loop for few seconds if the hostname is not available.

You can either add -nomaster to launch paramaters to prevent engine from querying invalid hostname or add -steam launch paramaters to force engine to use a valid master server source (which probably not gonna work on pirated game).

  1. Why the game process hangs up for tens of seconds on exiting / on restarting ?

Q: This is because ThreadGuard.dll is waiting for Valve's network threads or similiar things to exit before actually exiting the game. See ThreadGuard for more details.

One Click Installation

  1. Download from GitHub Release, then unzip it.

  2. Run scripts\install-to-SvenCoop.bat (or scripts\install-to-(WhateverGameYouWant).bat, depends on which you are going to play)

  3. Launch game from either the generated shortcut MetaHook for SvenCoop.lnk (* Run MetaHook for [GameName].lnk for games other than Sven Co-op.)

  • Other games follow the same instruction.

  • You should have your Steam running otherwise the SteamAppsLocation will probably not going to find GameInstallDir.

Manual Installation

  1. Download from GitHub Release, then unzip it.

  2. All required executable and resource files are in Build folder, copy whatever you want to \SteamLibrary\steamapps\common\Sven Co-op\.

  3. Go to \SteamLibrary\steamapps\common\Sven Co-op\svencoop\metahook\configs\, rename plugin_svencoop.lst (or plugin_goldsrc.lst) to plugin.lst (depending on the engine you are going to run)

  4. Rename MetaHook.exe to (ModDirectory).exe, Let's say svencoop.exe for Sven Co-op. or cstrike.exe for Counter-Strike.

  • Use MetaHook_blob.exe instead of MetaHook.exe if you are on a legacy GoldSrc engine with buildnum < 4554.

  • Plugins can be disabled or enabled in \SteamLibrary\steamapps\common\Sven Co-op\svencoop\metahook\configs\plugins.lst

  • The SDL2.dll fixes a bug that the IME input handler from original SDL library provided by valve was causing buffer overflow and game crash when using non-english IME. you don't need to copy it if you don't have a non-english IME.

  • Valve has fixed this issue in the HL25th update, you don't have to replace SDL2 if you are running HL25th engine.

Build Requirements

  1. Visual Studio 2017 / 2019 / 2022, with vc141 / vc142 / vc143 toolset

  2. CMake

  3. Git for Windows

Build Instruction

Let's assume that you have all requirements installed correctly.

  1. git clone --recursive https://github.com/hzqst/MetaHookSv to somewhere that doesn't contain space in the directory path.

  2. Run scripts\build-MetaHook.bat, wait for metahook exe to generate. The generated exe should be under Build if no error(s) occurs.

  3. Run scripts\build-Plugins.bat, wait for all plugins to generate. All generated dlls should be under Build\svencoop\metahook\plugins\ if no error(s) occurs.

Debugging

  1. git clone --recursive https://github.com/hzqst/MetaHookSv to somewhere that doesn't contain space in the directory path.

  2. Run scripts\debug-SvenCoop.bat (or scripts\debug-(WhateverGameYouWant).bat, depends on which you are going to debug with)

  3. Open MetaHook.sln with Visual Studio IDE, set specified project as launch project, compile the project, then press F5 to start debugging.

  • Other games follow the same instruction.

  • You should restart Visual Studio IDE to apply changes to debugging profile if Visual Studio IDE was running.

MetaHook Docs

Docs 中文文档

Plugins

CaptionMod

A subtitle plugin that adds closing-captioning, HUD text translatation to game, HiDpi support and Source2007-style chat dialog to game.

DOC 中文文档

BulletPhysics

A plugin that transform player model into ragdoll when player is dead or being caught by barnacle.

DOC 中文文档

MetaRenderer

A graphic enhancement plugin that modifiy the original render engine.

You can even play with 200k epolys models and still keep a high framerate.

DOC 中文文档

StudioEvents

This plugin can block studio-event sound spamming with controllable cvars.

DOC 中文文档

SteamScreenshots (Sven Co-op only)

This plugin intercepts snapshot command and replace it with ISteamScreenshots interface which will upload the snapshot to Steam Screenshot Manager.

SCModelDownloader (Sven Co-op only)

This plugin downloads missing player models from https://wootguy.github.io/scmodels/ automatically and reload them once mdl files are ready.

Cvar : scmodel_autodownload 0 / 1 Automatically download missing model from scmodel database.

Cvar : scmodel_downloadlatest 0 / 1 Download latest version of this model if there are multiple ones with different version.

CommunicationDemo (Sven Co-op only)

This plugin exposes an interface to communicate with Sven Co-op server.

DontFlushSoundCache (Sven Co-op only) (Experimental)

  • NOT READY FOR NON-DEVs

This plugin prevents client from flushing soundcache at retry (engine issues retry command everytime when HTTP download progress is finished), make it possible to preserve soundcache txt downloaded from fastdl resource server (sv_downloadurl).

The fastdl procedure only works when game server uploads current map's soundcache txt to the fastdl resource server. (I am using AliyunOSS)

The reason why I made this plugin is because transfering soundcache txt via UDP netchannel is really not a good idea as server bandwidth and file IO resource is expensive.

PrecacheManager

This plugin provides a console command fs_dump_precaches to dump precache resource list into [ModDirectory]\maps\[mapname].dump.res.

  • The SoundSystem from Sven Co-op uses soundcache.txt instead of engine's precache system to precache sound files.

ThreadGuard

This plugin intercepts Valve's Win32Thread creation and wait for all threads to exit before unloading the backed module, in case Valve's thread code gets running when the backed module is unloaded.

Managed modules that may create new threads and quit without waiting for thread termination :

hw.dll, GameUI.dll, ServerBrowser.dll

ResourceReplacer

This plugin replaces in-game resources (mainly model and sound files) at runtime with customizable replace list files without actually manipulating the files, just like what Sven Co-op does with gmr and gsr files.

DOC 中文文档

SCCameraFix (Sven Co-op only)

This plugin fixes camera glitching in spectator-view for Sven Co-op.

The updated spectator-view code credits to halflife-updated

ABCEnchance (third-party) (Sven Co-op only)

ABCEnchance is a metahook plugin that provides experience improvement for Sven co-op.

  1. CSGO style health and ammo HUD
  2. Annular weapon menu
  3. Dynamic damage indicator
  4. Dynamic crosshair
  5. Minimap which is rendered at real time
  6. Teammate health, armor and name display with floattext.
  7. Some useless blood efx

https://github.com/DrAbcrealone/ABCEnchance

HUDColor (third-party) (Sven Co-op only)

Changing HUD colors in game.

https://github.com/DrAbcrealone/HUDColor

MetaAudio (third-party) (GoldSrc only)

This is a plugin for GoldSrc that adds OpenAL support to its sound system. This fork fixes some bugs and uses Alure instead of OpenAL directly for easier source management.

Since SvEngine uses FMOD as it's sound system, you really shouldn't use this plugin in Sven Co-op.

https://github.com/LAGonauta/MetaAudio

  • MetaAudio blocks goldsrc engine's sound system and replaces with it's own sound engine. You should always put MetaAudio.dll on top of any other plugins that rely on goldsrc engine's sound system (i.e CaptionMod) in the plugins.lst to prevent those plugins from being blocked by MetaAudio.

Trinity-EngineSv (third-party) (GoldSrc only)

This is a Trinity Engine porting for Counter Strike 1.6

Client-Side part of the mod it´s introduced as a metahook plugin.

Server-Side part of the mod it´s done with a modifidied reGame dll.

https://github.com/ollerjoaco/Trinity-EngineSv

metahooksv's People

Contributors

drabcofficial avatar hzqst avatar katelin-basic avatar neubulae avatar ollerjoaco avatar qabriel99 avatar rbar1um43 avatar zaphero1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

metahooksv's Issues

r_wsurf_vbo breaks certain frames of textures.

In the MertaHookSv version of the renderer plugin, when r_wsurf_vbo is set to 0, almost all waterfall textures are frozen. Additionally, when r_wsurf_vbo is set to 1, almost all textures with an on/off variant will stay stuck in one of the two variants. For example, HEV chargers will show up as full even when empty, and almost all buttons will stay either on/off. While this is not game breaking, it's incredibly annoying.

Edit: I'm aware that the issue is (somewhat) talked about on the description of the wsurf_vbo option, the fact that the waterfalls aren't animated properly at all with the option off is certainly a bug, and the fact that the renderer is so unoptimized without it makes the mod almost unplayable unless you're willing to sacrifice the animations of buttons.

Also, good work on these amazing mods regardless. I just wish more people knew about them, because they deserve much more attention.

Texture filtering is forced on.

When using the MetaHookSv version of the renderer plugin, using the command "GL_texturemode GL_Nearest", which normally disables all of the texture filtering, does almost nothing.

Sky bug when joining the game with r_wsurf_vbo 1

When joining the game with r_wsurf_vbo 1 the sky is black with strange lines:
20210325231820_1

After toggling r_wsurf_vbo (r_wsurf_vbo 0;r_wsurf_vbo 1) the problem is solved and the sky is normal again. It only happens when joining a server with it enabled.

BUG

还是这个错误,我发现只要我开启渲染插件即便不开启任何功能某些地图也会变成这样
正常
de_dust0004_看图王
开启后
de_dust0003_看图王

阴影错误

20210720200727_1
20210720200721_1
20210720200722_1
我不清楚这是不是错误。

另外2个BUG:
1,在CS中 人质的阴影和玩家是相反的 玩家输入90是在正前方 而人质却在正后方。
2,在CS中 玩家死亡后尸体方向会立刻转向,也许这是因为玩家死后身体并不是一个实体的缘故?

请稍微增加些FPS

能否不要把FPS锁定在200,我在使用此插件前FPSfps可以达到200-300之间,是否可以提升最大FPS为300?因为我最近决定要更换为240HZ的屏幕

bug

以下为CS零点行动测试
1.记忆属性没了,即使在控制台R_HDR 0 下次进入游戏一切都会回归默认设置
2.CS零点行动任务模式无法打开手电筒
3.CS零点行动任务模式暂停时我的视角飞了出去
#cs_italy_cz0000_看图王
(第三个问题虽然不大,但在任务模式中玩家购买武器和打开控制台会自动暂停,难受不说,很容易头晕。)

什么时候支持其他金源游戏

他什么时候会支持CS或其他金源游戏,我非常想在金源使用更大面值的模型,但使用后的帧数令我头疼 ,你是否会有想法让他在其他对其他金源游戏支持。

Black Texture issue

Textures going black randomly, mostly happens after level change. (GoldSrc)

image

How to reproduce:

Just go to map c1a0b from c1a0a, you'll see the texture is changed goes black.

加载Renderer.dll导致无法进入游戏

进入游戏在主菜单载入的时候游戏就炸了,提示
Sven Co-op has Crashed unexpectedly. A crash report has been submitted automatically. We apologize for the inconvencience.

BUG

de_dust0001
使用了刚刚的最新版 阴影效果一直开着 重新进入游戏就是这样的情况

Improvements for Texture filtering

I have few improvement recommendations (bug fix actually) for Texture filtering.

1: When texture filtering is disabled, it doesn't effect skybox.
2: When you disable texture filtering, it doesn't disable it for chrome textures until game restarted.

BUG

使用了刚刚更新的版本 在地图黑暗的地方我的HUD也全部变黑看不到了

Zoomed screen issue

I don't know if this is a MetaHook (but i believe it is) problem but for some users screen starts zoomed for some reason.

Changing size of text, apps and other items to %100 in Windows Display Settings fixes the issue mostly.

Specific method of invisibility broken.

Got another weird one for you. Certain interactive objects with multiple normally invisible parts will not be invisible, namely in the conversion of the mod Uplinked ( http://scmapdb.wikidot.com/map:uplinked ) . The issues I've found are as such: Extra legs appearing on the cargo-robot (hl_u12_a5), duplicated submarines everywhere that the submarine stops at (hl_u12_a6), the Proto-Gluon having cubes where the spiral would be (hl_u12_a7), and finally, the satellite dish is duplicated (hl_u12_a9).
image
image
image

I'm unsure what method these use for invisibility, but it seems to be one that's broken in MetaHookSv. Loading without it shows each of these instances working correctly.

Viewmodel Color Remapping is broken.

This one's a bit odd. Recolorable viewmodels are completely broken, and the active HUD elements and particles cause changes to the color palette.

2021-06-30.11-52-36.mp4

Here's a colorable viewmodel pack to test it with: https://gamebanana.com/mods/167480

(The bug happens with multiple colorable viewmodel packs)

Also, it's for sure a Renderer issue, because here's a video taken with the same models, just without MetaHookSv:

2021-06-30.12-05-51.mp4

Wide characters in scoreboard have huge font size

Wide characters in the scoreboard (example: öäüßõ) have a huge font size (but the characters actually show correct!).
20210325214926_1
I actually like that bigger font, maybe just have it for all nicknames, even those without wide/special characters. It is just a minor annoyance that there are two different fonts and sizes.

动态模糊?

也许你会给渲染加入动态模糊功能?我觉得他现在所有的设置如SSAO,FXAA等非常棒 像是很多大型游戏才有的画面调节,但他支持一项动态模糊。 当然只是建议

视差贴图格式

原版
#youxiceshi0003
视差+法线
#youxiceshi0002

我刚测试了视差贴图以及法线贴图,法线贴图效果不是很明显,但视差贴图简直太棒了,我想请问都支持什么样的类型图片,我尝试使用了TGA,JPG,不知道是否支持DDS文件?
另外视差贴图是否是后缀为DIFF的贴图? 你可以告诉我怎么制作他们吗

烦人的误报错误

1Q)@1F2PWKY9ZY8 %NJ@%T9
每次进入游戏都会出现他们 即使纹理没有损坏。

你是否愿意有一个总细节纹理设置?这样我在某些使用相同纹理的地图就不用写两次纹理设置

Game doesn't relaunch

When _restart command used or Brightness/Gamma settings changed, MetaHook doesn't reload the game.

Culling Problems

20210620110743_1

It seems that when r_wsurf_vbo is set to 1, culling is broken and causes terrain that would normally be invisible to render. This can cause lower performance in some areas. I might not be accurately describing this, so I'll let the image speak for itself.

水不见了

20210721142914_1
我测试了最新版 有些地图水不见了,有些地图水的质量大大不如上个版本 因为他们好像没有混合着原版的纹理?

是否还支持3DSKY

我在制作地图时一直想把起源一些地图的3DSKY搬来,于是我使用了老版本的渲染器,但他不能把固体实体或模型的3DSKY在游戏世界显示,我想请问新版是否解决了此问题

Better implementation of character encoding (CaptionMod)

As of right now, if you had tried to add support to new languages, especially the ones with special (or accented) characters in their alphabets, you'd need to add every single special character by hand. Is it possible to update the plug-in that it somehow recognizes every single character automatically?

MSAA无效果

当我开启FXAA效果显著,但我把MSAA开到16时我的图像锯齿依然很明显,请检查一下

error delay loading library "metahook/fmodex.dll"

将build文件夹里的文件复制到游戏根目录后创建带有-game svencoop的metahook的快捷方式,运行之后跳出error delay loading library "metahook/fmodex.dll"的窗口,点击确定后游戏退出。
曾试过在游戏根目录创建名为metahook的文件夹,然后把svencoop文件夹里的fmodex.dll文件复制进去,之后再运行快捷方式不会跳出这个窗口,并且可以创建本地游戏,但是会出现无法搜索到服务器、游戏文件读取不完全(例如玩家模型数量减少,本地插件未启用),玩家视角转动受限制的问题,hdr、对话字幕等功能也没有,也无法用新增的指令进行调试。
问题

cs布娃娃错误

de_dust0000
我只给GIGN模型写了布娃娃配置(只写了动作序号)但所有模型在播放步枪动作的时候就变成了这样

地图的置换功能

哈哈 又是我 真不好意思 但我很激动能在CS用到这个插件
我在detail文件里写了cugroundi_PARALLAX tides_brick_wall_a.png 8 8, cugroundi_NORMAL tides_brick_wall_a_normal.png 8 8
控制台没有报错误,但当我打开r_wsurf_detail 1时 地图没有更换纹理 反而是让我地图上的其他纹理替换了上去,cugroundi是我的纹理名,是我的写法有问题吗 我想替换地图的材质给地图增加法线贴图 另外我想问我如何使用原来的细节纹理
你在这个文档中没有给出更多的写法

Weird Player model on CS1.6 build 8684

I just noticed some weird player model on certain animations.

CS1.6 version:
] version Protocol version 48 Exe version 1.1.2.7 (cstrike) Exe build: 19:53:27 Aug 3 2020 (8684)

I use only 2 metahook plugins:
Renderer.dll MetaAudio.dll

You can see the image i attached.
bugbugbug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.