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
Lazarus
Master
**

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

Hybris Ultima Online

Post: #21
RE: About the new combat system
(07-24-2015 04:39 AM)Rizz Wrote:  Should be if I can remember well

actdiff = <f_hitchance <src.uid>>

I am not using it right now and I replaced the script lol

tried. Working but still hitting almost everytime with 0 sword 0 tactics to a another player with 100 tactics o.o

[Image: 2hy9q0y.png]
07-24-2015 04:42 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: #22
RE: About the new combat system
Sorry, Try this

ON=@HITTRY
LOCAL.actdiff = <f_hitchance <src.uid>>
actdiff=<dLOCAL.actdiff>
07-24-2015 04:46 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: #23
RE: About the new combat system
(07-24-2015 04:46 AM)Rizz Wrote:  Sorry, Try this

ON=@HITTRY
LOCAL.actdiff = <f_hitchance <src.uid>>
actdiff=<dLOCAL.actdiff>

Still working. The problem is not the call function. The calculations are really wrong. I get a negative number everytime (that goes to 0)

http://fotos.subefotos.com/c64c674bf990f...53eeeo.png

The problem here is that actdiff = 0 is NOT fail in hittry!

[Image: 2hy9q0y.png]
(This post was last modified: 07-24-2015 05:08 AM by Lazarus.)
07-24-2015 04:51 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: #24
RE: About the new combat system
Going below 0 is normal since you have lower skills, that's why there is this part of the code

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

If you add another line like serv.b local.iDiff <dlocal.iDiff> after, you'll see your value set to 0.

Anyway I found two problems:

1) PLAYER A (allskills 1000), PLAYER B (allskills 0) -> chance to hit 20
2) PLAYER A (allskills 1000), PLAYER B (allskills 0) -> chance to hit 10
3)

Code:
    LOCAL.actdiff = <f_hitchance <src.uid>>
    serv.b FINAL <dLOCAL.actdiff>
    actdiff=<dLOCAL.actdiff>
    serv.b ACTDIFF <actdiff>

FINAL != ACTDIFF and I don't know why
(This post was last modified: 07-24-2015 05:21 AM by Rizz.)
07-24-2015 05:14 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: #25
RE: About the new combat system
I know. But actdiff 0 don't miss the hit o.O
I tried too with on=@start in swordsmanship actdiff = 0

still hit them everytime.

----
That's because the RANDOM
return <r<local.iDiff>> //always need to have some chance.

Now I have do 2 things about this:

1º //local.iDiff /= 10 comented this line (WHY /10? IF WE NEED 0 TO 100 THIS IS USELESS AND A PROBLEM HERE!) [trying something like 2 but still weird]
2º trying to get WHY the actdiff = 0 is doing NOTHING (you will still hit if the actdiff is 0)

o.O

[Image: 2hy9q0y.png]
(This post was last modified: 07-24-2015 05:34 AM by Lazarus.)
07-24-2015 05:17 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: #26
RE: About the new combat system
Change the code under @hittry with this one:

IF (<R100> < <f_hitchance <src.uid>> )
ACTDIFF=-10000
ELSE
ACTDIFF=10000
ENDIF


I don't like the solution but it works.
It gives you 10 to 20% of fail chance.
I need to work on this code and I don't have time now.
07-24-2015 05:35 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: #27
RE: About the new combat system
(07-24-2015 05:35 AM)Rizz Wrote:  Change the code under @hittry with this one:

IF (<R100> < <f_hitchance <src.uid>> )
ACTDIFF=-10000
ELSE
ACTDIFF=10000
ENDIF


I don't like the solution but it works.
It gives you 10 to 20% of fail chance.
I need to work on this code and I don't have time now.

The same: Actdiff = 0 not changing anything in Sphere hahaa

I'm frustrated now. I loved the old sphere combat system.

[Image: 2hy9q0y.png]
07-24-2015 05:41 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: #28
RE: About the new combat system
ACTDIFF=-10000 FAIL
ACTDIFF=10000 SUCCESS

Works for me.
07-24-2015 05:53 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: #29
RE: About the new combat system
(07-24-2015 05:53 AM)Rizz Wrote:  ACTDIFF=-10000 FAIL
ACTDIFF=10000 SUCCESS

Works for me.


Yes. Negative numbers are FAIL and + are SUCCESS

The problem is that IF (<R100> < <f_hitchance <src.uid>> ) this is not changing anything about. Everytime hits (10000)

even with your original formula that you posted in page 2.

You changed something?

[Image: 2hy9q0y.png]
07-24-2015 05:57 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: #30
RE: About the new combat system
I was running various code and I finally decided to create and use my own one taking just some idea from the original code posted by XuN.
(This post was last modified: 07-24-2015 10:45 AM by Rizz.)
07-24-2015 10:45 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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