Game type in spearhead changing
Moderator: Moderators
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
Game type in spearhead changing
Hi all,
Who know how i could change the game type name? in the mohaa browser,
Now it names is "Team-Match", Some mods can changed that to "free-tag"
but also to "custom-maps server"
How can i edit that to in spearhead,
I add this line to my cfg file but i dont work
seta g_gametypestring "Custom-Maps"
Greetz GateCrasher
Who know how i could change the game type name? in the mohaa browser,
Now it names is "Team-Match", Some mods can changed that to "free-tag"
but also to "custom-maps server"
How can i edit that to in spearhead,
I add this line to my cfg file but i dont work
seta g_gametypestring "Custom-Maps"
Greetz GateCrasher
GaTeCRaSHeR, NL
Mohaa mapping is the best thing to do , when you're in love with mohaa
:D:D
Mohaa mapping is the best thing to do , when you're in love with mohaa
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
i've never tried it from .cfg
try set instead of seta
if that doesn't work you need to put this in you map scripts.
do you have a map mod? I recomend you make a global script and call it from each custom map in your map mod pk3. That way if you ever need to add something to all your custom maps you only need to do it once in your global scr. make one for your stock maps too.
try set instead of seta
if that doesn't work you need to put this in you map scripts.
Code: Select all
setcvar "g_gametypestring" "Custom-Maps"
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
your best bet is to rcon it, editing maps from console can get hairy, especially when they're in pk3s.
rcon seta g_gametypestring "custom"
if you wanted to script it, you'd have to put the line
set g_gametypestring "custom"
after the level waittill prespawn. in every map.
in short: you're better off using rcon.
rcon seta g_gametypestring "custom"
if you wanted to script it, you'd have to put the line
set g_gametypestring "custom"
after the level waittill prespawn. in every map.
in short: you're better off using rcon.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
this will not be easy, just let me know if u have any questions
you will need a few things
1. winzip or winrar to make your mod pk3
i use winzip and notepad to do all my scripting.
get the .scr for each custom map from thier pk3s and drag them in your own project file.
in your project file make a maps file and in it make a dm file and a obj file.
so you have in your project folder you have these folders
maps
and in maps you have
dm
obj
put all your scrs in the right folder - if dm - dm if obj - obj
drag your maps folder into a new zip file named
zzzzz-mymods.pk3
now you can open the map sripts to view them with notepad - make changes and save them. drag your saved scrs into your folder and then back to your zip.
you will need a few things
1. winzip or winrar to make your mod pk3
i use winzip and notepad to do all my scripting.
get the .scr for each custom map from thier pk3s and drag them in your own project file.
in your project file make a maps file and in it make a dm file and a obj file.
so you have in your project folder you have these folders
maps
and in maps you have
dm
obj
put all your scrs in the right folder - if dm - dm if obj - obj
drag your maps folder into a new zip file named
zzzzz-mymods.pk3
now you can open the map sripts to view them with notepad - make changes and save them. drag your saved scrs into your folder and then back to your zip.
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
I want also to use it for the stock maps if that is possible
i have now this in the mainta map
test.pk3
-- global
------ DMprecache.scr
That DMprecache i thougt that the are for all DM maps
and this is the script file self
but it gifes an error in my console
`
but if i view the lan game its working
But its not working on the server where should be working
i have now this in the mainta map
test.pk3
-- global
------ DMprecache.scr
That DMprecache i thougt that the are for all DM maps
and this is the script file self
Code: Select all
Main:
level waittill prespawn
setcvar "g_gametypestring" "OYL MODS"
thread Adve
thread Advec
end
Adve:
while(1)
{
wait 60
iprintln "Welkom To GaTeCRaSHeR Compo Server!"
iprintln "www.dutch-division.nl"
iprintln "Play Fair!!!!!"
iprintln " *** G A M E O N *** "
}
end
Advec:
while(1)
{
wait `60
centerprint "welcome"
}
end
Code: Select all
-------------------- Actual Spawning Entities Done ------------------ 374 ms
0 teams with 0 entities
Adding script: 'dm/mohdm1.scr'
level waittill prespawn (global/dmprecache.scr, 2)
level ^
^~^~^ Script Error: invalid waittill prespawn for 'Level'but if i view the lan game its working
But its not working on the server where should be working
GaTeCRaSHeR, NL
Mohaa mapping is the best thing to do , when you're in love with mohaa
:D:D
Mohaa mapping is the best thing to do , when you're in love with mohaa
i dont think you need the dmprecach in your mod .pk3 - if you want all the stock maps also, you can get them out of pak1 and 2 from mainta just as i described earlier.
so you will have -
maps/dm
with a script for each AA dm map and each SH dm map plus all your custom dm map scrs
maps/obj
with a script for each AA obj map and each SH obj and tow map
plus all your custom obj map scrs
add a scr in a global folder and call it something like common.scr
and one called something like custom.scr
so you will have -
global/common.scr
and
global/custom.scr
here is your common.scr
here is your custom.scr
Now in every stock map script above level waittill spawn add this line
and in every custom map script above level waittill spawn add this line
In the future when you want to change your message or add something to all your maps you just need to edit these global scripts.
I think thats it !
so you will have -
maps/dm
with a script for each AA dm map and each SH dm map plus all your custom dm map scrs
maps/obj
with a script for each AA obj map and each SH obj and tow map
plus all your custom obj map scrs
add a scr in a global folder and call it something like common.scr
and one called something like custom.scr
so you will have -
global/common.scr
and
global/custom.scr
here is your common.scr
Code: Select all
Main:
thread gtype
thread Adve
thread Advec
end
gtype:
setcvar "g_gametypestring" "OYL MODS"
end
Adve:
while(1)
{
wait 60
iprintln "Welkom To GaTeCRaSHeR Compo Server!"
iprintln "www.dutch-division.nl"
iprintln "Play Fair!!!!!"
iprintln " *** G A M E O N *** "
}
end
Advec:
while(1)
{
wait 60 //you really want this ??? every 60 seconds?
centerprint "welcome"
}
end
Code: Select all
Main:
thread gtype
thread Adve
thread Advec
end
gtype:
setcvar "g_gametypestring" "Custom maps"
end
Adve:
while(1)
{
wait 60
iprintln "Welkom To GaTeCRaSHeR Compo Server!"
iprintln "www.dutch-division.nl"
iprintln "Play Fair!!!!!"
iprintln " *** G A M E O N *** "
}
end
Advec:
while(1)
{
wait 60 //you really want this ??? every 60 seconds?
centerprint "welcome"
}
end
Code: Select all
exec global/common.scr
Code: Select all
exec global/custom.scr
I think thats it !
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
its a good way to start your own mod pak - next step is to start adding other stuff like models, sounds, animations and map fixes.
lots of cool stuff you can start doing once you set up a global map scr system too.
on my servers i have a mod rotation that rotates multiple mods for each map each map rotation. i run more than 150 mods on 2 servers.
My global counts the players on the server and will select the appropriate mod or gametype for the number of people playing.
i also use my global.scr to run my weapons limiter, etc.
it's not the easy way, but its a good foundation for building your own map mod pak.
lots of cool stuff you can start doing once you set up a global map scr system too.
on my servers i have a mod rotation that rotates multiple mods for each map each map rotation. i run more than 150 mods on 2 servers.
My global counts the players on the server and will select the appropriate mod or gametype for the number of people playing.
i also use my global.scr to run my weapons limiter, etc.
it's not the easy way, but its a good foundation for building your own map mod pak.
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact:
Hi viper thanks for your help
and its works , nice job
I added the line exec global\gatemod.scr in all the stock scripts of the maps and the game type was "My Mod NaMe"
ok but now its hard to change it every time when i want to called it else or when i want to change the custom text below the compas
So i created 2 files gatemod.scr and i config file gate-config.cfg
GATEMOD.SCR :
GATE-CONFIG.CFG
ok i still needed to fix that message strings but now the still work fine
Only the game-type in game is NILL :S
and i have try it a view times but not succeed,
What could be wrong?
the map script file will exec gatemod.scr
and the gatemod.scr must wait when the config gile is load
in the config file are te custom strings that will be set with cvar
and then the gatemod.scr will get them like this
local.gametype = getcvar(GCR_regel1)
Only it not works :S
I added the line exec global\gatemod.scr in all the stock scripts of the maps and the game type was "My Mod NaMe"
ok but now its hard to change it every time when i want to called it else or when i want to change the custom text below the compas
So i created 2 files gatemod.scr and i config file gate-config.cfg
GATEMOD.SCR :
Code: Select all
Main:
waitexec gate-config.cfg
local.gametype = getcvar(GCR_regel1)
local.astext = getcvar(GCR_regel2)
thread gtype
thread Adve
end
gtype:
setcvar "g_gametypestring" local.gametype
setcvar "g_obj_alliedtext2" local.astext
end
Adve:
while(1)
{
wait 120
iprintln "On This server are some custom maps"
iprintln "please visit or site to download them"
}
end
GATE-CONFIG.CFG
Code: Select all
setcvar GCR_regel1 "*|My Mods|*"
setcvar GCR_regel2 "Testing"Only the game-type in game is NILL :S
and i have try it a view times but not succeed,
What could be wrong?
the map script file will exec gatemod.scr
and the gatemod.scr must wait when the config gile is load
in the config file are te custom strings that will be set with cvar
and then the gatemod.scr will get them like this
local.gametype = getcvar(GCR_regel1)
Only it not works :S
GaTeCRaSHeR, NL
Mohaa mapping is the best thing to do , when you're in love with mohaa
:D:D
Mohaa mapping is the best thing to do , when you're in love with mohaa
i think u need to pass your local.variables through the thread - like this
or stuff your locals like this -
Also, I init my cvars at the end of my server.cfg (not saying waitexec to cfg is wrong, i just like to see all the vars in server cfg for me and my admins)
end of server.cfg
Code: Select all
Main:
waitexec gate-config.cfg
local.gametype = getcvar(GCR_regel1)
local.astext = getcvar(GCR_regel2)
thread gtype local.gametype local.astext
thread Adve
end
gtype local.gametype local.astext:
setcvar "g_gametypestring" local.gametype
setcvar "g_obj_alliedtext2" local.astext
end
Adve:
while(1)
{
wait 120
iprintln "On This server are some custom maps"
iprintln "please visit or site to download them"
}
end Code: Select all
Main:
waitexec gate-config.cfg
thread gtype
thread Adve
end
gtype:
local.gametype = getcvar(GCR_regel1)
local.astext = getcvar(GCR_regel2)
setcvar "g_gametypestring" local.gametype
setcvar "g_obj_alliedtext2" local.astext
end
Adve:
while(1)
{
wait 120
iprintln "On This server are some custom maps"
iprintln "please visit or site to download them"
}
end end of server.cfg
Code: Select all
set GCR_regel1 "*|My Mods|*"
set GCR_regel2 "Testing"
-
GaTeCRaSHeR
- Lance Corporal
- Posts: 14
- Joined: Wed Mar 23, 2005 4:23 pm
- Location: The Netherlands, Wijchen
- Contact: