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

How to trigger via object editor "Item must remain in your inventory." (found in gameplay constants)

Status
Not open for further replies.
Level 5
Joined
Jul 4, 2007
Messages
84
Hi,

I see no results or documentation for: "Item must remain in your inventory." - Google

It would be so much better than making items so they "Can't be dropped" which actually means you can't even move them around between Num1 - Num8 hotkeys at all.

I assume this new "must remain" constant I found would allow movement between inventory slots just not drop. But where is it, how to set items to trigger that error message, not the old unforgiving "Can't be dropped" one?

As a current workaround can I have chat command triggers like -swap 1 2 (that replaces Num1 with Num2 in your inventory.)

But I want to do it "properly", through the object editor. No triggers. Except maybe Item - Make item property X.

It's important to keep some items undroppable. But not unmovable between slots.

--3ICE
 
Something like:?
Create a trigger that is triggered when the hero drops an item. Use a condition to the trigger, that checks it is the correct item. Then re-add the item to the hero's inventory as an action, along with a warning message.

Edit: Why without triggers? Are you even sure it is possible to do without triggers?
 
Level 5
Joined
Jul 4, 2007
Messages
84
There exists a gameplay constant for exactly what I need, so I seek the way for causing said gameplay constant to be displayed on screen. And the expected behavior to occur.

Blizzard already coded this behavior, and it's way better than my current implementation so I thought I'd see if I could throw away my code and use Blizz's instead.

Your idea is an excellent improvement already though. Over my user-unfriendly -swap command. I'll definitely do that if I can't find a way to use Blizzard's built-in method.

I wonder if Blizzard's implementation is even available somewhere. I can't find any references to it in the game files.

I know how to object editor "Unable to drop this item.", that's Cantdropitem=TRIGSTR_551
(Edit: I hate it when people say they know(/fixed) something but refuse to say (how they did it), so here is that info, for any new and upcoming map editors out there: Go to the Items tab, find your item in question, and uncheck Stats - Can be dropped === set it to False — This unfortunately makes the item immovable within your inventory too. I want the item to remain movable between slots, but not outside the inventory.)

I don't know how to object editor "Item must remain in your inventory.", but it exists somewhere, it must! I hope so... because there's a Cantdrop=TRIGSTR_520 in war3mapSkin.txt and why would it be there if it's unused.

Cantdropitem (known) vs Cantdrop (unknown)

I tried looking in Blizzard.j and found no references so I suspect it's a hidden native function or C++ game code. Not JASS, not public, not even as undocumented code hidden in an MPQ somewhere.
 
Last edited:
Level 2
Joined
Aug 7, 2019
Messages
5
What you're talking about is not a gameplay constant, it's just text interface. And it is just that, text. There is a bunch of unused text line that appear in the game interface customization, some became sound effect, others reference no longer used abilities (there is one for "must target fleshy corpse" formerly used by cannibalism).
I don't think you can display those strings normally, GetLocalizedString() only work for strings defined in the ui\framedef fdf files, unless I'm mistaken.
Even if you could, again it's just a string, it wouldn't do anything and it's probably leftover from old behavior possibly removed from the game code.
 
Level 5
Joined
Jul 4, 2007
Messages
84
Hey, that's cool, thanks! (Edit: I now understand my mistake thinking gameplay constants and game interface aren't that different.) I'll keep an eye out for other unused text constants from now on. I only knew about a boolean constant; ability to turn off divine shield, but the code for that is still in place just behind a boolean Gameplay - Can deactivate Divine shield. (CanDeactivateDivineShield=1 in war3mapMisc.txt) I was hoping to find something similar for reactivating the aforementioned text interface.

Glad you mentioned fdf, I just recently explored all of the framedef files (did you know there are 92 in total?) Almost a megabyte of text! I even found references to Taiwanese local law in one of them. Apparently they are supposed to register their identity (or at least nationality) with Blizzard if they want to keep their accounts around? Crazy. Portraits problem

I am an old version buff so digging up the removed code might just be something right up my alley. Which version was it removed in would be too hard of an ask so I won't even try to see if someone knows. I've kept around unpatched copies of the editor (and mpq data) since 2006, so I'll start from there. (Not every version, just before any major changes.)

By the way I'm still playing almost exclusively Reign of Chaos (and making RoC-only maps.) Even though Blizzard in their infinite wisdom has decided to grace me with a TFT license for free — I just plain prefer the simplicity of RoC. Even on ladder. Too bad I lost my RoC profile and can't even connect to Bnet anymore. Only with TFT. Thankfully there's the Warcraft III: UnForged preservation project for that!
 
Status
Not open for further replies.
Top