- Loading...
- No images or files uploaded yet.
GRAW2 coop mission creation wiki
In order to make mines work in GRAW2, I needed to create a new static prop. The new prop is called dav_mine. A "prop" is an object in the GRAW editor (for example, a wall is a static prop). In this case, the prop is a mine. It is based upon (and looks just like) the existing static prop called "at_mine". However the problem with the at_mine static prop is that it could not be triggered to explode when a person walks over it. It will also explode when shot on the trigger mechanism, ( the 3 prongs), or exploded with a grenade or other explosion nearby. From the code I belive it will only explode when a vehicle moves over it - though I have not tested this feature.
Download the mines mod from here.To do this you need to click here to download this file and place the 4 files into your data directory. The files are as follows... <graw2>\data\units\props\u_dav_mine.xml <graw2>data\objects\props\dav_mine\dav_mine.diesel <graw2>data\objects\props\dav_mine\dav_mine.xml <graw2>data\objects\props\dav_mine\materials.xml
Making the mine name unique to your mission to avaoid conflictsYou'll need to make some changes to these files to prevent any conflicts with other people also using mines in thir missions. Let's say your mission is called "sanctuary", (note: Bogie has already used this name so don't name your mission this!)
To make the mines work for your mission and not conflict with any other bundles, do the following steps.... 1) rename "u_dav_mine.xml" to "u_dav_mine_sanctuary.xml" 2) Change it's contents to match the following bold text, note the new prop name.
3) change the prop directory name from "data\objects\props\dav_mine\" to "data\objects\props\dav_mine_sanctuary\" 4) change the directory path in your dav_mine_sanctuary.xml to reflect the new path
Done! Now you'll have : <graw2>\data\units\props\u_dav_mine_sanctuary.xml <--- and updated the .xml as per step 2. <graw2>data\objects\props\dav_mine_sanctuary\dav_mine.diesel <graw2>data\objects\props\dav_mine_sanctuary\dav_mine.xml <--- and updated the .xml as per step 4. <graw2>data\objects\props\dav_mine_sanctuary\materials.xml
Make sure you include these files when you bundle your mission for testing and release.
You can now open up your mission in the graw editor.
Placing them in the editorThe new anti-personnel mine prop is called dav_mine_<whatever-you-named-it> and, once set up, appears in the small static porps list in the eitor (press Control-2 in the editoe to see the small static props list). You can easily find it in the list of props by typing dav in the mask and pressing enter as shown in the following image.
To set up a mine, you need to
I suggest that you also use control-downarrow to lower it such that just the top of the mine is showing above ground level.
Subsequent mines will have a name of mine_02, mine_03 etc...
The location must be named "loc_mine_01". Subsequent mines will have a location name of loc_mine_02, loc_mine_03 etc...
How to use anti-personnel mines in your mission.The first step is to download and place the mines_routine.xml in your mission folder (ie. same folder where you have your mission.xml). this is a script I have written to make it easier and cleaner to use mines.
The final step is to set up the mine in your missoin.xml. Create the following entries in your mission.xml.
<xi:include href = "mines_routine.xml#xpointer(/to_include/*)"/>
@setup_mine( 01 ) Note :This line must appear OUTSIDE of other tags (ie. NOT inside an <event>...</event> tag. THIS IS IMPORTANT). Subsequent mines will require additional lines ie..@setup_mine( 02 ).... @setup_mine( 03 ) etc...
<element type = "TriggerEvent" event = "e_arm_mine_01" start_time = "0"/>
<element type = "TriggerEvent" event = "e_disarm_mine_01" start_time = "0"/>
I have included a sample mission file with the above commands used to setup and trigger mines.
Note the mines will kill anyone within a 7 meter radius. Randomising the location of minesLet's say you have one mine, but want to have it spawn randomly in four different places, so every time you play the game, you don't know there it is! The following script will create a mine on your map from within your mission.xml. The commented out text is from the world.xml and shows the location we want our mine. To get the location coordinates, I placed the mine where I wanted it using the editor, then went to the world.xml and removed the unit (ie. cut out the above greyed out text), and added the "CreateUnit" command to my mission.xml. This created the mine in the desired location (x,y,z coordinates). I then used CentreLocation to move the "trigger" location (loc_mine_01) onto the mine.
All you need to do to randomise this is to have 4 events which place the mines in diff. x,y,z coordinates and trigger them by the following "random" command. The 4 events would be called e_mine_01_loc_a ...e_mine_01_loc_d.
And finally, create the 4 events for e_mine_01_loc_a, e_mine_01_loc_b, e_mine_01_loc_c, e_mine_01_loc_d
Technical details of the mod. and what it all means...Much more to add here about the structure of the unit files etc...but for now, what I basically did was take a copy of the existing unit (at_mine) and rename it to dav_mine and change the dav_mine.xml to include the sequence tag. This tag is the one called by the UnitSequence command in the mines_routine.xml (<element type = "UnitSequence" name_id="mine_$mine_number"/>). It's what causes the mine to explode. This should be doable for any unit - though I am yet to test it with other units.
range : all the object in this range shall be given damage. Its counted in radie so 700 will meen a sphere with 7m radie from the position. ie. 14m circumference.
<more to go in here> |
|
Anonymous
Create an account or Log in
|
Comments (4)
Galor said
at 6:22 pm on Mar 25, 2009
Good work !!
Galor said
at 6:25 pm on Mar 25, 2009
This change, which also serves for the rest of the game modes? (HH, Siege, RVSA, TDM)
I followed your step by step directions for use on a map HH, but mine does not explode when they step on it.
How or where can I link Loc_mine_01 with the object mine_01?...
davros123 said
at 10:05 pm on Mar 25, 2009
Hi Galor. Thanks for the feedback.
You'll need to change the mines_routine.xml.
See this post in the forums...http://www.ghostrecon.net/forums/index.php?showtopic=51431&st=0&gopid=537112&#
Also, it might be easier to ask these questions on the forums...then I'll update the wiki with any changes we discover.
Dav.
Galor said
at 12:14 am on Mar 27, 2009
The problem continues and I have followed the steps from zero..... I am missing something, or should I be doing wrong.....
You don't have permission to comment on this page.