Trap Box: Difference between revisions

From PZwiki
m (remove use of {{T}})
m (Automated Formatting)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages}}
{{Header|Project Zomboid|Items|Trapping}}
{{Header/sandbox2|Project Zomboid|Items|Trapping}}
{{Page version|41.78.16}}
{{Page version|41.78.16}}
{{Infobox tile
{{Infobox tile
|name=Trap Box
|name=Trap Box
|image=BoxTrapAnim.gif
|image=BoxTrapAnim.gif
|image_width=
|icon=TrapBox.png
|icon=TrapBox.png
|icon_name=Trap Box
|icon_name=Trap Box
Line 32: Line 30:
|item_id=Base.TrapBox
|item_id=Base.TrapBox
|tile_id=constructedobjects_01_4
|tile_id=constructedobjects_01_4
}}A '''trap box''' is a medium sized trap used by apprentice trappers.
}}
A '''trap box''' is a medium sized trap used by apprentice trappers.


==Usage==
==Usage==
Line 52: Line 51:
===Trapping===
===Trapping===
{{Main|Trapping}}
{{Main|Trapping}}
{{Crafting header|ing=3}}
{{Crafting/sandbox2
{{Crafting hunting|004|ing=3}}
|trap_box
|}
}}


==Code==
==Code==
{{CodeBox|  
{{CodeBox|
 
===Item===
===Item===
{{CodeSnip
{{CodeSnip
   | lang = java
   | lang = java
   | line = false
   | line = true
  | start = 2323
   | source = newitems.txt
   | source = newitems.txt
   | retrieved = true
   | retrieved = true
   | version = 41.78.16
   | version = 41.78.16
   | code =
   | code =
    item TrapBox
item TrapBox
     {
     {
         DisplayCategory = Trapping,
         DisplayCategory = Trapping,
Line 75: Line 76:
         Trap    =  true,
         Trap    =  true,
     }
     }
  }}
}}
 
===Tile===
===Tile===
{{CodeSnip
{{CodeSnip
Line 103: Line 105:
*[[Stick Trap]]
*[[Stick Trap]]


{{Navbox equipment}}
{{Navbox items|survival}}

Latest revision as of 12:58, 14 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]
Trap Box
BoxTrapAnim.gif
[[File:{{{icon2}}}|Trap Box|]]
[[File:{{{icon3}}}|Trap Box|]]
[[File:{{{icon4}}}|Trap Box|]]
[[File:{{{icon5}}}|Trap Box|]]
General
Category
Trapping
EncumbranceMoodle Icon HeavyLoad.png
1.0
Size
1 tile
Function
Catch animals
Properties
Health
50
Strength
15
Animals
Rabbit.png Squirrel.png
Crafting
Tool(s)
Ingredients
Plank × 4
Nails × 7
Destroy
Products
Technical
Item ID(s)
Base.TrapBox
Tile ID(s)
constructedobjects_01_4

A trap box is a medium sized trap used by apprentice trappers.

Usage

A trap box is one of several traps used in trapping to catch a variety of wildlife.

Trapping

Main article: Trapping

Trap boxes can be used to catch rabbits and squirrels.

Catch chance:
Rabbit 30%
Squirrel 25%

Crafting

To craft a trap box, the player must have picked either the "Park Ranger" occupation or "Hunter" trait during character creation. Otherwise it will be learnt after reaching trapping level 2 and carpentry level 1, or reading The Hunter Magazine Vol.3

Trapping

Main article: Trapping
Product Ingredients Tools Requirements Workstation XP
TrapBox.png
Trap Box
Plank.png Plank ×4
Nails.png Nails ×7

Handsaw.png
Saw (tag)
Carpentry 1
(and)
Trapping 2
none 1 Carpentry

Code

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

Item

Source: ProjectZomboid\media\scripts\newitems.txt

Retrieved: Build 41.78.16
item TrapBox
    {
        DisplayCategory = Trapping,
        Weight	=	1,
        Type	=	Normal,
        DisplayName	=	Trap Box,
        Icon	=	TrapBox,
        Trap    =   true,
    }

Tile

Source: ProjectZomboid\media\lua\server\Traps\TrapDefinition.lua

Retrieved: Build 41.78.16
local trapBox = {};
trapBox.type = "Base.TrapBox";
trapBox.sprite = "constructedobjects_01_4";
trapBox.northSprite = "constructedobjects_01_7";
trapBox.closedSprite = "constructedobjects_01_5";
trapBox.northClosedSprite = "constructedobjects_01_6";
trapBox.trapStrength = 15;
trapBox.destroyItem = { "Base.UnusableWood", "Base.Nails", "Base.Nails" };
table.insert(Traps, trapBox);

See also