Scaling Summons?

Sgt_Johnson

Active Member
Reaction score
1
I'm working on a new RPG and one of the classes (Necromancer) will be able to summon necro-like stuff such as skeletons, golems... you know what all that is lol.

But anyway is there any possible way to make the summons scale with how powerful the user is? Such as having life and damage and such based off the necromancer's stats.
 

jwallstone

New Member
Reaction score
33
Make a trigger with the Unit Enters Region event, with the region = playable map. Then, if the Summoned unit type matches, improve its stats with a system like Unit Properties.
 

RangerX

I am justice!
Reaction score
69
i have something like that on one of my "play with a friend" map :) if this what you searched for feel free to use it [and i know that are leeks and such in this map so be sure you get rid of does:) ]
Check the upgrade "Hp Points" and the Trigger "BladeMasterHpPoints"
 

TheCrystal

New Member
Reaction score
36
You need a special system for adding health, and for damage you need a system of an Integer Check for damage based off of doubles.
Damage +1
Damage +2
Damage +4
Damage +8
Damage +16
Damage +32
Damage +64
Damage +128

Etc. Each one of those add the damage of the plus, you need a system to check that.,
 

Sgt_Johnson

Active Member
Reaction score
1
Ok heres a better example of what I need.



Example

* Necromancer casts "Raise Dead"
* 3 Skeletons with a lets say, 100 base life and 10 base damage are raised.
* Each Skeleton then recieves bonus life equal to 50% of the Necromancer's Strength, and bonus damage equal to 50% of the Necromancer's Intelligence


Thats also just an example, in my map those numbers wouldn't be accurate.



CnP'd from one of my other posts on the hive for this same subject. Set integers for adding the damage just won't do as I need the summons to scale with the strength of the hero, not just become inferior as the hero becomes more powerful.
 

Yoshii

New Member
Reaction score
74
well you could make research such as animal war training( you can make it add Hp,dmg etc) but research cannot be unlearnt but since the hero doesnt get weaker it could still work

2nd option would be to the summoned skeleton as hero this way you could change their stats.
 

Sgt_Johnson

Active Member
Reaction score
1
well you could make research such as animal war training( you can make it add Hp,dmg etc) but research cannot be unlearnt but since the hero doesnt get weaker it could still work

2nd option would be to the summoned skeleton as hero this way you could change their stats.

Upgrades are completely out of the question, and yes the heroes stats can be changed (Removing equipment that improves stats?)

Hero could work, I did that in my last RPG map, though it could cause some issues possibly with other parts of the map. I'd prefer to just figure out a way to add life/damage to the summon as its summoned.
 

Yoshii

New Member
Reaction score
74
Upgrades are completely out of the question, and yes the heroes stats can be changed (Removing equipment that improves stats?)

Hero could work, I did that in my last RPG map, though it could cause some issues possibly with other parts of the map. I'd prefer to just figure out a way to add life/damage to the summon as its summoned.

hero is probably the best way to go about it because you can store the int,str and agi and set the unit to any % of it; i cant see cause issue with other part of your map; even in the case where you trigger is like "pick every unit matching unit is a hero" you could a 2nd condition to not pick the summoned type.
 

TheCrystal

New Member
Reaction score
36
As I said, for damage you need to do what I said and for life you need to find this hack some guy found that permanently adds hitpoints.
Here's part of my system for adding damage.

JASS:
if i >= 32768 then
    call UnitAddAbility(u,'A01D')
    set i = i-32768
endif
if i >= 16384 then
    call UnitAddAbility(u,'A01C')
    set i = i-16384
endif
if i >= 8192 then
    call UnitAddAbility(u,'A015')
    set i = i-8192
endif
if i >= 4096 then
    call UnitAddAbility(u,'A014')
    set i = i-4096
endif

i in this case is the number I want the damage to be, u is the unit I'm adding. Inside the ' ' is the ability's raw data. There's a more efficient method but that's more confusing.
 

Kahem

New Member
Reaction score
2
Use the item abilities like the hp increase and the damage increase
set their icons to nothing and make them unit abilities.

a unit is summoned
unit = to skelli
give summoned unit the abilitys
set level of ability to summong units stat / 2

if you want a more detailed way to do it or even a demo map ask k?
 

TheCrystal

New Member
Reaction score
36
If you do it that way, you'll have a shitload of levels, the icons will also default to green.
 

vypur85

Hibernate
Reaction score
803
> shitload of levels, the icons will also default to green

Not really.

For health/mana, see this.

For damage, see this.

Both require very few abilities (5 at most?) with not more than 10 levels each. They don't show icon at default. No green icons will appear.
 

TheCrystal

New Member
Reaction score
36
What of the one I have that requires TWO abilities for a no limit HP or Mana stat?

