Trap Box: Difference between revisions

From PZwiki
m (Automated template formatting)
(update to 41.78.16: new header, infobox, code)
Line 1: Line 1:
{{Languages}}
{{Languages}}
{{Header|Project Zomboid|Items|type=Trap|version=Version 40|incver=43}}
{{Header/sandbox2|Project Zomboid|Items|Trapping}}
{{Infobox trap
{{Page version|41.78.16}}
|display_name=Trap Box
{{Infobox tile
|name_colour=Trap
|name=Trap Box
|name_text_colour=Trap
|image=BoxTrapAnim.gif
|image=BoxTrapAnim.gif
|image_width=
|image_width=
|alternate_image=TrapBox.png
|icon=TrapBox.png
|alternate_name=Trap Box
|icon_name=Trap Box
|alternate_link=
<!--General-->
|category=Item
|category=Trapping
|weight=1.0
|weight=1.0
|size=1
|function=Catch [[animals]]
<!--Properties-->
|health=50
|strength=15
|strength=15
|animals=[[File:Rabbit.png|link=Rabbit]] [[File:Squirrel.png|link=Squirrel]]
|animals=[[File:Rabbit.png|link=Rabbit]] [[File:Squirrel.png|link=Squirrel]]
|placement=
<!--Build-->
|ingredients=4 × {{T|Plank}}<br>7 × {{T|Nails}}
|crafting=true
|class_name=Base.TrapBox
|build_skill=[[The Hunter Magazine|The Hunter Magazine Vol. 3]]
|build_skill2=[[Carpentry]]
|build_skill3=[[Trapping]]
|build_level2=1
|build_level3=2
|build_tool_tag=Saw
|ingredients=4 × [[Plank]]<br>7 × [[Nails]]
<!--Disassemble-->
|destroy=true
|products=[[Unusable Wood]]<br>2 × [[Nails]]
<!--Technical-->
|item_id=Base.TrapBox
|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.


Line 42: Line 57:


==Code==
==Code==
{{CodeBox
{{CodeBox|
| {{CodeSnip
===Item===
{{CodeSnip
   | lang = java
   | lang = java
   | line = false
   | line = false
Line 49: Line 65:
   | retrieved = true
   | retrieved = true
   | version = 41
   | version = 41
   | incver = 50
   | incver = 78.16
   | code =
   | code =
item TrapBox
    item TrapBox
{
    {
    Weight         = 1,
        DisplayCategory = Trapping,
    Type           = Normal,
        Weight = 1,
    DisplayName     = Trap Box,
        Type = Normal,
    Icon           = TrapBox,
        DisplayName = Trap Box,
    Trap           = true,
        Icon = TrapBox,
}
        Trap   =   true,
    }
  }}
===Tile===
{{CodeSnip
  | lang = lua
  | line = false
  | path = ProjectZomboid\media\lua\server\Traps
  | source = TrapDefinition.lua
  | retrieved = true
  | version = 41
  | incver = 78.16
  | code =
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);
   }}
   }}
}}
}}
Line 69: Line 106:


{{Navbox equipment}}
{{Navbox equipment}}
[[Category:Trapping]]

Revision as of 11:42, 19 February 2024

Template:Header/sandbox2

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
4 × Plank
7 × Nails
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 XP gained Skill(s) Recipe Ingredient 1 Ingredient 2 Ingredient 3
TrapBox.png
Trap Box
1 Carpentry Carpentry 1
Trapping 2
The Hunter Magazine Vol. 3
One of:
Hacksaw.png Saw
Handsaw.png Garden Saw

(keep)
Plank.png
Plank x4
(consumed)
Nails.png
Nails x7
(consumed)

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