Before we start, Thank you to Spadita. His 'How To
Add Weapons' tutorial was a great help.
Note: Even though it is technically a new weapon it still uses in game assets.
A while back I got a notion in my head to add the
cane carried by some of the elder pedestrians
as a weapon, but couldn't figure out how to do so.
Today I was sitting there messing around in the game
and the answer occurred to me ... Add it just like you
would add a new car.
That is to say All you have to do is add the meshes,
the textures and adjust a few files from the common.vpp_pc
folder.
So the first thing I had to do was figure out which meshes
and textures belong to the cane. To do this I opened items_3d.xtbl
and searched for cane
Here is the entry:
{CODE]<Item>
<Name>olcane</Name>
<Mesh>
<Filename>olcane.smeshx</Filename>
<Preload>true</Preload>
</Mesh>
<_Editor>
<Category>Life</Category>
</_Editor>
<Scale_Ambient>false</Scale_Ambient>
<Glow_Type>None</Glow_Type>
<FoleyCollision>OBJ_IMP_INT_CANE</FoleyCollision>
<LargeProp>False</LargeProp>
<Color_Variants></Color_Variants>
</Item>[/CODE]
Now that I know that the original item is called 'olcane' I know
which textures and smesh files I have to find.
olcane.smesh_pc (meshes.vpp_pc)
olcane.g_smesh_pc (meshes.vpp_pc)
olcane.peg_pc (pegs.vpp_pc)
olcane.g_peg_pc (textures.vpp_pc)
After extracting the proper files (using ThomasJepp Tools)
I refered to Spadita's tutorial: https://www.saintsrowmods.com/forum/threads/how-to-add-weapons.20732/
and found out which other files that I needed to edit.
items_3d.xtbl (common.vpp_pc)
items_inventory.xtbl (common.vpp_pc)
store_weapons.xtbl (common.vpp_pc)
weapons.xtbl (common.vpp_pc)
Note: If you use GOTR extract these files from
Gentlemen_of_the_Row_Saints_Row_2_Super_Mod_v1.9.2/optional_mod_stuff/modified
Now that you have your files assembled make backup copies and then you can start editing.
The first thing to do is decide what to name your new weapon. In this case I think cane works
fine. so just rename your mesh and texture files:
cane.smesh_pc
cane.g_smesh_pc
cane.peg_pc
cane.g_peg_pc
That's it for the mesh and texture files. Now we can move on to the xtbl files.
and textures belong to the cane. To do this I opened items_3d.xtbl
and searched for cane
Here is the entry:
{CODE]<Item>
<Name>olcane</Name>
<Mesh>
<Filename>olcane.smeshx</Filename>
<Preload>true</Preload>
</Mesh>
<_Editor>
<Category>Life</Category>
</_Editor>
<Scale_Ambient>false</Scale_Ambient>
<Glow_Type>None</Glow_Type>
<FoleyCollision>OBJ_IMP_INT_CANE</FoleyCollision>
<LargeProp>False</LargeProp>
<Color_Variants></Color_Variants>
</Item>[/CODE]
Now that I know that the original item is called 'olcane' I know
which textures and smesh files I have to find.
olcane.smesh_pc (meshes.vpp_pc)
olcane.g_smesh_pc (meshes.vpp_pc)
olcane.peg_pc (pegs.vpp_pc)
olcane.g_peg_pc (textures.vpp_pc)
After extracting the proper files (using ThomasJepp Tools)
I refered to Spadita's tutorial: https://www.saintsrowmods.com/forum/threads/how-to-add-weapons.20732/
and found out which other files that I needed to edit.
items_3d.xtbl (common.vpp_pc)
items_inventory.xtbl (common.vpp_pc)
store_weapons.xtbl (common.vpp_pc)
weapons.xtbl (common.vpp_pc)
Note: If you use GOTR extract these files from
Gentlemen_of_the_Row_Saints_Row_2_Super_Mod_v1.9.2/optional_mod_stuff/modified
Now that you have your files assembled make backup copies and then you can start editing.
The first thing to do is decide what to name your new weapon. In this case I think cane works
fine. so just rename your mesh and texture files:
cane.smesh_pc
cane.g_smesh_pc
cane.peg_pc
cane.g_peg_pc
That's it for the mesh and texture files. Now we can move on to the xtbl files.
First we need to open items_3d.xtbl and search for olcane
Here is the entry:
Copy this entire entry into a blank text file and edit it
There are a couple of things that need to be changed here:
<Name>olcane</Name> should be changed to <Name>cane</Name>
<Filename>olcane.smeshx</Filename> should be changed to <Filename>cane.smeshx</Filename>
<Category>Life</Category> should be changed to <Category>Weapons:Melee</Category>
Two lines need to be added to the entry between the </Mesh> and <_Editor> lines:
<Touch_Script>give_item</Touch_Script>
<Respawn_Delay>15000</Respawn_Delay>
Here is the modified entry:
Once the entry has been edited copy it into the 3d_items.xtbl under the olcane
entry and save your work. You're ready to move on to the next file. items_inventory.xtbl
Here is the entry:
Code:
<Item>
<Name>olcane</Name>
<Mesh>
<Filename>olcane.smeshx</Filename>
<Preload>true</Preload>
</Mesh>
<_Editor>
<Category>Life</Category>
</_Editor>
<Scale_Ambient>false</Scale_Ambient>
<Glow_Type>None</Glow_Type>
<FoleyCollision>OBJ_IMP_INT_CANE</FoleyCollision>
<LargeProp>False</LargeProp>
<Color_Variants></Color_Variants>
</Item>
</Item>
Copy this entire entry into a blank text file and edit it
There are a couple of things that need to be changed here:
<Name>olcane</Name> should be changed to <Name>cane</Name>
<Filename>olcane.smeshx</Filename> should be changed to <Filename>cane.smeshx</Filename>
<Category>Life</Category> should be changed to <Category>Weapons:Melee</Category>
Two lines need to be added to the entry between the </Mesh> and <_Editor> lines:
<Touch_Script>give_item</Touch_Script>
<Respawn_Delay>15000</Respawn_Delay>
Here is the modified entry:
Code:
<Item>
<Name>cane</Name>
<Mesh>
<Filename>cane.smeshx</Filename>
<Preload>true</Preload>
</Mesh>
<Touch_Script>give_item</Touch_Script>
<Respawn_Delay>15000</Respawn_Delay>
<_Editor>
<Category>Weapons:Melee</Category>
</_Editor>
<Scale_Ambient>false</Scale_Ambient>
<Glow_Type>None</Glow_Type>
<FoleyCollision>OBJ_IMP_INT_CANE</FoleyCollision>
<LargeProp>False</LargeProp>
<Color_Variants></Color_Variants>
</Item>
Once the entry has been edited copy it into the 3d_items.xtbl under the olcane
entry and save your work. You're ready to move on to the next file. items_inventory.xtbl
You need to copy an inventory entry for another melee item. I chose the sledgehammer
A few things need to be changed
<Name>sledgehammer</Name> should be <Name>cane</Name>
<DisplayName>sledgehammer</DisplayName> should be <DisplayName>cane</DisplayName>
<Bitmap>ui_hud_inv_w_sledgehammer</Bitmap> needs to be edited and <Filename>p_SledgeHammer.SMESHX</Filename> should be changed to
<Filename>cane.SMESHX</Filename>
Moddified:
So take your modified code and add it to items_inventory.xtbl
and save your work.
Code:
<Inventory_Item>
<Name>sledgehammer</Name>
<DisplayName>sledgehammer</DisplayName>
<Bitmap>ui_hud_inv_w_cane</Bitmap>
<Mesh>
<Filename>p_SledgeHammer.SMESHX</Filename>
<Preload>true</Preload>
</Mesh>
<Cost>125</Cost>
<Default_Count>1</Default_Count>
<Max_Inventory>1</Max_Inventory>
<_Editor>
<Category>Melee</Category>
</_Editor>
</Inventory_Item>
<Inventory_Item>
A few things need to be changed
<Name>sledgehammer</Name> should be <Name>cane</Name>
<DisplayName>sledgehammer</DisplayName> should be <DisplayName>cane</DisplayName>
<Bitmap>ui_hud_inv_w_sledgehammer</Bitmap> needs to be edited and <Filename>p_SledgeHammer.SMESHX</Filename> should be changed to
<Filename>cane.SMESHX</Filename>
Moddified:
Code:
<Inventory_Item>
<Name>cane</Name>
<DisplayName>cane</DisplayName>
<Bitmap>ui_hud_inv_w_sledgehammer</Bitmap>
<Mesh>
<Filename>olcane.smeshx</Filename>
<Preload>true</Preload>
</Mesh>
<Cost>125</Cost>
<Default_Count>1</Default_Count>
<Max_Inventory>1</Max_Inventory>
<_Editor>
<Category>Melee</Category>
</_Editor>
</Inventory_Item>
So take your modified code and add it to items_inventory.xtbl
and save your work.
A quick word here on store weapons"
In GOTR there is a mod that opens all of the store weapons up at the beginning
of the game, but in vanilla they open up based on how many hoods you control.
Since I built this mod on vanilla files I set the cane to open up with 0 hoods controlled
Copy an entry that you wish to modify into a blank file and change the name:
Here is the original entry
Just change the weapon name and copy the modified entry into your
store_weapons.xtbl
Modified:
Save your work. This one is done.
In GOTR there is a mod that opens all of the store weapons up at the beginning
of the game, but in vanilla they open up based on how many hoods you control.
Since I built this mod on vanilla files I set the cane to open up with 0 hoods controlled
Copy an entry that you wish to modify into a blank file and change the name:
Here is the original entry
Code:
<Entry>
<Num_Hoods>0</Num_Hoods>
<Weapon>baseball_bat</Weapon>
<Unlocked>true</Unlocked>
</Entry>
Just change the weapon name and copy the modified entry into your
store_weapons.xtbl
Modified:
Code:
<Entry>
<Num_Hoods>0</Num_Hoods>
<Weapon>cane</Weapon>
<Unlocked>true</Unlocked>
</Entry>
Save your work. This one is done.
Now we need to modify the weapons.xtbl and we will do so by
finding and changing an existing entry for a melee weapon.
Since I used the sledgehammer earlier in this tutorial I will use it again here.
So get your blank file and copy the sledgehammer info into it and then
change the <Name>sledgehammer</Name> line to <Name>cane</Name>
then copy the modified entry into the weapons file.
All we really need to change here is:
<Name>slefgehammer</Name> to <Name>cane</Name>
finding and changing an existing entry for a melee weapon.
Since I used the sledgehammer earlier in this tutorial I will use it again here.
So get your blank file and copy the sledgehammer info into it and then
change the <Name>sledgehammer</Name> line to <Name>cane</Name>
then copy the modified entry into the weapons file.
Code:
<Weapon>
<Name>sledgehammer</Name>
<Weapon_Class>bat</Weapon_Class>
<Trigger_Type>single</Trigger_Type>
<Magazine_Size>0</Magazine_Size>
<Range_Max>2</Range_Max>
<Damage_Max>
<NPC_Damage>0</NPC_Damage>
<Player_Damage>0</Player_Damage>
</Damage_Max>
<Sound_Radius>8</Sound_Radius>
<_Editor>
<Category>Entries:Melee</Category>
</_Editor>
<MeleeAttacks>
<StandingPrimary>2hm_a</StandingPrimary>
<MovingPrimary>2hm_move_a</MovingPrimary>
<ProneAttackPrimary>2hm_prone_attack</ProneAttackPrimary>
<StandingSecondary>2hm_b</StandingSecondary>
<MovingSecondary>2hm_move_b</MovingSecondary>
<ProneAttackSecondary>2hm_prone_kick</ProneAttackSecondary>
<Melee_Range>2</Melee_Range>
</MeleeAttacks>
<Animation_Group>Sledge</Animation_Group>
<AI_Range_Max>2</AI_Range_Max>
<Flags>
<Flag>melee can dislodge movers</Flag>
<Flag>instant ragdoll</Flag>
<Flag>left_hand_ik_during_attack_only</Flag>
</Flags>
<melee_damage_to_anchored_scaler>0.4</melee_damage_to_anchored_scaler>
<Category>WPNCAT_MELEE</Category>
<feedback_name_shot_in_vehicle>Null_Feedback</feedback_name_shot_in_vehicle>
<feedback_name_shot_on_foot>Null_Feedback</feedback_name_shot_on_foot>
<feedback_name_melee_soft>OF_WF_BS__Default_Soft</feedback_name_melee_soft>
<feedback_name_melee_hard>OF_WF_BS__Default_Hard</feedback_name_melee_hard>
<pickup_info>
<min_ammo_given>0</min_ammo_given>
<max_ammo_given>20</max_ammo_given>
</pickup_info>
<Time_Management>
<Refire_Delay>0</Refire_Delay>
</Time_Management>
<feedback_name_spinup>Null_Feedback</feedback_name_spinup>
<Inv_Slot>melee</Inv_Slot>
<Ammo_per_Shot>0</Ammo_per_Shot>
<Audio>
<Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
<Spinning_Snd_Pitch_End>1</Spinning_Snd_Pitch_End>
<NPC_Fire_Sound>BBAT_MELEE</NPC_Fire_Sound>
<MeleeSound>
<ImpactFoleyFlesh>IMP_METAL_HIT_FLESH</ImpactFoleyFlesh>
<Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
<ImpactFoleyWorld>IMP_METAL_HIT</ImpactFoleyWorld>
</MeleeSound>
</Audio>
<Constant_Effects></Constant_Effects>
<Melee_Damage_Overrides>
<NPC>115</NPC>
<Player>130</Player>
<Online>115</Online>
</Melee_Damage_Overrides>
<Alt_Trigger_Type>single</Alt_Trigger_Type>
<Spinebend_Limits>Default</Spinebend_Limits>
<Strafe_Angles>Default</Strafe_Angles>
<Player_Combat_Ready_MS>5000</Player_Combat_Ready_MS>
<NPC_Combat_Ready_MS>2000</NPC_Combat_Ready_MS>
</Weapon>
All we really need to change here is:
<Name>slefgehammer</Name> to <Name>cane</Name>
Code:
<Weapon>
<Name>cane</Name>
<Weapon_Class>bat</Weapon_Class>
<Trigger_Type>single</Trigger_Type>
<Magazine_Size>0</Magazine_Size>
<Range_Max>2</Range_Max>
<Damage_Max>
<NPC_Damage>0</NPC_Damage>
<Player_Damage>0</Player_Damage>
</Damage_Max>
<Sound_Radius>8</Sound_Radius>
<_Editor>
<Category>Entries:Melee</Category>
</_Editor>
<MeleeAttacks>
<StandingPrimary>2hm_a</StandingPrimary>
<MovingPrimary>2hm_move_a</MovingPrimary>
<ProneAttackPrimary>2hm_prone_attack</ProneAttackPrimary>
<StandingSecondary>2hm_b</StandingSecondary>
<MovingSecondary>2hm_move_b</MovingSecondary>
<ProneAttackSecondary>2hm_prone_kick</ProneAttackSecondary>
<Melee_Range>2</Melee_Range>
</MeleeAttacks>
<Animation_Group>Sledge</Animation_Group>
<AI_Range_Max>2</AI_Range_Max>
<Flags>
<Flag>melee can dislodge movers</Flag>
<Flag>instant ragdoll</Flag>
<Flag>left_hand_ik_during_attack_only</Flag>
</Flags>
<melee_damage_to_anchored_scaler>0.4</melee_damage_to_anchored_scaler>
<Category>WPNCAT_MELEE</Category>
<feedback_name_shot_in_vehicle>Null_Feedback</feedback_name_shot_in_vehicle>
<feedback_name_shot_on_foot>Null_Feedback</feedback_name_shot_on_foot>
<feedback_name_melee_soft>OF_WF_BS__Default_Soft</feedback_name_melee_soft>
<feedback_name_melee_hard>OF_WF_BS__Default_Hard</feedback_name_melee_hard>
<pickup_info>
<min_ammo_given>0</min_ammo_given>
<max_ammo_given>20</max_ammo_given>
</pickup_info>
<Time_Management>
<Refire_Delay>0</Refire_Delay>
</Time_Management>
<feedback_name_spinup>Null_Feedback</feedback_name_spinup>
<Inv_Slot>melee</Inv_Slot>
<Ammo_per_Shot>0</Ammo_per_Shot>
<Audio>
<Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
<Spinning_Snd_Pitch_End>1</Spinning_Snd_Pitch_End>
<NPC_Fire_Sound>BBAT_MELEE</NPC_Fire_Sound>
<MeleeSound>
<ImpactFoleyFlesh>IMP_METAL_HIT_FLESH</ImpactFoleyFlesh>
<Hit_Wall_Sound>IMP_METAL_HIT</Hit_Wall_Sound>
<ImpactFoleyWorld>IMP_METAL_HIT</ImpactFoleyWorld>
</MeleeSound>
</Audio>
<Constant_Effects></Constant_Effects>
<Melee_Damage_Overrides>
<NPC>115</NPC>
<Player>130</Player>
<Online>115</Online>
</Melee_Damage_Overrides>
<Alt_Trigger_Type>single</Alt_Trigger_Type>
<Spinebend_Limits>Default</Spinebend_Limits>
<Strafe_Angles>Default</Strafe_Angles>
<Player_Combat_Ready_MS>5000</Player_Combat_Ready_MS>
<NPC_Combat_Ready_MS>2000</NPC_Combat_Ready_MS>
</Weapon>
Note: A copy of Preload.tbl is generated when GOTR creates your patch.
You do not need to include preload.tbl in your patch just edit it afterwards
and make sure there is a copy in the Game Directory. For vanilla game players
there is a copy already in the game folder.
Once your patch is made you can go to brass knuckles and buy the cane
but it will not show up in the game until you add the entries for it to the preload.tbl (not xtbl)
just open preload.tbl with a text editor and add these lines near the top
"cane.smesh"
"cane.peg"
"cane.g_peg"
then save your file.
drop all of your edited files into your patch directory and recompile, then drop the
created files into the game directory.
You do not need to include preload.tbl in your patch just edit it afterwards
and make sure there is a copy in the Game Directory. For vanilla game players
there is a copy already in the game folder.
Once your patch is made you can go to brass knuckles and buy the cane
but it will not show up in the game until you add the entries for it to the preload.tbl (not xtbl)
just open preload.tbl with a text editor and add these lines near the top
"cane.smesh"
"cane.peg"
"cane.g_peg"
then save your file.
drop all of your edited files into your patch directory and recompile, then drop the
created files into the game directory.
For this you need to need to use Masamaru's pegtool and extract:
interface-backend.peg_pc
interface-backend.g_peg_pc
These contain the icon for your weapon. Several files will be extracted but we are only
interested in one of them. ui_bms_01.tga_0.png.
I have highlighted the weapon icon in orange to make it easier to locate.
The first thing that needs doing is create an icon. I used a 64x64 template.
Just draw your icon and use the select and copy functions to get it ready to move.
Choose a blank spor in the ui_bms_01.tga_0.png. file. I recommend that you place it near other
icons instead of by itself. The reason why is that you will need to choose some coordinates and
image sizes and having other icons close for reference helps.
Once you get your icons in place then open bitmap_sheetsen.xtbl and search for the name of
the file name that you just added the icon to, In this case bitmap_sheetsen.xtbl
You will find a section that holds all of the information for the icons in that file
Add your icon information just like I have in the above excerpt. Make sure that your file name
is the same in the items_inventory.xtbl and bitmap_sheetsen.xtbl. There are three enties
<Bitmap>ui_hud_inv_w_cane</Bitmap> (Items_Incentory.xtbl)
<Name>ui_hud_inv_w_cane</Name> *bitmap_sheetsen.xtbl(
<PersistFilename>c
ng\ui_hud_inv_w_cane.tga</PersistFilename> (bitmap_sheetsen.xtbl)
Once you have edited and save bitmap_sheetsen.xtbl then you are ready to recompile the
interface-backend files.
A wprd of vaution here. when you go to recompile these files using Sr2PegTool. Pegtool
does not play well with DX5 files. When you drag the DESc file onto the pegtool and start
to compile you will recieve an error about DXT5 encoding. There are two ways that you can handle it.
1. You change all of the instances of DXT5 to 8r8g8b8 but I do not recommend it. When I tried that
method My game took on an ugly greenish color and most of the textures were messed up.
2. Change all of the DXT5 entries to DXT1. The only entry that should read A8R8G8B8 is for the
file that you just edited ui_bms_01.tga_0.png.. Now drag the desc file over SR2PegTool again and
it should compile easily.
interface-backend.peg_pc
interface-backend.g_peg_pc
These contain the icon for your weapon. Several files will be extracted but we are only
interested in one of them. ui_bms_01.tga_0.png.
I have highlighted the weapon icon in orange to make it easier to locate.
The first thing that needs doing is create an icon. I used a 64x64 template.
Just draw your icon and use the select and copy functions to get it ready to move.
Choose a blank spor in the ui_bms_01.tga_0.png. file. I recommend that you place it near other
icons instead of by itself. The reason why is that you will need to choose some coordinates and
image sizes and having other icons close for reference helps.
Once you get your icons in place then open bitmap_sheetsen.xtbl and search for the name of
the file name that you just added the icon to, In this case bitmap_sheetsen.xtbl
You will find a section that holds all of the information for the icons in that file
Code:
<BitmapSheets>
<Name>ui_bms_01</Name>
<Images>
...
<Properties>
<Name>ui_hud_inv_w_dualkatana</Name>
<StartX>940</StartX>
<StartY>1</StartY>
<ImageWidth>70</ImageWidth>
<ImageHeight>75</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_golddeagle</Name>
<StartX>768</StartX>
<StartY>78</StartY>
<ImageWidth>76</ImageWidth>
<ImageHeight>64</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_deserteagle.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_pipeworks</Name>
<StartX>855</StartX>
<StartY>78</StartY>
<ImageWidth>74</ImageWidth>
<ImageHeight>64</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_pipebomb.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_spas12</Name>
<StartX>940</StartX>
<StartY>78</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>52</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_chainsawlauncher</Name>
<StartX>768</StartX>
<StartY>143</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>65</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_lazarus</Name>
<StartX>859</StartX>
<StartY>143</StartY>
<ImageWidth>83</ImageWidth>
<ImageHeight>75</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_silencer</Name>
<StartX>941</StartX>
<StartY>143</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>65</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_septicgun</Name>
<StartX>767</StartX>
<StartY>225</StartY>
<ImageWidth>83</ImageWidth>
<ImageHeight>75</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_ar50firework</Name>
<StartX>863</StartX>
<StartY>234</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>52</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_awpsniper</Name>
<StartX>768</StartX>
<StartY>300</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>52</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_mac10</Name>
<StartX>952</StartX>
<StartY>224</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>75</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_vidcamera</Name>
<StartX>863</StartX>
<StartY>300</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>85</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_woodbat</Name>
<StartX>950</StartX>
<StartY>292</StartY>
<ImageWidth>85</ImageWidth>
<ImageHeight>85</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_shotgun.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_sledgehammer</Name>
<StartX>779</StartX>
<StartY>363</StartY>
<ImageWidth>70</ImageWidth>
<ImageHeight>68</ImageHeight>
<PersistFilename>D:\projects\sr2art\Interface\bms\hud\ui_hud_inv_w_sledgehammer.tga</PersistFilename>
</Properties>
<Properties>
<Name>ui_hud_inv_w_cane</Name>
<StartX>863</StartX>
<StartY>363</StartY>
<ImageWidth>83</ImageWidth>
<ImageHeight>75</ImageHeight>
<PersistFilename>c:png\ui_hud_inv_w_cane.tga</PersistFilename>
</Properties>
...
</Images>
<_Editor>
<Category>Entries</Category>
</_Editor>
</BitmapSheets>
Add your icon information just like I have in the above excerpt. Make sure that your file name
is the same in the items_inventory.xtbl and bitmap_sheetsen.xtbl. There are three enties
<Bitmap>ui_hud_inv_w_cane</Bitmap> (Items_Incentory.xtbl)
<Name>ui_hud_inv_w_cane</Name> *bitmap_sheetsen.xtbl(
<PersistFilename>c

Once you have edited and save bitmap_sheetsen.xtbl then you are ready to recompile the
interface-backend files.
A wprd of vaution here. when you go to recompile these files using Sr2PegTool. Pegtool
does not play well with DX5 files. When you drag the DESc file onto the pegtool and start
to compile you will recieve an error about DXT5 encoding. There are two ways that you can handle it.
1. You change all of the instances of DXT5 to 8r8g8b8 but I do not recommend it. When I tried that
method My game took on an ugly greenish color and most of the textures were messed up.
2. Change all of the DXT5 entries to DXT1. The only entry that should read A8R8G8B8 is for the
file that you just edited ui_bms_01.tga_0.png.. Now drag the desc file over SR2PegTool again and
it should compile easily.
In order to help narrow down where your picture is located here is an online tool
nutbread github io (I won't include a working link because I don't know if this is an
acceptable website for linking. but just go to DuckDuckGo and search 'get coordinates of an image'
and it should show up in the first few results).
Once you get your approximate coordinates then look at the icons on the page and find one that
is close to the same size, then check bitmap_sheetsen.xtbl for the image size. Set the correct numbers
in your bitmap_sheetsen.xtbl entry and save your work.
If the picture oesn't like up correctly you can always try again.
nutbread github io (I won't include a working link because I don't know if this is an
acceptable website for linking. but just go to DuckDuckGo and search 'get coordinates of an image'
and it should show up in the first few results).
Once you get your approximate coordinates then look at the icons on the page and find one that
is close to the same size, then check bitmap_sheetsen.xtbl for the image size. Set the correct numbers
in your bitmap_sheetsen.xtbl entry and save your work.
If the picture oesn't like up correctly you can always try again.
Note 1: I have been working with the vanilla versions of these files but the GOTR
versions can be modified the same way.
Note 2: This is a different item than the olcane. So you have to buy it in the store or
set someone to carry it before it will spawn on the street. If you try to take someone's cane
and beat them with it it will not work.
Note 3: Right now the store icon for this is the Modified Sledgehammer icon from GOTR
to change this icon interface-backend.g_peg_pc and interface-backend.peg_pc will need to
be edited.
Note 4: https://www.saintsrowmods.com/forum/threads/three-questions.1940/ contains a
discussion that touches upon SR2PegTool's issues with DXT5.
versions can be modified the same way.
Note 2: This is a different item than the olcane. So you have to buy it in the store or
set someone to carry it before it will spawn on the street. If you try to take someone's cane
and beat them with it it will not work.
Note 3: Right now the store icon for this is the Modified Sledgehammer icon from GOTR
to change this icon interface-backend.g_peg_pc and interface-backend.peg_pc will need to
be edited.
Note 4: https://www.saintsrowmods.com/forum/threads/three-questions.1940/ contains a
discussion that touches upon SR2PegTool's issues with DXT5.
Attachments
Last edited: