|
|
|
04-11-2009 02:06 AM | |||
|
|||
I approve this feature.
|
04-11-2009 01:44 PM | ||
|
||
+1
|
04-11-2009 02:11 PM | |||
|
|||
One of the things in our pipeline is a sort of "Lua Switcher". So you could play 2fort, but from there you could decide how to play it. Do you want to play CTF, reverse CTF, or just plain team deathmatch? etc.
I don't think we'd have any set rules about it... basically you'd just drop the Lua in a certain place and then pick it out from a list. So yeah, this is on our to-do list for sure, trust me on that. |
04-12-2009 03:53 AM | |||
|
|||
You're familiar with sv_mapluasuffix, correct? perhaps a ghetto approach would be a script to change it somehow before next map load.
edit: well, I misunderstood (ALL maps) but it still applies for a very ghetto approach XD |
04-12-2009 10:42 PM | |||
|
|||
yeah, unless i've misunderstood you i think sv_mapluasuffix will do what you want but i suppose it's a bit messy (as it does more than you need, and example files aren't already in place for you). if you got any questions about sv_mapluasuffix then ask or pm me if you like.
if it's helpful then i guess we could make an example include "base_custom.lua" and a corresponding "ff_<mapname>__custom__.lua" file for each map, and put them in the next FF patch. i've assumed anyone competent enough to want to edit the lua would be capable of doing this themselves, but if it would be useful then it's v simple to do. whether an admin should be screwing with the lua on a non-map-dependant basis is another matter, but hey :) (i.e. surely on a skills map that map's lua should be configured appropriately already). |
04-13-2009 05:56 PM | |||
|
|||
Doesn't sv_mapluasuffix just try to load a map specific lua with a suffix at the end?
Ex: ff_shutdown2__suffix__.lua This won't work for what I'm talking about. What I'm trying to say is any include path you add to custom_includes.lua will be loaded on EVERY SINGLE MAP! So let's say in the custom_includes.lua we put the following: IncludeScript("block_conc_effect"); IncludeScript("auto_reload_ammo"); IncludeScript("some_other_lua_loaded_on_each_map") ; So now all 3 of these lua files will be loaded on EVERY MAP. Like I said I tried doing this via base.lua (since it's loaded each map) but some functions didn't work as I guess other lua files had to be loaded first. So I'm assuming the custom lua files will need to be loaded after all other map specific lua files. |
04-13-2009 06:12 PM | |||
|
|||
what i mean is:
1) copy each map's default lua file in your .../fortressforever/maps directory, and rename as "ff_<mapname>__custom__.lua". 2) edit each "ff_<mapname>__custom__.lua" you just created by adding the line "IncludeScript("base_custom");" right at the bottom. 3) create a new file called "base_custom.lua" in your .../fortressforever/maps/include directory. 4) edit the "base_custom.lua" to do whatever custom stuff you want. you can either directly write code here, or you could include other files (e.g. put "IncludeScript("block_conc_effect");" in your "base_custom.lua", then have a "block_conc_effect.lua" file in your .../fortressforever/maps/include directory). you would then load your custom lua for all maps by having "sv_mapluasuffix custom". the custom stuff can easily be edited in a single file (base_custom.lua) either by writing code here or by including other files here. i don't see why this shouldn't work. btw what i was suggesting was that we could do steps 1,2,3 so that it's easier for ppl like yourself. |
04-13-2009 06:24 PM | |||
|
|||
I support this feature as well.
|
04-13-2009 06:28 PM | |||
|
|||
Essentially sounds like a server-side global include.
sv_luaglobalinclude "blahblah" Would look for and include blahblah.lua on every map load. Something like that. |
04-13-2009 09:43 PM | |||
|
|||
Quote:
|
04-13-2009 09:51 PM | |||
|
|||
ideally that would be nice, sure, but imo there are so many far more important things waiting to be coded atm. what i posted above is a simple solution that you can use right now with no coding work required (along with a suggestion for a quick way to make this feature much simpler to use that also doesn't take up any coding time). when coding isn't such a precious resource (!) it would be good to have it coded tho, yep.
|
04-14-2009 12:19 AM | |||
|
|||
Quote:
What caesium is suggesting is the easiest for now. you can literally just do something like... ff_2fort__custom__.lua Inside that, include ff_2fort.lua, and then do your own stuff. You have to do it for every map, which does suck. But it'll do until something can be coded in. |
04-14-2009 01:39 AM | |||
|
|||
Quote:
If there were a global include file it would be nice if it also had a suffix cvar as well. |
04-14-2009 09:00 AM | |||
|
|||
Quote:
Quote:
p.s. jon, afaik you can't include anything not in the include folder (well, i haven't found a way), so you'd have to copy/paste each map's lua not just include it. if there's a way it would be handy tho pls. ty. |
04-14-2009 08:20 PM | |||
|
|||
Alright I had an even better idea for loading the global include files. What if you were to do it like SourceMod loads plugins. Just add the lua file(s) to lets say, 'FortressForever/maps/globals' directory, and every lua in this globals folder will automatically be loaded. This way server admins won't have to keep editing another file just to add/remove include path lines.
Quote:
Quote:
|
04-14-2009 08:52 PM | |||
|
|||
i don't think you're understanding what i mean still. see the 1,2,3,4 post above for details, but what i'm suggesting is that devs do steps 1,2,3 for you and include all the "ff_<mapname>__custom__.lua" files with FF along with a blank "base_custom.lua" file with helpful comments. you'd then have a single file that you can put whatever you want in, and enable/disable it with a server setting. no batch files, no creating files, just a single file that ppl can edit.
it's not ideal because custom maps will need a __custom__.lua creating for them still (easy to do, just needs doing), but it's a working solution we can actually do that does not divert coding resources. |
04-14-2009 11:09 PM | |||
|
|||
isnt Lua supposed to be limited to map stuff anyway? i dont think it can edit weapons/grenades as such, and shouldn't.
|
04-15-2009 05:15 AM | |||
|
|||
Quote:
|
04-17-2009 04:53 AM | |||
|
|||
Nice leak :D
|
04-17-2009 09:35 AM | |||
|
|||
ty, dexter :) problem solved hopefully
|
Issue Tools |
---|
Subscribe to this issue |