• 🏆 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 can i change the exact value of stats of a unit.

Status
Not open for further replies.
Level 2
Joined
Jul 15, 2015
Messages
8
Hello , recently i was bored of all RPG maps because good ones i finished.. but today doesn't exist a good RPG map.. i want to make one for myself and my clan.. and for other RPG lovers, i'm new in World Edit but in 1 day I maked a character selection, hero respawn and mobs respawn, also I maked a system when your hero die your food remain 1/1 because a bug was when you die you can pick up another hero and your food was like 2/1 :D . Now, i want to know how can i edit EXACT VALUE of stats of a costum mob/hero, like hit points, mana, damage, armor, experience need for level up ( hero ), and experience give when killed ( creep ) . And also I wanted to know how can i make a Atribute Point system, like when you chat -str (number) to add to you streght number you said, of course, if you have wood, i already make when you level up to give you five wood. Thanks in advance and sorry for my bad language..
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
it isnt that bad, trust me. This is compared to some golden gems on this site, very very understandable(even when not compared).

You cant directly change most of these directly, but you have to fall back to hacks like giving units invisible abilities that increase their life to increase their life.

The chat thingy is rather easy, you just check if user typed something in chat with substring of -str, then you check if SubString of entered message from 1 to 4 is -str and if it is, add it. Or even better, check for -str and exact match, so if they type "hey buddy -str" it wont actually level it up
 
Level 2
Joined
Jul 15, 2015
Messages
8
Can you create in trigger editor and show me a photo please? I don't understand exactly, i've made something in trigger but i don't think is good
  • Level UP Lumber
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Player - Add 5 to (Triggering player) Current lumber
This is atr points and for str is like that but i don't know how to make it work..
  • STR
    • Events
      • Player - Player 1 (Red) types a chat message containing (Substring(-str, 1, 1000)) as An exact match
    • Conditions
    • Actions
I don't find fuctions like " add player streght/agility/inteligence" .
 
Level 12
Joined
May 22, 2015
Messages
1,051
I think it is under Hero. Something like:
"Hero - Modify attribute"

I forget the exact wording.
 
Level 2
Joined
Jul 15, 2015
Messages
8
Ohh, but first is good? Event is good ?
  • STR Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing (Substring(-str, 1, 1000)) as An exact match
    • Conditions
    • Actions
      • Hero - Modify Strength of (Matching unit): Add (Key (Load 1 of 1000 from (Last created hashtable)))
Look, i try this but it doesn't work.. and i'm not sure why ::ogre_icwydt:
 
Level 2
Joined
Jul 15, 2015
Messages
8
Can you make me please a trigger and put it here ? :D

PS: Look what I make.. again don't work ..

  • STR Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing -str as An exact match
    • Conditions
    • Actions
      • Hero - Modify Strength of (Matching unit): Add 5
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
that is because there is no matching unit. If you select the unit properly it will work like wonders.

Matching unit can only be used inside the block where you do "For every unit matching condition XXX", only inside XXX will Matching unit actually be some unit, otherwise its no unit.

You have to store the unit in variable for that
 
Level 11
Joined
Jan 23, 2015
Messages
788
Change the Matching unit to Triggering Unit, it's an Event Response, just like it's name says - it responds to the Events (Casting Unit when a unit is casting a spell, Dying Unit when a unit dies etc.). If a unit/player does anything that isn't available as a specific Event Response, use Triggering Unit/Player.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
HP + MP is a little bit harder but still very possible.

One way is to use positive or negative powerup books. (I thought there was a fix for the golden special effect that is left on the ground.)
But I rather like the idea of changing it directly.

BonusMod uses the item health and item mana bonus abilities which can be abused by leveling them to gain or remove maximum health and mana.
It is also an easy way to change damage or armor.
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
  • Modify attribute
    • Events
      • Player - Player 1 (Red) types a chat message containing -str as A substring
    • Conditions
    • Actions
      • Set Substring_Strength = (Substring((Entered chat string), 5, (Length of (Entered chat string))))
      • Set Player_Hero_Integer = (Player number of (Triggering player))
      • Hero - Modify Strength of Player_Hero[Player_Hero_Integer]: Add 5
 
Status
Not open for further replies.
Top