First step: Create your hero using the Hero making guide found Here
Second step: Go to Behaviors under Data and create a behavior name (whichever you want, I used veterancy) and behavior type to be Veterancy
Third step: Set the following fields like mine, do not add veterancy levels
Fourth step: Create another behavior named (whichever stat you like, I picked Agility) and behavior type to be Buff
Fifth step: THIS IS THE MOST IMPORTANT STEP set the fields "Max Stack Count" and "Max Stack Count Per Caster" to a high number, I picked 255 for a max of stats.
Sixth step: go into the modification field and scroll down till you see damage (unscaled) and change the type of damage, for me I changed melee and ranged to 10
Seventh step: Be sure to add the veterancy behavior to your hero, click on your hero under the Unit section in Data, click on the Behavior field, and add veterancy.
TRIGGERS
Eighth step: First, I started with creating variables for all the things I will be using for the level dialog and such. Incase you are unaware on how to do that, you right click in the empty space on the left side of your trigger editor, mouse over to new, and then mouse over to new variable and click.
Ninth Step: Click on the newly created variable and mouse over to where you see type in the center of the trigger page, click on it and scroll down to dialog. Then you can rename it to whatever you like by right clicking on the variable and renaming it, I chose to name it Stats Dialog.
Tenth Step: Next, I created more variables to use, I created 3 dialog items, 3 integers, and a real variable. I named them like so. I set the XP Needed to 100 and the Hero Level to 1 to start things off.
Eleventh Step: Now, right click in the empty space on the left and mouse over to new, then mouse down to new trigger. This part is a little tedious but this is where we make a dialog box that shows your current level, xp, and attribute points.
1. I started out by making an event for this trigger, a map initialization trigger so that this will run right away.
2. I created a dialog 300x300 and placed it at the center of the screen (for testing purposes). Then I set the Stats dialog variable so that I can easily manipulate this dialog at a later time. Then I set it to show so that we can see the dialog that was just created.
3. Next I made a dialog item(label) and set the variable to Level Dialog Item. Next I moved the label 50x50 from the top left of the dialog so it looks better. Next I use the combine text for setting the text and I set the label accordingly. This way it will say "Level: " then the current level of the hero.
4. Again, I make another dialog item that is XP dialog item, then I used the Combine Text Multiple to make it show the current XP and how much XP is needed left. I set the size of the item so that it can show all the numbers correctly without chopping to the next line, and then I moved it 50x75, 25 units further than the last item so it shows in a list.
5. Now I created a dialog item and then set it to Agility Dialog Item. I set the size of it and then moved it 25 more units than the previous item. I set the text just like the Level text I set earlier. Now you are done with the dialog portion.
Twelfth Step: This next step is pretty simple. All I did here was set an event for when the unit gains experience, it runs the trigger. I set a local (Real) variable named Gained XP. Then down at the actions I just had it modify the Total XP variable to add to the Gained XP variable, then it would refresh the XP dialog item text. You can just copy this action trigger from the first trigger we made because it will display the same thing.
Thirteenth Step: This step isn't so bad either. I set an Event timer for every .2 seconds of the game (you can make it faster or slower if you like) then I made a local variable that is called Total XP. This local variable actually is a conversion variable. So when you create an integer variable, make sure you click the link at the bottom of the integer, and set the variable to do Conversion -> Convert Real to Integer. Next is the condition, every .2 seconds the game will check to see if your total experience is higher than how much you need to level, then it runs the trigger. Next, I modified 3 variables and set another one, Just modify your hero level to increase by 1, modify your agility count to increase by 2, and then subtract the Local Total XP - the XP needed. I will go over the set variable in the next step. Then, I created an action that adds an ability to a unit, you want to add 2 agility to your hero, from your hero. This way it will make the hero cast agility on itself to increase the numbers. Then you can take your dialog items that you set in the first trigger, and copy them over to this one, this will just update your labels on the dialog.
Fourteenth Step: This step is for creating the Set Variable action to make it automatically increase the amount of experience needed for each level.
First I set the first variable to XP Needed, then I changed the value to the Arithmetic Multiple (Integer). Here I chaged the operator to addition.
Then I double clicked on Integer+ to create another value that will be XP Needed as well. After that I double clicked on Integer+ again to make another Value that will be Arithmetic Multiple (Integer).
I set the operator to *, then I double clicked on Integer+ to set the first value to Hero Level, then I double clicked on Integer+ again to create another value, I set this to 100.
Now your variable should look something like this..
What this does is that when every level passes by, it will take the XP needed number, then multiply the product of the hero level and 100. This will automatically set your next levels all the way to whatever level max you want.
With this setup, every time my Hero levels, it will add 2 agility to the hero. It will appear as a buff and it wont expire. You can add as many different attributes as you'd like (as long as heroes can attain unlimited buffs)
If this isn't helpful enough, I can put into detail how to make the triggers add experience to your hero. its pretty simple if you look at the events list under triggers.. you might get a clue.
I like it up to step 7. Once you get to step 8 you assume that the reader knows how to create all that stuff. You should walk through step-by-step each step in doing step 8. Theres like 10 parts to step 8 that you dont explain. Would you please explain it?
Awesome, i'm going to try it out and see how it works. Much more clear to read thx :)~
Upon doing this trigger, it seems step five is a bit ambiguous in regards to explination. Mostly on the parts of set dialogue text part. I entered it manually and it made a jumbled mess of text in a box. How do you write that algorithm non manually?
And a Final Note : Could you post an example map of this trigger?
And a Final Note : Could you post an example map of this trigger?
^
I got to 11th step part 3 and i got lost in there, when i create the Label for the Dialog, i have a bunch of values to add, but in your picture it doesn't show like you added anything like that, i think uploading a map with this example would help us a lot. Thanks.
After spending a couple hours trying to figure it out myself I think I might have what I need. Except my dialog box is still centered in the middle of my screen and the info is just stacked on top of each other. Im going to go back through it pretty soon to see what it is. Whatever the case I appreciate the steps you guided us to so far but theres still those couple of detailed issues.
Very good tutorial, I have one question tought.
This "buff" attributes makes things really easier for leveling attribute bonus, but is there a way to show strengh, agility and intelligence in the UI next to wireframe like normal attributes does ? I followed every steps in this tuto yet it doesn't show up.
Very good tutorial, I have one question tought. This "buff" attributes makes things really easier for leveling attribute bonus, but is there a way to show strengh, agility and intelligence in the UI next to wireframe like normal attributes does ? I followed every steps in this tuto yet it doesn't show up.
In the data editor add each attribute to your hero (in behaviors)
In the data editor add each attribute to your hero (in behaviors)
I did that, that doesn't work. I don't know if you tested it yourself, but I think the way it is shown next to UI Frame is something specific to "attribute" objects. In this tutorial, for trigger purpose, we use "buff" objects instead of "attributes", and this tutorial negates the possibility to have it shown next to your UI wireframe. Or there is a step I skipped ? I tested everything :(
I did that, that doesn't work. I don't know if you tested it yourself, but I think the way it is shown next to UI Frame is something specific to "attribute" objects. In this tutorial, for trigger purpose, we use "buff" objects instead of "attributes", and this tutorial negates the possibility to have it shown next to your UI wireframe. Or there is a step I skipped ? I tested everything :(
sorry i never answerd sooner, I never actually gave you a full answer to your question before. To make the attributes show up next to wireframe, make a behavior for each(make the type Attribute). Then under your "buff" that is used by the triggers click the modifcation field and click the behaviors tab and under attributes click the green x and add your attribute(the tutorial uses agility as example) make sure you set it to add 1. Remember you will need 4 seperate buffs and 4 seperate attributes. so each buff will add to each attribute. now make sure you add the "attribute" behaviours to your unit. Now in the trigger when it adds the behaviour "buff" to the unit it will modify your attribute by the wireframe.
Just to be clear, this is only for one hero right? I started to follow it from the beginning, but it started to look less and less like you could use it for many different heroes without redoing every trigger.
sorry i never answerd sooner, I never actually gave you a full answer to your question before. To make the attributes show up next to wireframe, make a behavior for each(make the type Attribute). Then under your "buff" that is used by the triggers click the modifcation field and click the behaviors tab and under attributes click the green x and add your attribute(the tutorial uses agility as example) make sure you set it to add 1. Remember you will need 4 seperate buffs and 4 seperate attributes. so each buff will add to each attribute. now make sure you add the "attribute" behaviours to your unit. Now in the trigger when it adds the behaviour "buff" to the unit it will modify your attribute by the wireframe.
hope this helps
Thanks for your answer ! I'll test it when I got the time but it should work.
First step: Create your hero using the Hero making guide found Here
Second step: Go to Behaviors under Data and create a behavior name (whichever you want, I used veterancy) and behavior type to be Veterancy
Third step: Set the following fields like mine, do not add veterancy levels
Fourth step: Create another behavior named (whichever stat you like, I picked Agility) and behavior type to be Buff
Fifth step: THIS IS THE MOST IMPORTANT STEP set the fields "Max Stack Count" and "Max Stack Count Per Caster" to a high number, I picked 255 for a max of stats.
Sixth step: go into the modification field and scroll down till you see damage (unscaled) and change the type of damage, for me I changed melee and ranged to 10
Seventh step: Be sure to add the veterancy behavior to your hero, click on your hero under the Unit section in Data, click on the Behavior field, and add veterancy.
TRIGGERS
Eighth step: First, I started with creating variables for all the things I will be using for the level dialog and such. Incase you are unaware on how to do that, you right click in the empty space on the left side of your trigger editor, mouse over to new, and then mouse over to new variable and click.
Ninth Step: Click on the newly created variable and mouse over to where you see type in the center of the trigger page, click on it and scroll down to dialog. Then you can rename it to whatever you like by right clicking on the variable and renaming it, I chose to name it Stats Dialog.
Tenth Step: Next, I created more variables to use, I created 3 dialog items, 3 integers, and a real variable. I named them like so. I set the XP Needed to 100 and the Hero Level to 1 to start things off.
Eleventh Step: Now, right click in the empty space on the left and mouse over to new, then mouse down to new trigger. This part is a little tedious but this is where we make a dialog box that shows your current level, xp, and attribute points.
1. I started out by making an event for this trigger, a map initialization trigger so that this will run right away.
2. I created a dialog 300x300 and placed it at the center of the screen (for testing purposes). Then I set the Stats dialog variable so that I can easily manipulate this dialog at a later time. Then I set it to show so that we can see the dialog that was just created.
3. Next I made a dialog item(label) and set the variable to Level Dialog Item. Next I moved the label 50x50 from the top left of the dialog so it looks better. Next I use the combine text for setting the text and I set the label accordingly. This way it will say "Level: " then the current level of the hero.
4. Again, I make another dialog item that is XP dialog item, then I used the Combine Text Multiple to make it show the current XP and how much XP is needed left. I set the size of the item so that it can show all the numbers correctly without chopping to the next line, and then I moved it 50x75, 25 units further than the last item so it shows in a list.
5. Now I created a dialog item and then set it to Agility Dialog Item. I set the size of it and then moved it 25 more units than the previous item. I set the text just like the Level text I set earlier. Now you are done with the dialog portion.
Twelfth Step: This next step is pretty simple. All I did here was set an event for when the unit gains experience, it runs the trigger. I set a local (Real) variable named Gained XP. Then down at the actions I just had it modify the Total XP variable to add to the Gained XP variable, then it would refresh the XP dialog item text. You can just copy this action trigger from the first trigger we made because it will display the same thing.
Thirteenth Step: This step isn't so bad either. I set an Event timer for every .2 seconds of the game (you can make it faster or slower if you like) then I made a local variable that is called Total XP. This local variable actually is a conversion variable. So when you create an integer variable, make sure you click the link at the bottom of the integer, and set the variable to do Conversion -> Convert Real to Integer. Next is the condition, every .2 seconds the game will check to see if your total experience is higher than how much you need to level, then it runs the trigger. Next, I modified 3 variables and set another one, Just modify your hero level to increase by 1, modify your agility count to increase by 2, and then subtract the Local Total XP - the XP needed. I will go over the set variable in the next step. Then, I created an action that adds an ability to a unit, you want to add 2 agility to your hero, from your hero. This way it will make the hero cast agility on itself to increase the numbers. Then you can take your dialog items that you set in the first trigger, and copy them over to this one, this will just update your labels on the dialog.
Fourteenth Step: This step is for creating the Set Variable action to make it automatically increase the amount of experience needed for each level.
First I set the first variable to XP Needed, then I changed the value to the Arithmetic Multiple (Integer). Here I chaged the operator to addition.
Then I double clicked on Integer+ to create another value that will be XP Needed as well. After that I double clicked on Integer+ again to make another Value that will be Arithmetic Multiple (Integer).
I set the operator to *, then I double clicked on Integer+ to set the first value to Hero Level, then I double clicked on Integer+ again to create another value, I set this to 100.
Now your variable should look something like this..
What this does is that when every level passes by, it will take the XP needed number, then multiply the product of the hero level and 100. This will automatically set your next levels all the way to whatever level max you want.
With this setup, every time my Hero levels, it will add 2 agility to the hero. It will appear as a buff and it wont expire. You can add as many different attributes as you'd like (as long as heroes can attain unlimited buffs)
Pictures don't show up for me...
Yeah I uploaded to imageshack and tried to paste the link directly and it doesnt work.. I have attachments on there showing the pictures though.
If this isn't helpful enough, I can put into detail how to make the triggers add experience to your hero. its pretty simple if you look at the events list under triggers.. you might get a clue.
Also, this should be in the tutorials section, not map development :) Very useful, btw :)
I like it up to step 7. Once you get to step 8 you assume that the reader knows how to create all that stuff. You should walk through step-by-step each step in doing step 8. Theres like 10 parts to step 8 that you dont explain. Would you please explain it?
@xandramas: Go
Here we go.. I added a more detail step by step in triggering it. I hope it clears more things up.
Awesome, i'm going to try it out and see how it works. Much more clear to read thx :)~
Upon doing this trigger, it seems step five is a bit ambiguous in regards to explination. Mostly on the parts of set dialogue text part. I entered it manually and it made a jumbled mess of text in a box. How do you write that algorithm non manually?
And a Final Note : Could you post an example map of this trigger?
^ I got to 11th step part 3 and i got lost in there, when i create the Label for the Dialog, i have a bunch of values to add, but in your picture it doesn't show like you added anything like that, i think uploading a map with this example would help us a lot. Thanks.
After spending a couple hours trying to figure it out myself I think I might have what I need. Except my dialog box is still centered in the middle of my screen and the info is just stacked on top of each other. Im going to go back through it pretty soon to see what it is. Whatever the case I appreciate the steps you guided us to so far but theres still those couple of detailed issues.
Very good tutorial, I have one question tought. This "buff" attributes makes things really easier for leveling attribute bonus, but is there a way to show strengh, agility and intelligence in the UI next to wireframe like normal attributes does ? I followed every steps in this tuto yet it doesn't show up.
In the data editor add each attribute to your hero (in behaviors)
I did that, that doesn't work. I don't know if you tested it yourself, but I think the way it is shown next to UI Frame is something specific to "attribute" objects. In this tutorial, for trigger purpose, we use "buff" objects instead of "attributes", and this tutorial negates the possibility to have it shown next to your UI wireframe. Or there is a step I skipped ? I tested everything :(
sorry i never answerd sooner, I never actually gave you a full answer to your question before. To make the attributes show up next to wireframe, make a behavior for each(make the type Attribute). Then under your "buff" that is used by the triggers click the modifcation field and click the behaviors tab and under attributes click the green x and add your attribute(the tutorial uses agility as example) make sure you set it to add 1. Remember you will need 4 seperate buffs and 4 seperate attributes. so each buff will add to each attribute. now make sure you add the "attribute" behaviours to your unit. Now in the trigger when it adds the behaviour "buff" to the unit it will modify your attribute by the wireframe.
hope this helps
Just to be clear, this is only for one hero right? I started to follow it from the beginning, but it started to look less and less like you could use it for many different heroes without redoing every trigger.
Thanks for your answer ! I'll test it when I got the time but it should work.
I got to the Eleventh Step/2 and nothing there looks anything like it does now...well mainly the 300x300 thing.