HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

General Problem of Advanced Inventory Systems

08-11-2006, 07:26 AM#1
BertTheJasser
ONLY READ THE WHOLE TEXT OR MY LAST COMMENT
These days the spell section was updayted with some inventory systems, so good so far.

The generall problem of these systems is, that they stop channeling orders. I expired this first at Vex's System, later at Blade.dk's and one some others. After some time I got around the problem, that removing an item by a trigger will even skip the units current order, not only change page. The only orders which seem to "work", are the initialy(?) for darg & drop as long as you do not remove an item.

I guess this thread will not have any influence on Mapmakers usage of the system, but I wanted to make everybody to get aware of that problem and the following imbalancings in a map, if used in the wrong way.
08-11-2006, 07:33 AM#2
st33m
There was another thread about using spells on the run. I believe it was decided/discovered that wind walk does not stop channel.
08-11-2006, 07:40 AM#3
BertTheJasser
Oh no, if you add an ability that itself does not skip orders to an a item, and use it the game considers this as a generic item use and skips all orders. Even if, you still would not be able to get rid of the stop by removing >> eventually adding too<< items
08-11-2006, 10:45 AM#4
blu_da_noob
Windwalk skips all orders. Give a hero starfall and windwalk (not even items). Start channeling starfall and then cast windwalk: your starfall will carry on going (with the hero invisible). The only potential problem is the overwriting if the hero is using a windwalk skill.
08-11-2006, 11:07 AM#5
Mezzer
Doesn't berserk do the exact same thing? And units are less likely to have it as well
08-11-2006, 03:29 PM#6
BertTheJasser
Arrggh! You don't get the point of this thread.
<bullshit start>As I said before, even if we had abilities that do not interrupt channeling spells (which we actually have), they are completly useless when you use them as the ability of an item, as then the ordered id of the hero is not the initially ability id (in this case 'windwalk'), but the slot id of where the item lies down, and that slot order id skips any kind of channeling spells (like blizzard, rain of fire,starfall even flamstrike). <bullshit end>

Further: Even if we would not use that method of changing pages and get around another method to change them (e.g. using a spellbook with 2 abilities which not skip orders, like berserk/windwalk, to change pages), we still will have the problam of the inability to remove items, without skipping orders.

I hope now everybody got the point of this thread: DO NOT USE EXTENDED INVENTORY SYSTEMS LIKE THAT. (I myslef prefer using something like a 'Blackbox' which you can aupen and has several pages with items, which bonuses you do not get, while ot attached to the hero)
08-11-2006, 03:36 PM#7
blu_da_noob
Windwalk on an item does not cancel channeling spells. I have tested and know this for sure, it may also work for berserk but I don't know.
08-11-2006, 03:38 PM#8
BertTheJasser
Oh my holy cow!
<bullshit start>I've only tested berserk, and thouht all would work that way.<bullshit end>
My fault.
Will do my own tests right now.

But the other problem is still there.
08-11-2006, 04:51 PM#9
Vexorian
Some maps would rather not have channeling spells than use the super limited 6 slots inventory that sucks, this is a bug from blizzard anyways. Is it that big of a problem? If you are looking at the inventory then you can figure out the order was reset by doing so, and I don't think that just adding/removing items from a hero would stop a spell that's already going on. So by using a good base ability it could get rid of any major problem.
08-11-2006, 05:07 PM#10
Vexorian
From what I know, the only kind item you would like to find during a channeling spell is an active item.

So we could just hide the bonus items and let the hero keep 6-5 or 4 active items.

Most of the times those are enough.

Other kind of items could simply add spells to a spellbook, and that does not have that problem.

The active items could simply stack.

I was going to redesign InvX anyways.

We could also get fun and make the button like items require double click instead of a single one.
08-12-2006, 08:36 AM#11
BertTheJasser
But if we add spells to a spell bock, the user can cast the spell drop the depending book, pick up again and the cooldown is gone. So this would be worse than the channel-interrupt-"bug".

My tests with manashield, immolation, berserk and windwalk showed that they do not interrupt channaling spells whe the named spells are used as item abilities.

With the removing stuff,.. if you do not belief me, just open one of your InvX maps, pick a item in you current inventory and drop it on the next page button. Then you will see, while casting blizzar or flamestrike, it skips the spells.
08-12-2006, 01:05 PM#12
Vexorian
Quote:
But if we add spells to a spell bock, the user can cast the spell drop the depending book, pick up again and the cooldown is gone. So this would be worse than the channel-interrupt-"bug".

This has a work around. Yes it does.

If you think about it, the real life equivalent to moving an item to another page is like changing the position of an object in a backpack, there is no way you can do that and cast blizzard at the same time, so it is kind of logical.
08-12-2006, 02:42 PM#13
BertTheJasser
Oh my goodness. I've tested it again in your hero Arena 0.507. I casted blizzard with the archmage,.. and it works, even if the error page is full appears. Strange. I could swear that it canceled blizzard, maybe because of patch 1.20x, as I have tested this before I had it. Oh well..

So I would say... meh if you do it correctly, a extended inventory is very good.
08-13-2006, 06:10 PM#14
BertTheJasser
Her I've attached a Map where I have tested almost everything, what could be the cause of the Advanced Inventory systems to skip channeling spells [EXCEPT the event ENT_UNIT_USE_ITEM, that could be a problem too]. DL and you will.
The code of the workaround of UnitDropItemSlot is below.
Hidden information:
Collapse JASS:
function UnitDropItemInSlot takes unit u,item it,integer slot returns boolean
local integer a=0
local integer b=0
local item array i
if UnitHasItem(u,it) then
    call UnitRemoveItem(u,it)
endif
if slot==0 then
    call UnitAddItem(u,it)
    return UnitItemInSlot(u,0)==it
endif
loop
    set i[b]=UnitItemInSlot(u,b)
    if i[b]==null then
        set i[b]=UnitAddItemById(u,'ciri')
        set a=a+1
    else
        set i[b]=null
    endif
    set b=b+1
    exitwhen b>5 or b==slot
endloop
call UnitAddItem(u,it)
if a>0 and UnitHasItem(u,it) then
    set b=0
    loop
        if i[b]!=null then
            call RemoveItem(i[b])
            set i[b]=null
            set a=a-1
            exitwhen a==0
        endif
        set b=b+1
        exitwhen b>5
    endloop
else
    return false //6 items, no chance
endif

return UnitItemInSlot(u,slot)==it
endfunction


If anybody thinks this is worth repping, plx do so. It costed a lot of time and energie(-drinks).
Attached Files
File type: w3xItemDropCancelTest.w3x (22.0 KB)
08-13-2006, 11:15 PM#15
Vexorian
Collapse JASS:
call IssueTargetOrderById(u,85002+slot,tg)

Fixes the problem. Yes, it does. Somebody should complain to blizzard about how in hell did they fail to use this method for that native.

btw: I think I once saw a post from weaaddar about something like this.

Edit: you and your wrong order values, It was not really doing anything at all, if you correct the number to 852002 it works but the orders are still resetted, darn we would need to use that lame work around, that's the kind of funciton that adds like 400 conflicts due to addition and removal of items and is super slow. I think I would even prefer to stop channeling spells.