Jump to content

How do i make these weapons uncraftable?


Infected226

Recommended Posts

I made a auto pistol and a god pistol (unlimited ammo) to put at the end-game vending machines, Everything seems to be working except that you can take any pistol part and turn it into a auto pistol or god pistol. I didn't want to get into adding custom recipes and custom parts so is there a line i can add or a line i can remove in the code to make them un-craftable?

I tried deleting the parts line and my server stopped showing on the server list till i added them back, so not sure what else i can try.

<property class="Parts">

<property name="Stock" value="partsPistol_grip"/>

<property name="Receiver" value="partsPistol_receiver"/>

<property name="Pump" value="partsPistol_parts"/>

<property name="Barrel" value="partsPistol_barrel"/>

 

Here are the gun codes

 

<item id="938" name="AutoPistol">

<property name="CustomIcon" value="gunPistol"/>

<property name="CustomIconTint" value="ffa0a0"/>

<Property name="TintColor" value="200,005,160"/>

<property name="Meshfile" value="Items/Weapons/Ranged/Pistol/PistolPrefab"/>

<property name="Material" value="metal"/>

<property name="RepairTools" value="repairKit"/>

<property name="EconomicValue" value="15000"/>

<property name="HoldType" value="1"/>

<property name="DegradationRate" value="499999" param1="true"/>

<property name="DegradationBreaksAfter" value="false"/>

<property name="SoundJammed" value="weapon_jam"/>

<property name="Attachments" value="flashlight02"/>

<property name="CrosshairOnAim" value="false"/> <!-- aimTest -->

<property class="Parts">

<property name="Stock" value="partsPistol_grip"/>

<property name="Receiver" value="partsPistol_receiver"/>

<property name="Pump" value="partsPistol_parts"/>

<property name="Barrel" value="partsPistol_barrel"/>

</property>

<property name="Sound_Sight_In" value="pistol_sight_in"/>

<property name="Sound_Sight_Out" value="pistol_sight_out"/>

<property class="Action0">

<!-- AttackAction -->

<property name="Class" value="Ranged"/>

<property name="Delay" value="0.08"/>

<property name="Auto_fire" value="true"/>

<property name="Crosshair_min_distance" value="5"/>

<!-- 5 -->

<property name="Crosshair_max_distance" value="6"/>

<!-- 6 -->

<property name="Magazine_size" value="75"/>

<property name="Magazine_items" value="9mmBullet"/>

<property name="Magazine_item_ray_counts" value="1"/>

<property name="Magazine_item_ray_spreads" value="0.85"/>

<!-- .85 -->

<property name="Reload_time" value="1.0"/>

<property name="Bullet_icon" value="pistol"/>

<property name="Sound_start" value="mp5_fire_start"/>

<property name="Sound_repeat" value="Weapons/Ranged/MP5/mp5_fire_lp"/>

<property name="Sound_end" value="Weapons/Ranged/MP5/mp5_fire_end"/>

<property name="Sound_empty" value="weapon_empty"/>

<property name="Sound_reload" value="pistol_reload"/>

<property name="Particles_muzzle_fire" value="nozzleflash"/>

<property name="Particles_muzzle_smoke" value="nozzlesmoke"/>

<property name="DamageBonus.head" value="8"/>

<property name="DamageBonus.wood" value="3"/>

<property name="DamageBonus.earth" value="0.4"/>

<property name="DamageBonus.glass" value="1"/>

</property>

<property class="Action1"> <!-- UseAction -->

<property name="Class" value="Zoom"/>

<property name="Zoom_max_out" value="35"/>

<property name="Zoom_max_in" value="35"/>

</property>

<property name="LightSource" value="lightSource"/> <!-- Start: Needed for the attachment flashlight -->

<property name="ActivateObject" value="Attachments/flashlight/lightSource"/>

<property name="AttachmentFlashlight" value="flashlight02"/> <!-- End: Needed for the attachment flashlight -->

<property name="Group" value="Ammo/Weapons"/>

<property name="ActionSkillGroup" value="Pistols"/>

<property name="CraftingSkillGroup" value="craftSkillGuns"/>

<property name="RepairExpMultiplier" value="10.8"/>

<property name="LightValue" value="0.45"/>

</item>

 

<item id="939" name="GodPistol">

<property name="CustomIcon" value="gunPistol"/>

<property name="CustomIconTint" value="208,211,212"/>

<property name="Meshfile" value="Items/Weapons/Ranged/Pistol/PistolPrefab"/>

<property name="Material" value="metal"/>

<property name="RepairTools" value="repairKit"/>

<property name="EconomicValue" value="15000"/>

<property name="HoldType" value="1"/>

<property name="DegradationBreaksAfter" value="false"/>

<property name="DegradationRate" value="1" param1="true"/>

<property name="SoundJammed" value="weapon_jam"/>

<property name="Attachments" value="flashlight02"/>

<property name="CrosshairOnAim" value="false"/> <!-- aimTest -->

<property class="Parts">

<property name="Stock" value="partsPistol_grip"/>

<property name="Receiver" value="partsPistol_receiver"/>

<property name="Pump" value="partsPistol_parts"/>

