Questions on upgrade itemtypes and costumes

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Questions on upgrade itemtypes and costumes

#1 Post by Kaspy »

Was studying the parties regarding the items and I am with the following questions before submitting to the official SVN...

itemtype.txt
1 Usable Status
2 Usable Special
3 Event
-4 Weapon
-5 Armor

+4 Armor
+5 Weapon

6 Card
7 Quest
8 Pet Armor
-9 Weapon
+9 Weapon Two Handed
10 Arrow
11 Helmet
12 Unknown_Type_12
After some testing, I realized that the 9° is referring to "Weapon Two Handed". The problem is that word to use, since it would be good only occupy 13 characters or less (otherwise, in some cases as in vender_items_list, would get half the word). What would be a good word to replace "Two Handed Weapon" and has less than 13 characters?

Another thing, it seems that 4° and 5° are swapped since 4° is Weapon and 5° is Armor.

After all, the 12° exists or not? I could not find even one item to represent. The Gravity created something that does not exist?

src/actor/item.pm
-# type: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
-sub usable { (1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)[$_[0]{type}] }
-sub equippable { (0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1)[$_[0]{type}] }
-sub mergeable { (0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)[$_[0]{type}] }

+# type: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+sub usable { (1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0)[$_[0]{type}] }
+sub equippable { (0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1)[$_[0]{type}] }
+sub mergeable { (0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)[$_[0]{type}] }
The list has not counted on the 20°, Costume, so I decided to implement. Changed only that, oky?

Slots
Here is an implementation in visual items. I wonder if naming this good and if I did everything right.
Other equipment, equip and unequip work perfectly. I'm just not sure about the naming.

I tested and appears to be smoothly
Item.pm
robe armor shoes
leftAccessory rightAccessory
arrow
+ costumeTopHead costumeMidHead costumeLowHead
);
Globas.pm
@@ -69,10 +69,9 @@
'128' => 'leftAccessory',
'256' => 'topHead',
'512' => 'midHead',
- '1024' => 'carry', #used in messyKore don't know if it actually exists
- # 0x400 => LOCATION_COSTUME_HEAD1,
- # 0x800 => LOCATION_COSTUME_HEAD2,
- # 0x1000 => LOCATION_COSTUME_HEAD3,

+ '1024' => 'costumeTopHead',
+ '2048' => 'costumeMidHead',
+ '4096' => 'costumeLowHead',

# 0x2000 => LOCATION_COSTUME_FLOOR,
'32768' => 'arrow' #just use an made up ID since arrow doesn't have any
# 0xffff8000 => LOCATION_ARROW,
@@ -89,7 +88,9 @@
'leftAccessory' => 128,
'topHead' => 256,
'midHead' => 512,
- 'carry' => 1024,
+ 'costumeTopHead' => 1024,
+ 'costumeMidHead' => 2048,
+ 'costumeLowHead' => 4096,

'arrow' => '' #arrow seems not to have any ID
);
our %elements_lut;

I await response, because I need to make sure that before sending the commit. I never studied as much work items, so not sure if this alright.
Image

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Questions on upgrade itemtypes and costumes

#2 Post by EternalHarvest »

KeplerBR wrote:After some testing, I realized that the 9° is referring to "Weapon Two Handed". The problem is that word to use, since it would be good only occupy 13 characters or less (otherwise, in some cases as in vender_items_list, would get half the word). What would be a good word to replace "Two Handed Weapon" and has less than 13 characters?
Afaik it's "Two-Handed Weapon" in proper english. In my opinion, displaying long names is a problem of only interface and should be fixed in it, or just left for fixing it later.
Another thing, it seems that 4° and 5° are swapped since 4° is Weapon and 5° is Armor.
There are some inconsistency with that, but 4 is probably weapon: http://forums.openkore.com/viewtopic.php?t=11703
After all, the 12° exists or not? I could not find even one item to represent. The Gravity created something that does not exist?
As seen in previous topic, it's some kind of armor, but there are no items like that, at least in athena. So, if there's no further information on it, just leave it as is and maybe one day somebody would report an item which is displayed as "unknown type 12".
Here is an implementation in visual items. I wonder if naming this good and if I did everything right.
Other equipment, equip and unequip work perfectly. I'm just not sure about the naming.
Looks fine. You tested related commands and features? The only other naming I can think of would be "topHeadCostume" or "topHead_costume", and there's not a lot of differentce between all three, I'm fine with yours.

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: Questions on upgrade itemtypes and costumes

#3 Post by Kaspy »

Well, to solve the problem, I decided to use 2-Hand Weapon to be able to fit in 13 characters... You can understand and should not cause problems.
Do not know what to do in certain situations to be able to use more than 13 characters without breaking the formatting...

Have not found bad, so I decided to use costumeTopHead, costumeMidHead and costumeLowHead.


http://openkore.svn.sourceforge.net/vie ... ision=8312
Image

Locked