Post by ripc on Oct 6, 2010 1:15:18 GMT -5
Introduction:
The Purpose of this Tutorial is to teach you how to create a spawn an item within a level in DR2 and have it appear whenever the Level/Area is loaded.
In this tutorial I will assume you have a basic knowledge of the file structure and at least a vague idea of how the scripting works. This tutorial will be example based, I will try to explain as much as I can to help.
What's Required:
Dead Rising 2
Basic Scripting Knowledge
Gibbed *.big Packer/Unpacker
Files Required:
Dead Rising 2/data/datafile.big
safehouse.txt (Any other Level can be used in-place of this.)
items.txt (For listing of items.)
Tutorial:
Find an item in the Similar Area that you want to spawn the item, for this example I'm going to use a Bucket that Spawns just outside of one of the large storage rooms within the Safe House (Near Toilets).
Now that we've found the Bucket, you'll notice that the Bucket itself is just outside the door of the large storage area. Not only that, but it's close to a wall.
Side Note; the Reason I chose this Item is for positioning purposes.
Now Obviously we don't want our Item to replace this Item, we want to create and spawn another one (which is kind of the whole point). So we need to look at the following piece of syntax:
As you can see I've included simple information on how to alter the location, that's where the fun begins, it's basically play and test, I would suggest sticking to only the X and Z coordinates so your Items don't end up in the floor or too high. Here is an example of an Item placed within that said storage room:
That should be close to the middle of the room. Now lets break up the entire syntax line by line:
So we want to create our own Item spawn instead of a Bucket in this case we want a Bucket Drill, so we can call it whatever we like from here such as "BucketDrillCustom1" example:
From here what we need to do is find the Bucket Drill within "items.txt" the correct items listed should look like the following.
Here are some further examples of some Items you can spawn (yes, you can spawn vehicles):
To change which item spawns you use the following Syntax:
So now once we put together the Function, Position, Item and Rotation we get this final result:
Now if you add this to the top of "safehouse.txt" and recompile datafile.big then insert it back into your data folder you will find that a Shiny New Bucket Drill Combo Weapon will spawn within the large storage room within your Safe House. I hope this has helped some people. Sorry if it seems vague, it was quite rushed as I don't have too much time on my hands. Any Feedback and/or questions would be great!
The Purpose of this Tutorial is to teach you how to create a spawn an item within a level in DR2 and have it appear whenever the Level/Area is loaded.
In this tutorial I will assume you have a basic knowledge of the file structure and at least a vague idea of how the scripting works. This tutorial will be example based, I will try to explain as much as I can to help.
What's Required:
Dead Rising 2
Basic Scripting Knowledge
Gibbed *.big Packer/Unpacker
Files Required:
Dead Rising 2/data/datafile.big
safehouse.txt (Any other Level can be used in-place of this.)
items.txt (For listing of items.)
Tutorial:
Find an item in the Similar Area that you want to spawn the item, for this example I'm going to use a Bucket that Spawns just outside of one of the large storage rooms within the Safe House (Near Toilets).
cItemPlacement Bucket
{
ItemName = "Bucket"
Location = "2.495,-0.876,-8.313"
Rotation = "-0.000,0.002,0.000,1.000"
}
Now that we've found the Bucket, you'll notice that the Bucket itself is just outside the door of the large storage area. Not only that, but it's close to a wall.
Side Note; the Reason I chose this Item is for positioning purposes.
Now Obviously we don't want our Item to replace this Item, we want to create and spawn another one (which is kind of the whole point). So we need to look at the following piece of syntax:
Syntax:
Location = "2.495,-0.876,-8.313"
Use:
Location = "x-coordinate,y-coordinate,z-coordinate"
As you can see I've included simple information on how to alter the location, that's where the fun begins, it's basically play and test, I would suggest sticking to only the X and Z coordinates so your Items don't end up in the floor or too high. Here is an example of an Item placed within that said storage room:
Location = "-3.000,-0.876,-15.000"
That should be close to the middle of the room. Now lets break up the entire syntax line by line:
Syntax:
cItemPlacement Bucket
Use:
Function varName
So we want to create our own Item spawn instead of a Bucket in this case we want a Bucket Drill, so we can call it whatever we like from here such as "BucketDrillCustom1" example:
cItemPlacement BucketDrillCustom1
From here what we need to do is find the Bucket Drill within "items.txt" the correct items listed should look like the following.
cPlayerWeaponItem Combo_BucketDrill{
AchievementCategory = "3"
ActionButton2 = "PLAYERBUTTON_QUICK_ATTACK"
ActionDesiredAnimState2 = "ANIMSTATE_ATTACKSEQUENCE"
... etc. etc.
Here are some further examples of some Items you can spawn (yes, you can spawn vehicles):
Bazooka_Bike_RocketBaseballBat_Metal
Combo_BucketDrill
Combo_PropaneTankNails
FreezerBomb
HailMary
StickyBomb
To change which item spawns you use the following Syntax:
Syntax:
ItemName = "Bucket"
Use:
ItemName = "Item"
Tutorial Syntax:
ItemName = "Combo_BucketDrill"
So now once we put together the Function, Position, Item and Rotation we get this final result:
cItemPlacement BucketDrillCustom1
{
ItemName = "Combo_BucketDrill"
Location = "-3.000,-0.876,-15.000"
Rotation = "-0.000,0.002,0.000,1.000"
}
Now if you add this to the top of "safehouse.txt" and recompile datafile.big then insert it back into your data folder you will find that a Shiny New Bucket Drill Combo Weapon will spawn within the large storage room within your Safe House. I hope this has helped some people. Sorry if it seems vague, it was quite rushed as I don't have too much time on my hands. Any Feedback and/or questions would be great!