<property name="Barrel" value="partsPistol_barrel"/>

</property>

<property name="Sound_Sight_In" value="pistol_sight_in"/>

<property name="Sound_Sight_Out" value="pistol_sight_out"/>

<property class="Action0">

<!-- AttackAction -->

<property name="Class" value="Ranged"/>

<property name="Delay" value="0.08"/>

<property name="Auto_fire" value="true"/>

<property name="Crosshair_min_distance" value="5"/>

<!-- 5 -->

<property name="Crosshair_max_distance" value="6"/>

<!-- 6 -->

<property name="Single_magazine_usage" value="true"/>

<property name="Infinite_ammo" value="true"/>

<property name="Magazine_size" value="75"/>

<property name="Magazine_items" value="9mmBullet"/>

<property name="Magazine_item_ray_counts" value="1"/>

<property name="Magazine_item_ray_spreads" value="0.85"/>

<!-- .85 -->

<property name="Reload_time" value="1.0"/>

<property name="Bullet_icon" value="pistol"/>

<property name="Sound_start" value="mp5_fire_start"/>

<property name="Sound_repeat" value="Weapons/Ranged/MP5/mp5_fire_lp"/>

<property name="Sound_end" value="Weapons/Ranged/MP5/mp5_fire_end"/>

<property name="Sound_empty" value="weapon_empty"/>

<property name="Sound_reload" value="pistol_reload"/>

<property name="Particles_muzzle_fire" value="nozzleflash"/>

<property name="Particles_muzzle_smoke" value="nozzlesmoke"/>

<property name="DamageBonus.head" value="8"/>

<property name="DamageBonus.wood" value="3"/>

<property name="DamageBonus.earth" value="0.4"/>

<property name="DamageBonus.glass" value="1"/>

</property>

<property class="Action1"> <!-- UseAction -->

<property name="Class" value="Zoom"/>

<property name="Zoom_max_out" value="35"/>

<property name="Zoom_max_in" value="35"/>

</property>

<property name="LightSource" value="lightSource"/> <!-- Start: Needed for the attachment flashlight -->

<property name="ActivateObject" value="Attachments/flashlight/lightSource"/>

<property name="AttachmentFlashlight" value="flashlight02"/> <!-- End: Needed for the attachment flashlight -->

<property name="Group" value="Ammo/Weapons"/>

<property name="ActionSkillGroup" value="Pistols"/>

<property name="CraftingSkillGroup" value="craftSkillGuns"/>

<property name="RepairExpMultiplier" value="10.8"/>

<property name="LightValue" value="0.45"/>

</item>

Link to comment
Share on other sites

Any item that you make with "<property class="Parts">" will have a recipe auto made with the parts. You have to remove the parts from your modded ranged items. Look at how the blunderbuss is coded it will show you a templet for a ranged item with no parts.

Link to comment
Share on other sites

Any item that you make with "<property class="Parts">" will have a recipe auto made with the parts. You have to remove the parts from your modded ranged items. Look at how the blunderbuss is coded it will show you a templet for a ranged item with no parts.

 

I still cant seem to figure it out, i tried deleting the parts lines and was left with guns that would not repair or had no quality, i noticed that blunderbuss had a few different lines though so i tried to add those and was left with a server that wouldn't start so i had to delete them.

 

<property name="Group" value="Ammo/Weapons"/>

<property class="Attributes">

<property name="EntityDamage" value="6,9.4"/>

<property name="BlockDamage" value="1.6,5"/>

<!-- <property name="Accuracy" value="1,0.1"/> -->

<property name="FalloffRange" value="15,25"/>

<property name="DegradationMax" value="800,3200"/>

<property name="DegradationRate" value="10,1

Link to comment
Share on other sites

This bit.

 

<property class="Parts">

<property name="Stock" value="partsPistol_grip"/>

<property name="Receiver" value="partsPistol_receiver"/>

<property name="Pump" value="partsPistol_parts"/>

<property name="Barrel" value="partsPistol_barrel"/>

 

Make different parts. So I gave my NPC's weapons but didn't want them to be craftable... so I did this.

 

<property class="Parts">

<property name="Stock" value="npcpartsPistol_grip"/>

<property name="Receiver" value="npcpartsPistol_receiver"/>

<property name="Pump" value="npcpartsPistol_parts"/>

<property name="Barrel" value="npcpartsPistol_barrel"/>

</property>

 

It means players can't make them at all.

Link to comment
Share on other sites

This bit.

 

<property class="Parts">

<property name="Stock" value="partsPistol_grip"/>

<property name="Receiver" value="partsPistol_receiver"/>

<property name="Pump" value="partsPistol_parts"/>

<property name="Barrel" value="partsPistol_barrel"/>

 

Make different parts. So I gave my NPC's weapons but didn't want them to be craftable... so I did this.

 

<property class="Parts">

<property name="Stock" value="npcpartsPistol_grip"/>

<property name="Receiver" value="npcpartsPistol_receiver"/>

<property name="Pump" value="npcpartsPistol_parts"/>

<property name="Barrel" value="npcpartsPistol_barrel"/>

</property>

 

It means players can't make them at all.

 

This helped a lot thanks! :smile-new:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...