Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 02-06-2008, 07:07 PM   #1
trepid_jon
Ray Ray Johnson
Fortress Forever Staff
 
trepid_jon's Avatar
 
Join Date: Feb 2005
Location: Dallas, TX
Class/Position: D Civilian
Gametype: Rocket Jousting
Affiliations: EAFD
Posts Rated Helpful 78 Times
Send a message via ICQ to trepid_jon Send a message via AIM to trepid_jon
Arrow 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.
__________________
Support FF:
Trepid
steamcommunity.com/id/trepid_jon/
trepid_jon is offline   Reply With Quote


Old 02-06-2008, 09:11 PM   #2
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
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
Support FF:
Dr.Satan is offline   Reply With Quote


Old 02-06-2008, 10:07 PM   #3
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
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
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 02-06-2008, 10:39 PM   #4
trepid_jon
Ray Ray Johnson
Fortress Forever Staff
 
trepid_jon's Avatar
 
Join Date: Feb 2005
Location: Dallas, TX
Class/Position: D Civilian
Gametype: Rocket Jousting
Affiliations: EAFD
Posts Rated Helpful 78 Times
Send a message via ICQ to trepid_jon Send a message via AIM to trepid_jon
Yeah, this is also good for mappers who want to test out new lua stuff without getting rid of the default scripts.
__________________
Support FF:
Trepid
steamcommunity.com/id/trepid_jon/
trepid_jon is offline   Reply With Quote


Old 02-06-2008, 10:55 PM   #5
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
Quote:
Originally Posted by trepid_jon
Yeah, this is also good for mappers who want to test out new lua stuff without getting rid of the default scripts.
ff_aardvark_BATTLESHIPS? Nevermind, that probably uses a different bsp with different entities.
__________________
#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
squeek. is offline   Reply With Quote


Old 02-06-2008, 11:49 PM   #6
trepid_jon
Ray Ray Johnson
Fortress Forever Staff
 
trepid_jon's Avatar
 
Join Date: Feb 2005
Location: Dallas, TX
Class/Position: D Civilian
Gametype: Rocket Jousting
Affiliations: EAFD
Posts Rated Helpful 78 Times
Send a message via ICQ to trepid_jon Send a message via AIM to trepid_jon
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...
__________________
Support FF:
Trepid
steamcommunity.com/id/trepid_jon/
trepid_jon is offline   Reply With Quote


Old 02-15-2008, 02:48 AM   #7
Circuitous
Useless
Retired FF Staff
 
Join Date: Jun 2005
Class/Position: D Soldier, O Scout
Gametype: AvD
Posts Rated Helpful 9 Times
Send a message via AIM to Circuitous Send a message via MSN to Circuitous Send a message via Yahoo to Circuitous Send a message via Skype™ to Circuitous
I added this thread to the Lua section, as well as the Server section.

I dunno if they're two seperate threads or one omnithread. I'll find out shortly.

Edit: Seperate threads. Oh well.
__________________
Look at all those dead links.
Circuitous is offline   Reply With Quote


Old 02-15-2008, 03:14 AM   #8
trepid_jon
Ray Ray Johnson
Fortress Forever Staff
 
trepid_jon's Avatar
 
Join Date: Feb 2005
Location: Dallas, TX
Class/Position: D Civilian
Gametype: Rocket Jousting
Affiliations: EAFD
Posts Rated Helpful 78 Times
Send a message via ICQ to trepid_jon Send a message via AIM to trepid_jon
YOU SON OF A BITCH!

Haha, oh well indeed.

Could do that uh...move but leave a shadow or whatever.

Delete the one in server, and then move this one...leaving the forwarding link.

But would it be a sticky in both places?
__________________
Support FF:
Trepid
steamcommunity.com/id/trepid_jon/
trepid_jon is offline   Reply With Quote


Old 02-15-2008, 03:24 AM   #9
Circuitous
Useless
Retired FF Staff
 
Join Date: Jun 2005
Class/Position: D Soldier, O Scout
Gametype: AvD
Posts Rated Helpful 9 Times
Send a message via AIM to Circuitous Send a message via MSN to Circuitous Send a message via Yahoo to Circuitous Send a message via Skype™ to Circuitous
...

I think that's worth a try.
__________________
Look at all those dead links.
Circuitous is offline   Reply With Quote


Old 02-15-2008, 03:26 AM   #10
Circuitous
Useless
Retired FF Staff
 
Join Date: Jun 2005
Class/Position: D Soldier, O Scout
Gametype: AvD
Posts Rated Helpful 9 Times
Send a message via AIM to Circuitous Send a message via MSN to Circuitous Send a message via Yahoo to Circuitous Send a message via Skype™ to Circuitous
It unstickied the redirect. Lame.
__________________
Look at all those dead links.
Circuitous is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 11:50 AM.


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