Different weapons on different maps.

24 replies [Last post]
Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

There is something wrong with my syntax. My if statements are not workng.

//if ($mapname == "q3dm17") {Start Weapons: 1+64;}
if (map == "q3dm11") {Start Weapons: 1+2+4+8+16+32+128}
//if ( (map == "q3tourney3")|| (map == "q3dm18") || (map == "q3dm17")) {Start Weapons: 1+64;}
else if (map == "q3dm17") {Start Weapons: 64+1;}
//if (map == "q3dm17") {Start weapons: 64 +1}
else {Start Weapons: 1+64+256; }
I have tried if (map)... if ($mapname ==) with quotes, without quotes, the map title, with and without semicolons at the ends...

All that happens is I get all the weapons but the BFG and Rail whatever map I am on. When it changes the map, it doesn't change the weapons.

I am obviously doing something wrong. Any suggestions as to the correct syntax?

<Shredder>*ELITE'Z*

¯¯__█ALI█¯¯__
xpaliminium's picture
Offline
Joined: Nov 2005
Posts:
Different weapons on different maps.

[code:1]
if ($mapname == "q3dm11") {
Start Weapons = 1+2+4+8+16+32+128;
}
else if ( ($mapname == "q3tourney3") || ($mapname == "q3dm18") || ($mapname == "q3dm17") ) {
Start Weapons = 1+64;
}
else {
Start Weapons = 1+64+256;
}
[/code:1]
You have to put this inside Misc and not have any line Start Weapons after this code or it will overide it.

and if still don't work as expected better use kind of lines :
[code:1]Start Weapons = WP_GAUNTLET | WP_MACHINEGUN | WP_SHOTGUN | WP_GRENADE_LAUNCHER | WP_ROCKET_LAUNCHER | WP_LIGHTNING | WP_RAILGUN | WP_PLASMAGUN | WP_BFG;
[/code:1]

Wanna avoid seeying mow, skull & co Surprise

Check this peacefull place

Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

Thank you for a prompt and clear reply.

That does look an awful lot like what I've tried already... but I have tried as you suggested (I must have got it wrong before!) and I am giving it another go.

<Shredder>*ELITE'Z*

Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

No It didn't work. It gets the weapons from the first line (all bar BFG and Rail) then reverts to default config.

This is what happens when it it loaded with /load in my maprotation file.

When I used it in my settings file (set xp_setting: settings.cfg) I got an error message saying that complex if statments are not allowed in the settings file. (not allowed in the map rotation file either.)

I'll try again with the other kind of lines!

<Shredder>*ELITE'Z*

¯¯__█ALI█¯¯__
xpaliminium's picture
Offline
Joined: Nov 2005
Posts:
Different weapons on different maps.

Why does ppl need all ready Tongue

You will just code I have put upper in this cfg and it works.

You will need to add more things.

If it still doesn't work, you have problem with your server config, not weapon config.

Wanna avoid seeying mow, skull & co Surprise

Check this peacefull place

Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

Okay, thanks for that.

I think I've identified the problem - I obviously don't know what I'm doing!

You clearly do so I am assuming that works and that I just don't know how to use it.

Server config sets up things like max players, min bots, map rotation file name, lots of commands begining with set... yes?

My config file is set with xp_config "myconfigfile.cfg" - it sets things like the armour, starting weapons, weapons characteristics, health etc

my weapon config file should be called with /load from with in my map rotation.

If I am using a weapons config, should I delete the weapons informations from my xp_config file and put it into weapon.cfg?

Or am I doing something really, really stupid?

<Shredder>*ELITE'Z*

Laktos
Trollet's picture
Offline
Joined: Apr 2006
Posts:
Different weapons on different maps.
Shredder wrote:


Server config sets up things like max players, min bots, map rotation file name, lots of commands begining with set... yes?

Yes. server.cfg in e+ folder.

Shredder wrote:


My config file is set with xp_config "myconfigfile.cfg" - it sets things like the armour, starting weapons, weapons characteristics, health etc

This is the weaponconfig and also the place to put your syntaxx for different weapons on different maps. There is no need to load it from map rotation.txt if u have it set with xp_config in server.cfg. The weapon config should be placed in e+/conf folder.

(I'm assuming u start server and exec server.cfg)

Alla blå bär är blå bär - även blåbär - men det är bara blåbär som är blåbär.
A cloud pooped out a rainbow turd.

Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

OKay.

Thanks to you all for your patience and help. It really is appreciated.

I shall keep trying!

<Shredder>*ELITE'Z*

Laktos
Trollet's picture
Offline
Joined: Apr 2006
Posts:
Different weapons on different maps.

If nothing works out: Really simple Example pakage

1.04b6 + bat to start ded server (Win).
rotation of 3 maps
different weapons on all

Alla blå bär är blå bär - även blåbär - men det är bara blåbär som är blåbär.
A cloud pooped out a rainbow turd.

Shredder
Darren's picture
Offline
Joined: Sep 2009
Posts:
Different weapons on different maps.

OKay I give up!

It has defeated me!

Thanks for trying but I have decided the problem is beyond my capabilities.

There does seem to be a problem with the config with the misc{} section in it but I can't tell what it is. Even with a simple Start Weapons: 1+64 it still defaults to the default config.

However... if I load a weapons config from the map rotation file it all works fine.

I have tried putting the If statements into a working config file and using that but all I get is the error message:

Complex If Else statements are not supported.

I tried looking for the sample file suggested in the 1.04b6 but a) couldn't find the config (I did look, honest!) and there were compatability issues.

I can do what I wanted with the /load command in the map rotation file but... what I really wanted to do was set up a server so that if non-rotation/custom maps were played then the default weapons would have been BFG and Rail though now I'm not sure that would have worked.

I even did a clean reinstall of Excessive plus - dumped the old one to a back up folder, down loaded 1.03 and reinstalled, cleaned up my q3config, and looked at my server settings config (loaded in the batch file.)

Again, thanks for trying to help, I do apprectiate it. I am sure it can be done , just not by me. It takes someone with more experience and knowledge than I have. Happy

<Shredder>*ELITE'Z*