Thread: Difference between revisions

From PZwiki
No edit summary
(Update distribution file)
 
(47 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{languages|Thread}}
{{Header|Project Zomboid|Items|Materials|Fabric}}
{{Page version|41.78.16}}
{{Infobox item
|name=Thread
|model=Thread_Model.png
|icon=Thread.png
|icon_name=Thread
|category=Material
|weight=0.1
|function=Craft [[mattress]]<br>Stitch [[Health#Types of injuries|deep wounds]]
|max_units=0.1
|item_id=Base.Thread
}}
'''Thread''' is an item used in [[tailoring]], [[carpentry]] and [[First Aid|first aid]]. It has a maximum capacity of 10 units.
 
==Usage==
===Tailoring===
Thread is needed to repair and fortify clothes with the [[tailoring]] skill. Each application of a padding or patch uses 1 unit of thread.
 
===Crafting===
Thread is required in crafting a [[mattress]].
 
===Medical===
Thread can be used with a [[needle]] to stitch [[Health#Types of Injuries|deep wounds]], however causing more [[In Pain|pain]] than using a [[Suture Needle|suture needle]].


{{Items
==Crafting==
|image = Thread.png
{{Crafting/sandbox2
|weight = 0.1
|mattress
}}
}}


Thread can be used to craft a [[mattress]].
==Distribution==
The loot distributions can be found in the table(s) below.


== Code ==
<!--BOT FLAG|Thread|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>Thread distribution
        <span class="mw-customtoggle-togglebox-Thread" title="{{int:show}} / {{int:hide}}" style="float: right; padding-right: 30px; padding-top: 4px; font-size: 0.7em; font-weight: normal;">{{int:show}} / {{int:hide}}</span></div>
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-Thread">
    Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the [[lucky]] and [[unlucky]] traits.    <div class="toggle-content">
<div class="pz-container">
<div id="containers" style="flex-basis:30%">
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
    |+ {{ll|Containers}}
    ! Building/Room
    ! Container
    ! Effective chance
    |-
    | SewingKit
    | {{ll|SewingKit}}
    | 6.41%
    |-
    | SewingKit
    | {{ll|SewingKit}}
    | 120.41%
    |-
    | bedroom
    | {{ll|crate}}
    | 1.01%
    |-
    | bedroom
    | {{ll|crate}}
    | 41.14%
    |-
    | closet
    | {{ll|crate}}
    | 1.01%
    |-
    | closet
    | {{ll|crate}}
    | 41.14%
    |-
    | departmentstorage
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | garagestorage
    | {{ll|crate}}
    | 1.01%
    |-
    | garagestorage
    | {{ll|crate}}
    | 41.14%
    |-
    | generalstore
    | {{ll|shelves}}
    | 23.28%
    |-
    | generalstorestorage
    | {{ll|shelves}}
    | 23.28%
    |-
    | gigamart
    | {{ll|shelves}}
    | 23.28%
    |-
    | housewarestore
    | {{ll|shelves}}
    | 23.28%
    |-
    | kitchen
    | {{ll|counter}}
    | 12.96%
    |-
    | kitchen
    | {{ll|crate}}
    | 41.14%
    |-
    | kitchenwares
    | {{ll|shelves}}
    | 23.28%
    |-
    | livingroom
    | {{ll|counter}}
    | 12.96%
    |-
    | morgue
    | {{ll|counter}}
    | 23.28%
    |-
    | morgue
    | {{ll|counter}}
    | 41.14%
    |-
    | sewingstorage
    | {{ll|crate}}
    | 23.28%
    |-
    | sewingstorage
    | {{ll|crate}}
    | 41.14%
    |-
    | sewingstorage
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | sewingstorage
    | {{ll|metal_shelves}}
    | 41.14%
    |-
    | sewingstore
    | {{ll|clothingrack}}
    | 23.28%
    |-
    | sewingstore
    | {{ll|clothingrack}}
    | 41.14%
    |-
    | sewingstore
    | {{ll|counter}}
    | 23.28%
    |-
    | sewingstore
    | {{ll|counter}}
    | 41.14%
    |-
    | sewingstore
    | {{ll|shelves}}
    | 23.28%
    |-
    | sewingstore
    | {{ll|shelves}}
    | 41.14%
    |-
    | storageunit
    | {{ll|crate}}
    | 1.01%
    |-
    | storageunit
    | {{ll|crate}}
    | 41.14%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 1.01%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 41.14%
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Thread" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Thread|41.78.16-->


<pre>
==Code==
item Thread
{{CodeBox|
 
===Item===
{{CodeSnip
  | lang = java
  | line = true
  | start = 43
  | source = items.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Thread
{
{
DisplayName = Thread,
    DisplayCategory = Material,
Icon = Thread,
Weight = 0.1,
Type = Normal,
Type             =         Drainable,
Weight = 0.1
UseWhileEquipped = FALSE,
        UseDelta         =         0.1,
DisplayName = Thread,
Icon = Thread,
ConsolidateOption = ContextMenu_Merge,
SurvivalGear = TRUE,
WorldStaticModel = Thread,
}
}
</pre>
}}
 
===Obtaining from ripping clothing===
{{CodeSnip
  | lang = lua
  | line = false
  | start =
  | source = recipecode.txt
  | retrieved = true
  | version = 41.78.16
  | code =
-- add thread sometimes, depending on tailoring level
if ZombRand(7) < player:getPerkLevel(Perks.Tailoring) + 1 then
    local max = 2;
    if nbrOfCoveredParts then
        max = nbrOfCoveredParts;
        if max > 6 then
            max = 6;
        end
    end
    max = ZombRand(2, max);
    local thread = InventoryItemFactory.CreateItem("Base.Thread");
    for i=1,10-max do
        thread:Use();
    end
    player:getInventory():AddItem(thread);
end
  }}
}}
 
==See also==
*[[First Aid]]
 
{{Navbox items|first_aid_materials}}
 


[[Category:Item]]
[[Category:Medical items]]
[[Category:Materials]]
[[Category:First aid materials]]
[[Category:Tailoring materials]]

Latest revision as of 14:08, 30 April 2024

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Thread
Thread Model.png
General
Category
Material
Encumbrance
Moodle Icon HeavyLoad.png
0.1
Function
Craft mattress
Stitch deep wounds
Properties
Capacity
10 units
Technical
Item ID
Base.Thread

Thread is an item used in tailoring, carpentry and first aid. It has a maximum capacity of 10 units.

Usage

Tailoring

Thread is needed to repair and fortify clothes with the tailoring skill. Each application of a padding or patch uses 1 unit of thread.

Crafting

Thread is required in crafting a mattress.

Medical

Thread can be used with a needle to stitch deep wounds, however causing more pain than using a suture needle.

Crafting

Product Ingredients Tools Requirements Workstation XP
Mattress.png
Mattress
Thread.png Thread ×2 unit(s)
Sheet.png Sheet ×5
Pillow.png Pillow ×5

Needle.png
Needle (tag)
none none none

Distribution

The loot distributions can be found in the table(s) below.

Thread distribution Show / Hide
Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the lucky and unlucky traits.
Containers
Building/Room Container Effective chance
SewingKit SewingKit 6.41%
SewingKit SewingKit 120.41%
bedroom crate 1.01%
bedroom crate 41.14%
closet crate 1.01%
closet crate 41.14%
departmentstorage metal_shelves 23.28%
garagestorage crate 1.01%
garagestorage crate 41.14%
generalstore shelves 23.28%
generalstorestorage shelves 23.28%
gigamart shelves 23.28%
housewarestore shelves 23.28%
kitchen counter 12.96%
kitchen crate 41.14%
kitchenwares shelves 23.28%
livingroom counter 12.96%
morgue counter 23.28%
morgue counter 41.14%
sewingstorage crate 23.28%
sewingstorage crate 41.14%
sewingstorage metal_shelves 23.28%
sewingstorage metal_shelves 41.14%
sewingstore clothingrack 23.28%
sewingstore clothingrack 41.14%
sewingstore counter 23.28%
sewingstore counter 41.14%
sewingstore shelves 23.28%
sewingstore shelves 41.14%
storageunit crate 1.01%
storageunit crate 41.14%
storageunit metal_shelves 1.01%
storageunit metal_shelves 41.14%

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Item

Source: ProjectZomboid\media\scripts\items.txt

Retrieved: Build 41.78.16
item Thread
	{
	    DisplayCategory = Material,
		Weight	=	0.1,
		Type	            =	        Drainable,
		UseWhileEquipped	=	FALSE,
        UseDelta	        =	        0.1,
		DisplayName	=	Thread,
		Icon	=	Thread,
		ConsolidateOption = ContextMenu_Merge,
		SurvivalGear = TRUE,
		WorldStaticModel = Thread,
	}

Obtaining from ripping clothing

Source: ProjectZomboid\media\scripts\recipecode.txt

Retrieved: Build 41.78.16
-- add thread sometimes, depending on tailoring level
if ZombRand(7) < player:getPerkLevel(Perks.Tailoring) + 1 then
    local max = 2;
    if nbrOfCoveredParts then
        max = nbrOfCoveredParts;
        if max > 6 then
            max = 6;
        end
    end
    max = ZombRand(2, max);
    local thread = InventoryItemFactory.CreateItem("Base.Thread");
    for i=1,10-max do
        thread:Use();
    end
    player:getInventory():AddItem(thread);
end

See also