Author Topic: ULX not loading map and gamemode configurations  (Read 6758 times)

0 Members and 1 Guest are viewing this topic.

Offline Master-Guy

  • Newbie
  • *
  • Posts: 7
  • Karma: 1
ULX not loading map and gamemode configurations
« on: February 05, 2009, 10:36:00 PM »
Hi all,

Earlier this week I downloaded srcds with gmod10 and cs:s content. Then I decided to get ULX with it because of the great functionality, together with the GMStranded mod.
However now we want to add configuration files for each map. I found this manual on how to do it, but it doesn't load the files at all.

On starting the server I get the error:
exec //*/cfg/server.ini: invalid file type
so I renamed it to cfg and that's working.

After that I put the ini files into the cfg/maps directory with the proper names (gm_flatgrass.ini) and restarted the server.
It didn't load any of the settings put in to that file and it didn't echo the string I've put in it.
Immediately I thought of the earlier problem with the .ini extension and I copied the files but now I gave em the cfg extension, but its still not working.

Can anyone help me to get the map-specific configuration working? The main goal is to automatically load the proper gamemode.

Content of gm_flatgrass.ini/gm_flatgrass.cfg:
Code: [Select]
sv_gamemode   "sandbox"
sv_defaultgamemode  "sandbox"
echo "Sandbox loaded from map specific configuration"

Content of gm_islands.ini/gms_islands.cfg:
Code: [Select]
sv_gamemode   "GMStranded"
sv_defaultgamemode  "GMStranded"
echo "Sandbox loaded from map specific configuration"

Content of server.cfg:
Code: [Select]
   
    "sv_contact"            "**<MyEmailAdress>**"
   

"hostname" "**<MyHostname>**"
    "rcon_password" "**<MyPassword>**"
    "sv_password" ""
"sv_region" "3" // eastcoast: 0 - westcoast: 1 - south america: 2 - europe: 3 - asia: 4 - australia: 5 - middle east: 6 - africa: 7 - world: 255
"sv_lan" "0"

"sbox_godmode" "0"
"sbox_plpldamage" "0"  // set this to 1 to disable player vs player damage.
"sbox_noclip" "0"

"sbox_maxprops" "150"
"sbox_maxragdolls" "5"
"sbox_maxnpcs" "10"
"sbox_maxballoons" "10"
"sbox_maxeffects" "50"
"sbox_maxdynamite" "10"
"sbox_maxlamps" "20"
"sbox_maxthrusters" "30"
"sbox_maxwheels" "20"
"sbox_maxhoverballs" "20"
"sbox_maxvehicles" "6"
"sbox_maxbuttons" "20"
"sbox_maxemitters" "5"
"sbox_maxspawners" "3"
"sbox_maxturrets" "2"

//Any of the settings in here can be added to the per-map configs.

ulx showMotd 1 // Set to 0 to disable showing motd on connect. Shows the file the cvar motdfile says to.

//ulx addGimpSay "I'm a llama."
//ulx addGimpSay "How do you fly?"
//ulx addGimpSay "baaaaaaaaaah."
//ulx addGimpSay "Llama power!"
//ulx addGimpSay "Llamas are the coolest!"
//ulx addGimpSay "What's that gun to move stuff?"


ulx chattime 1.5 // Players can only chat every x seconds (anti-spam). 0 to disable


// This is what the players will see when they join, set it to "" to disable.
// You can use %host% and %curmap% in your text and have it automagically parsed for you
ulx welcomemessage "Welcome to %host%! We're playing %curmap%."


// Adverts
// addCsayAdvert <msg> <r> <g> <b> <repeat_time> <length> [<group>]
// addAdvert <msg> <repeat_time> [<group>]
// addCsayAdvert puts adverts in the middle of the screen, addAdvert puts adverts in the text area.
// You can use %host%, %curmap%, and %ulx_version% in your message and have it automagically parsed for you.
// If you specify a group, adverts in that group will run sequentially instead of simultaneously. EX:
// ulx addAdvert "This message is run first" 10 a
// ulx addAdvert "This message is run second" 10 a
ulx addCsayAdvert "You're playing on %host%, enjoy your stay!" 100 255 200 300 10

// Please, if you have any compassion at all, leave this one in.
ulx addAdvert "This server is running ULX Admin Mod version %ulx_version% by Team Ulysses -- ulyssesmod.net" 540


ulx logFile 1 // Log to file (Can still echo if off). This is a global setting, nothing will be logged to file with this off.
ulx logEvents 1 // Log events (player connect, disconnect, death)
ulx logChat 1 // Log player chat
ulx logSpawns 1 // Log when players spawn objects (props, effects, etc)
ulx logSpawnsEcho 1 // Echo spawns to players in server. 0 = off, 1 = Admins only, 2 = All players. (Echoes to console)
ulx logDir "ulx_logs" // The log dir under garrysmod/data.
ulx logEcho 2 // Echo mode
// Echo modes:
// 0 - OFF No output to players when an admin command is used
// 1 - ANONYMOUS Output to players similar to "(ADMIN) slapped Bob with 0 damage"
// 2 - FULL Output to players similar to "(ADMIN) Foo slapped Bob with 0 damage"



ulx rslotsMode 0
ulx rslots 2
ulx rslotsVisible 1 // When this is 0, sv_visiblemaxplayers will be set to maxplayers - slots_currently_reserved
//Modes:
//0 - Off
//1 - Keep # of slots reserved for admins, admins fill slots.
//2 - Keep # of slots reserved for admins, admins don't fill slots, they'll be freed when a player leaves.
//3 - Always keep 1 slot open for admins, kick the user with the shortest connection time if an admin joins.

//Difference between 1 and 2:
//I realize it's a bit confusing, so here's an example.
//On mode 1--
// You have maxplayers set to 10, rslots set to 2, and there are currently 8 non-admins connected.
// If a non-admin tries to join, they'll be kicked to keep the reserved slots open. Two admins join
// and fill the two reserved slots. When non-admins leave, the two admins will still be filling the
// two reserved slots, so another regular player can join and fill the server up again without being
// kicked by the slots system

//On mode 2--
// Same setup as mode 1, you have the two admins in the server and the server is full. Now, when a
// non-admin leaves the server, reserved slots will pick up the slot again as reserved. If a regular
// player tries to join and fill the server again, even though there are two admins connected, it will
// kick the regular player to keep the slot open

//So, the basic difference between these two is mode 1 will subtract currently connected admins from the slot
//pool, while mode 2 while always be attempting to reclaim slots if it doesn't currently have enough when
//players leave no matter how many admins are connected.

//rslotsVisible:
// If you set this variable to 0, ULX will automatically change sv_visiblemaxplayers for you so that if
// there are no regular player slots available in your server, it will appear that the server is full.
// The major downside to this is that admins can't connect to the server using the "find server" dialog
// when it appears full. Instead, they have to go to console and use the command "connect <ip>".
// NOTE THIS DOES NOT CHANGE YOUR MAXPLAYERS VARIABLE, ONLY HOW MANY MAXPLAYERS IT _LOOKS_ LIKE YOUR
// SERVER HAS. YOU CAN NEVER, EVER HAVE MORE PLAYERS IN YOUR SERVER THAN THE MAXPLAYERS VARIABLE.



ulx votemapEnabled 1 // Enable/Disable the entire votemap command
ulx votemapMintime 10 // Time after map change before votes count.
ulx votemapWaittime 5 // Time before a user must wait before they can change their vote.
ulx votemapSuccessratio 0.4 // Ratio of (votes for map)/(total players) needed to change map. (Rounds up)
ulx votemapMinvotes 3 // Number of minimum votes needed to change map (Prevents llamas). This supercedes the above convar on small servers.
ulx votemapVetotime 30 // Time in seconds an admin has after a successful votemap to veto the vote. Set to 0 to disable.
ulx votemapMapmode 1 // 1 = Use all maps but what's specified below, 2 = Use only the maps specified below.

ulx voteEcho 0 // 1 = Echo what every player votes (this does not apply to votemap). 0 = Don't echo

ulx votemap2Successratio 0.5 // Ratio of (votes for map)/(total players) needed to change map. (Rounds up)
ulx votemap2Minvotes 3 // Number of minimum votes needed to change map (Pevents llamas). This supercedes the above convar on small servers.

ulx votekickSuccessratio 0.6 // Ratio of (votes for kick)/(total players) needed to kick player. (Rounds up)
ulx votekickMinvotes 2 // Number of minimum votes needed to kick player (Pevents llamas). This supercedes the above convar on small servers.

ulx votebanSuccessratio 0.7 // Ratio of (votes for ban)/(total players) needed to ban player. (Rounds up)
ulx votebanMinvotes 3 // Number of minimum votes needed to ban player (Pevents llamas). This supercedes the above convar on small servers.

// If you'd like to add more maps, make separate lines for them all prefixed with "ulx votemapAddmap".
ulx votemapAddmap background01
ulx votemapAddmap background02
ulx votemapAddmap background03
ulx votemapAddmap background04
ulx votemapAddmap background05
ulx votemapAddmap background06
ulx votemapAddmap background07
ulx votemapAddmap credits
ulx votemapAddmap intro
ulx votemapAddmap test_hardware
ulx votemapAddmap test_speakers

// You can also add forced downloads here. Make sure you put quotes around the path/filename, and take out the comment string '//'.
// Add as many as you want. You can also add these to your map- or game-specific files.
// format: ulx addForcedDownload <file/folder> [<recursive>]
//ulx addForcedDownload "sound/cheeseman.mp3"
// You can add a folder to add all files inside that folder. If recursive is 1 it will also add all files from any sub-folders.
//ulx addForcedDownload "sound/my_music" 1

Any help would be very appreciated.

Edit 7 feb 2009: Created Mantis ticket #337
« Last Edit: February 07, 2009, 11:19:40 AM by Master-Guy »

Offline Alex

  • Newbie
  • *
  • Posts: 33
  • Karma: 1
Re: ULX not loading map and gamemode configurations
« Reply #1 on: February 06, 2009, 04:38:35 PM »
I don't know if this will help but try this:

1. In your server.cfg add this somewhere: sv_defaultgamemode  "sandbox"
2. Delete the sv_defaultgamemodes off of the map inis
 
Again I don't if this will work I haven't tried this yet.
:) Alex T. :)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX not loading map and gamemode configurations
« Reply #2 on: February 06, 2009, 05:12:31 PM »
Master-Guy, our 'latest' release, v3.31 which was released quite a while ago (June 2008) had a bug where server.ini file wouldn't execute. See http://ulyssesmod.net/bugs/view.php?id=213
I'm betting the fix we have in SVN (beta/pre-release) code probably fixes your issue with map ini files also.

We hope to have a new release soon.
Maybe this weekend, perhaps next..we've not had much response from those using SVN to know if we fixed a huge ULib bug caused by Garry in a recent Gmod update.
Even if we don't get enough response about the Ulib corrections, we've got enough fixes for other stuff that we could get by with a release.

If you are running SVN, by all means let us know. This means we need to dig further.
If you're willing to try SVN, see our SVN forum area and test with us.

(Oh, Megiddo could confirm what might happen, but I'm not sure how 'echo' would work within a ULX ini file.)
« Last Edit: February 06, 2009, 05:15:51 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ULX not loading map and gamemode configurations
« Reply #3 on: February 06, 2009, 05:39:36 PM »
Echo would work correctly within a .ini. We hope to have the current version out soon.
Experiencing God's grace one day at a time.

Offline Master-Guy

  • Newbie
  • *
  • Posts: 7
  • Karma: 1
Re: ULX not loading map and gamemode configurations
« Reply #4 on: February 07, 2009, 06:02:41 AM »
Currently we are running SVN revision 23 and we still have the issue.
Its a local test server and we haven't made that big modifications yet, so if there is an update I'd be happy to test it out.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX not loading map and gamemode configurations
« Reply #5 on: February 07, 2009, 08:55:17 AM »
Master-Guy, thanks for the response. SVN 23 is, as of this post, the latest for both ULib and ULX.
Is this local test server a dedicated  (srcds) or listen (started in game) server?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Master-Guy

  • Newbie
  • *
  • Posts: 7
  • Karma: 1
Re: ULX not loading map and gamemode configurations
« Reply #6 on: February 07, 2009, 11:18:15 AM »
It's a dedicated server ran in Microsoft Virtual PC 2007, which is running on my Win Vista box.

PS: Also created a Mantis ticket (#337)
« Last Edit: February 07, 2009, 11:20:19 AM by Master-Guy »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX not loading map and gamemode configurations
« Reply #7 on: February 07, 2009, 11:43:24 AM »
Thanks for the ticket.
Saves me the trouble. :)
I'll be looking into replicating the issue today if Megiddo doesn't fix it first.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming