SphereCommunity
miss - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: miss (/Thread-miss)

Pages: 1 2 3


miss - Art - 09-01-2012 07:28 PM

How i can control by script chance of miss of hit in combat?


RE: miss - Wap - 09-01-2012 08:46 PM

ON=@HitTry
ACTDIFF=

ACTDIFF=0 - 100% success;
ACTDIFF=-100 - 100% miss;
positive ACTDIFF - chanse of success.


RE: miss - Art - 09-02-2012 01:11 AM

How the chances works?

I tried ACTDIFF=15 to test 15% of success, but character always have success, and i tried -10, every hit is miss.


RE: miss - RanXerox - 09-02-2012 03:52 AM

ACTDIFF = Action Difficulty

From what I can tell, you can change the difficulty of the player's current action by changing this value. Any negative number means failure... but I am not sure what a positive number really means. Is that the minimum skill they need to perform that action successfully? Only a developer with access to the code could explain how it works.


RE: miss - Shaklaban - 09-02-2012 04:31 AM

im also setting actdiff 0 to never fail on hittry but im not sure is it works or not. sometimes players still miss.


RE: miss - RanXerox - 09-02-2012 04:57 AM

Before you code using ACTDIFF you might want to look at the value of ACTION to see what it is you are affecting. I've notice that often the value of ACTION in a trigger is unexpectedly lost (perhaps completed)...


RE: miss - Skul - 09-02-2012 05:07 AM

Quote:- Added ACTDIFF to characters to obtain the current action difficulty.
Suggestion: One can use ACTDIFF to modify difficulty within skill Start triggers.
Quote:- Added OF_Skill_DiffFirst = 0008. With this flag turned on, difficulty for a skill is calculated BEFORE
calling @Start/@SkillStart. This has the advantage of allowing the difficulty for a skill to be changed
via ACTDIFF within that trigger. Notice that for a skill to fail, ACTDIFF must be set above the current
(modified) skill. Setting ACTDIFF to a negative value means that the skill will abort, that is, @Fail
will not be called and no skill gain will be attempted. To always fail set ACTDIFF to a value above the
possible skill (say, 1001).
This has the sideffect of calling @SpellCast before @Start/@SkillStart. On the other hand, it is the
ultimate tool for implementing your own skill difficulties.
Here's an example of making the difficulty for arms lore AT LEAST the same value as for making the item
(using the primary skill). Characters with skill above ACTDIFF will always succeed.
ON = @Start
if ( <SRC.ACTDIFF> < <SRC.ACT.SKILLMAKE.1.VAL> )
SRC.ACTDIFF = <SRC.ACT.SKILLMAKE.1.VAL>
endif
Quote:- Changed args in functions to be writeable. This is useful in scripts, but for triggers, the server will read
back the values and use the new ones wherever it makes sense. For the time being, these triggers were
changed:
@GetHit, ARGN1 is the damage being apllied, ARGN2 the damage type (as usual, but now writeable).
@Hit, ARGN1 is now the raw damage being applied, prior to armour (writeable). ARGO is the weapon (if any).
@PersonalSpace, ARGN1 is the stamina required to move (writeable). "return 1" stops the movement, "return 0"
allows the movement but shows none of the hard-coded messages. Plain "return" or no return, works as standard.
@Hit, @HitTry and @HitMiss were also changed so that ARGO is the weapon being used (handy so you don't have to
be looking at layers n stuff).
I should add that ACTDIFF is also available, and it can be used to change the difficulty of a skill, even make
a skill succedd that would otherwise fail (by setting it to 0). It can also be used in @HitTry now, and if
set to any non-negative value, a missing hit will instead succeed.
Quote:- Removed OF_Skill_DiffFirst since the actdiff is calculated in any case.

Mostly done by Kell and partly changed by Vjaka.


RE: miss - Art - 09-02-2012 07:39 AM

So i can just use ACTDIFF = ... in SkillStart for proper effect?

Also i didn't found "OF_Skill_DiffFirst" in Revision.


RE: miss - Skul - 09-03-2012 10:20 AM

The last quote specifies more information about OF_Skill_DiffFirst. These are revisions from 55i to - 55r. First implemented by Kell, modified by Vjaka.

If I remmeber, if ACTDIFF is greater than the amount of skill you have it will always fail, if ACTDIFF is less it will have a certain fail rate depending on the difference of your skill and ACTDIFF and if ACTDIFF is 0 or less it will always succeed.

There is no float point in your skill, so setting ACTDIFF to 1000 is like setting it to 100.0%, similar idea to changing a skill value through .scp.


RE: miss - Art - 09-08-2012 09:27 AM

With actdiff=0 character always doing hit, but fighting skill not grow Sad

Maybe some special solution exist?