AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   FF2 FF2 2 rage platforms (https://forums.alliedmods.net/showthread.php?t=325052)

WhiteFalcon 06-06-2020 14:47

FF2 2 rage platforms
 
For a long time, FF2 had(and still do) many creators, one of them is sarysa, though her/his subplugins have some problem, or at least, in my opinion, ie: run medium~heavy checks every single server frame.
anyway, I've decided to make a new way of handing stuff independently/smoothly.
Unfortunately, it's not backward compatible, changes will be mentioned way below.
Since I gave up on the project, I may update it from time to time. So for now, this plugin will only work for VSH2
Secondly is RageMenu which allows you to use any rage as menu rage, FF2_DoAbility is not working as good as I wanted it to be so I've decided to precache ff2 plugins and manually trigger FF2_OnAbility2()

Download link and report bugs there, if any.

extras: i modified some(almost all) AMS plugins to be compatible with this new version of ams. you can find them here
mentions :
- took the idea from nergal, ConfigMap extremly useful
- menu rage inspired from Ness, in BatFoxKid server.
- credit to sarysa for the original AMS, that he/she used for epic scout.

AMS2 :
Templates :
Code:

"ams_sys"
        {
                "activation"        "0"                //0 : E rage, reload, mouse3 or mouse2
                "selection"                "reload"        //reload, mouse3 or mouse2
                "reverse"                "mouse3" //reload, mouse3 or mouse2
               
                "hud"
                {
                        "cinactive"        "0xFF0000"
                        "inactive"        "%s (%.2f rage) [RELOAD (R) to change]\n%s\nAbility is currently unavailable."
                       
                        "cactive"        "0x00FF00"
                        "active"        "%s (%.2f rage) [RELOAD (R) to change]\n%s\nAbility is available. (press E)"
                       
                        "y"                        "0.68"
                }
               
                "cast-particle"        "ghost_smoke"
        }

Code:

"ability: Template"
        {
                "name"                "ability_name"
               
                //rest of args
               
                "initial cd"                "5.0"
                "ability cd"                "10.0"
                "this_name"        "ability name here"
                "display_desc"        "ham ham ham"
                "cost"                "10.0"
                "can end"                "false"
               
                "plugin_name"        "plugin_name"
        }

for devs :
- to dynamically access any ability use FF2AMS_GetAMSHashMap, or F2AMS_GetGlobalAMSHashMap to change the base. global membres can be accessed like by StringMap.GetString("hud->inactive") or StringMap.SetString("cast-particle")
- to have a small idea how to make an ams2 rage, refer to this sample.
- more you will find it in include/source code

alternatively, if you don't have a rage with AMS prebuilt in it, you can still use this ff2_fakeams, which is literary ff2_doability but uses FF2_ForceAbility instead of FF2_DoAbility, tested and should work. The template will be found there.


(UNUPDATED)
Menu rage:
unlike AMS(without ff2_fakeams), you don't need to hardcode a subplugin just to function with the menu
Templates :
Code:

"menu_base"
        {
                "button"                        "reload" //0, reload, mouse3 or mouse2
                "menu name"                "Current [ENERGY] : %i\nSelect Your Powerup."
                "hud format"                "[ENERGY] : %i"       
                "damage taken"                "1000"
                "damage pts"                "45"
                "life loss"                        "70"                // how many points to get per life loss
                "loss mult"                "3 - 5 - 10" // same above but multiply it by ..
                "max pts"                        "9001"
                "gain per rage"                "60"
                "gain per kill"                "50"
               
                "hook"
                {
                        "num"                "3" // how many rages to use for menu
                        "1"
                        {
                                "name"                "ability_name1"
                               
                                "rage title"                "fish"
                                "rage info"                "ENERGY : 120 Stamina.\nCooldown : 20 sec"
                                "rage cost"        "120"
                                "rage cooldown"        "20.0"
                       
                                "plugin_name"        "plugin_name1"
                        }
                        "2"
                        {
                                "name"                "ability_name2"
                                ...
                                ..
                                "plugin_name"        "plugin_name2"
                        }
                        "3"
                        {
                                "name"                "ability_name3"
                                ...
                                ..
                                "plugin_name"        "plugin_name3"
                        }
                }
        }
        "sound_draw_menu"
        {
                "1"        "..."
                "2"        "..."
                ...
        }
        "sound_activate_menu"
        {
                "1"        "..."
                "2"        "..."
                ...
        }
        "sound_exit_menu"
        {
                "1"        "..."
                "2"        "..."
                ...
        }

for devs:
- FF2MenuRage_GetHashMap() will return to you the global menu base, which can be dynamically modified just like ams2.
- FF2MenuRage_PeekValue() and FF2MenuRage_SetValue() will let you change player's points/infos.
- again, more you will find it in include/source code.

change ff2_fakeams.smx to .ff2, but not the others.
includes can be found here.
Thanks for your time and feedbacks are greatly appreciated.


Updates:
-08/06/2020 : Added sounds keyvalues to emit during specific events, fixed all rage activation when boss uses normal E rage for menu.
-14/06/2020 : Migrated to github.

doroemon 08-06-2020 23:00

Re: FF2 2 rage platforms
 
1 Attachment(s)
Sorry but does it have a tutorial for install?
I try to install it in my server but it is not work correctly...

this is where I put plugin file,and the server server console:
https://imgur.com/juVwvKn.jpg
https://imgur.com/vacun2P.jpg

when server after First Round,I got these Erorr in my log:
PHP Code:

L 08/07/2020 10:28:20SourceMod error session started
L 08
/07/2020 10:28:20Info (map "vsh_dirtmound_rc3") (file "C:\Users\dora\Desktop\srcds manager\ServerFile\ReviveFF2Server\tf\addons\sourcemod\logs\errors_20200807.log")
L 08/07/2020 10:28:20: [ams_redux.smx] [FF2ParserInvalid path (addons\sourcemod\configs\freak_fortress_2\ninjaspy.cfg) / target key (ams_baseused
L 08
/07/2020 10:28:20: [menurage_platform.smx] [FF2ParserInvalid path (addons\sourcemod\configs\freak_fortress_2\ninjaspy.cfg) / target key (menu_baseused
L 08
/07/2020 10:28:41: [SMException reportedInvalid Handle 0 (error 4)
L 08/07/2020 10:28:41: [SMBlamingmenurage_platform.smx
L 08
/07/2020 10:28:41: [SMCall stack trace:
L 08/07/2020 10:28:41: [SM]   [0StringMap.GetValue
L 08
/07/2020 10:28:41: [SM]   [1Line 77menu_helper.sp::PointsMap.points.get
L 08
/07/2020 10:28:41: [SM]   [2Line 197, [FF2MenuRage Platform::FF2_OnLoseLife
L 08
/07/2020 10:28:41: [SM]   [4Call_Finish
L 08
/07/2020 10:28:41: [SM]   [5Line 12169Unofficial Freak Fortress::OnPlayerHurt
L 08
/07/2020 10:29:09: [menurage_platform.smx] [FF2ParserInvalid path (addons\sourcemod\configs\freak_fortress_2\epicscout.cfg) / target key (menu_baseused 

ninjaspy.cfg is using default cfg,and epicscout.cfg is in Attach Files,

WhiteFalcon 08-07-2020 04:49

Re: FF2 2 rage platforms
 
The parser shouldn't yell at you for not having a rage base, no idea why i left LogError there :P
Added a check for menurage to prevent accesss to null handle, that should fix the second problem.

You can find subplugins that works for those platform here (/edited not /original). tho i didn't test them all and planning to rewrite them for better optimization, but you can report anything bad there.
As for config, "ff2_sarysapub3" will not work, try "ff2_sarysapub3r", you'll find it above here.

doroemon 08-07-2020 12:13

Re: FF2 2 rage platforms
 
Quote:

Originally Posted by WhiteFalcon (Post 2713335)
The parser shouldn't yell at you for not having a rage base, no idea why i left LogError there :P
Added a check for menurage to prevent accesss to null handle, that should fix the second problem.

You can find subplugins that works for those platform here (/edited not /original). tho i didn't test them all and planning to rewrite them for better optimization, but you can report anything bad there.
As for config, "ff2_sarysapub3" will not work, try "ff2_sarysapub3r", you'll find it above here.

Thank you for your reply :)
Now the erorr log has fix and AMS system seem working~

But it had another problem,When I select epicscout boss,
after round end , it will hide ALL HUD message even that's not the AMS HUD,
And Starting new round it doesn't show ANY HUD anymore...
can you fix it?Thanks a lot!

WhiteFalcon 08-07-2020 12:49

Re: FF2 2 rage platforms
 
Huh, that's weird.
I'll take a proper look whenever i can, i apologize in advance for the upcoming delay.

doroemon 08-08-2020 09:04

Re: FF2 2 rage platforms
 
Quote:

Originally Posted by WhiteFalcon (Post 2713409)
Huh, that's weird.
I'll take a proper look whenever i can, i apologize in advance for the upcoming delay.

I test it again , It seems how BUG appears:
1.select epicscout BOSS
2.When round start,AMS system will remove all FF2 plugin HUD
3.When round end,AMS system HUD was gone,but FF2 plugin HUD doesn't adding back
4.Starting new round,FF2 plugin HUD not showing anymore

WhiteFalcon 08-08-2020 10:20

Re: FF2 2 rage platforms
 
Thanks for the great detail, it appears that i forgot again something.
let me know if the problem still persists

doroemon 08-09-2020 10:12

Re: FF2 2 rage platforms
 
Quote:

Originally Posted by WhiteFalcon (Post 2713520)
Thanks for the great detail, it appears that i forgot again something.
let me know if the problem still persists

It seem fix it now,thank you~

and I have a question,does the AMS「"can end" "1"」mean "can be ended early by the AMS"?

WhiteFalcon 08-09-2020 10:47

Re: FF2 2 rage platforms
 
the "can end" does same job as "arg1007" from old AMS, its 0 by default, you dont need to add it.
most of the time its useless, since only "fake dead ringer" ability use it, afaik.
what does it do? if true and boss has a consistent rage, it will call internally "MyRage_EndAbility(...)" which should stop the ability or do anything else, up to the plugin creator.

doroemon 08-09-2020 12:35

Re: FF2 2 rage platforms
 
Quote:

Originally Posted by WhiteFalcon (Post 2713643)
the "can end" does same job as "arg1007" from old AMS, its 0 by default, you dont need to add it.
most of the time its useless, since only "fake dead ringer" ability use it, afaik.
what does it do? if true and boss has a consistent rage, it will call internally "MyRage_EndAbility(...)" which should stop the ability or do anything else, up to the plugin creator.

But when I testing,it seem not work correctly...
that's my dead ringer ability:
PHP Code:

    "ability10"
    
{
        
"name"    "rage_fake_dead_ringer"
        
        "arg1"    "1" 
// trigger. 0 = E rage, 1 = triggered by ability management system
        
"arg2"    "5.0" // maximum duration
        
"arg3"    "1.5" // duration to wait before attacking is possible after uncloak
        
        
"initial cd"        "0.0"
        "ability cd"        "35.0"
        "this_name"        "Dead Ringer"
        "display_desc"    "Puts up a dead ringer."
        "cost"            "0.0"
        "can end"         "1"
        
        "plugin_name"    "ff2_sarysapub3r"
    


When I cloaking and I press E,it doesn't uncloak early...

and other question...although it doesn't a huge problem,
but can you optimalize AMS menu change speed?
it is old AMS menu change speed:
https://i.imgur.com/EuVh86y.gif
it is new AMS menu change speed:
https://imgur.com/TD08gmb.gif


All times are GMT -4. The time now is 08:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.