PDA

View Full Version : Question on saving settings?


SlippytheWeasel
09-11-2007, 12:06 AM
If I go into my server, and use cvars to adjust light levels, and use networkspawn to add lights to different areas, can I save that configuration to run whenever I start the server? As in this screenshot?

http://rottenrodents.com/modules/Forums/files/etqw_lights_01_919.png


Slippy

Awol
09-11-2007, 12:07 AM
Damn not sure but that screen shot looks fun to play on. I will be watching this thread.

SlippytheWeasel
09-11-2007, 12:32 AM
Then check this vid.

http://www.youtube.com/watch?v=DGC-_W2kvV0


Slippy

Awol
09-11-2007, 02:28 AM
Ok watching the video and thinking about it. Couldn't you use put the cvars into a cfg file and then have the server run that config file when the map loads. I know you can execute map config files as I saw that in the server launcher someplace. Not sure about networkspawn.

SlippytheWeasel
09-12-2007, 06:41 AM
My apologies, but 'bump' for a dev to possibly offer wisdom, insight, or a hearty "NO YOU CAN"T DO IT" or something.:dance:


Slippy

jRAD
09-12-2007, 07:16 AM
You can do as Awol suggests, placing your console commands into a config that you can then execute. I'd recommend setting "logfile 2" while you're editing, so you have a record of everything you did in <etqw>/base/console.log.

Cool work, by the way. Nice to see someone having fun with what's available right now. :)

sponge
09-12-2007, 08:18 AM
I wasn't able to networkspawn lights, only testlights. What was the entity name?

[edit] networkspawn light.. durr. Can't adjust color though, too bad.

[edit2] You may be able to use getviewpos and setviewpos to move and put down the lights, too.

SlippytheWeasel
09-12-2007, 10:05 AM
You can do as Awol suggests, placing your console commands into a config that you can then execute. I'd recommend setting "logfile 2" while you're editing, so you have a record of everything you did in <etqw>/base/console.log.

Cool work, by the way. Nice to see someone having fun with what's available right now. :)

That'll save the positions that I networkspawn the lights at? If so, great, that's exactly what I needed to learn.

Thanks for the tips. I'll give them a try. If it works, expect a Bad Gerbil NIGHTWATCH server.:dance:


Slippy

Babylon
09-12-2007, 10:12 AM
nice


I wonder if th strogg are scared of the dark!

SlippytheWeasel
09-12-2007, 10:19 AM
Tried a quick test. The atmosphere and ambient adjustments worked, but all the lights spawned where I was standing when I executed the cfg file. Need to figure out how to save the networkspawn light position information I guess.

Haven't really done much as far as mapping or anything, but with ETQW, you can bet I'm gonna learn. So much in the way of possibilities.:dance:


Slippy

jRAD
09-12-2007, 10:22 AM
Use getviewpos for each light, then use setviewpos with that value before you networkSpawn them. Unfortunately, the networkSpawn doesn't take extra parameters like the spawn command does, so adjusting colors, etc won't work.

SlippytheWeasel
09-12-2007, 10:52 AM
Use getviewpos for each light, then use setviewpos with that value before you networkSpawn them. Unfortunately, the networkSpawn doesn't take extra parameters like the spawn command does, so adjusting colors, etc won't work.

OK, let's see if I understand:

1. Type "logfile 2"
2. Type "networkspawn atmosphere"
3. Type "r_ambientscale 0.1"
4. Type "r_lightscale 5" (I like the lights to be bright.):cool:
5. Move to where I want the light, type "getviewpos", then, without moving, type "networkspawn light"
6. Repeat for all lights.
7. Exit the game, and open the console log. Create a cfg using the relevant commands I typed, substituting "setviewpos" for each instance of "getviewpos", and insert the coordinates
8. Save the cfg file.
9. Restart game, then execute the cfg file.

I did it, using just a few lights as a test, and it worked! Great big bags of thanks.

Expect a Bad Gerbil ETQW night server within the next 24 hours:dance: :dance: :dance:


Slippy

Babylon
09-12-2007, 11:46 AM
Thats brilliant... thats the kind of flexibility that will make this game varied and fun..and allow different servers to brand their own style on it.

now we have at least two versions of Valley to play with :D

And the best thing is.... as long a you keep your own cfg file, then you can have different lighting styles depending on the cfg you run.

I want ot make sure i have it right though.


1. Type "logfile 2" ( to capture the output and lights+locations etc)
2. Type "networkspawn atmosphere" (not sure what this does?)
3. Type "r_ambientscale 0.1" (sets the overall ligting to DARK!)
4. Type "r_lightscale 5" (I like the lights to be bright.) (sets individual light brightness)
5. Move to where I want the light, type "getviewpos", then, without moving, type "networkspawn light" (self explanatory)
6. Repeat for all lights. (self ex)
7. Exit the game, and open the console log. Create a cfg using the relevant commands I typed, substituting "setviewpos" for each instance of "getviewpos", and insert the coordinates (self ex)
8. Save the cfg file. (self ex)
9. Restart game, then execute the cfg file. (self ex)


Can this cfg be exec'ed by calling it form the main config file?
as in say server.cfg has a line at end called exec darkshit.cfg

or evn can you put it in the command line/?

Awol
09-12-2007, 03:19 PM
Hey Slippy can I get a copy of you light config I to would like to run a server that is in the dark.

Babylon
09-12-2007, 03:42 PM
Hey Slippy can I get a copy of you light config I to would like to run a server that is in the dark.



nooooooooooooooooooooooooooooooo...

something this cool should have to be worked for... :D

we dont want loads of identical dark servers do we? :p

everyone do their own..and we can have a competition to find the best :D

BTW, when you load the config...can you load another one on the fly?
I was thinking you coudl have 20 or so with different background lights to simulate dawn to dusk ..so he sun comes up and the lights go out :D

SlippytheWeasel
09-12-2007, 07:36 PM
Hey Slippy can I get a copy of you light config I to would like to run a server that is in the dark.

Sure, I'll have it ready by this evening. I have to go to work in an hour, and I'm about halfway through:mad:

BTW, when you load the config...can you load another one on the fly?
I was thinking you coudl have 20 or so with different background lights to simulate dawn to dusk ..so he sun comes up and the lights go out :D

I've been thinking about something like that. I am annotating in the config the different areas (GDF Main Base lights, Build the bridge lights, Outpost, etc.). I am going to see if I can get it where only the Main Base and Build the Bridge lights are on at first, then, as the GDF capture areas, more lights are activated. Should be able to make a pk4 that'll set that up, and whenever players connect to our server, they'll auto download that profile for it.

For a sunset, if there is a way to animate the sky tga, to make it change over time, that would be sweet. It wouldn't be hard, I think, to time the light levels changing.:dance:

Slippy

Babylon
09-13-2007, 01:27 AM
ooo

it will be like operation flashpoint :D

SlippytheWeasel
09-13-2007, 09:37 AM
OK, here's my update:

I created the config file, started the game, selected play against computer, and exec'd the cfg. Worked great, not counting that it moved me to the position of the last light I created. :p

Here's the problems:

1. After warm-up runs out, the map reverts to original settings. Should be an easy fix, either delete the warm-up, or figure a way to call the cfg AFTER warm-up is finished.

2. When I uploaded the config file to our server computer, nothing I did would make the server go into night mode, not even in warm-up. I tried execing the cfg with admin, but it said couldn't load it. I put copies of the config everywhere I thought the game might call for it, including the folder under My Documents.

Any thoughts? Tips? Assistance? Life preserver?:dance:


Slippy

Babylon
09-13-2007, 09:57 AM
hmm... I wonder if this is because it is a "lite" dedicated server that doesn't have all the files?

Otherwise, it may be possible to mod the server script in the pk4 files.

I think it needs a bit more of a dedicated look see...I will PM you or vice versa and I am sure we can work something out.


HANDBAGS AT DAWN, STROGG!!

JBRAA
09-13-2007, 10:22 AM
I would like to save ingame serverbrowser "filter settings", into my autoexec.cfg
Can this be done?

Awol
09-13-2007, 03:12 PM
Slippy if you were log on as admin on the server could you type those commands in in the console? If I get some free time today I will play with it and see if I can find a solution.

SlippytheWeasel
09-13-2007, 06:48 PM
Slippy if you were log on as admin on the server could you type those commands in in the console? If I get some free time today I will play with it and see if I can find a solution.

Nope, doesn't work that way either. It's gotta be on the server-side, maybe it needs to be compiled into a pk4 or something.

Still learning.:dance:


Slippy

Awol
09-14-2007, 02:33 AM
ok you can't enter those commands in a multiplayer mode. Tried at in game when logged on as admin and on the server console. Unless someone at SD comes and gives us a hint, I don't believe this can be done on a dedicated server. Sucks too cause its would give us 24 maps instead of 12 when the game comes out.

EDIT:
Maybe JRad can stop by and give us a few hints on how to do it. :)

Babylon
09-14-2007, 03:05 AM
hmm

interesting if there could be a tickle box for a pre set "night mode" for servers lol

hmm

Slippy, I got a few ideas...but its all supposition , contact me on msn or ICQ as per my profile details...will be easier to work it out that way and post the results back if its relevant.............

Awol
09-14-2007, 02:49 PM
BTW feel free to pull me in a MSN chat if you want. The only idea I have at this point would be turning cheating on for a server but I'm not sure that is a good idea to do.

Awol
09-14-2007, 04:25 PM
Ok spent the morning playing around in the valley.entities file. Either making changes in this file does nothing or the demo game doesn't override files in the base directory. Which would make sense as I know some game demos in the past prevented modding.

Also digging through the pk4 file I found generated\declb\atmosphere\valley.atmb while its a binary file it can be read and assumed can be edited as well. It has sun color and stuff like that but again edited the file and putting correctly under my base folder did nothing. Might have to wait for the game to come out and if thats the case the map editor would make it easier to create night maps.

SlippytheWeasel
09-15-2007, 07:55 AM
I wasn't able to networkspawn lights, only testlights. What was the entity name?

[edit] networkspawn light.. durr. Can't adjust color though, too bad.

[edit2] You may be able to use getviewpos and setviewpos to move and put down the lights, too.

Use getviewpos for each light, then use setviewpos with that value before you networkSpawn them. Unfortunately, the networkSpawn doesn't take extra parameters like the spawn command does, so adjusting colors, etc won't work.

Ah, a challenge! If a programmer tells you it can't be done, just claim ignorance and do it anyways!:dance:


http://www.rottenrodents.com/pictures/main.php?g2_view=core.DownloadItem&g2_itemId=1841&g2_serialNumber=1


http://www.rottenrodents.com/pictures/main.php?g2_itemId=1808
Does this qualify as Global Volunteer Force material?:dance:

Or am I a Weasel skulking around the wrong tapir?:eek:

j/k






But, I still can't get these settings to work on an actual server, just playing locally against the computer.:(

Slippy

Lekdevil.NL
09-15-2007, 11:35 AM
I know you can execute map config files as I saw that in the server launcher someplace. Not sure about networkspawn.
Yes, there is this nice cvar called g_execMapConfigs. When set to 1 (this works both server- and client-side), ETQW will look for a config file called "base/maps/<mapname>.cfg" and execute that at the time the map is being loaded. If it doesn't exist, it will try to execute "base/defaultmap.cfg".

The only problem I see is that this config is excuted before the map is loaded, so I don't think it's of much use to add lights and stuff automatically. Perhaps the addition of a "wait" command here and there can help, but that tends to be a somewhat unreliable method.

Awol
09-15-2007, 02:43 PM
Slippy those screenshots look sweet. Lets hope we can figure out how to get it working on a server soon.

SlippytheWeasel
09-16-2007, 11:04 PM
Sure hope so. Found more ways to create colored lights, with directional lights as well, they throw their light farther than the networkspawn lights do.:dance:

http://www.rottenrodents.com/pictures/main.php?g2_view=core.DownloadItem&g2_itemId=1850&g2_serialNumber=1


Slippy

SlippytheWeasel
09-17-2007, 03:06 AM
For grins and giggles, try the command "r_matey":dance:


Slippy

Awol
09-18-2007, 10:47 PM
Ok played around some on a server and you can spawn all the vehicles and deployables you want atmosphere and lights don't spawn at all. Looks like we need to wait for the map editor and with luck we will have the official maps and we can then make night maps. Either that make SD allow networkSpawn Atmosphere and light work.

SlippytheWeasel
09-19-2007, 05:52 AM
Ok played around some on a server and you can spawn all the vehicles and deployables you want atmosphere and lights don't spawn at all. Looks like we need to wait for the map editor and with luck we will have the official maps and we can then make night maps. Either that make SD allow networkSpawn Atmosphere and light work.

Kinda what I was thinking. No problems, I'm ready to go.:dance:


Slippy

sponge
09-19-2007, 06:11 AM
Yes, there is this nice cvar called g_execMapConfigs. When set to 1 (this works both server- and client-side), ETQW will look for a config file called "base/maps/<mapname>.cfg" and execute that at the time the map is being loaded. If it doesn't exist, it will try to execute "base/defaultmap.cfg".

The only problem I see is that this config is excuted before the map is loaded, so I don't think it's of much use to add lights and stuff automatically. Perhaps the addition of a "wait" command here and there can help, but that tends to be a somewhat unreliable method.

Mind you networkSpawn spawns things based on the player's position. The player in this case is the server, so if it spawns at all, it won't be where you want it to be.

Personally I hope that networkSpawn is enhanced a bit, either by SD or in a mod, to allow defining of positions, and entity keys, for a construction type mod.

SlippytheWeasel
09-19-2007, 09:19 AM
Mind you networkSpawn spawns things based on the player's position. The player in this case is the server, so if it spawns at all, it won't be where you want it to be.

Personally I hope that networkSpawn is enhanced a bit, either by SD or in a mod, to allow defining of positions, and entity keys, for a construction type mod.

Real basic run-down how I do it:

