404UserNotFound Posted January 28, 2013 Share Posted January 28, 2013 I'm trying to compile shopsubcategory2_converted.xml using Gibbed.Dunia2.ConvertBinaryObject.exe, and it keeps crashing and giving me this error: http://img233.imageshack.us/img233/315/dunia2error.png I've modified the file itself to see if I can add the Predator Bow from Multiplayer into the shop for Single Player. I don't understand what the above error message is trying to tell me, but I've figured out that when I remove the "<object external="Special weapons\PredatorBow.xml" />" line from the "shopsubcategory2_converted.xml" file, the file compiles just fine. But when I re-add it, it gives me that error. Just a side note: I've successfully modified shoppingitems_converted.xml and added in "<object external="Special weapons\PredatorBow.xml" />", then created "PredatorBow.xml" in the "data_win32\common_unpack\generated\databases\generic\shoppingitems_converted\Special weapons" folder. I've tried renaming the files for shopsubcategory2_converted.xml to "PredatorBow2.xml" because I thought maybe it was a naming issue, but that did not fix the issue. Here's my modified file(s): data_win32\common_unpack\generated\databases\generic\shopsubcategory2_converted.xml<?xml version="1.0" encoding="utf-8"?> <object name="lib" def="ShopSubCategory2"> <object external="Special weapons\PredatorBow.xml" /> <object external="Assault rifles\P416.xml" /> <object external="Launchers\GM-94.xml" /> <object external="SMGs\MP5.xml" /> <object external="Sniper rifles\SVD.xml" /> <object external="Vehicle\Scavenger.xml" /> <object external="Handguns\6P9.xml" /> <object external="Shotguns\M133.xml" /> <object external="Special weapons\Repair tool.xml" /> <object external="SMGs\A2000.xml" /> <object external="Assault rifles\MK16.xml" /> <object external="Special weapons\Mine.xml" /> <object external="LMGs\MKG.xml" /> <object external="Special weapons\B300.xml" /> <object external="Shotguns\1887.xml" /> <object external="SMGs\BZ19.xml" /> <object external="Sniper rifles\R700.xml" /> <object external="Special weapons\Flare gun.xml" /> <object external="Handguns\D50.xml" /> <object external="Assault rifles\ACE52.xml" /> <object external="Launchers\RPG-7.xml" /> <object external="SMGs\KSV.xml" /> <object external="Sniper rifles\Z93.xml" /> <object external="Handguns\KW1911.xml" /> <object external="Shotguns\SPAS 12.xml" /> <object external="SMGs\VZ61.xml" /> <object external="Assault rifles\AK47.xml" /> <object external="Special weapons\C4.xml" /> <object external="Handguns\Hunter.xml" /> <object external="LMGs\PKM.xml" /> <object external="Assault rifles\F1.xml" /> <object external="Assault rifles\STGW 90.xml" /> <object external="Sniper rifles\R700 Predator.xml" /> <object external="Special weapons\LPO 50.xml" /> <object external="LMGs\U100.xml" /> </object> data_win32\common_unpack\generated\databases\generic\shopsubcategory2_converted\Special weapons\PredatorBow.xmlThis is a copy of the B300.xml file found in the same folder, with the ID's tweaked for the Predator Bow.<?xml version="1.0" encoding="utf-8"?> <object hash="72DE4948"> <field name="hidSingleObject" type="Boolean">False</field> <field name="bCanBeShared" type="Boolean">True</field> <field name="text_hidName" type="String">Special weapons/PredatorBow</field> <field name="hidName" type="Hash32">6976E073</field> <field name="disId" type="UInt8">404</field> <field name="locidDescriptionId" type="Int32">151197</field> <field name="iSortId" type="Int32">1</field> <field name="sIconName" type="String"></field> <object name="ItemTypeDep"> <object name="Link"> <field name="disshpitpeId" type="UInt8">66</field> </object> <object name="Link"> <field name="disshpitpeId" type="UInt8">67</field> </object> <object name="Link"> <field name="disshpitpeId" type="UInt8">68</field> </object> </object> <object name="ItemSubTypeDep" /> </object> Link to comment Share on other sites More sharing options...
jvarnes Posted January 28, 2013 Share Posted January 28, 2013 Take PredatorBow.xml out of the folder. Make a copy of B300.xml and try to reconvert. You're using the convert2binary right (not the pack fcb) If it works then you have something wrong in the PredatorBow.xml. Could be something invisible like a soft return. My advice would be start from scratch and grab you a fresh copy of B300.xml and carefully change the values again. Generally the way I have crashed the tools are: A. Using the wrong tool (trying to drop an XML file onto the pcb pack tool(B. Dragging a folder onto the tool instead of the accompaning xml file (DOHT!)C. Forgetting to add the new entry into accompanying xml fileD. Screwing up something in an xml filesigh Good luck! PS - wait do you even need to add it to shopsubcategory? I think I have added new items to shoppingitems without mucking around in shopsubcategory... PSS - where did you get disID 404 from? Did you make that up or is it the bow's ID? I ask because I've had problems in the past with EntityIDs and whatnot. I'm still puzzling al of that out. Link to comment Share on other sites More sharing options...
404UserNotFound Posted January 30, 2013 Author Share Posted January 30, 2013 (edited) The 404 ID for disID is because I've been told to use custom IDs for new weapons, as having two weapons with the same disID can cause issues, so I just decided on 404 :P As for why I'm adding it to shopsubcategory2, it's because all the weapons in the game have their own XML files within "data_win32\common_unpack\generated\databases\generic\shopsubcategory2_converted\". So I figured I may as well make sure everything works properly and create a PredatorBow XML file in the shopsubcategory. I'm also trying to figure out why sometimes, custom weapons don't actually show the "EQUIPPED" text when you select them, like the Silver Dragon in that Swartz Mod Compilation. You can properly equip the Machete/Tribal Knife and it labels them as "EQUIPPED", but it doesn't do the same for the Silver Dragon. It may be a soft return. I'll try again from scratch. EDIT: Tried again from scratch, crashed. I'm dragging shopsubcategory2_converted.xml onto ConvertBinaryObject.xml, as I always do, so it converts it into a .FCB file that I can rename to shopsubcategory2.lib, and it crashes. Not sure if this matters, but I also have "data_win32\common_unpack\generated\databases\generic\shoppingitems_converted\Special weapons\PredatorBow.xml", and the line "<object external="Special weapons\PredatorBow.xml" />" in shoppingitems_converted.xml, and that compiled without crashing just fine. EDIT 2: What I'm going to try to do, is compile everything without the addition of the PredatorBow.xml file in ShopSubCategory2, and see if there are any issues. I've noticed that the ShopSubCategory2 folder doesn't have any Melee Weapons subfolder in it, nor does it have any linkage to melee weapons. That, and it also has linkage to "Vehicle\Scavenger.xml" which is a vehicular weapon, so I'm thinking I'm not supposed to modify anything in this folder. Edited January 30, 2013 by 404UserNotFound Link to comment Share on other sites More sharing options...
404UserNotFound Posted January 30, 2013 Author Share Posted January 30, 2013 I figured out the cause of the issue! I'm so stupid, I didn't realize there was a link between all the files! I ended up making some necessary linkages that all had to do with the IDs and everything compiled successfully. It all had to do with the ID's for the shopsubcategory2 file being different. Now that everything is properly linked together, this should also fix the bug I displayed in the video of me testing out the Predator Bow, where I had both the Recurve Bow and the "Recurve Bow Predator" equipped at the same time. (See my WIP thread for the video) First off was "C:\Program Files (x86)\Steam\steamapps\common\Far Cry 3\data_win32\patch_unpack\generated\databases\generic\shopsubcategory1_converted\Buy\Specials.xml":<?xml version="1.0" encoding="utf-8"?> <object hash="72DE4948"> <field name="hidSingleObject" type="Boolean">False</field> <field name="bCanBeShared" type="Boolean">True</field> <field name="text_hidName" type="String">Buy/Specials</field> <field name="hidName" type="Hash32">C1F95858</field> <field name="disId" type="UInt8">165</field> <field name="locidDescriptionId" type="Int32">42854</field> <field name="iSortId" type="Int32">8</field> <field name="sIconName" type="String"></field> <object name="SubCategory2Dep"> <object name="Link"> <field name="disshpscatbId" type="UInt8">117</field> </object> <object name="Link"> <field name="disshpscatbId" type="UInt8">118</field> </object> <object name="Link"> <field name="disshpscatbId" type="UInt8">159</field> </object> <object name="Link"> <field name="disshpscatbId" type="UInt8">162</field> </object> <object name="Link"> <field name="disshpscatbId" type="UInt8">163</field> <!-- Remember this. 163 is the new ID for the Predator Bow --> </object> </object> <object name="ItemTypeDep" /> <object name="ItemSubTypeDep" /> </object> Then, in "C:\Program Files (x86)\Steam\steamapps\common\Far Cry 3\data_win32\patch_unpack\generated\databases\generic\shopsubcategory2_converted\Special weapons\PredatorBow.xml"<?xml version="1.0" encoding="utf-8"?> <object hash="72DE4948"> <field name="hidSingleObject" type="Boolean">False</field> <field name="bCanBeShared" type="Boolean">True</field> <field name="text_hidName" type="String">Special weapons/PredatorBow</field> <field name="hidName" type="Hash32">6976E073</field> <field name="disId" type="UInt8">163</field> <!-- Added in the proper ID of 163 --> <field name="locidDescriptionId" type="Int32">82888</field> <field name="iSortId" type="Int32">4</field> <field name="sIconName" type="String"></field> <object name="ItemTypeDep" /> <!-- This means there won't be any attachments/camo --> <!-- <object name="ItemTypeDep"> <object name="Link"> <field name="disshpitpeId" type="UInt8">66</field> </object> <object name="Link"> <field name="disshpitpeId" type="UInt8">67</field> </object> <object name="Link"> <field name="disshpitpeId" type="UInt8">68</field> </object> </object> --> <!-- The above code that is commented out is for the attachments & camo options. Those, I'll be adding in later. --> <object name="ItemSubTypeDep" /> </object> Then, in "C:\Program Files (x86)\Steam\steamapps\common\Far Cry 3\data_win32\patch_unpack\generated\databases\generic\shoppingitems_converted\Special weapons\PredatorBow.xml"<?xml version="1.0" encoding="utf-8"?> <object hash="72DE4948"> <field name="hidSingleObject" type="Boolean">False</field> <field name="bCanBeShared" type="Boolean">True</field> <field name="text_hidName" type="String">Special weapons/PredatorBow</field> <field name="hidName" type="Hash32">81FE3BEE</field> <field name="disId" type="UInt16">9991</field> <!-- This stays the same. I didn't change this. --> <field name="locidItemNameId" type="Int32">151198</field> <field name="shpcatCategory" type="UInt8">11</field> <field name="shpscataSubCategory1" type="UInt8">165</field> <field name="shpscatbSubCategory2" type="UInt8">163</field> <!-- This is what I kept screwing up. This is now the proper ID for the new Predator Bow. --> <field name="shpitpeItemType" type="UInt8">66</field> <field name="shpisubtpeItemSubType" type="UInt8">255</field> <field name="locidDescriptionId" type="Int32">151197</field> <field name="selAttachmentType" type="Enum">None</field> <field name="text_ammoAmmoType" type="String">none</field> <field name="ammoAmmoType" type="Hash32">7F9000CF</field> <field name="iAmmoAmount" type="Int32">0</field> <field name="selGadgetType" type="Enum">None</field> <field name="arkArchetype" type="Id64">7676407210732</field> <field name="arkDisplayArchetype" type="Id64">7728318284954</field> <field name="fRotationSpeed" type="Float32">0.2</field> <field name="fRotationAmplitude" type="Float32">0.03</field> <field name="text_sName" type="String"></field> <field name="sName" type="Hash32">FFFFFFFF</field> <field name="iCost" type="Int32">925</field> <field name="fRefillAllAmmoCostMultiplier" type="Float32">1</field> <field name="iXPOnLoot" type="Int32">0</field> <field name="iSortId" type="Int32">2</field> <field name="UnlockOnMissionComplete" type="String"></field> <field name="UnlockFromScript" type="String">Tower3</field> <field name="bVisibleInInventory" type="Boolean">False</field> <field name="bShowCurrentCount" type="Boolean">False</field> <field name="sShopIconName" type="String">BOW</field> <field name="sHudIconName" type="String"></field> <field name="bIsLootItem" type="Boolean">False</field> <field name="bIsTreasureMap" type="Boolean">False</field> <field name="bIsRareItem" type="Boolean">False</field> <field name="selCollectibleType" type="Enum">Invalid</field> <field name="bIsWeaponStatistics" type="Boolean">True</field> <field name="sULC_Name" type="String"></field> <field name="wikiItemId" type="Int32">1370</field> <object name="WeaponStatistics"> <field name="iAccuracy" type="Float32">7</field> <field name="iDammage" type="Float32">8</field> <field name="iRange" type="Float32">7</field> <field name="iFireRate" type="Float32">6</field> <field name="iHandling" type="Float32">8</field> <field name="iStarRating" type="Float32">4</field> <field name="iStarRatingBonus" type="Float32">0</field> </object> <object name="DefaultPositionOnScreen"> <field name="vectorDisplayDefaultPosition" type="Vector3">-0.05,0.4,0.32</field> <field name="DisplayDefaultAngles" type="Vector3">-44.23,32.07,119.42</field> <field name="vectorDisplayDefaultPositionWithSilencer" type="Vector3">0,0,0</field> <field name="DisplayDefaultAnglesWithSilencer" type="Vector3">0,0,0</field> </object> <object name="CategoryPositionOnScreen"> <field name="bDisplayAsDefaultItem" type="Boolean">False</field> <field name="vectorDisplayDefaultCategoryPosition" type="Vector3">0,0,0</field> <field name="DisplayDefaultCategoryAngles" type="Vector3">0,0,0</field> <object name="DefaultAttachmentsNames"> <object name="DefaultAttachmentName"> <field name="text_Name" type="String"></field> <field name="Name" type="Hash32">FFFFFFFF</field> </object> </object> </object> <object name="PositionOnFullScreen"> <field name="FullscreenpAngles" type="Vector3">0,0,90</field> <field name="vectorFullscreenCenterOffset" type="Vector3">0,0,0</field> </object> </object> Link to comment Share on other sites More sharing options...
jvarnes Posted January 30, 2013 Share Posted January 30, 2013 Glad you figured it out. So it was a shop item Id code rather than the disId that caused the toruble (so many damn ID numbers in these files) As you correctly pointed out shop categories does NOT contain the melee weapons and does have the weird scavenger entry (perhaps at one point they were thinking about incorporating vehicle purchases/upgrades) I added in the Type 10 Flare gun and pretty sure I did not add it to shopcategorey2. I personally would not tinker in there unless your item isn't working. Having said that I totally get what you mean about the chinese swords (knives actually, but you know what mean ;)) not equipping properly. In addition I seem to have had a bug with his mod where if I equip the last sword it supercedes all the others and I cannot properly "unequip it" without going out of the game and back in. I'm suspecting it might have to do with those items Archetype ids as those particular knives are used in cutscenes during the game. Of course it could also be something else set wrong in the weapon/weapon property files, but I'm not savvy enough yet with them to be 100% sure. I plan to do more investigating and testing when I'm not trying to figure out a 100 other things LOL. Good luck with your modding and hope you continue to share discoveries and tutorials here on Nexus. The info on modding is quite sparse right now :/ Link to comment Share on other sites More sharing options...
Edgarhighmen Posted January 11, 2014 Share Posted January 11, 2014 nice work. I landed here trying to figure out why schwartz mod enables signature weapons on an already started game (available for purchase, as well as melee) But in a new game the melee isn't even a viewable category and signature weapons only has the .44 Cannon in it for purchase instead of the full list of signature weapons. Anyone know why? Also I had to delete the chinese_sword.xml from the shoppingitems folder and remove it from the shoppingitems.xml because no matter which sword I bought/equipped, it would always equip the dragon sword -_- But now on a new game the melee section isn't even there -_- (on old save it works proper now, equips whats selected, 3 melee options available, Machete, Tanto, Dragon (but no tribal)) Any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts