|
02-06-2008, 07:07 PM | #1 |
Fortress Forever Staff
|
Using Custom Lua Scripts
A Fortress Forever feature most server admins don't know about has the potential to be a very powerful and fun feature.
sv_mapluasuffix That cvar allows you to keep the default lua script, but have any number of alternate lua versions that you can easily use without renaming/deleting/overwriting/whatever. All you do is set sv_mapluasuffix to whatever text you want before loading a map, and FF will attempt to load an alternate lua file (mapname__suffix__.lua - 2 underscores on each side of the suffix) for that map. If the alternate lua file isn't found, the default lua file (mapname.lua) will load. This cvar is archived, so you can set it to something you commonly use without doing any kind of micromanagement. The default value is 0, so use that to reset the gameplay. And it should go without saying, but no suffix can be 0. For instance, hunted's lua script (and therefore, gameplay) will be different in 2.0. However, you'll be able to use sv_mapluasuffix "classic" to load the old lua script from 1.11 if you feel like playing the old way for whatever reason. If ff_hunted__classic__.lua isn't included with 2.0 for some reason, you'll still be able to at least find it here on the forums. But for another example, let's say you set sv_mapluasuffix to "pong" because you have an alternate version of ff_cz2.lua that somehow lets people play pong. Instead of getting rid of the default cz2 lua file, all you need is an alternate lua file to be named ff_cz2__pong__.lua with that cvar set. Then maybe you also make a pong version of crossover, so you would then need ff_crossover__pong__.lua. And so on. Also, maybe you have an ovd version of the crossover lua. You just need ff_crossover__ovd__.lua and sv_mapluasuffix to be "ovd" and you're all set. Annnnnnd, maybe you also have a reverse ctf version of the crossover lua (could be the easiest alternate lua to make, so maybe we should do this and include them with FF 2.0?). Just set sv_mapluasuffix to "rctf" and make sure you have an ff_crossover__rctf__.lua file. An example of another use would be a massive customization pack...say uh...called Klanope. And you want to change every map's gameplay, items, and...you just wanna change a lot. So you create new flag/backpack/health/armor/whatever models, new sounds, and stuff like that. Pretty much everything lua uses. Then you could put everything but your new lua files in a klanope folder for accessibility, and you could have a whole bunch of ff_mapname__klanope__.lua files. People would install this...well, they'd essentially install this mod of our mod and set their server's sv_mapluasuffix to "klanope"...and suddenly their FF has been modified into Klanope...at least in terms of map entities and gameplay. Keep in mind, you're pretty much limited to editing the existing entities in a bsp. Not like you could add a 3rd base to crossover or something like that. Good times to be had, that's what I say. |
|
02-06-2008, 09:11 PM | #2 |
Wiki Team
Fortress Forever Staff Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly Gametype: PAYLOAD Affiliations: DET- Posts Rated Helpful 19 Times
|
That's pretty sweet!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf (Beta) alchimy_b1 (Lua) base_payload_2015 (Models) props_trainyard |
|
02-06-2008, 10:07 PM | #3 |
Community Member
Server Owner
Beta Tester Forum Moderator Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout Gametype: AvD Affiliations: :e0:Eternal Order Leader Posts Rated Helpful 12 Times
|
That Sounds great b/c some class restrictions didn't work in all maps. I was thinking of adding restriction to Aardvark with 2 snipers/engy but I didn want restrictions on Hunted/Dustbowl/Conrfield/Palermo, etc.. Now I could do it in the Lua
So I'll shall experiment with this, Thank You
__________________
|
|
02-06-2008, 10:39 PM | #4 |
Fortress Forever Staff
|
Yeah, this is also good for mappers who want to test out new lua stuff without getting rid of the default scripts.
|
|
02-06-2008, 10:55 PM | #5 | |
Stuff Do-er
Lua Team
Wiki Team Fortress Forever Staff |
Quote:
__________________
#FF.Pickup ยค Fortress-Forever pickups My Non-official Maps Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic Beta FF_Myth - FF_Redlight_Greenlight Sick of the people on the internet, always moanin'. They just moan. - Karl Pilkington |
|
|
02-06-2008, 11:49 PM | #6 |
Fortress Forever Staff
|
Yeah, I guess I should mention something about how you can only use existing entities and brushes. Be cool if we'd finally get lua around to creating entities, though...
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|