Closed Thread
Page 9 of 30 FirstFirst ... 5 6 7 8 9 10 11 12 13 19 ... LastLast
Results 121 to 135 of 439
Like Tree4Likes

  Click here to go to the first Rift Team post in this thread.   Thread: Addon system bug reports

  1.   Click here to go to the next Rift Team post in this thread.   #121
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by seebs obvious sock View Post
    Actually writing code, I have concluded:

    It is in effect a bug that .stack is omitted when it's 1, because stackable items that are not currently stacked are harder to work with than they should be.
    Can't you just do something like "detailtable.stack or 1"?

  2. #122
    Shadowlander seebs obvious sock's Avatar
    Join Date
    Feb 2011
    Posts
    39

    Default

    Quote Originally Posted by ZorbaTHut View Post
    Can't you just do something like "detailtable.stack or 1"?
    I can!

    FIFTY OR MORE TIMES. And every time I forget, it's a latent bug that will explode because nil isn't a number, but not until it happens to hit a stack-of-one.

    Here's a thought: Distinguish between Stackable and Not Stackable things. For things which CAN stack to more than one, the number present is always interesting, even if it's 1. For things which CAN'T stack, it's uninteresting. So it might make sense to include stackMax and stack only if stackMax wouldn't be 1.

    Basically, think about writing a thing which wants to count things and then merge stacks and such. There's tons of stuff like

    to_move = (that.stack or 1)
    can_move = (this.stackMax or 1) - (this.stack or 1)
    will_move = if to_move > can_move then can_move else to_move end
    if can_move > 0 then
    Command.Item.Move(that_spec, this_spec)
    that.stack = (that.stack or 1) - can_move
    this.stack = (this.stack or 1) + can_move
    end

    Basically, I can't think of a circumstance where stackMax isn't 1 where I would ever, ever, want to use "this.stack" instead of "this.stack or 1". So it should be 1 instead of nil.

  3. #123
    Shadowlander seebs obvious sock's Avatar
    Join Date
    Feb 2011
    Posts
    39

    Default

    While I'm at it:

    I'd be happier if Utility.Item.Slot.Parse("x") yielded false or nil rather than a usage message -- because it would be super nice to have a tool for determining whether something is a slot identifier.

  4. #124
    Shadowlander seebs obvious sock's Avatar
    Join Date
    Feb 2011
    Posts
    39

    Default

    Nevermind, Zorba pointed out that pcall() works for that, and now LibBaggotry has a slotspec_p test.

  5. #125
    Shadowlander seebs obvious sock's Avatar
    Join Date
    Feb 2011
    Posts
    39

    Default

    BTW, same argument as I have for stack applies to rarity. There is a very small number of times that it is fun to write (x.rarity or 'common'); again, so far as I can tell there's never a circumstance where you'd want the value and NOT want to do that.

  6. #126
    RIFT Fan Site Operator Aieny's Avatar
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    472

    Default

    Code:
    items = Inspect.Item.Detail(Utility.Item.Slot.Inventory(1))
    This line of code returns an empty table, despite the bag being completely full of items.

    Edit: Well, it seems I cannot get any information whatsoever about items stored in containers. Using Utility.Item.Slot.Inventory(1,1) returns "si01.001" as expected, but getting Inspect.Item.Detail(Utility.Item.Slot.Inventory(1, 1)) gives me nil, as does Inspect.Item.Detail("si01.001"). Yes, I've made sure there's an item there.

    Apparently, only when I get an event back with a slotID am I able to get detailed information on the item in the bag slot.


    Other bugs:
    I get incorrect function usage when I attempt to use a string in Utility.Item.Slot.Inventory(bag)
    Last edited by Aieny; 11-15-2011 at 09:12 PM.
    a community-oriented site for all things Rift

  7.   Click here to go to the next Rift Team post in this thread.   #127
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Aieny View Post
    Code:
    items = Inspect.Item.Detail(Utility.Item.Slot.Inventory(1))
    This line of code returns an empty table, despite the bag being completely full of items.

    Edit: Well, it seems I cannot get any information whatsoever about items stored in containers. Using Utility.Item.Slot.Inventory(1,1) returns "si01.001" as expected, but getting Inspect.Item.Detail(Utility.Item.Slot.Inventory(1, 1)) gives me nil, as does Inspect.Item.Detail("si01.001"). Yes, I've made sure there's an item there.

    Apparently, only when I get an event back with a slotID am I able to get detailed information on the item in the bag slot.
    Having trouble reproducing this on PTS. Here's the code tests I'm using:

    Code:
    /script dump(Inspect.Item.Detail(Inspect.Item.List(Utility.Item.Slot.Inventory(1))))
    /script dump(Inspect.Item.Detail("si01.001"))
    Both of these return the expected results on both a mid-level character and a newly-created character. Can you provide repro steps starting from "create a new character"?

    Quote Originally Posted by Aieny View Post
    Other bugs:
    I get incorrect function usage when I attempt to use a string in Utility.Item.Slot.Inventory(bag)[/i]
    Having trouble reproducing this also

    Code:
    /script print(Utility.Item.Slot.Inventory("bag"))
    This prints "sibg", which should be interpreted properly as a slot specifier. Are you trying to pass an item ID in as a parameter?
    Last edited by ZorbaTHut; 11-15-2011 at 09:37 PM.

  8. #128
    RIFT Fan Site Operator Aieny's Avatar
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    472

    Default

    Quote Originally Posted by ZorbaTHut View Post
    Having trouble reproducing this on PTS. Here's the code tests I'm using:

    Code:
    /script dump(Inspect.Item.Detail(Inspect.Item.List(Utility.Item.Slot.Inventory(1))))
    /script dump(Inspect.Item.Detail("si01.001"))
    Both of these return the expected results on both a mid-level character and a newly-created character. Can you provide repro steps starting from "create a new character"?
    I'll test this out, but it may be related to the fact that I'm trying to get item details while handling Event.Unit.Available("player")


    Quote Originally Posted by ZorbaTHut View Post
    Having trouble reproducing this also

    Code:
    /script print(Utility.Item.Slot.Inventory("bag"))
    This prints "sibg", which should be interpreted properly as a slot specifier. Are you trying to pass an item ID in as a parameter?
    Well, that would certainly explain why I wasn't getting anything out. I could not figure out what string I needed to pass, so I was passing the bag number as a string, "sibg.001" to specifically get slot info for bag 1, etc. Should have realized it was as simple as passing "bag" to get the actual bag information, not slots within the bag.
    a community-oriented site for all things Rift

  9.   Click here to go to the next Rift Team post in this thread.   #129
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Aieny View Post
    I'll test this out, but it may be related to the fact that I'm trying to get item details while handling Event.Unit.Available("player")
    Yes, that very well may not work. Watch for Event.Item.Slot messages, they'll let you know when the items are available.

  10. #130
    RIFT Fan Site Operator Aieny's Avatar
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    472

    Default

    Event.Item.Slot does not trigger when looting an item that adds to a stack in the inventory.

    Quote Originally Posted by ZorbaTHut View Post
    Yes, that very well may not work. Watch for Event.Item.Slot messages, they'll let you know when the items are available.
    I'm not getting any events until after I start manually manipulating items or looting stuff.
    Last edited by Aieny; 11-16-2011 at 08:19 PM.
    a community-oriented site for all things Rift

  11.   Click here to go to the next Rift Team post in this thread.   #131
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Aieny View Post
    Event.Item.Slot does not trigger when looting an item that adds to a stack in the inventory.
    That's correct - the slot isn't changing, it still points to the same item. Watch Event.Item.Update.

    Incidentally, the Trion Development Tools have an /eventlog option that just dumps events to the console. It's quite handy for figuring out what events may fire in what cases.

    Quote Originally Posted by Aieny View Post
    I'm not getting any events until after I start manually manipulating items or looting stuff.
    I'm definitely getting the appropriate events on Live right now, on a fresh character. Run TDT, type "/eventlog Item", log out and log back in. It should display a behemoth Event.Item.Slot message that gets sent on login, once your inventory has loaded.

    Can you provide a minimal test case to demonstrate the problem?

  12. #132
    Ascendant the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    function dummy.slashcommand()
    x = { foo, bar }
    return string.format("%s", x)
    end

    ... more generally, tracebacks from slashcommands seem bogus. But this one caused rift to crash instantly.

    ... Poking at it more:

    Imagine that I have a function which calls string.format and passes the wrong arg type.

    I seem to get a traceback that complains I was passing the wrong argument to *my* function, when in fact it was string.format that got a bogus argument.
    Last edited by the_real_seebs; 11-16-2011 at 09:55 PM.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  13. #133
    Plane Touched Levva's Avatar
    Join Date
    Jan 2011
    Location
    Aberdeen, Scotland
    Posts
    243

    Default

    Quote Originally Posted by ZorbaTHut View Post
    That's correct - the slot isn't changing, it still points to the same item. Watch Event.Item.Update.

    Incidentally, the Trion Development Tools have an /eventlog option that just dumps events to the console. It's quite handy for figuring out what events may fire in what cases.
    /eventlog is a bit annoying though with mouse move events flooding the chat log. I note there is filter code but it seems to be "only show me event X". When I'd find it a lot more useful to have a /eventlog filterout Event.XXXX to add Event.XXXX to the list of events to ignore. So that as I'm testing I can add to a list the events I'm not interested in so it stops showing them.

    At present my solution is to hack the code and add extra ignores, which isn't elegant but works.

  14.   Click here to go to the next Rift Team post in this thread.   #134
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Levva View Post
    /eventlog is a bit annoying though with mouse move events flooding the chat log. I note there is filter code but it seems to be "only show me event X". When I'd find it a lot more useful to have a /eventlog filterout Event.XXXX to add Event.XXXX to the list of events to ignore. So that as I'm testing I can add to a list the events I'm not interested in so it stops showing them.

    At present my solution is to hack the code and add extra ignores, which isn't elegant but works.
    Note that it just does a text search in the event name - if you do "/eventlog Item" you'll get all Item-related events.

    I should probably filter out the mouse events explicitly, though, I'm not sure anyone cares about them.

  15. #135
    Champion
    Join Date
    Jun 2011
    Posts
    561

    Default

    The stats part of an item looks like missing the toughness stat.

    Cheers
    N.

Closed Thread
Page 9 of 30 FirstFirst ... 5 6 7 8 9 10 11 12 13 19 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts