| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Browse and search Google Drive and Gmail attachments (plus Dropbox and Slack files) with a unified tool for working with your cloud files. Try Dokkio (from the makers of PBworks) for free. Now available on the web, Mac, Windows, and as a Chrome extension!

View
 

Creating Customised Props

Page history last edited by davros123 11 years, 8 months ago

Page Contents


 


 

Creating Custom Props and making them c4 Attachable.

 

As the mission scripters are creating more complex missions we are limited as to which props we can use in the editor for attaching c4.

 

I have been giving this a lot of thought and have come up with a new idea where it's possible by making a custom prop to make most of the static props attachable with c4.

 

I will be using the prop "controlpanel_desk" as an example as in it's standard form it is not attachable with c4. You can Download the file here so you can get an idea of whats involved.

 

I found the best way is to find the name of the prop you want to use in the editor and make a note of it. You will need to unbundle the quick.bundle to find the necessary files you will need to create the custom prop.

 

Creating The Folders .

The first thing you need to do is create the folders needed for the prop you are going to use. First make a folder on your hard disk and call it "tc02_controlpanel_desk" I have used "tc02" here but you will need to change this part to a name that is unique to you.

 

Open the folder you have just made and then make a new folder called "objects" then inside that folder make another one called "props" finally in the "props" folder make a folder called "tc02_controlpanel_desk_alianza_v0_1" again you will need to change "tc02" to a unique name, the last part of the name "alianza_v0_1" would be the name and version number of your mission.

 

Now go back to the first folder you made "tc02_controlpanel_desk" and make a folder called "units" inside that folder make another called "props" you now have all the folders needed to create your custom prop.

 

Finding The Files. 

In the quick.bundle go to the folder "data/objects/props" there you will see most of the static props for the game. For the example here you will need to look in the folder "non_specific/controlpanel_desk" and copy the following files.

 

controlpanel_desk.diesel

controlpanel_desk.xml

materials.xml

 

Place these files in the folder, "tc02_controlpanel_desk/objects/props/tc02_controlpanel_desk_alianza_v0_1"

 

Next you need to make a new empty xml file in the folder

 

"tc02_controlpanel_desk/units/props" and name it "u_tc02_controlpanel_desk_alianza_v0_1.xml". open this file and add the two lines below.

 

<units>

 

</units>

 

Go back to the quick.bundle and look in the folder "data/units/props" then open the file "u_non_specific.xml" you will need to scroll down until you find this line.

 

<unit type="prop" name="controlpanel_desk" slot="13">

 

Now copy all the lines between the two unit tags and add them to the file you created above, it will then look the same as listed below.

 

<units>

 <unit type="prop" name="controlpanel_desk" slot="13">

   <network sync="bodies"/>

  <model file="/props/non_specific/controlpanel_desk/controlpanel_desk.xml"/>

    <script_class name="base" class="Base"/>

    <stats block="base_data">  

      <var name="lightmap" value="true"/>

      <var name="lightmap_size" value="8"/> 

    </stats>

  <xi:include href="/data/units/mass.xml#xpointer(/mass/mass_object_large/*)"/>

 </unit>

</units>

 

Renaming The Files. 

You now have all the files and folders needed to make your custom prop. The next thing you need to do is rename the prop and change the path names to make the prop unique to your mission, you will also need to change the name of two of the xml files, doing this will make the prop unique to your mission and avoid any conflicts with other missions in the game.

 

Go back to the folder ""tc02_controlpanel_desk/objects/props/tc02_controlpanel_desk_alianza_v0_1" and rename the two files below.

 

controlpanel_desk.diesel

controlpanel_desk.xml

 

Change the names to.

 

tc02_controlpanel_desk_alianza.diesel

tc02_controlpanel_desk_alianza.xml

 

Next you need to change the path names in two of the xml files. Open the file you just renamed "tc02_controlpanel_desk_alianza.xml"

 

Rename the line below.

 

  <diesel file="\data\objects\props\non_specific\controlpanel_desk\controlpanel_desk.diesel" materials="\data\objects\props\non_specific\controlpanel_desk\materials.xml" orientation_object="root_point"/>

 

And change it to.

 

  <diesel file="\data\objects\props\tc02_controlpanel_desk_alianza_v0_1\tc02_controlpanel_desk_alianza.diesel" materials="\data\objects\props\tc02_controlpanel_desk_alianza_v0_1\materials.xml" orientation_object="root_point"/>

 

As you can see all the path names in bold now reflect the new folders you created previously plus the name of the diesel file has also been changed to the new name. Now save this file and close it, next you will need to change the path names in the next xml file.

 

Open the file "u_tc02_controlpanel_desk_alianza_v0_1.xml" which is in the folder "tc02_controlpanel_desk/units/props"As before rename the line below.

 

 <model file="/props/non_specific/controlpanel_desk/controlpanel_desk.xml"/>

 

And change it to.

 

 <model file="/props/tc02_controlpanel_desk_alianza_v0_1/tc02_controlpanel_desk_alianza.xml"/>

 

Naming Your New Prop. 

Again you can see the path names and the name of the xml file in bold have been updated to reflect the new folders and file names.

Next you need to create a new name for the prop, this will be the name that you will see in the editor. Change the line below.

 

 <unit type="prop" name="controlpanel_desk" slot="13">

 

Rename it to.

 

 <unit type="prop" name="tc02_controlpanel_desk_alianza" slot="13">

 

You will see here that the name of the prop has been changed so it will now show in the editor as "tc02_controlpanel_desk_alianza"

 

Making Your New Prop Attachable. 

You can now save and close this file. The next thing to do is make one small change that will make the prop attachable with c4.

Open the file below.

 

tc02_controlpanel_desk_alianza.xml

 

All that is needed is to change the template switch in the line below.

 

<body name="col_controlpanel_desk" editable="true" collision_group="1" collision_force_from_mover="false" template="default">

 

Just change the last part of this line template="default" to template="static" this will make the prop c4 attachable you can then use this prop in your mission by adding the element "MakeAttachable" in your mission script.

 

Adding The Prop To The Game 

All you need to do now is get the prop into the game. This is quite simple, all you need to do is copy the two folders "object" and "units" located in the "tc02_controlpanel_desk" folder.

 

Place these folders into the game by pasting them into the <graw2>data/ folder.

 

You can now open the mission in the editor and use the prop as normal.

Comments (0)

You don't have permission to comment on this page.