PDA

View Full Version : Basic Guide on spawning objects serverside to maps.


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.

Sitting_Duck
03-07-2003, 03:41 PM
FK of the MOB sent me a list of items which he has been able to get to spawn into the maps. I also found one or two things which work, be advised this isn't all of the spawnable items. But this is a good start as he pointed out. I know FK is going to post the list but since its not up yet, heres a basic grouping to use.

At the bottom is a list of test objects which I haven't used yet.
I put this list on a notepad and put it in the map/dm/ folder so I can copy them directly over when I need them. It cuts down on the time. Good luck, and again, thanks goes to FK of the MOB.

AXIS TANKS

static/vehicle_panzer_iv_europe.tik
vehicles/panzer_iv.tik
vehicles/kingtank_all_d.tik
vehicles/panzeriv_w_d_base.tik
static/vehicle_tigertank.tik
static/vehicle_tigertankDSRT.tik
vehicles/panzeriv_w_d_cannon.tik
static/vehicle_ktigertank.tik


ALLIES TANKS

vehicles/shermantank.tik
vehicles/shermantank_damaged.tik
static/vehicle_shermantank.tik
static/vehicle_shermantank_dead.tik

AXIS VEHICLES

vehicles/bmwbike_d.tik
vehicles/bmwbike.tik
static/vehicle_bmwbike.tik
static/bmw_destroyed.tik
vehicles/opeltruck_d.tik
static/vehicle_opeltruck_green.tik
vehicles/opel_truck_2_1.tik (Snow covered green truck)
vehicles/opeltruckgreen_d.tik
static/vehicle_opeltruck1 (Tan truck with no tarp) (has solid area behind it)
static/vehicle_stucka.tik
static/vehicle_fockwulf.tik
static/v2
static/.tik
static/.tik

ALLIES VEHICLES

static/vehicle_jeep.tik
static/vehicle_gmctruck.tik
static/piperplane.tik
static/higginsxtrahull.tik
vehicles/higginslite.tik
vehicles/higgins_damage
static/.tik
static/.tik
static/.tik
static/.tik
static/.tik

CIVILIAN VEHICLES

static/vehicle_car_rusted.tik
static/vehicle_car_burnt.tik
static/vehicle_european_car_grey.tik
static/vehicle_european_car_silver.tik
static/vehicle_european_car_tan.tik
static/vehicle_european_delivery_truck_green.tik
static/vehicle_european_delivery_truck_red3.tik
static/vehicle_european_delivery_truck_grey.tik
static/rusty_truck.tik
vehicles/mercedes
static/vehicle_mercedes.tik
static/vehicle_dtruck_rusted.tik
static/vehicle_dtruck_burnt.tiK
static/wagon.tik
static/.tik
static/.tik
static/.tik

FURNITURE ITEMS

static/bathtub.tik
static/bathtubwithshowerhead.tik
static/peetrough" long.tik urnal to put against the wall
static/wardrobe_damaged.tik
static/hopechest.tik
static/planningtable.tik (large green table you can get on)
static/ornaterectable.tik (medium sized table you can get on)
static/ornaterectable_d.tik
static/worndowntable.tik
static/.tik
static/.tik
static/.tik
static/.tik

MISC ITEMS 1

static/static_cablespool_empty.tik
static/static_cablespool_full.tik
static/88shell.tik
static/50cal_crate.tik
static/45cal_crate.tik
static/30cal_crate.tik
static/indycrate.tik
static/produce_cart.tik
static/welding_torch.tik
static/hedgehog.tik
static/hedgehog_cluster_two.tik
static/hedgehog_cluster_two_seperated.tik
static/hedgehog_cluster_three.tik
static/minepole.tik
static/.tik
static/.tik
static/.tik

MISC ITEMS2

static/fire.tik
static/signpost_caen.tik
static/signpost_stlo.tik
static/signpost_veret.tik
static/signpost_vierville.tik
static/parachute.tik
static/parachute_actors.tik
static/signpost_caen.tik
static/.tik
static/.tik
static/.tik
static/.tik

NATURAL ITEMS

static/bush_buckthorn.tik (tall thin bush with berries)
static/bush_regularbush.tik (small bush)
static/rock_large.tik
static/rock_medium.tik
static/rock_winter_medium.tik
static/rock_winter_large.tik
static/rock1.tik
static/rock2.tik
static/haystack.tik
static/haystack_dry0.tik (wide hut like haystack)
static/haystack_dry02.tik (taller and thinner stack)
static/.tik
static/.tik
static/.tik
static/.tik

SANDBAGS

static/sandbag_longsegment.tik
static/sandbag_link_main.tik
static/sandbag_link_main_winter.tik
static/sandbag_link_leftbend.tik
static/sandbag_link_rightbend.tik
static/sandbag_link_rightbend_winter.tik
static/sandbag_rightangle.tik
static/sandbag_link_bottomcap.tik
static/sandbag_link_bottomcap_winter.tik
static/sandbag_link_topcap.tik
static/sandbag_link_topcap_winter.tik

BARBWIRE

static/barbwire_long.tik
static/barbwire_long_two_post.tik
static/barbwire_long_one_post.tik
static/barbwire.tik
static/barbwire_one_post.tik
static/barbwire_post.tik
static/barbwire_two_post.tik
static/barbwire_tetra_post.tik


BODIES

static/body_usvest06.tik
static/body_usvest05.tik
static/body_usvest04.tik
static/body_usvest03.tik
static/body_usvest02.tik
static/body_us06.tik
static/body_us05.tik
static/body_us04.tik
static/body_us03.tik
static/body_us02.tik
static/body_us01.tik
static/bodies_tarp.tik
static/body_german01.tik

STILL TESTING TO SEE IF THEY WORK

static/static_naziflag1.tik
static/static_naziflag2.tik
static/static_periscope.tik
static/bookcase.tik
static/bighutch.tik
static/bshelf-tall-thin-damaged.tik
static/bshelf-tall-thin.tik
static/bunkerstove.tik
static/minepole.tik
static/static_bangalore.tik
static/square_table.tik
static/1_3_bridge
static/tree_birch.tik
static/tree_commontree.tik
static/tree_juniper.tik
static/tree_oak.tik
static/tree_regularpalm.tik
static/tree_shortpalm.tik
static/tree_smallyucca.tik
static/tree_squatpalm.tik
static/tree_tallyucca.tik
static/tree_winter_fillpine.tik
static/tree_winter_midpine.tik
static/tree_winter_smallpine.tik
static/tree_winter_tallpine.tik
static/tree_winter_thicktrunk.tik
static/tree_winter_thintrunk.tik
static/trunk.tik
static/vanity.tik
static/vehicle_c47.tik
static/vehicle_sdkfz.tik
static/officer_tent.tik
static/us_mortar.tik
static/1_1-parachute-barn.tik
static/fuel_tank.tik
static/fuel_tank_d.tik
static/fuel_tanks.tik
static/fuel_tanks_d.tik
static/generator.tik
static/granatwerfer.tik
static/grandfathers_clock.tik
static/hedgehog_snowy.tik
static/logs0.tik
static/logStack0.tik
static/Opel_Truck_2_2.tik
static/panzer_tank2.tik
static/t34_dtm.tik
static/t34_base_d.tik
static/t34_cannon_d.tik
static/PzB41_turret.tik
static/PanzerIV_w_mg42.tik
static/panzerwerfer42_d.tik
static/dead_paratrooper.tik

vehicles/gmctruckpath_opening.tik
vehicles/gmctruck_opening.tik
vehicles/gmctruckpath_opening.tik
vehicles/truck2path_opening.tik
vehicles/m3.tik
vehicles/higginslite.tik
vehicles/higgins_damage.tik
vehicles/static_higginsdoor.tik
vehicles/higginsxtrahull.tik
vehicles/sdkfz_green_d.tik
vehicles/sdkfz_mg42.tik
vehicles/sdkfz_shield.tik
vehicles/sdkfz_desert_d.tik
vehicles/sdkfz_afrika.tik
vehicles/panzer_iv_eud.tik
vehicles/opeltruckgreen_canopy.tik
vehicles/.tik
vehicles/.tik
vehicles/.tik
vehicles/.tik
vehicles/.tik


//sample object

local.fix1 = spawn script model
local.fix1 model "vehicles/mercedes.tik"
local.fix1.origin = ( -410 800 -25 )
local.fix1.angles = ( 0 0 0 )
local.fix1 solid
local.fix1 nodamage
local.fix1 hide
local.fix1.scale = 1.75

Sitting_Duck
03-07-2003, 04:05 PM
This script is for spawning wpns into maps.... As of right now the infantry wpns can only be spawned into AA maps and most custom SH maps. The base SH maps crash for some odd reason. It apprarently has to do with the .bsp configuration. Oh well, I'm not a mapper. You can spawn all the infantry wpns in the weapons folder....so just be sure to enter the wpn.tk name correctly.

local.GrenadeAmmo = spawn models/items/item_grenade_ammobox.tik
local.GrenadeAmmo.origin = (200 -1230 15)
local.GrenadeAmmo.angles = ( 0 20 0 )

local.stg = spawn models/weapons/mp44.tik
local.stg.origin = (200 -1230 15)
local.stg.angles = ( 0 90 0)

_________________________________________

These are stationary wpns which can be fired. Be sure to note that some maps will not allow some of these wpns to appear....in fact they could crash all the other mods you have for the map. So test it out and you will see how it goes. Also the other two stationary wpns do work, so just go to the right folder and test them out.

//STATIONARY WEAPONS


local.mg42 = spawn models/statweapons/mg42_gun.tik
local.mg42.origin = ( -200 -832 115) //+65 above sanbags
local.mg42.angle = -90
local.mg42 yawCenter -90
local.mg42 maxyawoffset 180
local.mg42 = spawn script_model
local.mg42 model "statweapons/mg42_bipod.tik"
local.mg42.origin = ( -200 -832 115)
local.mg42.angles = (0 -90 0)
local.mg42 solid

local.88 = spawn models/statweapons/P_flak88.tik
local.88.origin = ( -200 -500 65)
local.88.angle = 80
local.88 yawCenter 80
local.88 maxyawoffset 40


local.mortar = spawn models/statweapons/P_granatwerfer_base.tik
local.mortar.origin = (-200 -500 65)
local.mortar.angle = 80
local.mortar yawCenter 80
local.mortar maxyawoffset 180