Sitting_Duck
03-07-2003, 03:38 PM
http://www.modtheater.com/forum/showthread.php?s=&threadid=6117
Hey gang, well I posted in tmt.com with the info on spawning serverside objects into a map. And in another post there was a request by WarTech for info on how to go about doing it. So here it is, all the info I posted...the link takes you to the origional....natch'
_______________________________________________
If you want to just add it server side heres what you do....
_________
The tools I used were pakscape and a script editor(when needed)
copy the script files for the maps you want to mod into this path
mohaa/main/map/dm or obj
inside the dm and or obj folder create a new folder called mapfixes (or what ever you want to call it)
inside the mapfixes folder you will make new scipt files with an ID you will use in conjunction with the origional script file.
leave these new script files blank inside. (or make a basic set up to copy and work with, thats what I do)
Now open up your original map scripts (in the dm or obj folder) and add this line:
exec maps/dm/mapfix/nameOfmapfix.scr (use the map ID for the .scr)
you add the new line after the following line:
setcvar "g_scoreboardpic" "mp_bahnhof_dm".
Now you will also need to make a pk3 file with the same folder and files in it. The name of mine is zzzzzzzzzzzSDmapfix.pk3.
Now start up the game, go to the map you want to mod. Once its started stay in observer to move around easy.
Open your console and type: editscript and hit enter
Now you will see a menue of the maps you want to mod, there will also be the name of the mapfix folder
Open the mapfix folder and click on the new .scr file you made. Now you can add the items you want to work on.
To obtain your coordinates type in the console: coord and then hit enter. This will give you 3 sets of numbers. don't worry about the .00 you don't need those numbers, just the primary numbers.
ex; 345.65 all you need is the 345 (don't use the decimals)
the last set of numbers is for your elevation, the other two determin forward back left and right (depending on your map and object position.
the second set of 3 numbers are your angles in degrees.
Now when ever you add something I suggest you leave a title on the object like this
// MapFix
//ALLIES DEFENSES
//AT WEST EXITWAY BY THE DEAD CAR
local.fix1 = spawn script_model
local.fix1 model "static/barbwire_long_two_post.tik" // FRONT
local.fix1.origin = ( -3970 3845 -380 )
local.fix1.angles = (0 0 0)
local.fix1.scale = 1.0
local.fix1 solid
also if you want to make an object bullet proof use this command:
local.fix1 nodamage
As for figuring out the items placement thats hit and miss, test it out and you'll get the hang of it.
Be sure to save your changes as you go incase anything crashes, also once you close the editscript, if you open it again you will not see the changes, ie; lose them. So be sure to keep it minimized untill you are sure you have everything you want. Once you are done with your changes go and shut down the game.
Now go to the main or mainta/maps/dm/mapfix folder and copy your changes over to the pk3 file you created. Save the changes there (the pk3 should be in your main or mainta folder btw.)
Then start the game up and look at your additions. If you don't see anything at all, make sure you didn't make any mistakes, or that the items are not under ground. Some items also can not be added to maps. Thats a whole other post. Now if you need to make any changes you go back through the steps I listed above.
I hope this helps. Also another way to make sure you are doing things right is to go take another map fix, use the steps I told you to use and see if you can emulate them with the proven add ons. Good luck.
Hey gang, well I posted in tmt.com with the info on spawning serverside objects into a map. And in another post there was a request by WarTech for info on how to go about doing it. So here it is, all the info I posted...the link takes you to the origional....natch'
_______________________________________________
If you want to just add it server side heres what you do....
_________
The tools I used were pakscape and a script editor(when needed)
copy the script files for the maps you want to mod into this path
mohaa/main/map/dm or obj
inside the dm and or obj folder create a new folder called mapfixes (or what ever you want to call it)
inside the mapfixes folder you will make new scipt files with an ID you will use in conjunction with the origional script file.
leave these new script files blank inside. (or make a basic set up to copy and work with, thats what I do)
Now open up your original map scripts (in the dm or obj folder) and add this line:
exec maps/dm/mapfix/nameOfmapfix.scr (use the map ID for the .scr)
you add the new line after the following line:
setcvar "g_scoreboardpic" "mp_bahnhof_dm".
Now you will also need to make a pk3 file with the same folder and files in it. The name of mine is zzzzzzzzzzzSDmapfix.pk3.
Now start up the game, go to the map you want to mod. Once its started stay in observer to move around easy.
Open your console and type: editscript and hit enter
Now you will see a menue of the maps you want to mod, there will also be the name of the mapfix folder
Open the mapfix folder and click on the new .scr file you made. Now you can add the items you want to work on.
To obtain your coordinates type in the console: coord and then hit enter. This will give you 3 sets of numbers. don't worry about the .00 you don't need those numbers, just the primary numbers.
ex; 345.65 all you need is the 345 (don't use the decimals)
the last set of numbers is for your elevation, the other two determin forward back left and right (depending on your map and object position.
the second set of 3 numbers are your angles in degrees.
Now when ever you add something I suggest you leave a title on the object like this
// MapFix
//ALLIES DEFENSES
//AT WEST EXITWAY BY THE DEAD CAR
local.fix1 = spawn script_model
local.fix1 model "static/barbwire_long_two_post.tik" // FRONT
local.fix1.origin = ( -3970 3845 -380 )
local.fix1.angles = (0 0 0)
local.fix1.scale = 1.0
local.fix1 solid
also if you want to make an object bullet proof use this command:
local.fix1 nodamage
As for figuring out the items placement thats hit and miss, test it out and you'll get the hang of it.
Be sure to save your changes as you go incase anything crashes, also once you close the editscript, if you open it again you will not see the changes, ie; lose them. So be sure to keep it minimized untill you are sure you have everything you want. Once you are done with your changes go and shut down the game.
Now go to the main or mainta/maps/dm/mapfix folder and copy your changes over to the pk3 file you created. Save the changes there (the pk3 should be in your main or mainta folder btw.)
Then start the game up and look at your additions. If you don't see anything at all, make sure you didn't make any mistakes, or that the items are not under ground. Some items also can not be added to maps. Thats a whole other post. Now if you need to make any changes you go back through the steps I listed above.
I hope this helps. Also another way to make sure you are doing things right is to go take another map fix, use the steps I told you to use and see if you can emulate them with the proven add ons. Good luck.