AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Open Fortress Tools [LINUX ONLY] (https://forums.alliedmods.net/showthread.php?t=325243)

Scag 06-13-2020 18:05

Open Fortress Tools [LINUX ONLY]
 
Basic tools for porting TF2 plugins to Open Fortress / creating Open Fortress plugins.

LINUX ONLY

Sorry, but I can't be bothered to reverse Windows functions every week. Linux bins are stripped anyways so it's already a pain. Plus since OF updates every 20 seconds, this is probably going to break a whole helluvah lot. I figured I'd just release it since it's better than nothing.

Requires
  • SM1.10+
  • DHooks with Detours
  • A lot of patience

This also comes with the gamedata for a SourceMod base install. If you extract it properly, you'll be able to do all of the basic SourceMod things like slaying people and renaming them.

To use it

As you've probably realized, the TF2 extension does not load in Open Fortress. It probably never ever will. To account for this, I've remapped a majority of the supported natives and forwards into openfortress.inc. Open fortress also has a bunch of silly quirks (like RegeneratePlayer not accounting for class-based weapons and there not being a player_spawn event, to name a few), so there are a few OF_* natives/forwards included to account for these as well.

Porting plugins from TF2 to OF isn't a cakewalk, either. There are a bunch of silly things you'll have to detour and work around, similar to what I've mentioned above. To get yourself started, open up the plugin(s) you want to import and replace:
PHP Code:

#include <tf2> 

With
PHP Code:

#include <openfortress> 

This remaps the natives to the plugin so there's no more reliance on the TF2 ext. After that you get to trial-and-error until your server stops crashing. Enjoy.

DOWNLOAD

For Windows folks

To be honest you're not completely kicked to the curb. The majority of the required gamedata is offsets, and those are generally 1 less than their Linux counterpart. So if you really really really want to use Windows, you can load up each gamedata file and add a windows entry that's 1 less than the Linux/Mac offset. DON'T TOUCH THE CORE.GAMES FILE. THAT'S A DIFFERENT KIND OF OFFSET.

The Windows offsets that aren't commented out are probably correct, anyways. So you might not need to touch those either.


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

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