• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Is UnitAddAbility have to be synced?

Status
Not open for further replies.
Level 19
Joined
Dec 12, 2010
Messages
2,069
I can't test any multiplayer-based stuff, so asking on forums again.

Can ability be added to unit just for one local player? Conditions are simple - its passive ability with no effect (f.i. Evasion with 0% chance).

Let's say we have Player1 and Player2 ingame, they are foes. If localplayer == P2 then P1's hero receive Evasion ability and vise verca. Those abilities doesn't exist for anyone but enemy.

Will that Evasion chance still calculate and desync randomness? If it won't, how about if command card will be filled with another skills? Lets say P1's hero has 7 skills, which took all free slots. This evasion will take slot from the point of P2, but there are still all 7 skills visible for P1. Will P1 be able to cast all 7 spells or desync will start once he would try to cast spell, which has been replaced by Evasion for P2?

One more time - ability have NO any impact on the game. All i want right now is the ability which exists locally and do nothing beside that existing.
 
So you only want visual buttons for any other player that basicly do nothing but take up button slots in the command card for enemy players is they click the unit? If so, I don't think that's possible. There's a couple of workarounds you can apply, though, like making those units shops and creating dummy items/units sold by the shop with a tooltip that matches the abilities.
 
Even if there is no real effect/impact in game, there still might be evaluations. (seems logical to me) So, as guess I would say it does not change it, that you set it to 0. (not tested)

All i want right now is the ability which exists locally and do nothing beside that existing.
Why do you want this? Maybe there is an other way, which would not abuse anything like this.

Btw, to note: I've read in some posts already that you can simulate multiplayer games with JNGP 2.0. to test on your own.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
Even if there is no real effect/impact in game, there still might be evaluations.
ya, thats why Evasoin can be replaced by anything else, for instance - with Channel the-only-existing-order-use. this way it wont affect anything but probably command card altering from point of another player.

Another way - hidden spellbooks with the same evasion ability. But then here comes spellbook local hiding, not even evasion.

You can't do anything locally that actually affects the gameplay.
i pointed that twice - 0 chance to evade, cant affect gameplay in terms of unit actions. the only issue i can see that - local memory offset will be different and dices could still be shaked even for 0 chance.

Why don't you just tell us what you are trying to accomplish, so we can suggest a solution for that?
it have no other good solution. either it works, either i forfeit this solution. it designed to defend against maphackers (another time)
 
If you need this only to combat maphackers, I'd say it's not worth the trouble. People will always cheat if they want to. There's no way to make your map fully secure of that - but there's no reason either. You don't make a living of mapping, don't you? So why care about some people cheating? They get bored of the map very quickly anyway.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
its not about how quickly we can surrender but how hard we can hit back. this one requires 5 mins of implement, the only thing is questionable is syncing. and i see no point to ignore maphackers while its the main feature of all newest games - no hack gaming.
 
Level 12
Joined
Oct 16, 2010
Messages
680
if u give locally an ability it will desync when you use it (there is no way an ability won't affect game if cast beside visually) or talking of evasion the game still recognizes the ability while the other player won't...:p I think there WILL be problem with the dices. your game calculates the chance of miss that is 0% and sends data to other player of it. Correct me if I'm wrong but that should be a problem :p

but how dose this helps you against cheaters?Oo
 
Level 12
Joined
Oct 16, 2010
Messages
680
but generally casting an ability that is local for that player will desync. so no point to try masking it from other players:p

such hacks base is global vision which can be prevented easier.. create a unit that noone can possibly see check every sec if its in players vision.. if it is kick him out of eternity
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
this hidden ability cannot be casted, used, iteracted or anything else. it could be even aura with 0 values affecting "none".
and no, hacks doesnt affect natives behaviour - wc3 still think that unit/point fogged. hacks beat the shit out of graphic driver, not wc3's engine
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,223
Yes local abilities will cause desyncs. Any order that gets issued will break on all clients that do not have the ability so a lot of "generic" triggers will fail to run which will eventually result in a desync somewhere. A local evasion ability will definitely desync when the unit is attacked as it will offset the RNG so all randomness no longer matches.

You could try locally disabling abilities however. Units can still own fully functional disabled abilities (most famous of which is the disabled spell book). There is a small chance that a castable disabled ability might still synchronize across all clients even if most have the button disabled as long as there is no fail safe check for casting disabled abilities.
 
Level 12
Joined
Oct 16, 2010
Messages
680
this hidden ability cannot be casted, used, iteracted or anything else.
Evasion (when demaging) auras ( how thay affect units ) may be problematic ...
Try with channel... no cast , no order id , nothing.. only visibility option
that might work better but tests needed. It all depends of when a unit gets in the vision of other player wether it sinc ability data between players. If so there will be difference and then every local ability will cause desync:/

EDIT: also this
Will P1 be able to cast all 7 spells or desync will start once he would try to cast spell, which has been replaced by Evasion for P2?
surely cause desync
 
its not about how quickly we can surrender but how hard we can hit back. this one requires 5 mins of implement, the only thing is questionable is syncing. and i see no point to ignore maphackers while its the main feature of all newest games - no hack gaming.
It's not easy and requires much more than 5 mins to implement. The fact that you have to make a post about this to ask for help should have already proven that. ;)

So, again, my suggestion is: if it's only to prevent people from cheating, just save your map the trouble of exposing it to potential desyncs only to get rid of a 1 in 10000 maphacker. It's not worth it and it's way more likely people will just exploit bugs in your map than actually applying hacks anyway (not kidding... I've seen countless maps that claimed to be "unhackable", yet failed to get rid of gamebreaking bugs).

You are not creating an e-sports game. You are creating a WC3 map. ;)
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
all i have to consider is sync, which is could be only tested but not theorycrafted, thats why i asked. the concept itself already proov, i just lurking about possibilities to extrapolate that even more commonly.

and there are second point - mh is more common thing today, especially in non-platform gaming (garena). i will not trash map for defense purposes but will do stuff which is surely safe. im not going to say "unhackable" - nobody can.
 

EdgeOfChaos

E

EdgeOfChaos

This is kind of old, but if anyone is wondering, the game desyncs the moment that the ability is added, no exceptions. Even if it has no effect on the game, even if it's an ability like Vorpal Blades that literally does nothing.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
for anyone wondering:
JASS:
local integer aid='A000'
if GetLocalPlayer()==MyPlayer then
set aid='A001'
endif
call UnitAddAbility(u,aid)
of course they should be based on the same thing, just for sake of consistency, unless you sure they won't collide with game process
 
Status
Not open for further replies.
Top