Jump to content

Help: Can't make Assemble action locked for a custom gun behind a book.


Subquake

Recommended Posts

I'm struggling, because I can't seem to get to make it work, so that my custom Pistol is locked behind a book. I marked down in yellow bits of code, that are different in comparison to the existing gunPistol item in the game.

 

<item id="[color="#FFFF00"]3001[/color]" name="[color="#FFFF00"]ulmPistol15[/color]">
	[color="#FFFF00"]<property name="CustomIcon" value="pistol15" />[/color]
	[color="#FFFF00"]<property name="EconomicValue" value="1700" />[/color]
	<property name="Meshfile" value="Items/Weapons/Ranged/Pistol/PistolPrefab" />
	<property name="Material" value="metal" />
	<property name="RepairTools" value="repairKit" />
	<property name="HoldType" value="1" />
	<property name="DegradationBreaksAfter" value="false" />
	<property name="SoundJammed" value="weapon_jam" />
	<property name="Attachments" value="flashlight02" />
	<property name="CrosshairOnAim" value="false" />
	<!-- aimTest -->
	<property name="CrosshairUpAfterShot" value="true" />
	<!-- aimTest -->
	<property class="Parts">
		<property name="Stock" value="[color="#FFFF00"]ulmPistolMag15[/color]" />
		<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.2" />
		<property name="Crosshair_min_distance" value="5" />
		<!-- 5 -->
		<property name="Crosshair_max_distance" value="6" />
		<!-- 6 -->
		<property name="Magazine_size" value="[color="#FFFF00"]15[/color]" />
		<property name="Magazine_items" value="[color="#FFFF00"]ulm9mmBulletST,ulm9mmBulletHP,ulm9mmBulletPlayerST,ulm9mmBulletPlayerHP,ulm9mmBulletPlayerINC[/color]" />
		<property name="Magazine_item_ray_counts" value="[color="#FFFF00"]1,1,1,1,1[/color]" />
		<property name="Magazine_item_ray_spreads" value="[color="#FFFF00"]0,0,0,0,0[/color]" />
		<!-- .85 -->
		<property name="Reload_time" value="2" />
		<property name="Bullet_icon" value="pistol" />
		<property name="Sound_start" value="Pistol_Fire" />
		<property name="Sound_repeat" value="" />
		<property name="Sound_end" value="" />
		<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="6" />
		<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="[color="#FFFF00"]3047[/color]" name="[color="#FFFF00"]ulmPistolBook2[/color]">
	<property name="Extends" value="schematicMaster" />
	[color="#FFFF00"]<property name="DescriptionKey" value="ulmPistolBook2Desc" />
	<property name="CustomIcon" value="pistolBook2" />
	<property name="EconomicValue" value="750" />[/color]
	<property class="Action1">
		<property name="Recipes_to_learn" value="[color="#FFFF00"]ulmPistol15[/color]" />
	</property>
</item>

 

Problem is, that the game always shows me, that it's already known. Even if I add ulmPistol15 to the existing pistol book, it will show, that I don't know the pistol, but the second one will show as known under item stats.

Link to comment
Share on other sites

Oh my, so embarrassing, but everyone makes mistakes time to time, the solution to my problem was very simple: I forgot to add a recipe for the gun. I didn't know I had to add one, because the gun could bee assembled without the need for it, but apparently you need to add a recipe for it in order for it to be locked behind a perk/skill book.

 

<recipe name="[color="#FFFF00"]ulmPistol15[/color]" count="1" craft_area="assembly">
<ingredient name="flashlight02" count="0" />
<ingredient name="[color="#FFFF00"]ulmPistolMag15[/color]" count="1" />
<ingredient name="partsPistol_barrel" count="1" />
<ingredient name="partsPistol_receiver" count="1" />
<ingredient name="partsPistol_grip" count="1" />
</recipe>

Link to comment
Share on other sites

Did you actually create the receipe to learn in Action1?

 

<property name="Recipes_to_learn" value="ulmPistol15" />

 

that should have its own entry in receipes.xml

 

something like this maybe:

 

<recipe name="ulmPistol15" count="1" craft_area="assembly">

<ingredient name="flashlight02" count="0"/>

<ingredient name="partsPistol_parts" count="1"/>

<ingredient name="partsPistol_barrel" count="1"/>

<ingredient name="partsPistol_receiver" count="1"/>

<ingredient name="ulmPistolMag15" count="1"/>

</recipe>

 

Cheers

 

-edit- oooh lol .. me typing took to long :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...