Raised This Month: $183 Target: $400
 45% 

VSH VS. Saxton Hale Version 2 - v2.10.28 Dev


Post New Thread Reply   
 
Thread Tools Display Modes
Sappykun
Junior Member
Join Date: Nov 2019
Old 01-14-2021 , 01:06   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #131

I decided to give the FF2 compatibility layer a spin, but it seems like there are a lot of missing natives.

Running EP_'s Koishi boss, it relies on three sub-plugins:
  • default_abilities.ff2
  • rage_overlay.ff2
  • powerlord_abilities.ff2
However, loading Koishi as a boss causes the following errors in the console:

Code:
[SM] Plugin freaks/default_abilities.ff2 failed to load: Native "FF2_GetFF2flags" was not found.
[SM] Plugin freaks/rage_overlay.ff2 failed to load: Native "FF2_GetBossTeam" was not found.
[SM] Plugin freaks/powerlord_abilities.ff2 failed to load: Native "FF2_GetBossIndex" was not found.
These functions are defined as stocks in freak_fortress_2.inc, but it seems none of these functions are recognized as natives, even when I try to recompile default_abilities.sp using the new include.

I can make these messages go away when defining dummy natives in modules/ff2/natives.sp, but unfortunately I am not proficient enough in Sourcepawn to figure out how to get these natives to use the defined stock methods.

Should these subplugins be able to find the natives they're looking for? Am I just doing something wrong with my setup?

-------------------

On a side note, I noticed that when adding characters in data/freak_fortress_2/characters.cfg, it always seems to chop off the last defined character. For example, when I have:
Code:
"Freak Fortress 2"
{
	"1"		"koishi"
	"2"		"metalgearrising_armstrong"
}
I only see Koishi. When I have:
Code:
"Freak Fortress 2"
{
	"1"		"koishi"
	"2"		"metalgearrising_armstrong"
	"3"		"whatever"
}
I see both Koishi and Armstrong as intended.
Sappykun is offline
WhiteFalcon
Member
Join Date: Nov 2019
Old 01-14-2021 , 07:43   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #132

Quote:
Originally Posted by Sappykun View Post
However, loading Koishi as a boss causes the following errors in the console:

Code:
[SM] Plugin freaks/default_abilities.ff2 failed to load: Native "FF2_GetFF2flags" was not found.
[SM] Plugin freaks/rage_overlay.ff2 failed to load: Native "FF2_GetBossTeam" was not found.
[SM] Plugin freaks/powerlord_abilities.ff2 failed to load: Native "FF2_GetBossIndex" was not found.
These functions are defined as stocks in freak_fortress_2.inc, but it seems none of these functions are recognized as natives, even when I try to recompile default_abilities.sp using the new include.
Make sure you're running and compiling with VSH2-Branch, those natives doesn't exists anymore and are reforwarded with a stock function. I lazily updated default_abilities for now, it should work but you should also use ff2_vsh2defaults documented here for consistency


Quote:
Originally Posted by Sappykun View Post
I can make these messages go away when defining dummy natives in modules/ff2/natives.sp, but unfortunately I am not proficient enough in Sourcepawn to figure out how to get these natives to use the defined stock methods.
You shouldn't use anything in "modules/ff2" directory except for "formula_parser" if you really need to


Quote:
Originally Posted by Sappykun View Post
On a side note, I noticed that when adding characters in data/freak_fortress_2/characters.cfg, it always seems to chop off the last defined character. For example, when I have:
Code:
"Freak Fortress 2"
{
	"1"		"koishi"
	"2"		"metalgearrising_armstrong"
}
I only see Koishi. When I have:
Code:
"Freak Fortress 2"
{
	"1"		"koishi"
	"2"		"metalgearrising_armstrong"
	"3"		"whatever"
}
I see both Koishi and Armstrong as intended.
I'm not sure about what's wrong here exactly, i'll look it up later when i'm not busy. For now you can use ConfigMap's enumeration to resolve it
Code:
"Freak Fortress 2"
{
	"<enum>"		"koishi"
	"<enum>"		"metalgearrising_armstrong"
	"<enum>"		"some_other_hale"
	"<enum>"		"etc"
}
Four final notes
  • Make sure you're compiling the latest version of FF2
  • Inb4 Nergal merge the PR, make sure your "slot" or "arg0"'s value is not "0", you can straight up remove it for now or change it to "10", or wait for Nergal to merge
  • Check the Wiki here for more informations, still under construction and if you need any more questions, you can make a post an issue there, new thread, or wait until I finish the wiki
  • For koishi's config, you can add two keys
    Code:
    	"No Superjump"			"1" // Disable superjump
    	"No HUD"			"1" // Disable superjump hud

Last edited by WhiteFalcon; 01-14-2021 at 07:49.
WhiteFalcon is offline
Sappykun
Junior Member
Join Date: Nov 2019
Old 01-14-2021 , 16:03   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #133

Quote:
Originally Posted by WhiteFalcon View Post
Make sure you're running and compiling with VSH2-Branch, those natives doesn't exists anymore and are reforwarded with a stock function. I lazily updated default_abilities for now, it should work but you should also use ff2_vsh2defaults documented here for consistency
That seems to have fixed the import issues, but now Koishi seems to have infinite rage. Anytime I press E, the rage meter resets to 0 and her teleport/stun immediately activates. I haven't edited her config outside of replacing default_abilities with ff2_vsh2defaults.

I've also noticed this output in the console:

Code:
L 01/14/2021 - 19:33:03: [custom/vsh2/freak_fortress_2.smx] [VSH2/FF2] Failed to find plugin: freaks\ff2_vsh2defaults.ff2
L 01/14/2021 - 19:33:03: [custom/vsh2/freak_fortress_2.smx] [VSH2/FF2] Failed to find plugin: freaks\rage_overlay.ff2
L 01/14/2021 - 19:33:03: [custom/vsh2/freak_fortress_2.smx] [VSH2/FF2] Failed to find plugin: freaks\powerlord_abilities.ff2
even though the files exist in plugins/freaks and they seem to be loaded just fine.

Quote:
Originally Posted by WhiteFalcon View Post
  • For koishi's config, you can add two keys
    Code:
    	"No Superjump"			"1" // Disable superjump
    	"No HUD"			"1" // Disable superjump hud
Disabling the HUD also disables the Rage counter.
Disabling Superjump for Koishi and using her seems to disable superjump for every other VSH2 boss until I use a second FF2 boss that doesn't have Superjump disabled (in my case, Armstrong).
Sappykun is offline
Sappykun
Junior Member
Join Date: Nov 2019
Old 01-14-2021 , 21:06   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #134

Another question unrelated to my previous posts:

I'm editing the Plague Doctor example to create a new boss from it. If I want to change the max HP of the boss, where would be the best place to do that?

Specifically, I want to take the default starting HP (with one other player, that's 3000 HP) and divide it by 3 since I plan to have the boss be able to heal 3 times. Trying to do it in PlagueDoc_OnBossInitialized, but at that point the max HP seems to be set to 0 and resets to 3000 when the round starts anyways.

Last edited by Sappykun; 01-14-2021 at 21:13.
Sappykun is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 01-14-2021 , 22:56   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #135

Quote:
Originally Posted by Sappykun View Post
Another question unrelated to my previous posts:

I'm editing the Plague Doctor example to create a new boss from it. If I want to change the max HP of the boss, where would be the best place to do that?

Specifically, I want to take the default starting HP (with one other player, that's 3000 HP) and divide it by 3 since I plan to have the boss be able to heal 3 times. Trying to do it in PlagueDoc_OnBossInitialized, but at that point the max HP seems to be set to 0 and resets to 3000 when the round starts anyways.

one thing you can do is to hook `OnBossCalcHealth`
HTML Code:
function Action (const VSH2Player player, int& max_health, const int boss_count, const int red_players);
function void (const VSH2Player player, int& max_health, const int boss_count, const int red_players);
and to use the integer property, `iLives`.
__________________
nergal is offline
Sappykun
Junior Member
Join Date: Nov 2019
Old 01-15-2021 , 03:28   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #136

Quote:
Originally Posted by nergal View Post
one thing you can do is to hook `OnBossCalcHealth`
HTML Code:
function Action (const VSH2Player player, int& max_health, const int boss_count, const int red_players);
function void (const VSH2Player player, int& max_health, const int boss_count, const int red_players);
and to use the integer property, `iLives`.
Cool, OnBossCalcHealth worked perfectly. Thanks!

Another question since I'm actually making pretty good progress on this boss (for context, it's supposed to be The Patriarch from Killing Floor):

The Plague Doctor spawns his minions immediately after they're killed. In the example addon given, this means that anytime KilledPlayer is called, there's already a VSH2Player object with which you can call ConvertToMinion.

I want The Patriarch to spawn minions as well, but only at specific points in the fight (specifically, anytime his HP falls to 50%. Since he can heal 3 times, the minions should be able to spawn 3 times as well). This means looping over the connected clients, checking if they're minions, and spawning them if they are.
Is there a way to access a list of connected players viewed as VSH2Player objects, or can I use a player's index to retrieve or create said object?

Last edited by Sappykun; 01-15-2021 at 03:28.
Sappykun is offline
WhiteFalcon
Member
Join Date: Nov 2019
Old 01-15-2021 , 07:22   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #137

Quote:
Originally Posted by Sappykun View Post
That seems to have fixed the import issues, but now Koishi seems to have infinite rage. Anytime I press E, the rage meter resets to 0 and her teleport/stun immediately activates. I haven't edited her config outside of replacing default_abilities with ff2_vsh2defaults.
Everything should be fixed on the next update, Thank you for the report
For your "characters.cfg", you should either start from "0", or use "<enum>". Same with some other key section in FF2


Quote:
Originally Posted by Sappykun View Post
Is there a way to access a list of connected players viewed as VSH2Player objects, or can I use a player's index to retrieve or create said object?
There is VSH2GameMode.GetMinions, GetFighters and GetBosses, which already does loop for you if that's what you're looking for

Last edited by WhiteFalcon; 01-15-2021 at 07:24.
WhiteFalcon is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 01-15-2021 , 17:10   Re: VS. Saxton Hale Version 2 - v2.10.28 Dev
Reply With Quote #138

Quote:
Originally Posted by WhiteFalcon View Post
Everything should be fixed on the next update, Thank you for the report
For your "characters.cfg", you should either start from "0", or use "<enum>". Same with some other key section in FF2
update has been done.
I'd start with just using "<enum>", I don't see any point with manually numbering keys.
__________________

Last edited by nergal; 01-15-2021 at 17:10.
nergal is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:21.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode