HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Vexorian, ThyFlame, and DasJank.. your skills please..

04-07-2004, 10:32 PM#1
sans
Sorry to create a whole nother thread for this, but I assumed it would be more efficient this way. I posted a thread about a week or so ago about a hero I was creating called the soul harvester. I took Alpha's suggestion with the item charges approach and it's worked out beautifully. Now I've come to a road block and from all the attempts I've made to rectify the problem, I've concluded that I need the help of skills beyond my own.

To recap the soul harvester:
1) Each kill will add to the hero's soul tank, with a max of 60.
2) The skill I'm having problems with is something I call "Strength of Many"

The skill takes the given souls collected, an easy little variable, and devides it by 3, then multiplies it by the level of the skill and applies that number as a bonus to agil/str/int. That's where it gets complicated..

The only solution I can come up with that I *know* will work is to create a set of about 40-odd custom items, each with a previously calculated outcome of the desired bonus. One item having +1 for 3 souls collected, +2 for 6, etc etc. Then create a long redundant set of triggers that will replace the "Vial of Souls" with the appropriate item (which is essentially the exact same thing but with a bonus to stats.) The max stat bonus will be 60 at level 3 (do the math hehe). But you can probably imagine the redundancy to it all, just an ass load of seperate items with another ass load of triggers to remove, create, and give the necessary item back to the hero.

What that will accomplish is a hero with the green +bonus to stats instead of an outright trigger adjustment of the hero's individual stats, which is another option but again would require a rediculous amount of variable setting, reseting, adjusting, and mathmatics in a set of redundant triggers. The other complication with the second option is that once the trigger makes the calculations and adjusts the hero's stats, those stats are assumed to be real, so in order to effectively modify them when the soul count goes from 60 to 0 would require knowing the int/agil/str of the hero *before* the adjustment, and then again if the hero levels up causing a real change in those stats while under the stat bonus effect. See what I mean by road block? =D Haha..

I'm no JASS junkie, but I have seen what can be accomplished with a bit of real knowledge of the language, and that's why I becon. I also wanted to post it in this fashion so I could get it all out and maybe someone can help, and outline any details before hand...

If anyone feels up to the challenge PM me and I will reply with a link to my map-thus-far so I don't have to attach it or anything...

Thanks in advance..
04-08-2004, 02:42 AM#2
Quetz
You really need the entire thing to be done by item? If you could go without the item, you could just create a custom attribute bonus skill and level that up with triggers...
04-08-2004, 02:52 AM#3
sans
That's my point, I shouldn't have to use items. I'm looking at Vex's custom spell map and all the triggers/functions he uses that aren't inherently part of WEU.. and I'm like.. man.. what I'm trying to do must be ****ing cake for people with skills like Vex.

But as of now, that's the only way I can do it, and to answer your question, no. It's not that simple, because those attribute bonuses need to alter depending on how many souls are in the soul tank.. even if it decreases by one. For example, if you've got 30 souls, devide that by 3 and you get 10. At level 1, that would give you a +10 to all stats. Now if you use a soul, then you've got 29, and that only gives you +9... and it has to take effect immediately.. see what I mean?
04-08-2004, 03:07 AM#4
Quetz
Yes, I do, but you could just remove the skill from the hero and have them relearn it at a lower level in that case, couldn't you?
04-08-2004, 03:44 AM#5
sans
Quote:
Originally Posted by Quetz
Yes, I do, but you could just remove the skill from the hero and have them relearn it at a lower level in that case, couldn't you?

As far as I know, you can't actively set abilities attributes or levels. Even though the raw code is there, ie. A003,DataA1, you can't set it to a certain level for a given hero... I don't think. I haven't seen any implication that it's possible. And if I did the whole 40-odd different abilities, each one to match a certain criterian, that'd have the same redundancy as the item thing, dontcha think?

More specifically I'm looking for some sort of mathmatical equivilant to do it, or like Vex does in some of his triggers that the ability the hero researches isn't the *actual* ability the hero gets.. like so:

Code:
constant function GoblinMissiles_AbilityId takes nothing returns integer
    return 'A01O' //* Goblin Missiles ability rawcode (changes between maps)
