PenUltima Online

It is currently Sat Aug 30, 2008 9:07 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Sun May 25, 2008 12:07 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 206
This is only a small nuisance, but worth the thread: item.layer returns valid information only if the item is equipped or has been equipped in the past. Say, I create a sword on the ground and check it's layer using .getprop layer: "Property layer is not set or zero." If I equip it and try again, result is "Property layer is: 1". After unequipping the value is still correct, until the server is rebooted.

As far as I know this has existed for a very long time.

Even if the item is never-ever equipped layer property should tell the layer it would fit into, if any.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 11:02 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 05, 2006 7:20 pm
Posts: 45
Interesting. I think you are wrong in one very minor detail- I think if you set the items layer, it remains set even if it was never equipped. But that is a mostly useless distinction.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 16, 2008 12:07 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 206
What do you mean by setting layer?

Wasn't sure so I tried two ways.

1. Defining layer in itemdesc.cfg element
2. Trying to set layer in game using .setprop-command

Neither way made a correct value readable without equipping the item first. Of course layer is r/o value so it cannot be changed / trying did not refresh the value like equipping does.

Also interesting is that even though layer is objtype -even graphic- spesific value, it is saved per item, for one equipped axe didn't make axes around it to have corrected layer values. Maybe it's just me who tend to think "hard coded" values are really stored only once.


Top
 Profile  
 
 Post subject: Re: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Sun Aug 17, 2008 11:11 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 05, 2006 7:20 pm
Posts: 45
Ah, I know what my mistake was on layer- I was (strangely enough!) confusing it with Facing when I said that- specifically facing's weird overloading where it also stores the light type for an object. You are correct that layer is r/o and so ignore what I said about setting it, I was on crack.

Now that you mention it, I vaguely remember this layer issue coming up years ago.


Top
 Profile  
 
 Post subject: Re: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Mon Aug 18, 2008 7:12 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 400
Location: San Diego, California
Its not too big an issue - as the layer information can be retrieved from tiles.cfg

_________________
-Austin


Top
 Profile  
 
 Post subject: Re: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Mon Aug 18, 2008 10:43 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 206
No it isn't, but then again, is a non-working hardly fixable feature worth keeping in the core? I don't know, but until it works, it's better to use the mentioned tiles.cfg method.


Top
 Profile  
 
 Post subject: Re: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Mon Aug 18, 2008 11:01 am 
Offline
POL Developer
User avatar

Joined: Wed Jan 25, 2006 2:30 am
Posts: 400
Location: San Diego, California
Internally the layer property seems to be used to determine if an item is equipped on a mobile.
I think the issue is - when unequipped, the layer property is not being erased.

_________________
-Austin


Top
 Profile  
 
 Post subject: Re: Item.layer only works for items (once) equipped (POL 097)
PostPosted: Mon Aug 18, 2008 11:26 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 206
Okay, then... Is there a reason not to switch the internal way to use .container property, as it tells for sure if item is equipped by mobile (returns a reference if it is)? That way .layer could be, if possible and there is a motivation to do so, changed to return the correct layer value every time?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl