Unit upgrade and Miss chance

hopy

Active Member
Reaction score
64
Got 2 questions so far today, one of them I already asked befor but doesnt work yet so I thought I'd ask again. :)

Question one: Fixed, Thank you.
The simple question about hit chance ...

Take for example:
Unit one: has the standart ability evasion wich gives him 30% chance to evade an attack.
Unit two: Has a buff from a custom curse ability wich gives him a -100% chance to miss (aka: gives him 100% bonus chance to hit).

If Unit two were to attack unit one ... how much chance of hitting would unit two have?
Would the negative curse cancel out the evasion of wont it matter and still have 30% chance of missing?

Awnser: The Curse will be calculated first and the evasion afther. so at first WIII would say: -100% chance to miss is a hit (always) and afther that it would calculate the evasion with: -30% chance to hit wich would still be only 70% chance to hit with or without the custom curse.

Question two: Fixed, Thank you. (I think? xD)
A bit more complicated question.
I want to have a unit that can upgrade to another unit like a building.
(Like in a "Scout Tower -> Guard Tower" or a Town Hall Upgrade)

It should have a gold cost, lumber cost and building time. (so beserk and stuff wont work).

Would I have to trigger this or is there a simpeler way of achieving this?
My idea was that maybe if I made the unit a building but give it normal attack and movement speed ... would it work?

The whole ability would have to be triggered. can post a trigger tomorow if I get it working.

Thank you for help in advance and +rep if you help solve a problem. Thank you.
Added awnser to the question incase someone else needs it too ... would save em time :p
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Question Two:

Under object editor, find the Techtree - Upgrades to: And insert whatever building you want to upgrade it to. Also, to change the cost of that, I think it'll be in the unit you want to upgrade to's stats. E.g.

Tower 1 upgrades to Tower 2.
Tower 1 should have Techtree - upgrades to: Tower 2
Tower 2 should have the cost you want to be in Stats - Gold cost and Stats - Lumber cost
 

hopy

Active Member
Reaction score
64
Yea but that option doesnt exist for Units ... only for buildings.
And I ain't sure if using a building as a unit would work... since it should 100% like a unit only upgradable
 

hopy

Active Member
Reaction score
64
>< BUMP ><
Sorry for double post, but 24 hours have past since the last reply ...

Please dont kill me D:
 

Nexor

...
Reaction score
74
Q #1:

I think first it "rolls" for the attacking unit: 100% chance miss will everytime miss

Then it "rolls" again for the evasion: if the attacker's hit goes through on the first chance (in this case, it won't) then it calculates the chances for the miss.

so lets say, there is a curse with a 20% chance to miss and the evasion with 30%.
from 100 attacks there will go through only 80 attacks and from the 80 will go through 70% of it, it will be then 56 from 100 attacks aka. 56% chance to hit.
 

hopy

Active Member
Reaction score
64
Alright, thank you.

Although the curse gave a -100% chance to miss (Negative value) ... so it will always hit ...

But if it calculates the curse first and the evasion afther it wont matter cause the evasion will hit either way.

Thank you +rep
 

Tyman2007

Ya Rly >.
Reaction score
74
To answer your second question, if the unit is not a building, yes you have to trigger it.

Make a dummy spell that does nothing.. And make SURE it does nothing.

Trigger it to replace the unit, and add in the tooltip how much it costs.

Inside the tooltip, you can use |n whenever you want the text to continue to another line. You can put |n|n if you want to double space it and get it out of the way of the other information.

It doesn't have to be instant. If you know jass, you can give it a wait time.
But just use unit - replace
and it's made the same way as a trigger enhanced spell.

If you feel you want to delete the unit and create a new one in its place, that works too, but it's a little harder seeing how you have to fix the leak inside of it.
 

hopy

Active Member
Reaction score
64
oh I see, not 100% chance to miss, its minus 100 :D then it will always hit

So ... if it's (minus) -100% chance to hit it will always hit even if the eneme unit has a 30% evasion? or will the curse buff be calculated first still and the curse actualy still doesnt realy matter?


To answer your second question, if the unit is not a building, yes you have to trigger it.

Make a dummy spell that does nothing.. And make SURE it does nothing.

Trigger it to replace the unit, and add in the tooltip how much it costs.

Inside the tooltip, you can use |n whenever you want the text to continue to another line. You can put |n|n if you want to double space it and get it out of the way of the other information.

It doesn't have to be instant. If you know jass, you can give it a wait time.
But just use unit - replace
and it's made the same way as a trigger enhanced spell.

If you feel you want to delete the unit and create a new one in its place, that works too, but it's a little harder seeing how you have to fix the leak inside of it.

No, I am sorry I dont know how to wor with Jass.
I could make it with GUI but I aint sure if I would be able to make the wait timer in GUI without having bug and leak trouble. :p

And without the timer it would be quite hard to balance ... oh well I'll see if I can get it to work. :)
 

Tyman2007

Ya Rly >.
Reaction score
74
You can make it in GUI also, but it's much harder. It's easier using Jass locals because they can never be overwritten, while global variables via GUI can be overwritten.

Overall, Jass is quicker. I can help you out on how, but send me a map with the GUI trigger. Don't bother with arrays.

Just do unit starts the effect of an ability

The condition with the ability

the actions saying wait and unit replace or wait and unit remove then create.
 

Nexor

...
Reaction score
74
I did not test it, but I think the percentage can move between 0 and 100% in this case the curse and the evasion calculations should be seperate from each other.
 

hopy

Active Member
Reaction score
64
Alright, I will do that tomorow... just heared I need to wake up at about 7 tomrow ... so I'd better go sleep now or else I'll have to do alot of stuff with a headache again xD

Thank you all for the help and I'll make that trigger tomorow first thing when I have some time.
 
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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top