AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   FF2 Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED] (https://forums.alliedmods.net/showthread.php?t=340276)

NoloZero01 11-07-2022 16:20

Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
1 Attachment(s)
Freak Fortress 2: List
A SourceMod plugin designed to neatly list all currently active Freak Fortress 2 bosses and some of their config data (descriptions, health, themes, and more) in a browser.


LIVE EXAMPLE | GitHub


Dependencies:
  1. Conplex and Webcon by asherkin
  2. Freak Fortress 2 (only at runtime to detect whether it's FF2 Legacy or Rewrite)
  3. Rest In Pawn


Installation:
  1. Grab the attached archive (plugin compiled against 1.10.6445) or download and compile the plugin off GitHub.
  2. Move the files to their respective directories.
  3. Load the plugin or trigger a map change.


Usage:
Once the plugin loads, you will be able to visit your server's IP address in the browser. Please note that you must specify your gameserver port as well. Example: 192.168.1.101:27015.

The front-end is designed to be adaptive for both desktop and mobile use.



Custom boss images:
This plugin ships with a placeholder image that takes place of actual boss images. If you'd like to provide your own, simply upload them to /configs/web/bosses/images in the .png format.

Refer to the placeholder image for proper dimensions to avoid size differences. Make sure that every image has the name of it's respective boss' config file (for example, hhh_hale.cfg -> hhh_hale.png).


Hosting web files remotely:

If you'd like to host the web front-end somewhere else (like a FastDownloads web server), please do the following:
  • Move the contents of the "bosses" folder on your game server to your desired location on the web server. Make sure to not forget about images as well.
  • Change the ff2list_enable_web ConVar to 0. Save that ConVar in server.cfg.
  • Manually replace "SERVERIP" with the IP and port of your game server inside loader.js.


Credits:
  1. Naydef for FAQ-like assistance and inspiration.
  2. MadeInQuick for creating the placeholder image.
  3. NecGaming for being my personal sandbox.
  4. Respective authors of the code pieces I borrowed (50DKP team of Official Freak Fortress, ...).

Versions:
  • 1.0: Initial release
  • 2.0: Support for Freak Fortress Rewrite, Boss-Packs, general code improvements
  • 2.0 Hotfix: Support for boss configs placed in sub-directories of configs/freak_fortress_2/, proper 403 Forbidden reponse when web serving is off


Kolaxie 11-07-2022 22:39

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
This is awesome, probably one of the best thing possible to let people get access to the content available at any time

Hoto Cocoa 11-08-2022 11:00

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Cool

Transit Of Venus 11-22-2022 07:07

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
I like the concept of this, I've added it to Obamaworld FF2. I've noticed it only shows info for the currently active boss pack, however.

http://45.121.209.68:27500/bosses/

Frixu 11-23-2022 12:04

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Quote:

Originally Posted by NoloZero01 (Post 2792353)
Freak Fortress 2: List
A SourceMod plugin designed to neatly list all currently active Freak Fortress 2 bosses and some of their config data (descriptions, health, themes, and more) in a browser.


LIVE EXAMPLE | GitHub


Dependencies:
  1. Conplex and Webcon by asherkin
  2. Freak Fortress 2 (namely the FF2_OnLoadCharacterSet forward)
  3. Rest In Pawn


Installation:
  1. Grab the attached archive (plugin compiled against 1.10.6445) or download and compile the plugin off GitHub.
  2. Move the files to their respective directories.
  3. Load the plugin or trigger a map change.


Usage:
Once the plugin loads, you will be able to visit your server's IP address in the browser. Please note that you must specify your gameserver port as well. Example: 192.168.1.101:27015.

The front-end is designed to be adaptive for both desktop and mobile use.



Custom boss images:
This plugin ships with a placeholder image that takes place of actual boss images. If you'd like to provide your own, simply upload them to /configs/web/bosses/images in the .png format.

Refer to the placeholder image for proper dimensions to avoid size differences. Make sure that every image has the name of it's respective boss' config file (for example, hhh_hale.cfg -> hhh_hale.png).





Credits:
  1. Naydef for FAQ-like assistance and inspiration.
  2. MadeInQuick for creating the placeholder image.
  3. NecGaming for being my personal sandbox.
  4. Respective authors of the code pieces I borrowed (50DKP team of Official Freak Fortress, ...).




Does this work on ff2r because I uploaded it and it doesn't show my bosses.
http://51.83.217.86:25009/bosses/

NoloZero01 11-25-2022 02:33

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Quote:

Originally Posted by Transit Of Venus (Post 2793414)
I like the concept of this, I've added it to Obamaworld FF2. I've noticed it only shows info for the currently active boss pack, however.

http://45.121.209.68:27500/bosses/

Its not hard to make it display all available charsets, Ill add this to my QoL list of stuff to do

NoloZero01 11-25-2022 02:36

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Originally not intended for Freak Fortress 2 Rewrite - places where I am have no thoughts about FF2R whatsoever. To be honest, I don't even know how the config looks. Though pretty sure it's a quick fix, I'll take a look. Will probably add automatic version detection to use proper KV traverse logic/ and FF2 natives

NoloZero01 11-25-2022 13:46

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Quote:

Originally Posted by Frixu (Post 2793546)
Does this work on ff2r because I uploaded it and it doesn't show my bosses.
http://51.83.217.86:25009/bosses/


Could you please post your errors log if there is one? Pretty sure at least some data is supposed to be available even in FF2R.
Also if it's possible, could you bring the plugin back up? I'd like to take a look myself

Frixu 11-25-2022 15:57

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
Quote:

Originally Posted by NoloZero01 (Post 2793688)
Could you please post your errors log if there is one? Pretty sure at least some data is supposed to be available even in FF2R.
Also if it's possible, could you bring the plugin back up? I'd like to take a look myself

L 11/25/2022 - 21:54:52: [SM] Exception reported: Failed to open "avatar.png" (error 2)
L 11/25/2022 - 21:54:52: [SM] Blaming: webcon.smx
L 11/25/2022 - 21:54:52: [SM] Call stack trace:
L 11/25/2022 - 21:54:52: [SM] [0] WebFileResponse.WebFileResponse
L 11/25/2022 - 21:54:52: [SM] [1] Line 27,
L 11/25/2022 - 21:54:52: [SM] Unable to load plugin "webcon.smx": Error detected in plugin startup (see error logs)

try now to check out http://51.83.217.86:25009/bosses/

NoloZero01 11-25-2022 16:15

Re: Freak Fortress 2: List - show your bosses on a web page! [NO WEBSERVER REQUIRED]
 
You don't need webcon.smx, it's an example plugin that serves no purpose for you.

As for the boss list, interesting - http://51.83.217.86:25009/bosses/query returns no bosses.
From what I can tell, FF2R's characters.cfg structure changed a bit, instead of individual entries being their own sub-sections (as {} implied for non-Rewrite versions), they are just Keys with empty values. Let me get a quick fix in place, Ill make a new branch on GitHub for it.

Ill add it into master as proper Rewrite support with some other QoL things when I get to it (maybe this weekend dunno)


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

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