Before spawning something, open the console and type "logfile 2". When you are in position and ready, type "getviewpos ", then "networkspawn" the item. Repeat for all the objects, then exit the game.

Open your base folder, you'll find a console log file.

Open it, and you'll see all the commands you issued in the game.

Create a config file (whatever name you want.cfg), and copy all the "getviewpos" and "networkspawn" commands. Don't change the order they are in!

Replace "getviewpos" with "setviewpos", and remove and "(" or ")" in the position numbers.

Put "net_allowcheats 1 as the first line of the file, and net_allowcheats 0 as the last line.

Save the file, start the game, and exec the config from the console.

Viola!

Should look kinda like this:

//Enemy Territory:Quake Wars
//Valley Map Night Configuration file v. 1.0
//by |RR|SlippytheWeasel
//Rotten Rodents Clan
//Bad Gerbil Servers
//www.rottenrodents.com
net_allowcheats 1
//networkspawn atmosphere = deletes the sky map and darkens the entire map
networkspawn atmosphere
//r_ambientscale .2 = set a low lights level on all objects
r_ambientscale .2
//r_lightScale 5 = makes all networkspawned lights extra bright
r_lightScale 5
//Main GDF Base Lights
setviewpos 10306.83 -11227.94 1543.55 355.32 -354.79 0.00
networkspawn light
setviewpos 9706.61 -11653.41 1480.5 88.91 -353.12 0.00
networkspawn light
setviewpos 9706.61 -11653.41 1480.5 266.21 -0.70 0.00
networkspawn light
setviewpos 9103.16 -11235.48 1543.56 178.52 -358.60 0.00
networkspawn light
setviewpos 9712.72 -10810.59 1480.5 270.34 -357.06 0.00
networkspawn light
setviewpos 9712.72 -10810.59 1480.5 87.09 -357.39 0.00
networkspawn light
.
.
.
.
net_allowcheats 0

Slippy

Awol
09-19-2007, 02:50 PM
Mind you networkSpawn spawns things based on the player's position. The player in this case is the server, so if it spawns at all, it won't be where you want it to be.

Personally I hope that networkSpawn is enhanced a bit, either by SD or in a mod, to allow defining of positions, and entity keys, for a construction type mod.

True but networkspawn doesn't work for everything in a host server game. I tried both on the server console and in the game. I can spawn all the vehicles and deployables I want and had fun with a strogg AVT in the GDF base. I also spawned about 15 titan trying to make a tower of titans (didn't work very well). When I went to lights nothing happened didn't spawn them like it does with vehicles.

BTW this all works fine if you use the play computer option on the game and might work fine if you run a listen server but I haven't tried that yet.

SlippytheWeasel
09-23-2007, 09:21 AM
If anyone wants to give it a try, here's my light config file. WARNING: Lots of lights will be spawned, may effect performance, especially inside large buildings near Main Outpost.:eek:

Unzip it, and put it in your C:\Documents and Settings\MyComputer\My Documents\id Software\Enemy Territory - QUAKE Wars Demo\base folder

Has to be done on a local computer, can't get it to work on a server. Just select "Play Computer", start the game, open the console, and type "exec lights1.cfg"

NOTE: It will also spawn 3 extra base defense guns, a radar inside the building behind the Titan at the first GDF spawnpoint, and a psi radar above the tunnel entrance, just for giggles. That's because it real hard to see the Tormentor when it comes in on a dark map.

I've also included the files to light the separate areas of the maps, if the lights1.cfg is too intense for your computer to handle.:eek:

A readme is enclosed explaining which cfg lights which area. You exec them the same way as described above, but substitute the individual area cfg filenames (lightsa.cfg, lightsb.cfg, etc). You can light up the map one area at a time this way. Lightsa.cfg has the extra defense guns and radar spawns in it.

Enjoy. Not responsible if you get lost in the dark, though!:dance:


Slippy

marmil
09-23-2007, 08:57 PM
I just tried it out-- very cool Slippy. :)
Thanks for putting that cfg together and posting!

( And yes, I did get a little lost in the dark a few times. hehehe )

SlippytheWeasel
09-23-2007, 09:27 PM
I just tried it out-- very cool Slippy. :)
Thanks for putting that cfg together and posting!

( And yes, I did get a little lost in the dark a few times. hehehe )

Not responsible for lost keys in the dark, either.:dance:


Slippy

SlippytheWeasel
10-01-2007, 12:31 AM
We have our server up and running. Soon as I get the game (02 Oct):( , I'll start working on scripts for night/evening maps on it.

Bad Gerbil ET:QW 12 Map Campaign
66.186.33.170:27733

http://stage6.divx.com/user/SlippytheWeasel/video/1686768/ETQW-Lights-Out

Slippy