Results 1 to 12 of 12

Thread: Van Helsing CrossBow - check it out

  1. #1
    Colony Founder Lonestarcanuck's Avatar
    Join Date
    May 2014
    Location
    Texas
    Posts
    1,563
    Rep Power
    1

    Cool Van Helsing CrossBow - check it out

    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!

  2. #2
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,835
    Rep Power
    1
    .1 delay with 100 shot magazine and explosive bolts could get a bit hard on the server

  3. #3
    Colony Founder Valmar's Avatar
    Join Date
    Jan 2015
    Posts
    4,121
    Rep Power
    1
    Sounds fun.
    I think you could make the item code shorter and cleaner, if you wanted, if you used the extends property.


    Code:
    <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>

  4. #4
    Colony Founder Lonestarcanuck's Avatar
    Join Date
    May 2014
    Location
    Texas
    Posts
    1,563
    Rep Power
    1
    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!

  5. #5
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,835
    Rep Power
    1
    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

  6. #6
    Colony Founder Lonestarcanuck's Avatar
    Join Date
    May 2014
    Location
    Texas
    Posts
    1,563
    Rep Power
    1
    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

  7. #7
    Tracker
    Join Date
    Jul 2017
    Posts
    221
    Rep Power
    1
    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>

  8. #8
    Tracker
    Join Date
    Jul 2017
    Posts
    221
    Rep Power
    1
    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.

  9. #9
    Colony Founder Lonestarcanuck's Avatar
    Join Date
    May 2014
    Location
    Texas
    Posts
    1,563
    Rep Power
    1
    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

  10. #10
    Colony Founder Lonestarcanuck's Avatar
    Join Date
    May 2014
    Location
    Texas
    Posts
    1,563
    Rep Power
    1
    Quote Originally Posted by dreamdancer View Post
    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 ?

  11. #11
    Tracker
    Join Date
    Jul 2017
    Posts
    221
    Rep Power
    1
    Download the Ravenhearst mod. It's available in the Launcher, or through a quick look in the Game Mods forum.

  12. #12
    Tracker
    Join Date
    Jul 2017
    Posts
    221
    Rep Power
    1
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •