tooltip calculations?

afisakov

You can change this now in User CP.
Reaction score
37
Is it possible to do any sort of automatic calculations in the tooltip field?

I know you can fill in data values of the for <A001,DataA1> and you can multiply the value by 100 using <A001,DataA1,%> % to make ratios look like percents. |n skips to next line

Can math be done in this field, like (2n+1) where n is the level of the ability done with autofill so I do not have to type every value myself (or have it look ugly like 2*3+1 at level 3)? Or a way to make variable seen in the in-game ability tooltip using I2s() or an ingrained string variable?
 

Slapshot136

Divide et impera
Reaction score
471
I don't get why the calculations would be in the tooltip field - why not autofill the value fields and reference them? (or if it's a trigger ability, use some sort of dummy value)
 

jonas

You can change this now in User CP.
Reaction score
67
It's not possible.

If you just need to do it statically, what you can do is use either the modern abilities of JPNG, which has some sort of autofill, or use LUA and this one tool - I think it's called objectmerger or something - to actually generate the abilities from code.

What I used to do is autogenerate the LUA code from ruby, and inject it using the import command in JPNG. That way I could change the code for the object generation in my favorite editor without having to bother with //! extern lua ... or whatever the syntax used to be.

You can theoretically simulate dynamic computations with this if the set of possible values is small, and replacing the abilities as the values change. But more abilities = more load time, so use with care.
 
Last edited:

afisakov

You can change this now in User CP.
Reaction score
37
static is fine for me, I was just hoping there was some simple trick I missed to do it easier.
I keep making changes/rebalances to the abilities and having to type the new values in every level of tooltip gets tedious.
I have started using a lazy autofill to make up for it, but it does not look as good to the player who sees formula instead of number.

Btw, what is JPNG? whenever I try to google it I keep getting a job recruitment company, seems kind of like Linkedin?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I think he means JNGP = Jass New Gen Pack which was an extension to the Wc3 editor which was floating around some time ago.
 

jonas

You can change this now in User CP.
Reaction score
67
I think he means JNGP = Jass New Gen Pack which was an extension to the Wc3 editor which was floating around some time ago.
Yeah... I remembered it as jass pack new gen, so thanks for sorting that out :)

I have started using a lazy autofill to make up for it, but it does not look as good to the player who sees formula instead of number.
Yeah you should use objectmerger or w/e it was called... I know azlier made a tutorial for that
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top