Jump to content

A little help from the experts.


dr.toast

Recommended Posts

I've been trying to get my feet wet in creating custom recipes and QoL changes.

 

Currently two projects are eluding me.

 

 

PROJECT ONE

 

Attempting to add a functioning flashlight to the compound bow.

 

<item id="147" name="compoundBow">
<property name="Meshfile" value="Items/Weapons/Ranged/Bows/CompoundBow/CompoundBowPrefab"/>
<property name="Material" value="Mplastics"/>
<property name="RepairTools" value="repairKit"/>
<property name="HoldType" value="53"/>
<property name="DegradationBreaksAfter" value="false"/>
<property name="Attachments" value="flashlight02"/>
<property name="SoundJammed" value="ItemNeedsRepair"/>
<property name="SoundDestroy" value="wooddestroy1"/>
<property name="CrosshairOnAim" value="false"/> <!-- aimTest -->
<property name="CrosshairUpAfterShot" value="false"/>
<property class="Parts">
	<property name="Stock" value="partsCompoundBow_body"/>
	<property name="Receiver" value="partsCompoundBow_grip"/>
	<property name="Pump" value="partsCompoundBow_parts"/>
	<property name="Barrel" value="partsCompoundBow_string"/>
</property>
<property class="Action0">
	<property name="Class" value="Catapult"/>
	<!-- Catapult might not be the best name for it but it can also be used for a slingshot -->
	<property name="Hitmask_override" value="Arrow"/>
	<property name="Delay" value="1"/>
	<property name="Crosshair_min_distance" value="30"/> <!-- 30 -->
	<property name="Crosshair_max_distance" value="30"/> <!-- 30 -->
	<property name="Magazine_size" value="1"/>
	<property name="Magazine_items" value="arrow,ironArrow,steelArrow,flamingArrow"/>
	<property name="Rays_spread" value="0.011"/>
	<property name="Reload_time" value="0.9"/>
	<property name="Bullet_icon" value="uzi"/>
	<property name="Sound_start" value="bow_fire"/>
	<property name="Sound_repeat" value=""/>
	<property name="Sound_end" value=""/>
	<property name="Sound_empty" value="weapon_empty"/>
	<property name="Sound_reload" value="bow_reload"/>
	<property name="Sound_draw" value="bow_draw"/>
	<property name="Sound_cancel" value="bow_fire_cancel"/>
	<property name="Particles_muzzle_fire" value="nozzleflashuzi"/>
	<property name="Particles_muzzle_smoke" value="nozzlesmokeuzi"/>
	<property name="Max_strain_time" value="0.43"/>
	<!-- ammunition can override Exp values
	<property name="ActionExp" value="3"/>
	<property name="ActionExpBonusMultiplier" value="3"/>-->
</property>
<property class="Action1">
	<property name="Class" value="Zoom"/>
	<property name="Zoom_max_out" value="38"/>
	<property name="Zoom_max_in" value="38"/>
</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="Archery"/>
<property name="CraftingSkillGroup" value="craftSkillWeapons"/>
<property name="RepairExpMultiplier" value="5.5"/>
<property name="PickupJournalEntry" value="alternateAmmoTip"/>
</item>

 

This has resulted in being able to attach the light to the bow, I'm still too basic to worry about finding a place for the model to graphically appear. BUT it is non activateable, despite having the ActivateObject property. <---see? Basic :D

 

 

 

 

 

PROJECT TWO - Solved (Many thanks Guppy)

 

 

 

 

 

Attempting to add a flashlight to the cowboy hat black

 

 

item

 

<item id="1509" name="blackCowboyHatLamp">
<property name="Extends" value="cowboyHat"/>
<property name="CustomIcon" value="cowboyHat"/>
<property name="LightSource" value="Entities/Lighting/miningHelmetLightSource"/>
<property name="ActivateObject" value="miningHelmetLightSource(Clone)"/>
<property name="CustomIconTint" value="87,87,87"/>
<property name="HoldType" value="7"/>
<property name="Meshfile" value="Items/Clothing/Head/PrefabCowboyhat"/>
<property class="UMA">
	<property name="Overlay0Tint" value="87,87,87"/>
</property>
<property name="LightValue" value="0.7"/>
</item>

 

recipe

<recipe name="cowboyHatLamp" count="1" craft_area="workbench">
<ingredient name="blackCowboyHat" count="1"/>
<ingredient name="flashlight02" count="1"/>
<ingredient name="electricParts" count="8"/>
<ingredient name="ductTape" count="5"/>
</recipe>

 

 

This results in all the recipes in the crafting list disappearing....

 

I did search for similar issues and found someone saying that all recipes after one of their entries were invisible, no matter where in the list they placed it. However my item is at the bottom of the list but one and all the recipes except those produced in the forge have gone.

 

 

Any pointers?

Link to comment
Share on other sites

I did wonder about renaming it after posting, so I tried the blackCowboyHatLamp. No joy.

 

Even tried removing the 4 lines I added to return to it's last working condition and its a no show....

 

Not really sure what's happened.

 

 

For Guppy - pastebin incoming soon

Link to comment
Share on other sites

Oh, and here is a working hat with miners helmet.

 

<item id="3499" name="wizardsHat"> <!--StompyNZ-->
	<property name="CustomIcon" value="leatherHood" />
	<property name="CustomIconTint" value="FFFF00" />
	<property name="Waterproof" value="0.60" />
	<property name="Class" value="ItemClassToggle" />
	<property name="Meshfile" value="Items/Misc/sackPrefab" />
	<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" />
	<property name="Material" value="metal" />
	<property name="RepairTools" value="forgedIron" />
	<property name="HoldType" value="45" />
	<property name="Weight" value="60" />
	<property name="EconomicValue" value="1200" />
	<property name="LightSource" value="Entities/Lighting/miningHelmetLightSource" />
	<property name="EquipSlot" value="Head" />
	<property name="Degradation" value="250" param1="true" />
	<property name="DegradationBreaksAfter" value="false" />
	<property name="Encumbrance" value="0.01" />
	<property class="Attributes">
		<property name="ConcussiveProtection" value="0.5,0.75" />
		<property name="PunctureProtection" value="0.5,0.75" />
		<property name="FireProtection" value="0.5,0.75" />
		<property name="RadiationProtection" value="0.5,0.75" />
		<property name="DegradationMax" value="1200,3000" />
	</property>
	<property name="ActivateObject" value="miningHelmetLightSource(Clone)" />
	<property class="UMA">
		<property name="Mesh" value="armor_leather_hood" />
		<property name="Overlay0" value="armor_leather_hood" />
		<property name="Layer" value="2" />
		<property name="UISlot" value="Headgear" />
		<property name="ShowAltHair" value="true" />
	</property>
	<property name="Group" value="Clothing" />
	<property name="ActionSkillGroup" value="Heavy Armor" />
	<property name="CraftingSkillGroup" value="Science" />
	<property name="RepairExpMultiplier" value="10.8" />
</item>

Link to comment
Share on other sites

Alas, more fool me, I changed a single letter in an item name in the item file, and didn't alter it in the recipe file where it was called.... (log file showed the way) so I have my recipe list back....

 

However my recipe for the cowboy hat doesn't show. :c so it is still flawed ultimately.

Link to comment
Share on other sites

But does brickWedgeTipStairs show?

 

Andd did you remember to verify that your new edit has the recipe name as the exact, case sensitive item name or did you forget to fix the black part on this copy? I typically copy/paste between the two files to ensure this.

Link to comment
Share on other sites

I was laboring under a misunderstanding of the name property :)

 

The names now match and the item appears correctly.

However. From studying the other item names I believed that the capitalized letters... "animalHideGloves" were treated as word spacings so it appears as animal hide gloves.

 

This doesnt seem to work as the item and recipe both appear as blackcowboyhatlamp?

 

 

After checking and rechecking the hat codes...

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

Was all I was missing. I didn't even see it originally....

 

 

 

And no thoughts for the activation on the bow? I c/p'd the flashlight code from the shotgun to try and make it work but no dice....

...even tried the class value to no effect.

Link to comment
Share on other sites

Even if I don't require the model for it to function? As a beginner I would settle for the light coming out of my hands :L

 

I ask as I saw other projects for adding flashlights to crossbows with no mesh editing mentioned?

Link to comment
Share on other sites

Even if I don't require the model for it to function? As a beginner I would settle for the light coming out of my hands :L

 

I ask as I saw other projects for adding flashlights to crossbows with no mesh editing mentioned?

The light source is a part of the meshfile , I can help with it if you want , but the animation will be messed up .

Link to comment
Share on other sites

I appreciate the offer...

 

I feel a good place to start would be a crash course... what do I need for editing meshfiles and where do I find them?

 

Then I'll go and explore and see if I cant work it out, then come back if it beats me again? :)

Link to comment
Share on other sites

The flashlight doesn't work on the bow with the shotgun code, because the shotgun and other guns use the attachment system to place a flashlight on the model.

 

Which you can't do on the bow, because the bow isn't assembled. Trying to open the assemble window will likely cause a NullReferenceError because I'm pretty sure it doesn't have a preview mesh.

Link to comment
Share on other sites

Yep. Needs the code from the shotgun + needs to be assembled so the flashlight "object" can be attached to it in order to work + needs to be setup in unity with an Attachment child object AND a lightSource object under that.

Link to comment
Share on other sites

Weird didn't see any page two when I replied. Now my answer doesn't make sense.

 

Khaine, forgive the misunderstanding but the post started with the compound bow, not just the bow, so it is fine with the code allowing it to be attached, that works fine, just no light source... which the rest of your post was more appropriate for :)

 

So meshfiles... point me in a direction and lets have a look at what needs doing? :D

Link to comment
Share on other sites

Weird didn't see any page two when I replied. Now my answer doesn't make sense.

 

Khaine, forgive the misunderstanding but the post started with the compound bow, not just the bow, so it is fine with the code allowing it to be attached, that works fine, just no light source... which the rest of your post was more appropriate for :)

 

So meshfiles... point me in a direction and lets have a look at what needs doing? :D

 

You can get them from the resources.assets file for the game using UABE.

 

Hopefully Random Person can sort you out. :) I tried doing it and it WORKED, but the bow didn't animate (string didn't pull back) so I know I'm missing something important.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...