endfunction

constant function GoblinMissiles_DamageAbilityId takes integer level returns integer
    if level == 3  then
        return 'A00R' //* Goblin Missiles Damage (level 3) ability rawcode (changes between maps)
    elseif level == 2 then
        return 'A00T' //* Goblin Missiles Damage (level 2) ability rawcode (changes between maps)
    endif
        return 'A00S' //* Goblin Missiles Damage (level 1) ability rawcode (changes between maps)
endfunction

I'm really learning a lot from Vex just by trying to disect and desipher all the JASS and stuff, but I still couldn't code anything on my own. It just helps me get insight ot what is possible... then I just have to ask someone to actually do it. :P Haha

So I think the math is there, or some sort of subtle work around.. but you're talking about giving and taking away abilities a lot, just seems like overkill. It'd be nice if ONE item's + stat bonus could be altered in real time.. that way 3 simple equations, one for each stat, could be used over and over.. then just set the DataA1 or whatever of the items + stat ability...

But like I said, I don't think it's possible to *actively* alter ability data... no matter how much of a JASS bad ass you are..
04-08-2004, 03:54 AM#6
sans
That made no since what-so-ever..

My perfect scenario is this:

I have created an item called the Vial of Souls, it's automatically given to the Soul Harvester and cannot be dropped. As he kills things, a variable changes, and the charges of that Vial are altered to match. If I could add a custom item ability of a +stat bonus (like the Crown of Kings does +5 to all) to that vial, and then use a trigger that would set the 1 or 5 or whatever bonus data to the outcome of ((souls/3)x(level) then it would be.. well.. nice.

I *imagine* it's possible with all the tricky wording I've seen and the very specific JASS code that Vex uses to do things I didn't think could happen. BUt I just have to wait back for him or someone who does know JASS that well.
04-08-2004, 04:27 AM#7
Grater
Couldn't you just use the "Set Strength / Agility / Intelligence" actions, record the old amount of bonus, then when the amount changes, subtract the old amount (which should be stored in a variable) from the heroes stats, calculate the new amount, and add it on to the heroes stats? As far as I can see this skill doesn't even require JASS...

edit: If you need the green bonus numbers then weaaddar's bonusmod is what you need, but it'd need to be modified first.
04-08-2004, 09:22 AM#8
sans
Technically, any kind of real trigger based spell can be considered JASS..






and technically that worked... =P
04-08-2004, 02:39 PM#9
Cubasis
Quote:
Originally Posted by sans
Technically, any kind of real trigger based spell can be considered JASS..






and technically that worked... =P
Oh...and the "Set STR/AGI/INT" native has the ability to affect the Temporary (green) or the permanent stats. Here are the functions:

call SetHeroStr(unit whichHero, integer value, boolean Permanent)
call SetHeroAgi(unit whichHero, integer value, boolean Permanent)
call SetHeroInt(unit whichHero, integer value, boolean Permanent)

So if you'd want to add 1 to his green str, you could do something like this:
call SetHeroStr(udg_MyHeroVar, ( GetHeroStr(udg_MyHeroVar, true) - GetHeroStr(udg_MyHeroVar, false) ) + 1, false)

So basicly I set MyHeroVar's Temporary (that "false" at the end) stat to: (His Permanent Str Stat including Bonuses - His Permanent Str Stat) + 1

Hope this helps.

Cubasis
04-08-2004, 03:00 PM#10
linkmaster23
I would help, but I guess I am not worthy enough to be put in the title... :P
04-08-2004, 07:38 PM#11
sans
Yeah I was just making things more complicated than they had to be..
It works fine now, but visually it appears to be hard-numbers and not "bonus" stats..

And linkmaster, you rule too. :P
04-08-2004, 10:02 PM#12
ThyFlame
Quote:
Originally Posted by linkmaster23
I would help, but I guess I am not worthy enough to be put in the title... :P

Somehow I got in there... o.O. That has to kill your ego, Link. :-p.



One of these days I'll actually learn JASS... but it's spring break I say! :-p.