vsh2-devs / vs-saxton-hale-2 Goto Github PK
View Code? Open in Web Editor NEWVSH2 is a rewrite of the original VSH, meant to combine the best of VSH and FF2.
Home Page: https://forums.alliedmods.net/showthread.php?t=286701
VSH2 is a rewrite of the original VSH, meant to combine the best of VSH and FF2.
Home Page: https://forums.alliedmods.net/showthread.php?t=286701
When a boss takes damage by sources not caused by entities > MaxClients, most notably trigger_hurts, the following happens.
L 12/10/2016 - 14:58:56: [SM] Exception reported: Property "m_nPlayerCond" not found (entity 241/trigger_hurt)
L 12/10/2016 - 14:58:56: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 14:58:56: [SM] Call stack trace:
L 12/10/2016 - 14:58:56: [SM] [0] GetEntProp
L 12/10/2016 - 14:58:56: [SM] [1] Line 539, E:\Sourcemod\include\tf2_stocks.inc::TF2_IsPlayerInCondition
L 12/10/2016 - 14:58:56: [SM] [2] Line 360, modules/handler.sp::ManageOnBossTakeDamage
L 12/10/2016 - 14:58:56: [SM] [3] Line 647, vsh2.sp::OnTakeDamage
A fix would be to cut it short by changing if (attacker <= 0)
to if (attacker <= 0 || attacker > MaxClients)
default cvar value will be false.
Would be another event like the current ManageOnBossDealDamage etc.
Something I remember being a cool feature of the old OzFur VSH:Remake servers was that they had these randomly (though pretty uncommom) occuring 'Unusual' rounds. They would apply some unique round modifier for the current boss. Examples: http://vssaxtonhale.wikia.com/wiki/Unusual_Bosses
Obviously this would be an optional feature, with a CVAR. It could even just be a framework for round modifiers for server developers.
This happens every time someone uses a specific weapon (taken from the context of the code)
L 12/10/2016 - 13:21:41: [SM] Exception reported: Entity index 0 is not a valid client
L 12/10/2016 - 13:21:41: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 13:21:41: [SM] Call stack trace:
L 12/10/2016 - 13:21:41: [SM] [0] GetPlayerWeaponSlot
L 12/10/2016 - 13:21:41: [SM] [1] Line 515, modules/handler.sp::ManageOnBossTakeDamage
L 12/10/2016 - 13:21:41: [SM] [2] Line 647, vsh2.sp::OnTakeDamage
The fix for this is easy, find GetPlayerWeaponSlot(Hale, TFWeaponSlot_Melee); and replace with GetPlayerWeaponSlot(victim.index, TFWeaponSlot_Melee);
minor issue is that every time an engineer builds, he (idiotically) yells about what he's building and gives away his position. This small code hopefully should silence so that engineers don't screw themselves over.
#include <sourcemod>
#include <sdktools>
char samples[][] = {
"engineer_autobuildingsentry",
"engineer_autobuildingteleporter",
"engineer_autobuildingdispenser",
"engineer_sentrymoving",
"engineer_sentrypacking",
"engineer_sentryplanting"
};
public Plugin myinfo = {
name = "Block Engineer Announcements",
author = "Powerlord",
description = "Shh, I'm buildin' a sentry.",
version = "1.1",
url = "https://forums.alliedmods.net/showthread.php?t=191220"
}
public OnPluginStart()
{
AddNormalSoundHook(EngySoundHook);
}
public Action EngySoundHook(int clients[64], int& numClients, char sample[PLATFORM_MAX_PATH], int& entity, int& channel, float& volume, int& level, int& pitch, int& flags)
{
int size = sizeof(samples);
for (int i=0; i<size; i++) {
if (StrContains(sample, samples[i], false) > -1)
return Plugin_Handled;
}
return Plugin_Continue;
}
@assyrianic You're using the now defunct attribute 265 for mini-crits on airborne targets. You'll need to switch over to how I fixed it in VSH using the 'new' attribute (114 ; 1). Here. You can replace TFCond:99 with TFCond_GrapplingHookSafeFall, I just never got around to doing it.
Is this intentional?
apparently, the original creator of vsh and ff2 made a respawn ticket subplugin which was created to address the apparent issues of people getting bored because they died very quickly and had to wait for a new round.
I was thinking of adding that as an internal feature managed by the gamemode manager and enabled by cvar.
as far as I know, the mechanics for the respawn ticket was that RED team had a limited number of respawns that was shared by everybody and each person could stake a claim to the tickets unless they were all used up.
Each claimed "ticket" was then called on a timer to respawn the ticket claimers all at one time.
Happens sometimes when playing as HHH, special conditions I didn't feel like looking into.
L 12/10/2016 - 15:42:47: [SM] Exception reported: Client index 64 is not valid
L 12/10/2016 - 15:42:47: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 15:42:47: [SM] Call stack trace:
L 12/10/2016 - 15:42:47: [SM] [0] TF2_StunPlayer
L 12/10/2016 - 15:42:47: [SM] [1] Line 347, modules/bosses/hhh.sp::StunHHH
L 12/10/2016 - 15:42:47: [SM] [3] Call_Finish
L 12/10/2016 - 15:42:47: [SM] [4] Line 639, modules/stocks.inc::DoThink
The cause is using userid where index should be used, change userid in TF2_StunPlayer(userid, ...)
to client.
Getting several errors when all players leave a server while VSH2 is running. Lots of invalid client errors.
L 09/25/2016 - 12:55:11: [SM] Exception reported: Invalid client index 0
L 09/25/2016 - 12:55:11: [SM] Blaming: vsh2.smx()
L 09/25/2016 - 12:55:11: [SM] Call stack trace:
L 09/25/2016 - 12:55:11: [SM] [0] ThrowError
L 09/25/2016 - 12:55:11: [SM] [1] Line 40, C:\hlserver\tf\addons\sourcemod\scripting\include\morecolors.inc::CPrintToChat()
L 09/25/2016 - 12:55:11: [SM] [2] Line 1367, modules/handler.sp::_SkipBossPanel()
L 09/25/2016 - 12:55:11: [SM] [4] Call_Finish
L 09/25/2016 - 12:55:11: [SM] [5] Line 639, modules/stocks.inc::DoThink()
L 09/25/2016 - 12:55:11: [SM] Exception reported: Invalid client index 0
L 09/25/2016 - 12:55:11: [SM] Blaming: vsh2.smx()
L 09/25/2016 - 12:55:11: [SM] Call stack trace:
L 09/25/2016 - 12:55:11: [SM] [0] ThrowError
L 09/25/2016 - 12:55:11: [SM] [1] Line 40, C:\hlserver\tf\addons\sourcemod\scripting\include\morecolors.inc::CPrintToChat()
L 09/25/2016 - 12:55:11: [SM] [2] Line 1367, modules/handler.sp::_SkipBossPanel()
L 09/25/2016 - 12:55:11: [SM] [4] Call_Finish
L 09/25/2016 - 12:55:11: [SM] [5] Line 639, modules/stocks.inc::DoThink()
L 09/25/2016 - 12:55:25: [SM] Exception reported: Client index 0 is invalid
L 09/25/2016 - 12:55:25: [SM] Blaming: vsh2.smx()
L 09/25/2016 - 12:55:25: [SM] Call stack trace:
L 09/25/2016 - 12:55:25: [SM] [0] AreClientCookiesCached
L 09/25/2016 - 12:55:25: [SM] [1] Line 110, modules/base.sp::BaseFighter.iPresetType.get()
L 09/25/2016 - 12:55:25: [SM] [2] Line 398, modules/gamemode.sp::VSHGameMode.GetBossType()
L 09/25/2016 - 12:55:25: [SM] [3] Line 135, modules/events.sp::RoundStart()
Sometimes when spawning new weapons, this happens.
L 12/10/2016 - 17:02:47: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
L 12/10/2016 - 17:02:47: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 17:02:47: [SM] Call stack trace:
L 12/10/2016 - 17:02:47: [SM] [0] TF2Items_SetAttribute
L 12/10/2016 - 17:02:47: [SM] [1] Line 179, vsh2.sp::TF2Item.SetAttribute
L 12/10/2016 - 17:02:47: [SM] [2] Line 321, modules/base.sp::BaseFighter.SpawnWeapon
L 12/10/2016 - 17:02:47: [SM] [3] Line 1477, modules/handler.sp::PrepPlayers
L 12/10/2016 - 17:02:47: [SM] [5] Call_Finish
L 12/10/2016 - 17:02:47: [SM] [6] Line 639, modules/stocks.inc::DoThink
The exact cause I'm not sure of, but I'm willing to bet it's ExplodeString returning 1
instead of 0
for some odd reason, either way I'd say it's better to be on the safe side and always ensure that count here is always divides evenly by 2. Which can be done by appending changing ExplodeString(att, " ; ", atts, 32, 32);
into ExplodeString(att, " ; ", atts, 32, 32) & (~1);
, it uses the bitwise operators to simply strip away uneven numbers if needed, as always just subtracting 1 wont work whereas always doing this will.
After simply being hit even once (with any shield equipped), the Targe 2-hits thing stops working until the plugin is reloaded (aka map change).
I've been considering this idea for a while, and decided it can't hurt to put it here.
So historically the info panels for class and boss information have been a bit messy, and also restricted by a character limit.
I was thinking that for the class info panels, we could do something like what Custom Weapons 3 does custom weapon info. Split it into weapon slots and passive class abilities (like the optional life regen CVAR), and have a seperate section for the current boss, so you can see what you're fighting against.
Instead of the current message that pops up at the start of a round, a menu will display with your currently equipped weapons and class.
Perhaps as an extra feature add an extra menu that you can use to browse all weapons/classes.
Haven't thought about the boss panels too much, but I guess it could just be set up in 3 categories for boss devs to work with however they want; Weapon(s), abilities, and stats (like if the boss has less HP or multiple lives). Also maybe a bio section, like VSH1 sorta kinda has.
Again, potentially have it be possible to look through all the boss panels of bosses currently in the server with another command.
I don't know if using translation files or leaving in the plugin itself would be more convenient for developers to edit for this, personally not a fan of translation files but it would allow for multi-language support for devs.
I don't know if this would be too much effort for not much gain, but I think the people who do read the class/boss info panels would appreciate it.
basically if you know the plugin called "haledmg on", this is the same thing but making it internal and hardcoded to the plugin. I'll add a cvar that turns it off or on with on being default.
Is this a bug or a feature? It seems kind of silly though when you get a triple-boss round with all Saxton Hales.
Rather than generate a countdown timer, why not just use the inbuilt timer function? Looks much nicer too, being a part of the actual HUD and all.
You might need to do some extra stuff to get the timer to stop when Hale's HP reaches a certain level though.
This happens when there's an engineer.
L 12/10/2016 - 15:02:49: [SM] Exception reported: Client index -1 is invalid
L 12/10/2016 - 15:02:49: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 15:02:49: [SM] Call stack trace:
L 12/10/2016 - 15:02:49: [SM] [0] GetClientTeam
L 12/10/2016 - 15:02:49: [SM] [1] Line 1900, modules/handler.sp::ManageFighterThink
L 12/10/2016 - 15:02:49: [SM] [2] Line 564, vsh2.sp::Timer_PlayerThink
The enemy check on this line should at least be enemy > 0
and would be better off as enemy > 0 and enemy <= MaxClients
.
L 09/04/2016 - 11:38:32: [SM] Exception reported: Client index 0 is invalid
L 09/04/2016 - 11:38:32: [SM] Blaming: vsh2.smx()
L 09/04/2016 - 11:38:32: [SM] Call stack trace:
L 09/04/2016 - 11:38:32: [SM] [0] GetClientUserId
L 09/04/2016 - 11:38:32: [SM] [1] Line 67, modules/base.sp::BaseFighter.BaseFighter()
L 09/04/2016 - 11:38:32: [SM] [2] Line 557, modules/base.sp::BaseBoss.BaseBoss()
L 09/04/2016 - 11:38:32: [SM] [3] Line 624, C:\hlserver\tf\addons\sourcemod\scripting\vsh2.sp::OnTakeDamage()
Why not just use the newer models by default? It seems kind of strange to be supporting the older models at all, considering you can't even headshot the old Vagineer model.
Original VSH had a planned thing for medieval mode maps or servers but was never implemented.
The original mechanic was that medieval mode maps/servers would give players 3 lives since it was melee only.
If boss doing taunt, scout can instantly kill him with Shortstop alt-fire.
1.5.1 Beta
sometimes during gameplay, I have noticed that my HUD goes away, my speed goes to normal, and boss functionality from the boss specific Think() methodmap function.
So it IS optional on compile, but it is not optional to NOT run the TF2Attbs plugin if VSH2 was compiled with it.
To fix it, we just need to make a copy paste of the SteamTools enabled bool for TF2Attbs, then apply it in the same way VSH1 has done.
uncommonly, sometimes the mod bugs out and the person to be the boss has the model applied but doesn't lose their items or have any boss code running, so it looks like a normal player with a boss model on them and their class weapons.
I think the VSH1 code to block boss suiciding and joining red team should work in this case.
I was going to do the code myself but I'm tied as I need to remake my server since my community owner wiped it >_>
basically when VSH2 is running, it'll control boss code through an interpreter to a folder and it will run code according to the boss it is for.
Think the idea of QuakeC for the Quake engine. This idea is basically an alternative to give not only coding power to newbies and server operators but it'll match against FF2's config system by having an easy scripting language.
I'm thinking it'll be a very simple and easy to learn scripting sub-language too.
should probably block this as well and I do not know how to block this.
I was thinking, instead of having the name as "Vs. Saxton Hale 2", it should be renamed to "Super VS. Saxton Hale" aka Super VSH or "Freak Fortress 1" ? lol.
Idea is to set a new name to differentiate it from the original VSH even though it sorta stems from it but the purpose is to emphasize that VSH2 is very different and built with a different purpose.
L 09/04/2016 - 11:59:21: [SM] Exception reported: Cannot evaluate the square root of a negative number (val:-51.000000)
L 09/04/2016 - 11:59:21: [SM] Blaming: vsh2.smx()
L 09/04/2016 - 11:59:21: [SM] Call stack trace:
L 09/04/2016 - 11:59:21: [SM] [0] SquareRoot
L 09/04/2016 - 11:59:21: [SM] [1] Line 656, modules/base.sp::BaseBoss.GiveRage()
L 09/04/2016 - 11:59:21: [SM] [2] Line 734, modules/handler.sp::ManageHurtPlayer()
L 09/04/2016 - 11:59:21: [SM] [3] Line 79, modules/events.sp::PlayerHurt()
pretty much the title
With the recent closing of BBG's TF2 servers, Shadow93/Koishi has decided to release the source code for their custom FF2 fork to the public.
No harm in browsing through it for any nice features to add to VSH2.
Compiling vsh2.sp...
SourcePawn Compiler 1.8.0.5967
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2015 AlliedModders LLC
modules/handler.sp(101) : warning 213: tag mismatch
modules/handler.sp(118) : warning 213: tag mismatch
modules/handler.sp(118) : warning 213: tag mismatch
modules/handler.sp(126) : warning 213: tag mismatch
modules/handler.sp(153) : warning 213: tag mismatch
modules/handler.sp(169) : warning 213: tag mismatch
modules/handler.sp(183) : warning 213: tag mismatch
modules/handler.sp(197) : warning 213: tag mismatch
modules/handler.sp(221) : warning 213: tag mismatch
modules/handler.sp(279) : warning 213: tag mismatch
modules/handler.sp(293) : warning 213: tag mismatch
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossDealDamage"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossHealthCheck"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossJarated"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossKillBuilding"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossMedicCall"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossPickUpItem"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossTakeDamage"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnBossTaunt"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnControlPointCapped"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnHookSound"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnLastPlayer"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnMessageIntro"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnMusic"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnPlayerAirblasted"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnPlayerKilled"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnPrepRedTeam"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnRedPlayerThink"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnRoundEndInfo"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnUberDeployed"
vsh2.sp(1400) : warning 203: symbol is never used: "Call_OnVariablesReset"
This is an enhance that I'm planning myself to do, basically gonna replace the backing variables for the methodmaps with StringMaps (aka dictionaries) for the sake of organization and faster code updating.
The benefit to this is that, since dictionaries have O(1) time for all necessary operations in this case, we won't lose much needed speed performance.
I'm putting this as an issue so I can remind myself to do it.
I believe for better clarity of modifying and controlling boss logic, should the backstab logic be an overall separate event from OnBossTakeDamage?
occasionally and sometimes frequently, the RoundEnd code doesn't run. Problem with this is that the boss' queue points don't return to 0 and the person who was the boss when this occurs infinitely becomes the boss unless they reset their queue points manually.
as a test to show off VSH2's new subplugin system, I'm proposing to move Plague Doctor to a subplugin form instead of having him inside the core plugin itself.
Latest dev version.
Would it be worth borrowing some Arena:Respawn code to make caps not an instant win on the first cap (maybe after 3 caps or something)?
Or is this the sort of thing that should just be left to server operators.
I'm asking because I just finished a working (albeit kind of spaghetti-coded) version of Chdata's unimplemented Cap Point idea that did effects on cap rather than win the round in my branch of VSH1.
The most notable examples being:
For some reason all fall damage is being negated while VSH2 is running.
Instead of full on 100% crits (which in most cases, is extremely OP for the Demoman), how about having it scale up from no-crits, to mini-crits, and finally regular crits proportionally to the charge meter?
0-35% would be no buff, 35-85% would be minicrits, 85+% would be crits (percentages subject to change under testing, of course), and a broken shield would be crits/minicrits (since they're vulnerable without the shield escape the crits aren't as OP in that case).
EDIT: Add optional CVAR as well, perhaps.
Putting this here for recording purposes, since I've already mentioned it twice before.
The plugin currently will not compile unless you add "modules/" to the path of every #include that references a file within that folder.
Just preemptively making this issue to use as a checklist for any problems that arise from this year's Halloween update (scheduled to go live tomorrow).
for some reason, the boss menu won't fire.
Unsure of what sounds aren't being precached, but my test server console is being spammed with
SV_StartSound: not precached (0)
from time to time.
Why does the Mantreads even have the cancel falling damage attribute when all fall damage is disabled anyway?
Sometimes the following shows up in our error logs
L 12/10/2016 - 11:56:15: [SM] Exception reported: Client 1 is not in game
L 12/10/2016 - 11:56:15: [SM] Blaming: customPlugins/vsh2.smx
L 12/10/2016 - 11:56:15: [SM] Call stack trace:
L 12/10/2016 - 11:56:15: [SM] [0] IsPlayerAlive
L 12/10/2016 - 11:56:15: [SM] [1] Line 90, modules/handler.sp::ManageDisconnect
L 12/10/2016 - 11:56:15: [SM] [2] Line 438, vsh2.sp::OnClientDisconnect
A possible fix is to add IsClientInGame prior to IsPlayerAlive, or around depending on what should be run only when the client is In Game, in ManageDisconnect in handler.sp. A client disconnecting does not equate to them being in-game, it only means they were at least connected.
I just realized VSH2 isn't using VSH1's PrepareModel/Material/Sound (and other such functions) stocks, which combine adding to the downloads table and precaching into one function.
While I'm addressing #26 I'll work this as well.
self explanatory.
I'll build a system of natives and forwards for other plugins to use.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.