Skip to content

Commit b79e323

Browse files
Add gamedata support for css, dods, and hl2dm
1 parent 5cda43d commit b79e323

File tree

2 files changed

+52
-34
lines changed

2 files changed

+52
-34
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# VScript
22

3-
SourceMod plugin that exposes many VScript features to make use of it. Currently supports L4D2 and TF2.
3+
SourceMod plugin that exposes many VScript features to make use of it.
4+
5+
Currently supports the following games:
6+
- Counter Strike: Source
7+
- Day of Defeat: Source
8+
- Half-Life 2: Deathmatch
9+
- Left 4 Dead 2
10+
- Team Fortress 2
411

512
## Builds
613
All builds can be found in [releases](https://github.com/FortyTwoFortyTwo/VScript/releases) page, auto-built on every commits done in main branch.

gamedata/vscript.txt

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
"Offsets"
3636
{
37-
// All offsets are based on games with smallest offset numbers (e.g. TF2)
37+
// All offsets are based on any game with smallest offset numbers, of which a large amount of it is based from sdk2013
3838

3939
"ScriptClassDesc_t::m_pszScriptName"
4040
{
@@ -296,8 +296,51 @@
296296
}
297297
}
298298

299+
"#default"
300+
{
301+
"#supported"
302+
{
303+
"game" "cstrike" // Counter Strike: Source
304+
"game" "dod" // Day of Defeat: Source
305+
"game" "hl2mp" // Half-Life 2: Deathmatch
306+
"game" "tf" // Team Fortress 2
307+
}
308+
309+
"Keys"
310+
{
311+
// 6 - IGameSystem::LevelShutdownPreClearSteamAPIContext
312+
"IGameSystem::ExtraOffsets" "6"
313+
}
314+
315+
"Offsets"
316+
{
317+
// These games have m_pFunction sized 16 bytes, giving 12 extra bytes
318+
319+
"ScriptFunctionBinding_t::m_flags"
320+
{
321+
"linux" "56"
322+
"windows" "56"
323+
}
324+
325+
"sizeof(ScriptFunctionBinding_t)"
326+
{
327+
"linux" "60"
328+
"windows" "60"
329+
}
330+
331+
"sizeof(ScriptFunctionBindingStorageType_t)"
332+
{
333+
"linux" "16"
334+
"windows" "16"
335+
}
336+
}
337+
}
338+
339+
299340
"left4dead2"
300341
{
342+
// Left 4 Dead 2
343+
301344
"Keys"
302345
{
303346
// 6 - IScriptVM::GetInternalVM
@@ -328,36 +371,4 @@
328371
"FIELD_QANGLE" "40" // +1
329372
}
330373
}
331-
332-
"tf"
333-
{
334-
"Keys"
335-
{
336-
// 6 - IGameSystem::LevelShutdownPreClearSteamAPIContext
337-
"IGameSystem::ExtraOffsets" "6"
338-
}
339-
340-
"Offsets"
341-
{
342-
// TF2 have m_pFunction sized 16 bytes, giving 12 extra bytes
343-
344-
"ScriptFunctionBinding_t::m_flags"
345-
{
346-
"linux" "56"
347-
"windows" "56"
348-
}
349-
350-
"sizeof(ScriptFunctionBinding_t)"
351-
{
352-
"linux" "60"
353-
"windows" "60"
354-
}
355-
356-
"sizeof(ScriptFunctionBindingStorageType_t)"
357-
{
358-
"linux" "16"
359-
"windows" "16"
360-
}
361-
}
362-
}
363374
}

0 commit comments

Comments
 (0)