View unanswered posts | View active topics
|
Page 1 of 1
|
[ 8 posts ] |
|
| Author |
Message |
|
ncrsn
|
Post subject: Item.layer only works for items (once) equipped (POL 097) Posted: Sun May 25, 2008 12:07 am |
|
Joined: Fri Feb 10, 2006 12:15 am Posts: 217
|
|
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 |
|
 |
|
Madman
|
Post subject: Posted: Fri Aug 15, 2008 11:02 pm |
|
 |
| POL Developer |
 |
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 |
|
 |
|
ncrsn
|
Post subject: Posted: Sat Aug 16, 2008 12:07 am |
|
Joined: Fri Feb 10, 2006 12:15 am Posts: 217
|
|
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 |
|
 |
|
Madman
|
Post subject: Re: Item.layer only works for items (once) equipped (POL 097) Posted: Sun Aug 17, 2008 11:11 pm |
|
 |
| POL Developer |
 |
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 |
|
 |
|
Austin
|
Post subject: Re: Item.layer only works for items (once) equipped (POL 097) Posted: Mon Aug 18, 2008 7:12 am |
|
 |
| POL Developer |
 |
Joined: Wed Jan 25, 2006 2:30 am Posts: 410 Location: San Diego, California
|
|
Its not too big an issue - as the layer information can be retrieved from tiles.cfg
_________________ -Austin
|
|
| Top |
|
 |
|
ncrsn
|
Post subject: Re: Item.layer only works for items (once) equipped (POL 097) Posted: Mon Aug 18, 2008 10:43 am |
|
Joined: Fri Feb 10, 2006 12:15 am Posts: 217
|
|
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 |
|
 |
|
Austin
|
Post subject: Re: Item.layer only works for items (once) equipped (POL 097) Posted: Mon Aug 18, 2008 11:01 am |
|
 |
| POL Developer |
 |
Joined: Wed Jan 25, 2006 2:30 am Posts: 410 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 |
|
 |
|
ncrsn
|
Post subject: Re: Item.layer only works for items (once) equipped (POL 097) Posted: Mon Aug 18, 2008 11:26 am |
|
Joined: Fri Feb 10, 2006 12:15 am Posts: 217
|
|
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 |
|
 |
|
Page 1 of 1
|
[ 8 posts ] |
|
Who is online |
Users browsing this forum: Baidu [Spider] 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
|
|