Item codes: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
m (Reverted edits by Revenant (talk) to last revision by Dr Heward)
(Undo revision 1877596 by Vapor (talk) rollback. fuck)
Line 1: Line 1:
{{Codenav}}
{{Codenav}}


It is widely believed (among Firefox UD extension developers) that the [[inventory]] of each player is stored as a single string in a field of the user's line in the users table of Kevan's UD Database.
It is widely believed (among Firefox UD extension developers) that the [[inventory]] of each player is stored as a single string in a field of the user's line in the users table of the UD database.
Only Kevan knows for sure, but so far nothing seems to invalidate this hypothesis.
Only [[Kevan]] knows for sure, but so far nothing seems to invalidate this hypothesis.


Each [[item]] is stored in the '''inventory string''' as a letter, eventually followed by a number if the item needs extra info to be defined.
Each [[item]] is stored in the '''inventory string''' as a letter, eventually followed by a number if the item needs extra info to be defined.
This is so far the case for only three items: the shotgun, the pistol, and the radio.
This is so far the case for only three items: the shotgun, the pistol, and the radio.


The length of the string is used as "weight". If a search is successful, the message "You cannot carry any more" will appear if the string length is equal or greater to 51.
The length of the string is used as “weight”. If a search is successful, the message {{udspan|You cannot carry any more.}} will appear if the string length is equal to or greater than 81 (was 51 pre-[[Encumbrance]]).


== Actions that change the inventory ==
==Actions that change the inventory==
 
===[[Searching]]===
* '''[[Searching]]'''
When a search is successful, the length of the '''inventory string''' is used as “weight” to check if the player can add an item to his inventory.
 
When a search is successful, the length of the '''inventory string''' is used as "weight" to check if the player can add an item to his inventory.


The message "You cannot carry any more" will appear if the string length is equal or greater to 51.
The message "You cannot carry any more" will appear if the string length is equal or greater to 51.
Line 23: Line 21:
Knowing this can be useful when finding unwanted items: The one you just found is at the very end of the Drop List.
Knowing this can be useful when finding unwanted items: The one you just found is at the very end of the Drop List.


* '''Using an Item'''
===Using an item===
 
Some items disappear from your inventory when used. ([[Beer]], [[Wine]], [[Newspaper]], [[Spray Can]] (if unlucky), etc.)
Some items disappear from your inventory when used. ([[Beer]], [[Wine]], [[Newspaper]], [[Spray Can]] (if unlucky), etc.)
Only the code of the item is sent to the server, not the actual position of the item you clicked.
Only the code of the item is sent to the server, not the actual position of the item you clicked.
The item removed from your '''inventory string''' is the first encountered in the string that matches the sent code.
The item removed from your '''inventory string''' is the first encountered in the string that matches the sent code.


* '''Dropping an Item'''
===Dropping an item===
 
Same as using it, only the item's code is sent.
Same as using it, only the item's code is sent.
The first match in your '''inventory string''' will be removed.
The first match in your '''inventory string''' will be removed.
This can sometimes be confusing, when you drop the unwanted item you just found, clicking on the last value of the dropdown box (a second fire axe for example) and see first disappear instead.  The associated number described above is sent too; so when you choose to drop an empty shotgun, you'll drop the first empty shotgun in your inventory.
This can sometimes be confusing, when you drop the unwanted item you just found, clicking on the last value of the drop-down box (a second fire axe for example) and see first disappear instead.  The associated number described above is sent too; so when you choose to drop an empty shotgun, you'll drop the first empty shotgun in your inventory.
 
* '''Reloading'''
 
Reloading doesn't send any extra information to the server.  The game will find the weapon of that type with the lowest ammunition count and reload it.  If there is more than one weapon with the same ammo count, the first will be reloaded.  The ammunition itself will disappear in accordance with the usual rules given above.


* '''Firing'''
===Reloading===
Reloading doesn't send any extra information to the server. The game will find the weapon of that type with the lowest ammunition count and reload it.  If there is more than one weapon with the same ammo count, the first will be reloaded.  The ammunition itself will disappear in accordance with the usual rules given above.


When you fire at something/someone, only the type of weapon is sent to the server, you cannot specify the which of your pistols/shotguns you'd like to use.
===Firing===
When you fire at a target, only the type of weapon is sent to the server; you cannot specify the which of your pistols/shotguns you'd like to use.
The weapon used is the first in the list that is of the correct type and has at least 1 shot left.
The weapon used is the first in the list that is of the correct type and has at least 1 shot left.
This is not optimal in terms of inventory space. The ideal scenario would have been to fire the gun with the least shots left, providing it is not empty.
This is not optimal in terms of inventory space. The ideal scenario would have been to fire the gun with the least shots left, providing it is not empty.
Knowing this, you can plan your reloading more efficiently.  
Knowing this, you can plan your reloading more efficiently.  
For example, assuming your first pistol is empty and second has one shot left, it would be advisable to wait for next shot before reloading both guns.
For example, assuming your first pistol is empty and second has one shot left, it would be advisable to wait for next shot before reloading both guns.
If you reloaded immediatly, you would have to empty the entire pistol before being able to reload the second efficiently.
If you reloaded immediately, you would have to empty the entire pistol before being able to reload the second efficiently.
 
== Items' Internal Letters ==


==List of item codes==
{| class="wikitable"
{| class="wikitable"
! Code!! Item Name !! Category
! Code!! Item Name !! Category
Line 55: Line 48:
| '''a'''|| GPS Unit || [[Useful Items]]
| '''a'''|| GPS Unit || [[Useful Items]]
|-
|-
| '''b'''X where X is the number of shots left.|| Pistol || [[Firearms]]  
| '''b'''''X'' (''X''=shots,<br/> i.e. '''b6''' = fully loaded pistol.) || Pistol || [[Firearms]]
'''b6''' for a fully loaded pistol
|-
|-
| '''c'''|| Flare Gun || Useful Items
| '''c'''|| Flare Gun || Useful Items
Line 90: Line 82:
| '''r'''|| Shotgun Shell || Firearms
| '''r'''|| Shotgun Shell || Firearms
|-
|-
| '''s'''X where X is the number of shots left.|| Shotgun|| Firearms
| '''s'''''X'' (''X''=shots,<br/> i.e. '''s2''' = fully loaded shotgun.) || Shotgun|| Firearms
'''s2''' for a fully loaded shotgun
|-
|-
| '''t'''|| Beer|| Assorted/Misc Items
| '''t'''|| Beer|| Assorted/Misc Items
Line 107: Line 98:
| '''A'''|| Portable Generator || Useful Items  
| '''A'''|| Portable Generator || Useful Items  
|-
|-
| '''B'''XXXX where XXXX defines the frequency,|| Radio || Useful Items
| '''B'''''XXXX'' (XXXX = frequency,<br/> i.e. '''B2710''' = radio @ 27.10 MHz.)|| Radio || Useful Items
'''B2710''' would be for a radio (27.10 MHz)
|-
|-
| '''C'''|| Radio Transmitter || Useful Items  
| '''C'''|| Radio Transmitter || Useful Items  
Line 152: Line 142:
|}
|}


== The missing items ==  
===The missing items===
 
Note that the letter {{{CodeInline|v}}} is missing.
Note that the letter '''v''' is missing.
Some think it's the letter for the Mark One revivification syringe.
Some think it's the letter for the Mark One revivification syringe.
Others think there is a super-secret item, undocumented in the wiki.
Others think there is a super-secret item, undocumented on the wiki.
Should you own an item identified with the v letter, please add the missing info here.
Should you own an item identified by {{{CodeInline|v}}}, please add the missing info here.


Letters '''E''' and '''H''' are now also missing.
Letters {{{CodeInline|e}}} and {{{CodeInline|h}}} are now also missing.
<s>It wasn't documented, however they are believed to be [[Decorative_Items#Christmas_Decorations|Christmas Decorations]] (plastic and dead trees, christmas lights) that may no longer be found in game</s>. Strike: on 10th December 2007 christmas items are back and this time we've caught the codes (all on letter '''G''')


[[Category:Player Resources]]
[[Category:Player Resources]]
[[Category:Technical Information]]
[[Category:Technical Information]]
[[Category:Items]]
[[Category:Items]]

Revision as of 06:57, 1 May 2011

Item Codes - Attack Codes - Target Codes

It is widely believed (among Firefox UD extension developers) that the inventory of each player is stored as a single string in a field of the user's line in the users table of the UD database. Only Kevan knows for sure, but so far nothing seems to invalidate this hypothesis.

Each item is stored in the inventory string as a letter, eventually followed by a number if the item needs extra info to be defined. This is so far the case for only three items: the shotgun, the pistol, and the radio.

The length of the string is used as “weight”. If a search is successful, the message You cannot carry any more. will appear if the string length is equal to or greater than 81 (was 51 pre-Encumbrance).

Actions that change the inventory

Searching

When a search is successful, the length of the inventory string is used as “weight” to check if the player can add an item to his inventory.

The message "You cannot carry any more" will appear if the string length is equal or greater to 51. Since shotguns and pistols require 2 characters, they count as two items. Since radios require 5 characters, they count as five items.

If the string length is 50 or less, the item code is appended at the end of the inventory string, possibly making it longer than 51 characters in the process.

Knowing this can be useful when finding unwanted items: The one you just found is at the very end of the Drop List.

Using an item

Some items disappear from your inventory when used. (Beer, Wine, Newspaper, Spray Can (if unlucky), etc.) Only the code of the item is sent to the server, not the actual position of the item you clicked. The item removed from your inventory string is the first encountered in the string that matches the sent code.

Dropping an item

Same as using it, only the item's code is sent. The first match in your inventory string will be removed. This can sometimes be confusing, when you drop the unwanted item you just found, clicking on the last value of the drop-down box (a second fire axe for example) and see first disappear instead. The associated number described above is sent too; so when you choose to drop an empty shotgun, you'll drop the first empty shotgun in your inventory.

Reloading

Reloading doesn't send any extra information to the server. The game will find the weapon of that type with the lowest ammunition count and reload it. If there is more than one weapon with the same ammo count, the first will be reloaded. The ammunition itself will disappear in accordance with the usual rules given above.

Firing

When you fire at a target, only the type of weapon is sent to the server; you cannot specify the which of your pistols/shotguns you'd like to use. The weapon used is the first in the list that is of the correct type and has at least 1 shot left. This is not optimal in terms of inventory space. The ideal scenario would have been to fire the gun with the least shots left, providing it is not empty. Knowing this, you can plan your reloading more efficiently. For example, assuming your first pistol is empty and second has one shot left, it would be advisable to wait for next shot before reloading both guns. If you reloaded immediately, you would have to empty the entire pistol before being able to reload the second efficiently.

List of item codes

Code Item Name Category
a GPS Unit Useful Items
bX (X=shots,
i.e. b6 = fully loaded pistol.)
Pistol Firearms
c Flare Gun Useful Items
d Crowbar Melee Weapons
e Baseball Bat Melee Weapons
f Flak Jacket Useful Items
g Kitchen Knife Melee Weapons
h First Aid Kit Useful Items
i Fuel Can Useful Items
j Mobile Phone Useful Items
k Pistol Clip Firearms
l Book Assorted/Misc Items
m Crucifix Assorted/Misc Items
n Newspaper Assorted/Misc Items
o Fire Axe Melee Weapons
p Length of Pipe Melee Weapons
q Pair of Wirecutters Assorted/Misc Items
r Shotgun Shell Firearms
sX (X=shots,
i.e. s2 = fully loaded shotgun.)
Shotgun Firearms
t Beer Assorted/Misc Items
u Wine Assorted/Misc Items
w DNA Extractor Useful Items
x Spray Can Assorted/Misc Items
y Poetry Book Assorted/Misc Items
z NecroTech Revivification Syringe Useful Items
A Portable Generator Useful Items
BXXXX (XXXX = frequency,
i.e. B2710 = radio @ 27.10 MHz.)
Radio Useful Items
C Radio Transmitter Useful Items
D1 Pool Cue Melee Weapons
D2 Cricket Bat Melee Weapons
D3 Fencing Foil Melee Weapons
D4 Ski Pole Melee Weapons
D5 Tennis Racket Melee Weapons
D6 Hockey Stick Melee Weapons
D7 Golf Club Melee Weapons
F Binoculars Useful Items
G1 plastic Christmas tree Decorative Items
G2 red Christmas lights Decorative Items
G3 green Christmas lights Decorative Items
G4 white Christmas lights Decorative Items
G5 dead fir tree Decorative Items
G6 Stale Candy Assorted/Misc Items
I Museum Piece (in general) Decorative Items
IXX, XX is a number Certain Museum Piece, (for example, I24 is a European Painting) Decorative Items
I81 pumpkin Decorative Items
J1 toolbox Useful Items
J2 video camera Monroeville only item

The missing items

Note that the letter v is missing. Some think it's the letter for the Mark One revivification syringe. Others think there is a super-secret item, undocumented on the wiki. Should you own an item identified by v, please add the missing info here.

Letters e and h are now also missing.