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

Dynamic Strings

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Do we have the technology yet to apply strings that come from a variable to Item Description OR Ability Description while the game is progressing ?

Example (Ability -> Item):
An ability called "Power Enchancement" in which the caster will cast the ability to give an item to gain a temporary added bonus damage (for the wielder of the item) of 50~70% at random for 3 minutes.
So the ability can give the item an added bonus damage of either 50, 51, 52, ..., 70.
Then, while the buff is in effect, an added text of how much the bonus is, will be added to the Item Description.

Example 2 (Item):
This item will deal X damage to enemy unit.
X is a formula for damage that is a Real Variable comes from Trigger Editor.
X is a dynamic variable, should not come from Object Editor, static description.

Example 3 (Ability):
Your damage will increase by 1% per 1% missing Maximum Health.
Let's say you lost 37% of Health, now you would have a +37% bonus damage.
The text in the ability description should read as "You now gain +37% bonus damage" instead of static description like "You will gain 1% bonus damage per 1% missing Maximum Health.
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
Unless there's a native for it, there's no way to change an object's field values dynamically / in game.

If there was a way to write/read from memory in game / via triggers (as is the case for Starcraft I), then perhaps you could change the value in the string table or whatever data structure the item descriptions are put in, or the pointer of the item description.

I'm certain there is a safe way to write/read to some areas of memory in WC3, perhaps taking advantage of buffer overflows, but people haven't cared enough to find this out. In Starcraft I, they use "extended" units to accomplish this task: http://www.staredit.net/topic/15356/

Barring the non-existent memory reading/writing API, you just have to use what the editor supports.

To simulate what you want, you could just create many different versions of your items, and do an item replacement each time.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I guess you COULD do it by modifying the memory. Which is basically hacking with a third party program.
Any such method can be considered unsafe and will have to be patched for security reasons. This was the case with the type casting exploit and code type variables.

It just is not possible in WC3. Fortunately they added such support to StarCraft II as seen in Heroes of the Storm.
 
Status
Not open for further replies.
Top