• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Working on a GUI Fullscreen Inventory

Status
Not open for further replies.
Level 19
Joined
Feb 4, 2009
Messages
1,313
I decided to post my WIPs of the GUI Inventory System I am working on and ask for help since many heads are smarter than one

Feel free to post any suggestions

I'll update the following list of problems as well as the system from time to time

Problems/Ideas/Questions/Stuff:
  • Right now it disconnects in multiplayer mode cause the blizzard selection function is using local script and I can't think of any way around it
  • How should the User Interface look like?
  • What should be possible? (like selling, combining, item sets, etc.)


Progress:
  • stuff is clickable
  • buttons are shown
  • inventory can be opened and closed
  • selection and camera does not get messed up by opening and closing
  • Items are swappable in inventory
  • added full MUI support
  • items can be dropped and picked up
  • switched some things to hashtables so it should support an infinite number of everything
  • ...except item types (but who wants to initialize more than 8190 items)
  • Trigger-stuff-bonus-system implanted
 

Attachments

  • GUI Fullscreen Inventory 0.1.w3x
    19.8 KB · Views: 81
  • GUI Fullscreen Inventory 0.2.w3x
    21 KB · Views: 95
  • GUI Fullscreen Inventory 0.3.w3x
    26.3 KB · Views: 69
  • GUI Fullscreen Inventory 0.4.w3x
    26.7 KB · Views: 106
  • GUI Fullscreen Inventory 0.5.w3x
    31 KB · Views: 200
Last edited:
Level 13
Joined
Feb 18, 2009
Messages
1,381
I shall say, good luck with that. GUI is incredibly hard to make a fullscreen inventory in.
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
Amazing! That was surprisingly smooth, I don't know if the code is efficient or not, I won't notice on this machine or single player (didn't bother checking WE yet), but it seemed to flow really nicely.

Suggestions:

-> Lock The Camera.

-> If you can, this is probably impossible... hide or deactivate the green arrows there really annoying! :p But this is a side effect of using a spell and is tolerable.

-> Keep it up :)
 
Level 12
Joined
Nov 20, 2007
Messages
660
i have a "better idea" for your GUI inventory :)

  • GIForceSelection
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • -------- Force player to cast selection spell --------
      • Player Group - Pick every player in GI_Player and do (Actions)
        • Loop - Actions
          • Game - Force (Picked player) to press the key E
I recommand

  • GIForceSelection
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select
    • Actions
      • -------- Force player to cast selection spell --------
      • Player Group - Pick every player in GI_Player and do (Actions)
        • Loop - Actions
          • Game - Force (Picked player) to press the key E
or you can just add this:

-------- Force player to cast selection spell --------
Player Group - Pick every player in GI_Player and do (Actions)
Loop - Actions
Game - Force (Picked player) to press the key E

to GISelect (trigger)
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
try to use units with custom models with icon textures pasted on them. make the units selected

why? it already works that way and units take far more space than destructibles

i have a "better idea" for your GUI inventory :)

  • GIForceSelection
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • -------- Force player to cast selection spell --------
      • Player Group - Pick every player in GI_Player and do (Actions)
        • Loop - Actions
          • Game - Force (Picked player) to press the key E
I recommand

  • GIForceSelection
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Select
    • Actions
      • -------- Force player to cast selection spell --------
      • Player Group - Pick every player in GI_Player and do (Actions)
        • Loop - Actions
          • Game - Force (Picked player) to press the key E
or you can just add this:

-------- Force player to cast selection spell --------
Player Group - Pick every player in GI_Player and do (Actions)
Loop - Actions
Game - Force (Picked player) to press the key E

to GISelect (trigger)

if you cancel the casting you can play around with the dummy and I don't want that
maybe there is some way to get the order for stoping to target something
gonna test it
already thought about that myself but didn't try it though

edit:
unit selection is not instant so I have to use a wait to cast it the first time
however it is still much faster than clicking but slower than the loop
but in other cases it's faster so I will use this
it is now possible to do other stuff with the selection dummy but since the dummy can't do anything it does not really matter...
both solutions have their (dis-)advantages
I'll use your idea

thanks anyway
 
Level 19
Joined
Aug 16, 2007
Messages
881
I like this. It's a very simple system at the moment and the good thing is that it's GUI. I think you can finish this to be a fully working fullscreen inventory system, it should not be that hard. A question though, will this work just as a bag or will you add a function that allow heroes to equip items too? Anyway, goodluck! :)
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Actually this is the bad thing. This makes it harder to edit and a nightmare to import.
(GUI triggers are way heavier then JASS ones)

