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-nmm6 (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-nmm6 (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-nmm6 (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
tag.override.moverate
Author Message
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #1
tag.override.moverate
Adding a peasant NPC and doing .xtag.override.moverate 1 shows no difference in movement.

Sphere.ini settings

MOVERATE=100

It seems to have no effect on other NPCs too. Is it just me, maybe I'm doing something wrong? Let me know, thanks.

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
08-09-2014 02:03 AM
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: #2
RE: tag.override.moverate
Here you have a 'bad' example of how does it works (its the code writed now 'in the fly' in spherescript to explain it. TICK_PER_SEC is equal to 10, which are the current ticks per second the Sphere is performing.
Code:
    if (<tag0.override.moverate>)
local.moverate = <tag.override.moverate>
else
local.moverate = <moverate>
endif
local.dex = <dex>
if (fRun) // If character is Moving
if (IsStatFlag(STATF_Pet))    // pets run a little faster.
  if (iDex < 75)
   local.dex = 75; // little adjust for have a minimum speed moverate on pets, so they can follow their master.
  endif
endif
local.NextMove = TICK_PER_SEC / 4 + Rand((100 - (<local.dex>*<local.tick>) / 100) / 5) * TICK_PER_SEC / 10
else
local.NextMove = TICK_PER_SEC + Rand((100 - (<local.dex>*<local.tick>) / 100) / 3) * TICK_PER_SEC / 10;
endif

So for a normal NPC (no pet) with 100 dex and 100 moverate the values will be these: 10 + Rand(33) * 10 / 10 = 41 (r33 gave me 31 when calculating). So this character will do a move each 0.4 seconds.
A normal NPC with 100 dex and 30 moverate will have thse values: 10 + Rand(10)* 10 /10 = 13 (r10 gave me 3), so this character will move each 0.1 seconds.


There are 2 more checks, one ensuring the nextmove is not lesser than 1 and other not allowing it to be higher than 50.
08-09-2014 08:12 AM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #3
RE: tag.override.moverate
I see your example above, but how I see it in-game using .xtag.override.moverate 5 on an npc and .xtag.override.moverate 10000 shows no difference in movement.

I use tag.override.moverate for my player's pets so they can follow commands faster (come/follow/guard/kill/go). At the moment I can't find a way to alter their walk/run speed, they move like snails!

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
08-10-2014 12:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #4
RE: tag.override.moverate
I wonder if now as a staff you'll get us an answer... Tongue
01-07-2015 03:02 PM
Visit this user's website 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)