Transitioning devs, documenting and testing 2.13 for final fixes for release.
VSH2 Addons Repository
NOTICE: This readme will be updated soon. Thank you for your patience!
VSH2 is a rewrite of VSH1. VSH1 and FF2 both had a very bad gamemode framework using shoddy, hacky coding. I could even go as far to say they probably had no framework at all nor any real structure to its code.
VSH2 actually has a structured, event-based framework which combines the best features of both FF2 and VSH1 by not only having multiplayer boss support but also to make it easier to add new bosses and give them truly unique abilities & mechanics through giving the developer full, uninhibited control by code rather than strictly config files.
FF2's purpose was to be very easy to add bosses in a generic, cookie-cutter manner. Of course there's a trade off: FF2 is alot more difficult, if not impossible, to truly customize boss mechanics & abilities without having to recode parts of FF2 itself. VSH2, since it requires at least some experience with SourcePawn, is somewhat more difficult for a newbie to create new bosses than if they were to use FF2 but choosing VSH2 rewards taking the harder route by allowing you to control damn near every individual boss behavior and logic.
If you do require help in setting up the bosses or at least need some info on the API for boss building, then take advantage of VSH2's vast API by having a look at the VSH2 wiki
NB: VSH2 will work perfectly fine as-is out of the box as a VSH1 replacement, but it was designed with capable SourcePawn developers in mind to make the most out of the coded-from-scratch framework!
addons/sourcemod/configs
. Make sure to keep the folder structure that's in the configs.Use New sourcepawn syntax (sourcemod 1.7+).
Statements that require parentheses (such as 'if' statements) should have each side of the parentheses spaced out with the beginning parens touching the construct keyword, e.g. construct( code/expression )
.
Single line comments that convey a message must have 3 slashes: ///
.
Multi-line comments that convey a message should have an extra beginning star: /**
.
Properties, functions, & methods smaller than 30 lines of code should have the beginning {
brace in K&R C style, for example: ret func() {
.
Local variable names should be in snake_case.
Property names must have a single-letter prefix of their type.
Functions, methods, methodmaps, enums, enum values, must be named in PascalCase. Pascal_Case is also acceptable.
Enum values used as flags may be upper-case.
Named constants rules:
1.0
) should be enum constants that are added with 0.0
at their location(s) of use.3.14
) should be preprocessor defines.Chained if
statements aren't bad but if the data is only ever be one thing at a time, use if-else if
statements.
if-else if
statements on a single piece of data, use a switch
statement.Bit fields/flags lets you use a single int as 32 bools. Useful if an element can be multiple aspects at once.
1 << n
where n
is from 0 to 31.IntLog2
in int_log.inc
: n == IntLog2(1 << n)
No pre-increments ++i, i--
, Post-Increments only i++, i--