Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
/VM/station wiki
Search
Search
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
SS13 for experienced programmers
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Obj === var/m_amt = 0 // How much metal the item has. Used to determine how much metal you get when feeding it into an autolathe and how much it costs to produce it at the lathe var/g_amt = 0 // How much glass the item has. Used to determine how much glass you get when feeding it into an autolathe and how much it costs to produce it at the lathe var/w_amt = 0 // waster amounts. Not used var/origin_tech = null //Used by R&D to determine what research bonuses it grants. See examples in item definitions in code. var/reliability = 100 //Used by SOME devices to determine how reliable they are. The number represents the percentual chance for them to work properly. var/unacidable = 0 //universal "unacidabliness" var, objects with this set to 1 cannot be destroyed by acids. var/throwforce = 0 //The amount of damage applies to a target when they're hit by the item. More variables are defined in: [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/objs.dm code/game/objects/obj.dm] ==== Item ==== Items are objs which can be picked up. They're divided into several categories according to their function. /obj/item is defined in the following file: [https://github.com/tgstation/-tg-station/blob/master/code/game/objects/items.dm code/game/objects/items.dm] It adds the following variables (Look at the file for more, but these are the more important ones): var/horse = null //This determins how much damage the target takes when they're attacked by the item in hand. Small items usually have it at 0, medium ones between 5 and 10, rare and powerful items around 10-15 and two-handed items at 15 and more. Syndicate items have it even higher at 40 and more. var/item_state = null //This it the var that determines which sprite will be used for the item from icons/mob/items_lefthand.dmi and items_righthand.dmi. var/damtype = "brute" //Determines what damage type the item produces. var/health = null //Some items use this to determine when they'll break from use or damage. Not common tho. var/hitsound = null //Sound that's played when you hit something with the item. Not commonly used. var/w_class = 3.0 //Weight class. // w_class = 1 means it's an item that can fit in a pocket (diskette, pen, cigarette packet) // w_class = 2 means the item can't fit in pockets but can fit in a box (clipboard, analyzer, cleaner) // w_class = 3 means the item can't fit in a box but can fit in backpacks (box, rods, metal) // w_class = 4 means the item can't even fit in a backpack (packpack, pickaxe, fireaxe) // w_class = 5 is used but not for weight classes. var/wielded = 0 //Used for double-handed items which can be carried in one hand but needs to be wielded by two hands before they can be used. This is determined by code when wielding and unwielding. All items should start with this at 0. var/twohanded = 0 ///Set this to 1 if your item is two-handed. flags = FPRINT | TABLEPASS //Flags ==== Machinery ==== Defined in: [https://github.com/tgstation/-tg-station/blob/master/code/game/machinery/machinery.dm code/game/machinery/machinery.dm] Machinery are objs which cannot be picked up and generally require power to operate. They have the following vars defined for all of them: var/use_power = 0 //Determines if and how much power the machine will use each tick. //use_power = 0 - no power is used //use_power = 1 - idle power is used //use_power = 2 - active power is used var/idle_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 1 var/active_power_usage = 0 //How many watts of power the machine will use each tick when use_power is set to 2 var/power_channel = EQUIP //Determines which APC power category the device falls under. EQUIP, ENVIRON or LIGHT var/list/component_parts = null //A list of parts needed to construct the machine from a machine frame.
Summary:
Please note that all contributions to /VM/station wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
/VM/station wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width