Results 1 to 4 of 4

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

  1. #1
    Nomad Subquake's Avatar
    Join Date
    Oct 2014
    Location
    Latvia
    Posts
    393
    Rep Power
    1

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

    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.

    Code:
    	<item id="3001" name="ulmPistol15">
    		<property name="CustomIcon" value="pistol15" />
    		<property name="EconomicValue" value="1700" />
    		<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="ulmPistolMag15" />
    			<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="15" />
    			<property name="Magazine_items" value="ulm9mmBulletST,ulm9mmBulletHP,ulm9mmBulletPlayerST,ulm9mmBulletPlayerHP,ulm9mmBulletPlayerINC" />
    			<property name="Magazine_item_ray_counts" value="1,1,1,1,1" />
    			<property name="Magazine_item_ray_spreads" value="0,0,0,0,0" />
    			<!-- .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="3047" name="ulmPistolBook2">
    		<property name="Extends" value="schematicMaster" />
    		<property name="DescriptionKey" value="ulmPistolBook2Desc" />
    		<property name="CustomIcon" value="pistolBook2" />
    		<property name="EconomicValue" value="750" />
    		<property class="Action1">
    			<property name="Recipes_to_learn" value="ulmPistol15" />
    		</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.
    Last edited by Subquake; 01-13-2018 at 08:37 AM.

  2. #2
    Nomad Subquake's Avatar
    Join Date
    Oct 2014
    Location
    Latvia
    Posts
    393
    Rep Power
    1
    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.

    Code:
    <recipe name="ulmPistol15" count="1" craft_area="assembly">
    	<ingredient name="flashlight02" count="0" />
    	<ingredient name="ulmPistolMag15" count="1" />
    	<ingredient name="partsPistol_barrel" count="1" />
    	<ingredient name="partsPistol_receiver" count="1" />
    	<ingredient name="partsPistol_grip" count="1" />
    </recipe>

  3. #3
    Reconstructionist
    Join Date
    Sep 2016
    Location
    NL - Tilburg
    Posts
    665
    Rep Power
    1
    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
    Last edited by Prisma501; 01-13-2018 at 09:04 AM.

  4. #4
    Nomad Subquake's Avatar
    Join Date
    Oct 2014
    Location
    Latvia
    Posts
    393
    Rep Power
    1
    The problem was that Assemble functionality worked like a charm without a recipe, that's why I thought I don't need one, but to lock it under a book or perk that's the only way.

Posting Permissions

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