Where in the ROM Diku/DOT codebase is the code that governs spell/skill lag?

Posted by BishopOsiris on Mon 18 Oct 2021 10:37 PM — 8 posts, 24,126 views.

USA #0
I've found a few keywords (wait_state, wait, pulse) that I thought would lead me to lag-code but so far I can't quite pin it down. I want to reduce all lag from imm chars. No spell lag. No skill lag.

Any ideas?
Australia Forum Administrator #1
What do you mean by spell lag? The time from when you cast the spell to when it takes effect?
USA #2
I mean the time between when you cast one spell till the time you can cast another spell. Offensive spells generally have 2 rounds of lag. I want to reduce that to no lag for immortals.
Australia Forum Administrator #3
What message do you get if you try to cast a spell before the rounds are up?
USA #4
No message. You are just lagged 2 rounds before the next command goes through.
Australia Forum Administrator #5
You are posting in the DoT part of the forum, but also asking about ROM Diku/DOT code bases. They may well not all do it the same way.

Does *every* command lag, or just the skills? If only the skills I would look at what happens when you type one and see where the code decides to do it later. It may put it into a queue of things to do, rather than do it immediately.

Using the debugger to follow the flow of code may be quicker than trying to work out by just looking at it.
USA #6
DOT is based on the Diku base code that's why I mentioned it. I have traced it via debugger a few times but never saw the pulse time for the skill/spell. I even set all the pulse macros to 0 but it had no affect.

DOT works just like all other Diku muds. There's lag time on any action that affects another player; offensive and defensive skills/spells used in either combat or to help a guild mate, etc. But other regular commands like says, emotes, eating, drinking, etc. have no lag.

I'll keep looking until I find it but thanks for looking anyway. I appreciate it.
Australia Forum Administrator #7

My guess is that it is related to this in update.c:

   if( --pulse_violence <= 0 )
   {
      pulse_violence = PULSE_VIOLENCE;
      violence_update(  );
   }

The violence_update function is called only every PULSE_VIOLENCE ticks (for every player) so perhaps this is why it isn’t easy to change it so that things happen faster for some players rather than others.

However I could be wrong.