Lonestarcanuck Posted March 14, 2016 Share Posted March 14, 2016 some of my players where "wouldn't it be cool to have a cross bow like Van Helsing?!?" so I made one! items.xml --- <item id="1666" name="VanHelsing_Crossbow"> <property name="CustomIcon" value="crossbow" /> <property name="CustomIconTint" value="575757" /> <property name="Meshfile" value="Items/Weapons/Ranged/Bows/Crossbow/crossbowPrefab" /> <property name="Material" value="metal" /> <property name="HoldType" value="26" /> <property name="Stacknumber" value="1" /> <property name="Candrop" value="false" /> <property name="RepairTools" value="repairKit" /> <property name="Degradation" value="600" param1="false" /> <property name="DegradationBreaksAfter" value="false" /> <property name="ActionSkillGroup" value="Archery"/> <property name="CraftingSkillGroup" value="Weapon Smithing"/> <property class="Action0"> <!-- AttackAction --> <property name="Class" value="Launcher" /> <property name="Delay" value="0.100" /> <property name="Range" value="220" /> <property name="Magazine_size" value="100" /> <property name="Magazine_items" value="crossbowBolt, ironCrossbowBolt, steelCrossbowBolt, explodingCrossbowBolt" /> <property name="Reload_time" value="1" /> <property name="Auto_fire" value="true" /> <property name="Bullet_icon" value="uzi" /> <property name="Sound_start" value="Weapons/Ranged/Bows/Crossbow/crossbow_fire" /> <property name="Sound_repeat" value="" /> <property name="Sound_end" value="" /> <property name="ActionExp" value="10" /> <property name="ActionExpBonusMultiplier" value="5" /> <property name="Sound_empty" value="Weapons/weapon_empty" /> <property name="Sound_reload" value="Weapons/Ranged/Bows/Crossbow/crossbow_reload" /> </property> <property class="Action1"> <!-- UseAction --> <property name="Class" value="Zoom" /> <property name="Zoom_max_out" value="45" /> <property name="Zoom_max_in" value="45" /> </property> <property class="Attributes"> <property name="EntityDamage" value="5,25" /> <property name="DegradationRate" value="1,1" /> <property name="DegradationMax" value="50,650" /> </property> <property name="Group" value="Ammo/Weapons" /> <property class="Preview"> <property name="Zoom" value="28" /> <property name="Pos" value="0,-0.05" /> <property name="Rot" value="90,45,0" /> </property> <property name="ActionSkillGroup" value="Archery"/> <property name="CraftingSkillGroup" value="Weapon Smithing"/> </item> recipe.xml ----- <recipe name="filament" count="10" scrapable="False"> <ingredient name="scrapCable" count="1"/> </recipe> <recipe name="Iron_Crossbow" count="1" scrapable="False" > <ingredient name="forgedIron" count="5" /> <ingredient name="filament" count="2"/> <ingredient name="leather" count="2" /> <ingredient name="wood" count="10"/> </recipe> <recipe name="VanHelsing_Crossbow" count="1" scrapable="False" > <ingredient name="Iron_Crossbow" count="1" /> <ingredient name="spring" count="2"/> <ingredient name="shortMetalPipe" count="1"/> </recipe> ------- I am trying to see if I can control recoil other than that it rocks! Link to comment Share on other sites More sharing options...
StompyNZ Posted March 14, 2016 Share Posted March 14, 2016 .1 delay with 100 shot magazine and explosive bolts could get a bit hard on the server Link to comment Share on other sites More sharing options...
Valmar Posted March 14, 2016 Share Posted March 14, 2016 Sounds fun. I think you could make the item code shorter and cleaner, if you wanted, if you used the extends property. <item id="1666" name="VanHelsing_Crossbow"> <property name="Extends" value="crossbow" /> <property name="CustomIcon" value="crossbow" /> <property name="CustomIconTint" value="575757" /> <property name="Candrop" value="false" /> <property name="RepairTools" value="repairKit" /> <property name="DegradationBreaksAfter" value="false" /> <property class="Action0"> <property name="Class" value="Launcher" /> <property name="Delay" value="0.100" /> <property name="Range" value="220" /> <property name="Magazine_size" value="100" /> <property name="Reload_time" value="1" /> <property name="Auto_fire" value="true" /> <property name="ActionExp" value="10" /> <property name="ActionExpBonusMultiplier" value="5" /> </property> <property class="Attributes"> <property name="EntityDamage" value="5,25" /> <property name="DegradationMax" value="50,650" /> </property> </item> Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted March 15, 2016 Author Share Posted March 15, 2016 Thanks Valmar, I keep forgetting about the Extend feature. for the performance, yes I tried 100 exploding bolts at a building and my server barely noticed and my 5 other players did not even notice. than again my server has 8 Cores (4 HT each) 32G RAM and the game is running from an SSD. I also have two other games running Minecraft and Rust with 30-50players at 1000FPS (server side) and I never get over 50% CPU. my server is at Internap in Dallas and is really low ping. For the record 100 exploding bolts into a horde in a spray fashion was really cool! Link to comment Share on other sites More sharing options...
StompyNZ Posted March 15, 2016 Share Posted March 15, 2016 Nice It was probably a12 I was thinking of where having a ton of floating blocks after they were broken that was the issue, but a13 they mostly just vanish now Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted January 12, 2018 Author Share Posted January 12, 2018 Can anyone tell me if my code would still work in A16.4 or is there a new/better way to code this cross but? Ideally want it gated behind crossbow schematic and make another crafting perk like the one that lets you make mech parts. ALSO if you could have support for mod like adding a scope Link to comment Share on other sites More sharing options...
dreamdancer Posted January 12, 2018 Share Posted January 12, 2018 Ravenhearst has a repeating crossbow. It's a little different from yours but has some similar ideas. I am fairly certain most of your code above still works in 16.4. The code in the RH xml is: <item id="2007" name="crossbowRepeater"> <property name="Extends" value="crossbow"/> <property name="DescriptionKey" value="crossbowRepeaterDesc"/> <property name="Meshfile" value="#crosbowMid?crosbowMid"/> <property name="Material" value="metal"/> <property name="DescriptionKey" value="crossbowRepeaterDesc"/> <property name="RepairTools" value="repairKit"/> <property name="HoldType" value="26"/> <property name="FuelValue" value="70"/> <property name="EconomicValue" value="3000"/> <property name="DegradationBreaksAfter" value="false"/> <property name="SoundJammed" value="ItemNeedsRepair"/> <property name="SoundDestroy" value="wooddestroy1"/> <property name="CrosshairOnAim" value="false"/> <!-- aimTest --> <property name="CrosshairUpAfterShot" value="true"/> <!-- aimTest --> <property name="Sound_Sight_In" value="crossbow_sight_in"/> <property name="Sound_Sight_Out" value="crossbow_sight_out"/> <property class="Action0"> <!-- AttackAction --> <property name="Class" value="Launcher"/> <property name="Hitmask_override" value="Arrow"/> <property name="Delay" value="0.5"/> <property name="Range" value="220"/> <property name="Rays_spread" value="0.01"/> <property name="Reload_time" value="2"/> <property name="Crosshair_min_distance" value="30"/> <!-- 30 --> <property name="Crosshair_max_distance" value="30"/> <!-- 30 --> <property name="Magazine_size" value="5"/> <property name="Magazine_items" value="ironCrossbowBolt, modernCrossbowBolt, steelCrossbowBolt, explodingCrossbowBolt, shockCrossbowBolt"/> <property name="Bullet_icon" value="uzi"/> <property name="Sound_start" value="crossbow_fire"/> <property name="Sound_repeat" value=""/> <property name="Sound_end" value=""/> <property name="Sound_empty" value="weapon_empty"/> <property name="Sound_reload" value="crossbow_reload"/> </property> <property class="Action1"> <property name="Class" value="Zoom"/> <property name="Zoom_overlay" value="Items/Weapons/HUD/sniper_zoom_overlay"/> <property name="Zoom_max_out" value="40"/> <property name="Zoom_max_in" value="15"/> </property> <property class="Attributes"> <property name="EntityDamage" value="6,14"/> <property name="DegradationRate" value="1,1"/> <property name="DegradationMax" value="240,600"/> </property> <property name="Group" value="Ammo/Weapons"/> <property name="ActionSkillGroup" value="Archery"/> <property name="CraftingSkillGroup" value="craftSkillBowWeapons"/> <property name="RepairExpMultiplier" value="5.5"/> <property name="PickupJournalEntry" value="alternateAmmoTip"/> </item> <item id="2008" name="partscrossbowRepeater_stock"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Stock"/> <property name="Material" value="metal"/> <property name="Weight" value="20"/> <property class="Attributes"> <property name="DegradationRate" value="6,6"/> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2009" name="partscrossbowRepeater_body"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Receiver"/> <property name="Material" value="metal"/> <property name="Weight" value="5"/> <property class="Attributes"> <!-- <property name="Accuracy" value="1,0.01"/> --> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2010" name="partscrossbowRepeater_scope"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Pump"/> <property name="Material" value="metal"/> <property name="Weight" value="7"/> <property class="Attributes"> <property name="EntityDamage" value="2,10"/> <property name="BlockDamage" value="1,3"/> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2011" name="partscrossbowRepeater_limb"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Barrel"/> <property name="Material" value="metal"/> <property name="Weight" value="5"/> <property class="Attributes"> <property name="DegradationMax" value="2000,5000"/> </property> </item> Link to comment Share on other sites More sharing options...
dreamdancer Posted January 12, 2018 Share Posted January 12, 2018 Poking at your code I think all of it is good apart from scrapCable, which is not a thing. In order to have it modded with a scope you would have to either have it be made of parts like the RH version, or have -another- recipe for a scoped one that built off the original. Playing around with perks and such is pretty easy too, just requires adding it to progression.xml. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted January 12, 2018 Author Share Posted January 12, 2018 At one point back in A15.x we had a scoped version with zoom and everything. I will see if I can find that but I believe it was a separate recipe Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted January 12, 2018 Author Share Posted January 12, 2018 Ravenhearst has a repeating crossbow. It's a little different from yours but has some similar ideas. I am fairly certain most of your code above still works in 16.4. The code in the RH xml is: <item id="2007" name="crossbowRepeater"> <property name="Extends" value="crossbow"/> <property name="DescriptionKey" value="crossbowRepeaterDesc"/> <property name="Meshfile" value="#crosbowMid?crosbowMid"/> <property name="Material" value="metal"/> <property name="DescriptionKey" value="crossbowRepeaterDesc"/> <property name="RepairTools" value="repairKit"/> <property name="HoldType" value="26"/> <property name="FuelValue" value="70"/> <property name="EconomicValue" value="3000"/> <property name="DegradationBreaksAfter" value="false"/> <property name="SoundJammed" value="ItemNeedsRepair"/> <property name="SoundDestroy" value="wooddestroy1"/> <property name="CrosshairOnAim" value="false"/> <!-- aimTest --> <property name="CrosshairUpAfterShot" value="true"/> <!-- aimTest --> <property name="Sound_Sight_In" value="crossbow_sight_in"/> <property name="Sound_Sight_Out" value="crossbow_sight_out"/> <property class="Action0"> <!-- AttackAction --> <property name="Class" value="Launcher"/> <property name="Hitmask_override" value="Arrow"/> <property name="Delay" value="0.5"/> <property name="Range" value="220"/> <property name="Rays_spread" value="0.01"/> <property name="Reload_time" value="2"/> <property name="Crosshair_min_distance" value="30"/> <!-- 30 --> <property name="Crosshair_max_distance" value="30"/> <!-- 30 --> <property name="Magazine_size" value="5"/> <property name="Magazine_items" value="ironCrossbowBolt, modernCrossbowBolt, steelCrossbowBolt, explodingCrossbowBolt, shockCrossbowBolt"/> <property name="Bullet_icon" value="uzi"/> <property name="Sound_start" value="crossbow_fire"/> <property name="Sound_repeat" value=""/> <property name="Sound_end" value=""/> <property name="Sound_empty" value="weapon_empty"/> <property name="Sound_reload" value="crossbow_reload"/> </property> <property class="Action1"> <property name="Class" value="Zoom"/> <property name="Zoom_overlay" value="Items/Weapons/HUD/sniper_zoom_overlay"/> <property name="Zoom_max_out" value="40"/> <property name="Zoom_max_in" value="15"/> </property> <property class="Attributes"> <property name="EntityDamage" value="6,14"/> <property name="DegradationRate" value="1,1"/> <property name="DegradationMax" value="240,600"/> </property> <property name="Group" value="Ammo/Weapons"/> <property name="ActionSkillGroup" value="Archery"/> <property name="CraftingSkillGroup" value="craftSkillBowWeapons"/> <property name="RepairExpMultiplier" value="5.5"/> <property name="PickupJournalEntry" value="alternateAmmoTip"/> </item> <item id="2008" name="partscrossbowRepeater_stock"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Stock"/> <property name="Material" value="metal"/> <property name="Weight" value="20"/> <property class="Attributes"> <property name="DegradationRate" value="6,6"/> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2009" name="partscrossbowRepeater_body"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Receiver"/> <property name="Material" value="metal"/> <property name="Weight" value="5"/> <property class="Attributes"> <!-- <property name="Accuracy" value="1,0.01"/> --> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2010" name="partscrossbowRepeater_scope"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Pump"/> <property name="Material" value="metal"/> <property name="Weight" value="7"/> <property class="Attributes"> <property name="EntityDamage" value="2,10"/> <property name="BlockDamage" value="1,3"/> <property name="DegradationMax" value="2000,5000"/> </property> </item> <item id="2011" name="partscrossbowRepeater_limb"> <property name="Extends" value="partsMaster"/> <property name="DescriptionKey" value="partsCrossbowRepeaterGroupDesc"/> <property name="PartType" value="Barrel"/> <property name="Material" value="metal"/> <property name="Weight" value="5"/> <property class="Attributes"> <property name="DegradationMax" value="2000,5000"/> </property> </item> so the RH one has parts right? where do I get the code for RH so I can see the recipe.xml ? Link to comment Share on other sites More sharing options...
dreamdancer Posted January 13, 2018 Share Posted January 13, 2018 Download the Ravenhearst mod. It's available in the Launcher, or through a quick look in the Game Mods forum. Link to comment Share on other sites More sharing options...
dreamdancer Posted January 13, 2018 Share Posted January 13, 2018 Looking at the RH code, I think a bunch of the stuff there is redundant and/or not ideal. Some of that code I think is redundant with the inherit, and giving the weapon a base damage when it has ammo(which has its own damage value that overwrites the weapon) probably is pointless. I am also not sure if this code possible with that to make a non-scoped version, if not you could look at the code for the other weapons, most of which can be scoped in RH. I honestly haven't played with the repeating crossbow in the mod myself, so I don't know how it ends up functioning in game, I just knew it existed and had the mod handy. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 29, 2019 Author Share Posted July 29, 2019 So I want to bring this back in my A17.4 modlet. I have a Diamond Pickaxe and now I want to add my Van Helsing crossbow from A12. anyone know much about the XML for the current A17.4 xbow? the key to this new xbow is 25-100 shot mag, faster fire rate and a bit more damage. I also want to be able to add a scope 2x due to range or reflex. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.