yeah! your system is far better than I could ever make this :thumbs_up:
...and now go and make your custom whatever system which will be so complex and great that nobody but you fully understands it
I won't mess with you since I know I can't win anyway
just let me say that this is GUI and yours is JASS so it's on a totally different level

I think you can finish this to be a fully working fullscreen inventory system, it should not be that hard. A question though, will this work just as a bag or will you add a function that allow heroes to equip items too? Anyway, goodluck! :)

The bag won't be a problem but I still wonder how I could achieve all the item effects most easily
I will require many abilities with even more levels and this will make things complicated
Nevertheless I'm going to try it

Ohsh-, a GUI fullscreen inventory system :O
I think it would be best to do things like this in vJASS.
Pretty much all systems should be done in vJASS since it's easier to use those systems and integrate them into other systems. Customizing vJASS systems is also easier.

congratulations to your 1000th post :D
and there is a pretty good one in vJASS already so making another one would not make much sense
 
Last edited:
Level 22
Joined
Dec 31, 2006
Messages
2,216
Ohsh-, a GUI fullscreen inventory system :O
I think it would be best to do things like this in vJASS.
Pretty much all systems should be done in vJASS since it's easier to use those systems and integrate them into other systems. Customizing vJASS systems is also easier.
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
It may be easier if you understand vJASS, but not everyone does. Whether this is because they can't learn it, don't have time to or can't be bothered. Either way, this is a nice attempt to cater for those people, as I said before, it's looking good, keep it up, the above people will be grateful (you would hope) :grin:.

Btw don't bother flaming me, I KNOW vJASS/JASS is more efficient but that doesn't void the above point.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
huuuuuuuge update
  • Items are swappable in inventory
  • added full MUI support
  • items can be dropped and picked up
  • switched some things to hashtables so it should support an infinite number of everything
  • ...except item types (but who wants to initialize more than 8190 items)
  • Trigger-stuff-bonus-system implanted

so how should the user interface look like?
and are there any other things you would like to have?

edit:
blizzards selection functions disconnect in multiplayer mode
I don't know much about synchronisation but I remember a function with "sync" in it
any ideas how to fix?
 
Last edited:
Level 19
Joined
Aug 16, 2007
Messages
881
huuuuuuuge update
  • Items are swappable in inventory
  • added full MUI support
  • items can be dropped and picked up
  • switched some things to hashtables so it should support an infinite number of everything
  • ...except item types (but who wants to initialize more than 8190 items)
  • Trigger-stuff-bonus-system implanted

Nice update. Find a bug though with the "drop item" function:

It works perfectly but there's one issue. When you change position of an item in the inventory and then drop it, the dropped item won't be putted in the heroes inventory or on the ground. Else it works good.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Nice update. Find a bug though with the "drop item" function:

It works perfectly but there's one issue. When you change position of an item in the inventory and then drop it, the dropped item won't be putted in the heroes inventory or on the ground. Else it works good.

fixed this and 2 other bugs
(buttons somehow "stacked" so they became higher and higher and when picking up items in inventory mode it would not show them correctly)
but I still have problems with the selection and I don't know if showing the buttons only to local player might cause disc like the unit selection
 
Level 19
Joined
Aug 16, 2007
Messages
881
fixed this and 2 other bugs
(buttons somehow "stacked" so they became higher and higher and when picking up items in inventory mode it would not show them correctly)
but I still have problems with the selection and I don't know if showing the buttons only to local player might cause disc like the unit selection

Okey, nice. I don't really think it would cause a disconnect by only showing buttons for one player. Isn't that how other inventory systems work?

And what, do:
  • Game - Force p to press the key E
cause disconnects?
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Horrible con. Use trackables instead of units.

the button selection is perfect (and how the fuck do you want to use trackables in GUI? o_O) but I am talking about
  • Selection - Select group for player
JASS:
function SelectGroupForPlayerBJ takes group g, player whichPlayer returns nothing
    if (GetLocalPlayer() == whichPlayer) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        call ClearSelection()
        call ForGroup( g, function SelectGroupBJEnum )
    endif
endfunction
and it disconnects all players but the host
if you know any way around it please tell me
 
Status
Not open for further replies.
Top