The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About the new combat system
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
About the new combat system
I noticed that now is very easy to miss a target, is there some kind of local or argn to manage the chance to hit?
Should I script something on my own?
07-06-2015 06:22 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: About the new combat system
In @HitTry: actdiff < 0 always fail, >=0 always success.
07-06-2015 06:32 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #3
RE: About the new combat system
(07-06-2015 06:22 AM)Rizz Wrote:  I noticed that now is very easy to miss a target, is there some kind of local or argn to manage the chance to hit?
Should I script something on my own?

Yes. Is something weird. I want the old system :'( (with the changes of damage formula)

[Image: 2hy9q0y.png]
07-14-2015 07:34 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #4
RE: About the new combat system
I've noticed that too... so there is no way to change it unless we re-script a part of sphere that have been "improved"??? whats the chances??? its funny or sad? :/

Back the old system or unleast let us chooose the system we want!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
07-14-2015 10:45 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #5
RE: About the new combat system
(07-14-2015 10:45 AM)escribano Wrote:  I've noticed that too... so there is no way to change it unless we re-script a part of sphere that have been "improved"??? whats the chances??? its funny or sad? :/

Back the old system or unleast let us chooose the system we want!


Chill out man Tongue they are working. I know, it's frustrating because we can't live our shards fine, but they're trying the best, Coruja and XuN have reworked all the emulator and fixed the bugs that Sphere has had. Now is better, but when they change something big (like the combat system and speed formulas) there are mistakes sometimes.

I agree with your call, hope they will let us choose the old system too because we all need that.

Big Grin

[Image: 2hy9q0y.png]
(This post was last modified: 07-14-2015 01:22 PM by Lazarus.)
07-14-2015 01:19 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: About the new combat system
Here's the old formula scripted and commented like we had it in the source:

Code:
[function f_HitChance]
// src should be my target

if !(<src.isChar>)
return <r31>// must be a training dummy
endif

if ((<brain>==brain_guard) && (<serv.GuardsInstantKill>==1))
return 0
endif

// Frozen targets should be easy.
if ((<src.flags>&statf_freeze) || (<src.flags>&statf_sleeping))
return <r10>
endif

local.iSkillVal = <i.<action>> // value of the skill whe are using to hit.
// Offensive value mostly based on your skill and TACTICS.
// 0 - 1000
local.iSkillAttack = <local.iSkillVal> + <eval <tactics>/2>

// Defensive value mostly based on your tactics value and random DEX,
// 0 - 1000
local.iSkillDefend = <src.tactics>

// Make it easier to hit people havin a bow or crossbow due to the fact that its
// not a very "mobile" weapon, nor is it fast to change position while in
// a fight etc. Just use 90% of the statvalue when defending so its easier
// to hit than defend == more fun in combat.
local.iStam= <src.dex>
if (<serv.skill.<action>.flags>&skf_ranged)
// The defender uses ranged weapon and the attacker is not.
// Make just a bit easier to hit.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*9))/2
else
// The defender is using a nonranged, or they both use bows.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*10))/2
endif

local.iDiff = (<local.iSkillAttack> - <local.iSkillDefend>) /5
local.iDiff /= 10

if (<local.iDiff> < 0)
local.iDiff = 0 // just means it's very hard.
elseif (<local.iDif>> 100)
local.iDiff = 100 // just means it's very easy.
endif

return <r<local.iDiff>> //always need to have some chance.

EDIT: the less iDiff, the more difficult.
(This post was last modified: 07-18-2015 07:17 PM by XuN.)
07-14-2015 04:45 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: About the new combat system
That was a nice hit formula Big Grin, I like the idea of more easy to hit an opponent with a ranged weapon
(This post was last modified: 07-14-2015 06:58 PM by darksun84.)
07-14-2015 06:36 PM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #8
RE: About the new combat system
(07-14-2015 04:45 PM)XuN Wrote:  Here's the old formula scripted and commented like we had it in the source:

Code:
[function f_HitChance]
// src should be my target

if !(<src.isChar>)
return <r31>// must be a training dummy
endif

if ((<brain>==brain_guard) && (<serv.GuardsInstantKill>==1))
return 0
endif

// Frozen targets should be easy.
if ((<src.flags>&statf_freeze) || (<src.flags>&statf_sleeping))
return <r10>
endif

local.iSkillVal = <i.<action>> // value of the skill whe are using to hit.
// Offensive value mostly based on your skill and TACTICS.
// 0 - 1000
local.iSkillAttack = <local.iSkillVal> + <eval <tactics>/2>

// Defensive value mostly based on your tactics value and random DEX,
// 0 - 1000
local.iSkillDefend = <src.tactics>

// Make it easier to hit people havin a bow or crossbow due to the fact that its
// not a very "mobile" weapon, nor is it fast to change position while in
// a fight etc. Just use 90% of the statvalue when defending so its easier
// to hit than defend == more fun in combat.
local.iStam= <src.dex>
if (<serv.skill.<action>.flags>&skf_ranged)
// The defender uses ranged weapon and the attacker is not.
// Make just a bit easier to hit.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*9))/2
else
// The defender is using a nonranged, or they both use bows.
local.iSkillDefend = (<local.iSkillDefend> + (<local.iStam>*10))/2
endif

local.iDiff = (<local.iSkillAttack> - <local.iSkillDefend>) /5
local.iDiff /= 10

if (<local.iDiff> < 0)
local.iDiff = 0 // just means it's very easy.
elseif (<local.iDif>> 100)
local.iDiff = 100 // just means it's very hard.
endif

return <r<local.iDiff>> //always need to have some chance.

And what's changed in the new formula? why is so hard to hit?
How can I reactivate this formula in my sphere? just change it in Combat?

[Image: 2hy9q0y.png]
07-16-2015 01:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #9
RE: About the new combat system
Code:
local.iDiff = (<local.iSkillAttack> - <local.iSkillDefend>) /5
local.iDiff /= 10

if (<local.iDiff> < 0)
local.iDiff = 0 // just means it's very easy.
elseif (<local.iDif>> 100)
local.iDiff = 100 // just means it's very hard.
endif

WHO ATTACKS skillsum 1000
WHO DEFENDS skillsum 2000

local.iDiff = 0 --> always hit, are you sure is correct?

100 means 100% hits or 100% miss?
(This post was last modified: 07-16-2015 08:07 AM by Rizz.)
07-16-2015 08:07 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #10
RE: About the new combat system
Didn't read the comments, just copied them.


Success formula is something like this:

[function Skill_CheckSuccess]
local.dif=<eval <ActDiff>*10>
return <qval <local.diff> > <r1000>?1:0>

There are some more checks to make a bell curved check, but they are rarelly used and very complex and long to script them now Tongue

Coming back to topic, these comments are wrong ... they should be the opposite.
07-18-2015 07:17 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)