Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-11-2014, 10:42 PM   #1
R00Kie
Kawaii! ルーキー
Lua Team
Wiki Team
Fortress Forever Staff
 
R00Kie's Avatar
 
Join Date: Jan 2008
Location: Nowhere, Kansas
Class/Position: Random
Gametype: CTF
Affiliations: BiG, Kawaii!, MustacheBrigade, GoodFellas
Posts Rated Helpful 82 Times
Arrow Game Rules

Game rules are server-side scripts that modify game play. Some are useful, others pointless fun. If anyone has any questions or problems feel free to post. If someone has an idea they would like implemented on their server, I am willing to help. Enjoy


How to Install
  • game_rules

    Unzip this into your FortressForever/maps/ folder. These are the basic game rules files that will tell the server which scripts you want to run. You can comment out the ones you don't want to use with a double dash "--" in front of that IncludeScript.

    Example:
    Code:
    -- For CTF game mode put the include script here
    if GAMEMODE == "CTF" then
    	-- IncludeScript("game_force_ovd") -- Won't be used
    	IncludeScript("game_auto_balance")
    end
    
    -- For all game modes put the include script here
    IncludeScript("game_afk")
    --IncludeScript("game_spawn_safety") -- Don't use this
    To activate game_rules on your server use the CVAR below. Also make sure it is added to your server config file.
    Code:
    sv_globalluascript game_rules
  • Note: base_ctf & base_ctf4

    These are base files included with Fortress Forever, I added a single variable to them that I can detect for use with other files. Their main function remains unchanged and can be overwritten.

  • Download
    game_rules.zip @Google.Drive


Adding Mods

Put all mods in your FortressForever/maps/includes/ folder and add the appropriate IncludeScript("Game_name") To your game_rules.lua. There is an example above.
  • game_afk - Download Link

    Will send a player to spectator after about 2 minutes of not moving. Can be used on any game mode.
    Code:
    local CHECK_AFK = 30 -- How often in seconds it checks to see if a player is AFK
    local IDLE_TIME = 120 -- How long in seconds it takes to go AFK
    local MESSAGE_TIMER = 10 -- Starts counting down when the timer reaches this number
  • game_spawn_safety - Download Link

    Makes a player Immune to damage for a few seconds after spawning or until they attack another player. Can be used on any game mode.
    Code:
    local IMMUNE_TIME = 3
  • game_auto_balance - Download Link

    Prevents a player from joining a team that will make it unbalanced. Currently set up to only work on CTF with Red and Blue teams. Unknown what will happen if you try to use it on any other game modes.

  • game_force_ovd - Download Link

    Forces an Offense vs Defense game mode. With Blue as Offense and Red as Defense. The Red team will be unable to touch the Blue flag until the player threshold is met. Used on CTF game mode with Red and Blue teams.
    Code:
    local PLAYERS_NEEDED = 10



  • game_ff_armor - Download Link

    Armor-Only friendly fire. Mirror damage or Team only damage available.
    Code:
    TEAM_DAMAGE_ALLOWED = true
    TEAM_DAMAGE = 5 -- Divide damage by this much for less armor removed.
    
    MIRROR_DAMAGE_ALLOWED = true
    MIRROR_DAMAGE = 5 -- Divide damage by this much for less armor removed.
  • game_readyup - Download Link

    Puts players on a ready screen, in which they must type "r" (Or other modified chat message) to indicate they are ready to play. Begins a countdown when all players on both teams are ready. Only works during prematch.
    Code:
    local PrematchTime = 999
    local UsefulTip = "Type 'r' when you are ready to start the match."
    local ChatStrings = { "r", "ready", "start", "go" }  -- Strings to use for a player to accept being ready


  • game_duels - Download Link

    When two enemy players are within melee range of each other and hold "use" simultaneously. They will engage in a one on one duel. They will restock life and ammo. Outsiders can't interrupt them and they cant hurt outsiders until the duel is over. First player to kill the other; wins, or until 30 seconds is up then a random winner is chosen.
    Code:
    local REQUEST_RADIUS = 128
    local FIGHT_TIME = 30
    
    local USE_OBJECTIVEICON = true
    local RESTOCK_PLAYER = true
__________________
Released: [ Island ] [ Rookie ] [ Limbo ] [ Sonic ] [ Tomb ] [ Skydive2 ] [ Bunkerwars ]
Beta: [ Argon ] [ Reflection ] [ Urbantag ]
Lua: [ game_rules ]

Last edited by R00Kie; 11-29-2015 at 02:55 AM.
R00Kie is offline   Reply With Quote


5 members found this post helpful.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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. The time now is 03:23 PM.


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