• 🏆 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!

Full GUI Item System

Status
Not open for further replies.
Level 11
Joined
Feb 23, 2009
Messages
577
ThisPOT's Extra Heavy Item System


2exm0br.jpg




INTRO:

Hi all, I've been creating a fully GUI item system and was hoping to get some feedback, bug reports, advice and (constructive) criticism.

This map is supposed to serve as a template to create your world upon (RPG, arena, campaign, whatever).
The goal was to not have to use any triggers in damage calculation as I use almost only (hidden) abilities to determine the stats. The few exceptions are: HP/MP Regeneration, Gold/Exp per 5 sec, HP/Exp on cast.
The hero attributes (strength, agility, intelligence) have been balanced to fit the system, but still have the same relative purpose as in the normal game, just modified a little bit.

The system uses terrain changes, floating texts, destructibles and unit dummies for the inventory screen, and stores all of the item stats into hashtables (which as of now does not recycle, I plan on fixing that).




SYSTEM INFO:

- Almost 100% GUI
- MPI, up to 10 Players
- Super easy to use, even for beginners with no experience
- Uses a lot of custom icons



BASICS:

- 15 Equip-able inventory slots
- 14 Bag slots
- 62 different item types
- 5 different item rarities
- 38 different item stats
- Socket-able items
- Can be used in conjunction with the normal inventory and other wc3 items (for potions?)
- Does NOT use any orb effects
- Randomly generated items
- Randomly generated item stats
- Easy to manipulate Item Level
- Can create specific items with specific stats (can even do multiple of same stat, tho it's useless)
- Huge (and balanced) cap on stats (besides Item Level)
- Cap on stats can be bypassed on specific items (non randomly generated)
- Blocks the use of Power Up class items (use any other class for other items)


!!! Bugs with more than 1 "Inventory Hero" per player (not designed for it) !!!


HOW TO MAKE IT WORK:

The system is currently still in BETA phase and hasn't been fully tested for bugs yet (I did my best)
No known bugs as of now, please report any bugs you may find


- The system will automatically detect any unit with the "Inventory (Hero)" ability
- It will grant that unit the Item System (you should use a Hero as there are hero attribute stats)
- Only give the "Inventory (Hero)" ability to one single unit per player, or the system bugs
- You don't need to do anything else for the system to work for that unit! :)
- This system is functional for player 1 only as of now, I will have it for players 1-10 next week



ITEM STAT LIST (38):

- Life (Max 9999)
- Mana (Max 9999)
- Strength (Max 999)
- Agility (Max 999)
- Intelligence (Max 999)
- Damage (Max 9999)
- Damage per Mana
- Life on Cast
- Exp on Cast
- Life on Kill
- Mana on Kill
- Gold on Kill
- Exp on Kill
- Armor (Max 999)
- Damage Protection (Max 95)
- Regen Life
- Regen Mana
- Move Speed (Max 522 MS)
- Gold per 5 sec
- Exp per 5 sec
- Life %
- Mana %
- Strength %
- Agility %
- Intelligence %
- Attack Speed % (Max 400%)
- Gold on Kill %
- Exp on Kill %
- Magic Resistance % (Max 95%)
- Regen Life %
- Regen Mana %
- Move Speed % (Max 522 MS)
- Item Rarity Find %
- Crit % (Max 95%)
- Stun % (Max 95%)
- Dodge % (Max 95%)
- Cleave % (Max 95%)
- Extra Socket

The Max represents the in game cap for the bonus stat a unit may have.
Life and mana are hard capped at 9999 (for balance and mechanical issues).


WHAT I'M TRYING TO DO:

Save / load system. The problem is that there is a possible 1889 digits when I string all the integers together and the only way I know (I only use GUI) is codes, which would be to long. Basically saving 29 possible item slots owned (bag + equipped inventory), which each have 4 hashtables: Item Specific Stats, Stat ID, Stat Value and Stat Tooltip.

* I've read of people saving using external text files and then using those to load all the info into the game but I'm unsure how to actually do that myself. I would appreciate any help on that!



 

Attachments

  • ThisPOT ItemSystem BETA V1.06b.w3x
    3.2 MB · Views: 142
Last edited by a moderator:

~El

Level 17
Joined
Jun 13, 2016
Messages
558
I have been summoned on the notice of Save/Load systems. This just happens to be my self-appointed area of expertise within WC3.

There is indeed a way to save/load in WC3 using files, especially in patch 1.30 as it lifted one severe restriction that constrained the use of Save/Load in WC3 beforehand.

I'm not sure if there's a straightforward way to do it in GUI, but @TriggerHappy has made a system that allegedly has GUI support:
Codeless Save and Load (Multiplayer) - v2.0.0

That's about your only option unless you're willing to dive into Wurst or vJASS directly, unfortunately. I hope it helps you on your journey.
 
Level 11
Joined
Feb 23, 2009
Messages
577
Thanks for the info Sir Moriarty, I will check that out right away :).

I'm not sure I want to jump into learning a new language right now though I may have to for this, but if you feel like it, it would be nice if you made a system that worked for this specific map that I could easily implement, and I would give you credits of course. Since I'm definitely no expert on save/load and I want this system to be available to everyone it would be nice to have the expert working on it hehe.
 

~El

Level 17
Joined
Jun 13, 2016
Messages
558
Thanks for the info Sir Moriarty, I will check that out right away :).

I'm not sure I want to jump into learning a new language right now though I may have to for this, but if you feel like it, it would be nice if you made a system that worked for this specific map that I could easily implement, and I would give you credits of course. Since I'm definitely no expert on save/load and I want this system to be available to everyone it would be nice to have the expert working on it hehe.

I don't work with GUI, unfortunately, and I'm somewhat busy with work and maintaining Wurst's FileIO library in the Stdlib, so I have my plate full, unfortunately.
I'd want to help, but I just don't have enough time :(
 
Level 11
Joined
Feb 23, 2009
Messages
577
I've tested Codeless Save and Load (Multiplayer) - v2.0.0 and it seems like a nice system, however it wouldn't save any of my item stats stored in the hastables :(. Also it would be hard for me to tweak it to my map as the important sections are laced with JASS, which I don't know anything about.

Is there a custom text command that allows to save a .txt file? I could probably go from there if I knew how to do that.

Also don't worry about it I understand :) you're helping already and I appreciate it.
 

~El

Level 17
Joined
Jun 13, 2016
Messages
558

Unfortunately, this library isn't "full", in the sense that it's just one piece of the puzzle. It only handles the actual File IO, but besides that, you also need to synchronize that data to other players, which, afaik, the only way to do is by using SelectUnit() and Sync* natives. Trying to use it in a "naive" way would just desync you.

I've tested Codeless Save and Load (Multiplayer) - v2.0.0 and it seems like a nice system, however it wouldn't save any of my item stats stored in the hastables :(. Also it would be hard for me to tweak it to my map as the important sections are laced with JASS, which I don't know anything about.

Is there a custom text command that allows to save a .txt file? I could probably go from there if I knew how to do that.

Also don't worry about it I understand :) you're helping already and I appreciate it.

I'm afraid I can't help you much if you're not ready to dive into JASS right now. Save/Load was pretty much useless before patch 1.30, because even if you implemented in your map - most users wouldn't be able to use it, so it never gained much traction, nor many people wrote libraries and/or systems for it. That might change in the near future, as word of mouth spreads that File IO is fully supported now for all players, but I'm personally not up to the task of creating a GUI library for that or tailoring existing libs to other people's needs.

Do hope that someone else may be able to help you, however.
 

~El

Level 17
Joined
Jun 13, 2016
Messages
558
In that case I'll probably skip the save/load system for now and release this (the finished version) in the Map Development section.

Thanks a lot for everyone's input! I'll probably be learning JASS after all it seems >.<...

If you do, I highly recommend also checking out Wurst - WurstScript • Home
I know it's a thing of preference, but many people find that things are much easier to accomplish and work on in Wurst rather than JASS or vJASS.
It also has a Save/Load package in the standard library, maintained by yours truly :)
 

~El

Level 17
Joined
Jun 13, 2016
Messages
558
What has the most potential? I'm pretty good at learning those things usually, did some JavaScript and stuff but that was so long ago lol...

In terms of pure efficiency / potential, is there a better choice?

As far as I'm concerned, Wurst is the best one for both efficiency and ease-of-use. vJASS drives me crazy, and JASS even more so.
If you don't know either vJASS or JASS, there's very little reason to learn them.

Just beware of JASS purists.
 
Level 39
Joined
Feb 27, 2007
Messages
5,015
Imo vJASS is a fine introduction to OOP languages if you've never used one because it's reasonably simplified and dumbed down. It also doesn't require additional tools any more (unlike Wurst) and doesn't require you to change how you think about building/compiling a map (like Wurst does). But perhaps those features of Worst appeal to the OP; to each their own.
 
Status
Not open for further replies.
Top