Objective maps as TDM?
Moderator: Moderators
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Objective maps as TDM?
Can the stock objective maps be converted to TDM via scripting...and if so how?

you cant run them in gametype 2(TDM)
but you can always just take out the code for the objectives....
comment out waittill roundstart first off
change level.clockside = to kills
and comment out the objeciteve information, usualy just a few threads.
oh and change level.dmrespawning to 1 so everyone respawns.
as long as the script isnt looking for an objective, there wont be one.
of course, spawns wont change, but i believe it should run fine.
edit--- heres v2
i put ---> before the lines I changed. Freezetag, and capture the flag are mods that work supplanting the normal objective gametype.
remember tho, the gametpye cant be changed(as far as I know) because of the prefix obj/ though I guess maybe you could repack it in a dm subfolder...
if you want to run different game types on a moh:aa server you can just add the line 'setcvar g_gametype "whatever"' at the beginning of each script. Then, when it loads, the gametype is set on a per map basis.
but you can always just take out the code for the objectives....
comment out waittill roundstart first off
change level.clockside = to kills
and comment out the objeciteve information, usualy just a few threads.
oh and change level.dmrespawning to 1 so everyone respawns.
as long as the script isnt looking for an objective, there wont be one.
of course, spawns wont change, but i believe it should run fine.
edit--- heres v2
Code: Select all
// V2 FACILITY
// ARCHITECTURE: POWZER
// SCRIPTING: POWZER
main:
setcvar "g_obj_alliedtext1" "- Destroy the Control"
setcvar "g_obj_alliedtext2" "Room"
setcvar "g_obj_alliedtext3" "- Destroy V2 Rocket"
setcvar "g_obj_axistext1" "- Defend the Control"
setcvar "g_obj_axistext2" " Room and the V2"
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "objdm2"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
//***Flyby Planes
exec global/bomber.scr
//thread flyby
//***Ambient sounds
level.script = maps/obj/obj_team2.scr
exec global/ambient.scr obj_team2
exec global/door_locked.scr::lock
thread global/exploder.scr::main
//thread global/barrel.scr::explosive_barrel
level waittill spawn
level.defusing_team = "axis"
level.planting_team = "allies"
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
// set the parameters for round based match
---> level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
---> level.clockside = kills // set to axis, allies, kills, or draw
---> //level waittill roundstart
thread flyby
---> //$v2_explode thread global/obj_dm.scr::bomb_thinker
---> //$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
---> //thread allies_win_bomb $v2_explode $ctrlroom_explode
---> //$v2_explode thread axis_win_timer
// thread objectives_setup
endremember tho, the gametpye cant be changed(as far as I know) because of the prefix obj/ though I guess maybe you could repack it in a dm subfolder...
if you want to run different game types on a moh:aa server you can just add the line 'setcvar g_gametype "whatever"' at the beginning of each script. Then, when it loads, the gametype is set on a per map basis.
When I am king, you will be first against the wall~


- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Thanks a million!
Thank you so much Splaetos for your prompt and thorough reply. I truly appreciate the help.

I made The Hunt obj map able for DM, TDM and RBM but it was for the multiplayer demo game, here it is: www.mohdemo.tk
eh, i was messing with this to see if it would work as i typed it, and it seemed to, but whatever you do, dont comment out the global bomb thinker line heh... my brain was frozen as its still early and I did that for some reason. And for some reason, i couldnt figure out why the exploder chunnks were showing lol... need coffee... duh.
You can run it as a 'real' tdm if you copy the bsp/scr etc into a new pk3 with the structure maps/dm (or just the maps/dm folder, but i always put custom stuff in pk3's) the only thing, to my knowledge, you lose in doing this is the urc for the load screen. You would have to make a different one, for 'dm/obj_team2' since the old one is for obj/obj_team2. Thats easy tho, the image is already in there, all you have to do is get the old one, change one line, and repack it in your pk3 in a 'ui' folder.
like I said, I THINK that it runs like that(it seemed to on my computer) and thats usualy preferrable to modifying the obj version, since it leaves you more options with less work later on. ie... you can still play the objective versions without removing the custom pk3.
You can run it as a 'real' tdm if you copy the bsp/scr etc into a new pk3 with the structure maps/dm (or just the maps/dm folder, but i always put custom stuff in pk3's) the only thing, to my knowledge, you lose in doing this is the urc for the load screen. You would have to make a different one, for 'dm/obj_team2' since the old one is for obj/obj_team2. Thats easy tho, the image is already in there, all you have to do is get the old one, change one line, and repack it in your pk3 in a 'ui' folder.
like I said, I THINK that it runs like that(it seemed to on my computer) and thats usualy preferrable to modifying the obj version, since it leaves you more options with less work later on. ie... you can still play the objective versions without removing the custom pk3.
When I am king, you will be first against the wall~


- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Can you get rid of the bombs?
Thanks so much. Just one more thing...any way to get rid of the red glowing bombs?

- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
Problem with your download link Atomic
I tried your download link Atomic, but it tells me it'll take 3 hours to download 

Thats because the damn free website lol,
Here, I uploaded it to an other server:
http://www.mm2x.com/upload/files/The%20 ... 20demo.zip
Owyeah and anyway, I didnt add some new spawnpoints in the map, this is bad for free for all, anyway here you can find how to add spawnpoints by script:
/forum/viewtopic.php?t=7582&highlight=block+spawns
Here, I uploaded it to an other server:
http://www.mm2x.com/upload/files/The%20 ... 20demo.zip
Owyeah and anyway, I didnt add some new spawnpoints in the map, this is bad for free for all, anyway here you can find how to add spawnpoints by script:
/forum/viewtopic.php?t=7582&highlight=block+spawns
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
- IvanTheTerrible
- Sergeant
- Posts: 55
- Joined: Thu Jun 26, 2003 7:35 pm
- Location: Upland, CA
dm folder method doesn't seem to work
Putting everything in the dm folder does not seem to work Splaetos. It worked fine on my local machine, but once on the server it didn't work...probably because I had the modified pk3 local, but that's not the case once on the server. Any chance you could do a sample script?

not sure what you mean...
you need to load the modified pk3 onto the server, same as you would load it into your local directory...
but now that I think about it... a dm version wouldnt work unless it was distributed... right? unless the people have a tdm version of whatever obj map, they will get kicked to the intro screen cause they dont have the map.... i think =)
better off jsut using it as an obj modified to play as a tdm then. Sorry I didnt think bout that, too many different things going on at once
if you want it in a rotation, youll need a cvar at the top to change the gametype when it loads.
but that also means that you need a cvar to change the gametype back when it goes back to a true tdm... all this isnt hard... but the amount of cwork depends on what rotation you will run.
I can modify v2 and put the cvar in so you can see how it should be...
EDIT --
ok... the flashing bombs, dont want to hide, may just need there exact targetname, which im not sure of without decompiling the map....
setting up a rotation using the cvar to play different gametypes works fine... except ---
the round wont start until you have players.... therefore, Im not positive it will play right, but I think it should, it just wont move on till it has players.
NOTE: ive never actualy tried a map like this, the only times ive used mixed rotations is when using actual objective maps heh...
and as for atomics mod... it is both server and player side(as most maps are) you need to load it into the server, AND the player needs to have it loaded in thier main folder.
as an alternative to tdm, you might want to try freezetag on these maps, as those are already set up in a 'pseudo' tdm format on obj maps. I think it is far preferrable to distribute a dm version, rather then mod the obj version, but that is the problem... you have to distribute the tdm version, which can be a pain to say the least, unless you only want to play it with a few people who you know well. Freezetag is a good alternative cause its already widely distributed and has a good player base. course thats up to you...
ill post the full .scr i was using for v2 tho, with the gametype set at the beginning.
alot of that stuff doesnt get used since its been commented out, but i just posted it as is.
you need to load the modified pk3 onto the server, same as you would load it into your local directory...
but now that I think about it... a dm version wouldnt work unless it was distributed... right? unless the people have a tdm version of whatever obj map, they will get kicked to the intro screen cause they dont have the map.... i think =)
better off jsut using it as an obj modified to play as a tdm then. Sorry I didnt think bout that, too many different things going on at once
if you want it in a rotation, youll need a cvar at the top to change the gametype when it loads.
but that also means that you need a cvar to change the gametype back when it goes back to a true tdm... all this isnt hard... but the amount of cwork depends on what rotation you will run.
I can modify v2 and put the cvar in so you can see how it should be...
EDIT --
ok... the flashing bombs, dont want to hide, may just need there exact targetname, which im not sure of without decompiling the map....
setting up a rotation using the cvar to play different gametypes works fine... except ---
the round wont start until you have players.... therefore, Im not positive it will play right, but I think it should, it just wont move on till it has players.
NOTE: ive never actualy tried a map like this, the only times ive used mixed rotations is when using actual objective maps heh...
and as for atomics mod... it is both server and player side(as most maps are) you need to load it into the server, AND the player needs to have it loaded in thier main folder.
as an alternative to tdm, you might want to try freezetag on these maps, as those are already set up in a 'pseudo' tdm format on obj maps. I think it is far preferrable to distribute a dm version, rather then mod the obj version, but that is the problem... you have to distribute the tdm version, which can be a pain to say the least, unless you only want to play it with a few people who you know well. Freezetag is a good alternative cause its already widely distributed and has a good player base. course thats up to you...
ill post the full .scr i was using for v2 tho, with the gametype set at the beginning.
Code: Select all
// V2 FACILITY
// ARCHITECTURE: POWZER
// SCRIPTING: POWZER
main:
setcvar "g_gametype" "4"
setcvar "g_obj_alliedtext1" "V2"
setcvar "g_obj_alliedtext2" "TDM Mod"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "objdm2"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
//***Flyby Planes
exec global/bomber.scr
//thread flyby
//***Ambient sounds
level.script = maps/obj/obj_team2.scr
exec global/ambient.scr obj_team2
exec global/door_locked.scr::lock
thread global/exploder.scr::main
//thread global/barrel.scr::explosive_barrel
level waittill spawn
level.defusing_team = "axis"
level.planting_team = "allies"
level.bomb_damage = 200
level.bomb_explosion_radius = 2048
// set the parameters for round based match
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
//level waittill roundstart
thread flyby
//$v2_explode thread global/obj_dm.scr::bomb_thinker
//$ctrlroom_explode thread global/obj_dm.scr::bomb_thinker
//thread allies_win_bomb $v2_explode $ctrlroom_explode
//$v2_explode thread axis_win_timer
// thread objectives_setup
end
allies_win_bomb local.bomb1 local.bomb2:
while (local.bomb1.exploded != 1)
wait .1
while (local.bomb2.exploded != 1)
wait .1
teamwin allies
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
flyby:
//***random flyby of plane
wait 1.0
thread global/bomber.scr::bomb 4
thread global/bomber.scr::bomb 5
thread global/bomber.scr::bomb 6
thread global/bomber.scr::bomb 7
wait (randomint(180) + 60)
goto flyby
//Display objectives
//objectives_setup:
//
// waitthread global/objectives.scr::blank_objectives
// waitthread global/objectives.scr::add_objectives 1 2 "Destroy the V2 rocket and the Launch Control Room" //$v2_bomb.origin
// wait 2
// waitthread global/objectives.scr::current_objectives 1
//end
When I am king, you will be first against the wall~

