Raised This Month: $51 Target: $400
 12% 

Open Fortress Tools [LINUX ONLY]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Scag
AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
Plugin ID:
7160
Plugin Version:
1.0.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Basic tools for Open Fortress Sourcemod development
    Old 06-13-2020 , 18:05   Open Fortress Tools [LINUX ONLY]
    Reply With Quote #1

    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.
    __________________
    Over-engineering is underrated.

    GitHub
    BTC
    ETH

    Retired
    Scag is offline
    Reply



    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 23:27.


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