The other one has an additional damage that requires many abilities (Based off of multiplying from the previous, AKA 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 (can go further), but it isn't hard to use. I'm using both in my map.
 

vypur85

Hibernate
Reaction score
803
> What of the one I have that requires TWO abilities for a no limit HP or Mana stat?

That is the one I linked. I just make it easier for the guy to look at for explanation and demo map.


> that requires many abilities

The other link I posted only requires 5 abilities, with 10 levels each. Can go up to 99999 damage.


No worries :). I never doubt your system. Just stating the incorrect statement as per quoted in post above.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
Heh I have something similar.... I think it's an easy way (probably not very efficient)and requires a bit of OE work but that's ok right? ^^
The following is run on map init (don't forget to check the 'Run on Map Initialization' checkbox)

JASS:
function SetSkeletons takes nothing returns nothing
    set udg_Skeletons[1] = 'e001' // this is the skeleton unit with ex: health 20, damage 4-4, Scale Size 1.0, defense 1, set the level to 1 and do something with GetUnitLevel() 
    set udg_Skeletons[2] = 'e002'// this is the skeleton unit with ex: health 40, damage 8-8, Scale Size 1.10, defense, set the level to 2 and do something with GetUnitLevel()
    set udg_Skeletons[3] = 'e003'//and so on...
    set udg_Skeletons[4] = 'e004'
    set udg_Skeletons[5] = 'e005'
    set udg_Skeletons[6] = 'e006'
    set udg_Skeletons[6] = 'e006'
    set udg_Skeletons[7] = 'e007'
    set udg_Skeletons[8] = 'e008'
    set udg_Skeletons[9] = 'e009'
    set udg_Skeletons[10] = 'e00A'
    set udg_Skeletons[11] = 'e00B'
    set udg_Skeletons[12] = 'e00C'
    set udg_Skeletons[13] = 'e00D'
    set udg_Skeletons[14] = 'e00E'
    set udg_Skeletons[15] = 'e00F'
    set udg_Skeletons[16] = 'e00G'
    set udg_Skeletons[17] = 'e00H'
    set udg_Skeletons[18] = 'e00I'
    set udg_Skeletons[19] = 'e00J'
    set udg_Skeletons[20] = 'e00K'
endfunction
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function InitTrig_Set_Skeletons takes nothing returns nothing
    set gg_trg_Set_Skeletons = CreateTrigger()
    call TriggerAddAction(gg_trg_Set_Skeletons, function SetSkeletons)
endfunction


And for the spell itself:
JASS:
function Skeletons_Cond takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function Treezy_Main takes nothing returns nothing
    local integer s = GetHeroStr(GetTriggerUnit(), false)
    local integer a = GetHeroAgi(GetTriggerUnit(), false)
    local integer i = GetHeroInt(GetTriggerUnit(), false)
    local integer totalstats = s + a + i
    local unit u 
    set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()), udg_Skeletons[totalstats / 50], GetSpellTargetX(), GetSpellTargetY(), 270)
    call UnitApplyTimedLife(u, 'BTLF', 180)
    //if GetUnitLevel(u) > 1 then
    //    call UnitAddAbility(u, 'A00J')
   // endif
endfunction
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function InitTrig_Treezy takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition(function Treezy_Cond))
    call TriggerAddAction(t, function Treezy_Main)
endfunction

The logic is that if the Necromancer has 50 total stats he will spawn Skeleton unit with RAW code 'e001' aka level 1
If he has 100 total stats the spawned unit will be 'e002'
If he has 149 the spawned unit will still be 'e002'
becase integer division drops remainder (149 / 3 = 2.98 and when droped it becomes 2)

You can work out your own logic that still complies to this principal.
 

TheCrystal

New Member
Reaction score
36
The reason I doubted the first one was because the code wasn't JASS, since this is the code I have is:
JASS:
constant function MaxStateModifierId takes unitstate u returns integer
    if u == UNIT_STATE_MAX_LIFE then
        return 'A000' // Rawcode of the Max Life Modifier ability.
    elseif u == UNIT_STATE_MAX_MANA then
        return 'A001' // Rawcode of the Max Mana Modifier ability.
    endif
    return 0
endfunction
//call SetUnitMaxState(udg_TempUnit, UNIT_STATE_MAX_LIFE, udg_TempInteger)
function SetUnitMaxState takes unit whichUnit, unitstate whichUnitState, integer newVal returns boolean
    local integer c = newVal-R2I(GetUnitState(whichUnit, whichUnitState))
    local integer i = MaxStateModifierId(whichUnitState)
    if i == 0 then
        return false
    endif
    if c > 0 then
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 4)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 3)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 2)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    elseif c < 0 then
        set c = -c
        loop
            exitwhen c == 0
            call UnitAddAbility(whichUnit, i)
            if c >= 100 then
                set c = c - 100
                call SetUnitAbilityLevel(whichUnit, i, 7)
            elseif c >= 10 then
                set c = c - 10
                call SetUnitAbilityLevel(whichUnit, i, 6)
            else
                set c = c - 1
                call SetUnitAbilityLevel(whichUnit, i, 5)
            endif
            call UnitRemoveAbility(whichUnit, i)
        endloop
    endif
    set whichUnit = null
    return true
endfunction

As for the second one, I put my damage system down in case he has ridiculous amounts for some reason, both work nonetheless.
 

Immolation

Member
Reaction score
20
Try eGUI. It has functions to modify MaxHealth and Damage and whateverelseyouneedtodowithyoursummons.

~Immolation
 

Viikuna

No Marlo no game.
Reaction score
265
Probably yea.

Id just use UnitProperties, in case you dont wanna create dozens of different unit types...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top