• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How do I change item/unit names?

Status
Not open for further replies.
I've scoured the list of triggers in search of this, and remember it being possible, to change the name of a specific item or unit once in game. Example: You have a thing of shimmerweed, something happens, and it becomes 'burnt shimmerweed' or 'tasty shimmerweed' without the need to create an entirely seperate item.

What I'm trying to do is create food bowls that are renamed after the contents inside of them.

Bowl + Macaroni = Bowl of macaroni. Since there are so many different types of combinations, I can't create an individual item for each. Plus if I did that, I would have to revamp my entire system.
Currently I've worked out a system from scratch that by using hashtables allows items to store other items and remember whats inside. I'm using it for a post office system at the moment but want to use it for food also.

Right now, if you have an envelope and click on an item it becomes a letter or parcel depending on the items class. Clicking on the letter or parcel retrieves the item. The system is perfected and you can have multiple letters/parcels in your inventory, retrieving each item's specific item.

Transferring that over to a food system, I'll be able to create a cooking system that allows a dish, when clicked and eaten, to give you the effects of the ingredients used to make it + the bonus of the food created. My problem stands with this naming issue.

If I were to retain the current method of putting food into a bowl and getting a "full bowl" item, then the player would have no idea what was inside until they eat it. However if I can rename their specific bowl, then they would know that they're eating macaroni, pasta, salad, rat poison, ect. and would know what to expect to benefit.

Is there a way to do this in world-editor or with Jass scripting?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Unfortunately, I don't think you are able to change item or unit names in-game (you can only change player names). I think the only solution would be to create different items for all combinations; probably not the news you wanted to hear :O
 
Well I'm most definitely not doing that. I've thought of an alternative though. i'll create a spell that describes objects when you click on them. by clicking on a "full bowl" (I'll probably come up with something more clever) you'll recieve a description of the contents based on string variables and hashtables that merge together to form coherent sentences.

I really can't make items for every possible combination. Not only would I be slaving away making literally thousands of items, it would defeat the purpose of my system (which is to store items and stack effects.)

And you're certain there's no custom script that can be made for this? What do you think of my alternative solution? Would it be an irritant in gameplay?
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Ya, that wouldn't be very practical to make new items for everything.

I use vJASS all the time, and I have never come across such a function. I did search through the existing functions and couldn't find anything about setting a unit or item name - sorry!

That system would work well! It's certainly better than creating all the new items.
 
Status
Not open for further replies.
Top