I am currently making a round-based-rpg-style game. For that i made custom Units and custom Abilities and so on. Now I am trying to make a tooltip for an ability, which automaticly calculates the damage it deals, based on level and stats of the caster. During triggering, I capture all the stats and stuff in variables and by using the ability, the damage is calculated correctly. Now the question:
Is there a way to link Tooltip Data Reference to a Variable?
If not, what other way is there? The table of custom made units and abilities and behaviors seems to be empty while browsing Data References. What can I do?
"Catalog Triggers" usually refers to reading/modification of data entries via trigger, using the CatalogValueGet/Set functions.
There is a Tutorial how to use those functions. (€ thats script only, for gui you can look here, for example)
Also there is another Tutorial on how to reference data fields in tooltips. Those 2 combined should solve most of your problems.
I looked into the tutorials and realized that I don't understand even the half of it. From what I got to understand those catalog entries are the default tables, preset by blizzard, the values of which can be changed via trigger.
The problem is that my Abilities are "faked". Due to round-based-system i am using, I only need the abilities for my trgger to know, when a player uses an ability. From there, a chain of triggers lets the caster move to an area on the battlefield, play cast animation, calculate damage, place ability effecs etc. So there is no real connection between those catalogs except maybe the ability cost. The complete damage calculation is based on public and local variables in the trigger, which controls the events which happen after the player uses an ability on a unit.
I explain a little further in hope that you might find a solution if you understood my proceeding better.
In the calculation of the damage, there are 4 main things: Caster's level, level of ability used, caster's stat the ability is based on and a small random factor. When a caracter levels up, the player receives an ability point and 5 stat points (like for example it Diablo II), which he may use to increase his stats and an ability. How the points are used is saved in public variables (only the random factor is local in order for it being reset on each use of the trigger). When an ability is used, this formula is used to calculate the damage:
((0,2 * Level of Ability) * Caster's Stat the Ability is based on + 5 * Level of Caster) * Random Real between 0,8 and 1,2
This is the actual damage dealt to an enemy or all enemies, which are hit by the ability. And exactly this formula I want to have in the tooltip. Something like "Ability A: Deals x - y Damage to All Enemies."
Well it certainly is a solution but is there no more elegant way to do this? The player will control 3 Fighters, while each of them has up to 11 abilities, totaling a 33 different damage formula, which I am supposed to hide in let's say, marines', ghosts' and firebats' field values? I'm afraid I will loose track of where I put which formula. I think I will just let the tooltips be and point out only the stat, the ability is based on.
The easiest way would probably using catalog triggers to modify the damage of your damage effects directly and let the tooltip display this damage.
hes handling damage for a trigger it would be impossible to then display the damage from a damage effect because well it doesnt exist...
He could make a dummy one though.... that the ability could link to just for display purposes.... he could then change the dummy damage effects damage to display the correct damage through set catalog field value triggers.
If your using some kinda turn based system why dont you just implement a UI that players can select what abilities to use. Then you can use UI - Buttons. UI-Buttons have tool tips that I believe you can update at run time or you could just recreate them with the proper tool tips when required.
your using the actually ability buttons on the units....
these normal ability button's tooltips have nothing to do with the actual abiltiy your implementing because they are just dummy abilities that you key your triggers for spells off of
UI-Buttons have tool tips that I believe you can update at run time
- I am actually planning to insert some kind of button UI for the player to be able to upgrade, select Abilities and Stats. If their tooltips are indeed updated in runtime, this will be very helpful.
Generally I thought there was a way I could write trigger variables into tooltips and just didn't know how, so I asked. Now that I see, that there is no easy way, I will finish the system itself first (abilities, stat leveling, hit, crit, miss, evade etc) and make the UI later.
Nevertheless, thank you for the hints!
PS: Sorry, dunno how to quote here [quote] and [q] don't seem to work.