Extended Inventory System (15 Slot)

Rad

...
Reaction score
228
Extended Inventory System (15 Slot) *Updated*

[highlight]UPDATE[/highlight]​

Updates:
Made it so system is multiplayer compatible (Not multiple heroes per player)
Fixed a bug where player 1 and 2 shared the same page of inventory (Page one and page three)
Cleaner system now runs the trigger smoother (Probrably not noticeable)

Setting up your map:

Setting up your map is very easy, follow the steps below to get untill it all looks similar to the map attached. In order for the inventory to work all you need to do is give every players hero the "Page 1" item. I made it so it doesnt require any other variables except the item variables. It still doesnt support multiple heroes per player, nor support charged items correctly (As they reset)... But its still a basic system.

[size=+1]How to import:[/size]
Step 1 Open the map attached in World Editor, and then open your map after that
Step 2 Open the Trigger Editor and create a new variable called [highlight]Inventory_Items[/highlight] as an Item array with a size 180
Step 3 In the menu bar select "Window" and then "2. C:\...\Extended Inventory by Rad"
Step 4 Go to the Object Editor, in the Item tab find the three custom items "Page 1/2/3". Select the first one, and press CTRL+C
Step 5 Go back to your map (With the window method) and paste the item into your map. If the ability for the item isnt what it should be, select the "Clockwork Penguin" ability and simply remove the sound effect (In ability editor). Create three versions of this item
Step 5 Go back to the inventory map, find the action "Inventory" and press CTRL+C, and go back to your map (Using the Window option again) and paste it into your trigger editor.
Step 6 Depending on how your map was already made up, the trigger should appear fine. If for some reason one of the conditions says "Item being manipulated equal to Fireball" or something, then you should edit the actions inside. Make them match the ones on the original map and it should work fine​

Tips:

1: Uncheck the option on your "Page" items that says "Can be dropped"
2: Uncheck the options on your "Page" items that say "Can be sold to/by merchants"
3: Remove gold cost from your "Page" items
4: Set up your items tooltips, you only need the "Tooltip - Name" and the "Tooltip - Extended"

The code your map should look like:
Code:
Inventory
    Events
        Unit - A unit Uses an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Page One
            Then - Actions
                For each (Integer A) from 1 to 5, do (Set Invetory_Items[((Integer A) + ((0 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] = (Item-type of (Item carried by (Hero manipulating item) in slot ((Integer A) + 1))))
                For each (Integer A) from 1 to 6, do (Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A)))
                Hero - Create Page Two and give it to (Hero manipulating item)
                For each (Integer A) from 1 to 5, do (Hero - Create Invetory_Items[((Integer A) + ((60 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] and give it to (Hero manipulating item))
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Page Two
            Then - Actions
                For each (Integer A) from 1 to 5, do (Set Invetory_Items[((Integer A) + ((60 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] = (Item-type of (Item carried by (Hero manipulating item) in slot ((Integer A) + 1))))
                For each (Integer A) from 1 to 6, do (Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A)))
                Hero - Create Page Three and give it to (Hero manipulating item)
                For each (Integer A) from 1 to 5, do (Hero - Create Invetory_Items[((Integer A) + ((120 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] and give it to (Hero manipulating item))
            Else - Actions
                Do nothing
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Page Three
            Then - Actions
                For each (Integer A) from 1 to 5, do (Set Invetory_Items[((Integer A) + ((120 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] = (Item-type of (Item carried by (Hero manipulating item) in slot ((Integer A) + 1))))
                For each (Integer A) from 1 to 6, do (Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A)))
                Hero - Create Page One and give it to (Hero manipulating item)
                For each (Integer A) from 1 to 5, do (Hero - Create Invetory_Items[((Integer A) + ((0 + ((Player number of (Owner of (Hero manipulating item))) x 5)) - 5))] and give it to (Hero manipulating item))
            Else - Actions
                Do nothing

Once again, you need a few things. Three items that are click to activate (I based off the Clockwork Penguin editing ability to have no sound). One variable array size 180 type item. One hero per player MAX, with the "Page 1" in [highlight]slot one[/highlight]
 

Attachments

  • Extended Inventory by Rad.w3x
    17.5 KB · Views: 267

Jazradel

Helping people do more by doing less.
Reaction score
102
Nice. Hope this is less confusing than Vex's.

I mean in game, the JASS code was understandable just long.
 
E

Elthanor

Guest
I havent opend it in WE to see how confusing it is, but i like it so far.

Just one thing i dont know if you can fix or thats the way you made it, if you pick up an idea that gives you a bonus, like +1 agi, when you change bags, that effect is gone. Only the items in your current bag works.

Hopefully you can get that to work, but, i love it non-the-less. Great work Rad :D
 

mase

____ ___ ____ __
Reaction score
154
Elthanor said:
I havent opend it in WE to see how confusing it is
Its to triggers, prolly long ones, but like Rad said, "Simple Triggers" lol
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Very Simple Rad :D <3
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
zyzfcs said:
cant open it yet..im in school right now damn it :banghead:

Still in school? how old are you im 17 and im in college but I still got a week off
 

mase

____ ___ ____ __
Reaction score
154
Orc_Tamer said:
Still in school? how old are you im 17 and im in college but I still got a week off
You skipped a year? Im 15 and School starts agian tomorrow for me :(
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
mase said:
You skipped a year? Im 15 and School starts agian tomorrow for me :(

Didn't skip a year a started a year early and plus a got strait A's dont call me a nerd :p
 

zyzfcs

New Member
Reaction score
5
Orc_Tamer said:
Still in school? how old are you im 17 and im in college but I still got a week off

17 years old in college?
well im 19, good news is i only have 1 month school left :D

i think we're off topic :banghead:
 

Rad

...
Reaction score
228
Very off topic...

Anyways, Im making it so it works for multiplayer but for some reason Player 1 doesnt work. Players 2 through 12 are fine work great, heres the trigger... Variables are all set correctly, item variable is size 250 so that shouldnt be the problem

<Code removed>
 

mixmax2

RedArmyGangsta
Reaction score
31
if you have stat enchancing items, if u change a page the buffs they give disapear.

EX-
+24 dmg on page 1
+2agility on page 1

*switch to page 2

no more dmg or agility boost
 

Rad

...
Reaction score
228
Found out why my triggers didnt work.. also found out a bit about arrays. I used 60xplayer number-60 (so player 1 was still 0) which I have no idea why.. Anyways Im fixing it right now will update first thread when its done
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Things start from 0 in most computer languages. Took me a while to work that out too.

This system is good but it really needs a method of giving the stats from items.
 

Rad

...
Reaction score
228
Well its a simple system, making it give the stats from items would be hard work.. You would have to give a set of abilities for every item when you pick it up and remove them when you drop/use/sell the item. Its more like a backpack then an extended inventory... but more importantly its 'Simple'
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top