The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Pause between spells!
Sikret
post Jun 24 2006, 01:34 PM
Post #1


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




This tutorial contains a false comment inside one of its codes:

QUOTE

This is a technique used to account for the pause between spellcasting. It cuts off spellcasting actions when they cannot be performed,[...] So, you might have the following block:


IF
    !GlobalTimerNotExpired("castnattack","LOCALS")
    HaveSpellRES("spwi999",Myself)
THEN
    RESPONSE #100
        SetGlobalTimer("castnattack","LOCALS",6) // Timer always set to 6, as that is the duration of the pause
        SpellRES("spwi999",LastSeenBy(Myself))
END

Well, this is wrong!

As I have mentioned elsewhere the duration of the pause is NOT 6. I don't know how many modders might have been misled by the fasle comment inside the code which says "as that is the duration of the pause", but it's now perhaps the time to let people know that it is false.

The duration of the pause varies from spell to spell (it's not 6 for every spell). I know the exact duration of the pause for each and every spell, but the easiest way to implement the correct duration of the pause is to use "SpellNoDec" instead of "ForceSpell" as it is implemented in Improved Anvil.


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
Baronius
post Jun 24 2006, 02:23 PM
Post #2


Master of energies
Group Icon

Council Member
Posts: 3307
Joined: 9-July 04
From: Magyarország




I'm sure SimDing0 will be happy to correct it, and all other sources (if any) which give incorrect information in this respect will also get updated, hopefully.


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Creepin
post Jun 24 2006, 05:04 PM
Post #3





Forum Member
Posts: 35
Joined: 21-September 04
From: Moscow




Mmm... I've always thought that 6 (one round) is the pause between starting of casting one spell and another, not between end of first spell and start of second (hence timer action is before casting action in action list). As length of casting time may wary, so gap between spells wary as well, which is irrelevant for purposes of determening when you could cast next spell. May be this is the case?
Go to the top of the page
 
Quote Post
Sikret
post Jun 24 2006, 05:39 PM
Post #4


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




Perhaps! (It can be tested.)

Still the claim in the turtorial is explicit:
QUOTE

Timer always set to 6, as that is the duration of the pause

Which is false.


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
Baronius
post Jun 24 2006, 06:00 PM
Post #5


Master of energies
Group Icon

Council Member
Posts: 3307
Joined: 9-July 04
From: Magyarország




While Sim's comment in question may look just ambigious, and not explicitly false, it's obvious that its general interpretation will be: pause between the end of casting a spell and the start of casting the next one, which will result in malfunctioning for those who interpret it in this way.


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Sikret
post Jun 24 2006, 06:20 PM
Post #6


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




I performed a test (with spells with long spell casting times) and it seems that Creepin's comment is right. If the timer is set before the spell-casting action, it works fine. Thank you, Creepin!

However, the duration of the pause is not 6 (as claimed in the tutorial), so yes, the comment in the tutorial needs to be edited, because, as it stands, it is false and misleading (though the code works).

Still, using "SpellNoDec" instead of "ForceSpell" has several other advantanges (as I have mentioned in the SpellNoDec thread here) as well as the fact that we will NOT need the timer either.

So, to optimize his tutorial, Sim would need to edit his comment inside the code and would also need to add the possibility of using "SpellNoDec" along with all of its advantages over "ForceSpell".


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
SimDing0
post Jun 26 2006, 05:51 PM
Post #7





Forum Member
Posts: 106
Joined: 14-August 04




Thanks for the comments.

Yes, the wording is slightly unclear. No, I don't think it's an emergency.

SpellNoDec shouldn't be overencouraged because it doesn't account for Nishruus draining spells, nor the player assuming control of creatures. I have to confess that I tend to get lazy and use it because editing spellbooks is such a pain, though.

I'm not entirely sure why you elected to discuss the tutorial here. I'm surprised I found this thread, actually. I don't browse here very much.

This post has been edited by SimDing0: Jun 26 2006, 05:51 PM
Go to the top of the page
 
Quote Post
Baronius
post Jun 26 2006, 06:52 PM
Post #8


Master of energies
Group Icon

Council Member
Posts: 3307
Joined: 9-July 04
From: Magyarország




I believe that the issue he brought up wasn't related to your tutorial only, it was also a matter regarding the pause between spells -- which is something that can be discussed in a technical IE forum. Furthermore, I don't know whether your Scripting Tutorial has a forum (and if yes, where), for example.


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post
Andyr
post Jun 26 2006, 10:42 PM
Post #9


A fool and a knave


Forum Member
Posts: 153
Joined: 21-July 04
From: Oxford, UK




QUOTE(Baronius @ Jun 26 2006, 06:52 PM)
I believe that the issue he brought up wasn't related to your tutorial only, it was also a matter regarding the pause between spells -- which is something that can be discussed in a technical IE forum.

In which case a more explicit topic title ("Pause between spell casting" or somesuch) would have been more useful than "Misleading tutorial".

Good work on finding that one out, though, Sikret.


--------------------
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods.

<jcompton> Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"
Go to the top of the page
 
Quote Post
Sikret
post Jun 27 2006, 12:17 AM
Post #10


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




Thank you, Andyr!

Since the title of this topic might have caused some confusions, I edited it.

The number of (IE Modding) sites I regularly browse are few. Whenever, I find something interesting or encounter a problem or have a question, I usually send it here to BWL. However, I don't send general topics to my own mods' forums here (hence the analogy of quest pack forum fails).


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
Sikret
post Jun 27 2006, 10:54 AM
Post #11


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




QUOTE(SimDing0 @ Jun 26 2006, 09:21 PM)
Yes, the wording is slightly unclear.

I don't think that the wording was unclear. It was clear, but plainly false.
QUOTE

No, I don't think it's an emergency.

It's up to you to decide how urgent is to correct the mistake.
QUOTE

SpellNoDec shouldn't be overencouraged because it doesn't account for Nishruus draining spells,

I think that "ForceSpell" doesn't account for Nishruus draining spells either. Since I was comparing "SpellNoDec" with "ForceSpell", your comment is off-target. My main point was that if you use "SpellNoDec" instead of "Forcespell" you will not need the timer at all.
QUOTE

I'm not entirely sure why you elected to discuss the tutorial here. I'm surprised I found this thread, actually. I don't browse here very much.

My intention was not to report anything to *you*. And you don't seem to be willing to correct your mistakes either.


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
SimDing0
post Jun 27 2006, 12:25 PM
Post #12





Forum Member
Posts: 106
Joined: 14-August 04




You do make me laugh.
Go to the top of the page
 
Quote Post
Sikret
post Jun 27 2006, 01:17 PM
Post #13


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




QUOTE(Baronius)

While Sim's comment in question may look just ambigious, and not explicitly false, it's obvious that its general interpretation will be: pause between the end of casting a spell and the start of casting the next one, which will result in malfunctioning for those who interpret it in this way.

Yes, the natural interpretation of the phrase "pause between spells" is the period of time during which the caster is not casting (i.e. the time between the end of the first spell and the beginning of the second one). Honestly, I don't see how it can be interpreted in a different way, but even if we agree that the phrase is ambiguous (rather than false), such a highly ambiguous and misleading phrase needs to be edited to avoid confusions. However, it's upto Sim to decide whether to correct and optimize his tutorial or not. His attitude shows that I did the right thing by not wasting my time in another site reporting anything directly to him.

Furthermore, my point about using "SpellNoDec" instead of "ForceSpell" makes that particualr part of his tutorial entirely redundant. The code will not need to include any timer.

This post has been edited by Sikret: Jun 28 2006, 06:24 AM


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
SimDing0
post Jun 27 2006, 01:45 PM
Post #14





Forum Member
Posts: 106
Joined: 14-August 04




QUOTE(Sikret @ Jun 27 2006, 01:17 PM)
Furthermore, my point about using "SpellNoDec" instead of "ForceSpell" makes that particualr part of his tutorial entirely redundant. The code will not need to include any timer.

Had you posted this anywhere else, I'd explain why this is untrue. But this is BlackWyrm, so nobody will be reading. smile.gif
Go to the top of the page
 
Quote Post
jastey
post Jun 27 2006, 03:04 PM
Post #15





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




QUOTE(SimDing0 @ Jun 27 2006, 03:45 PM)
QUOTE(Sikret @ Jun 27 2006, 01:17 PM)
Furthermore, my point about using "SpellNoDec" instead of "ForceSpell" makes that particualr part of his tutorial entirely redundant. The code will not need to include any timer.

Had you posted this anywhere else, I'd explain why this is untrue. But this is BlackWyrm, so nobody will be reading. smile.gif

I'd be happy if you'd explain nontheless. (You could open a new thread in the Quest Pack forum, if you do not want to post here. smile.gif)

And since I posted in this thread anyway: Sikret (and everyone else), I see it as an act of courtesy to contact the author of a tutorial directly instead of pointing out a mistake publically elsewere (starting with "this tutorial contains an error"). As already stated, this thread did not begin as a pure discussion about pause between spells but as a direct critic on a specific tutorial. I assume you'll jump on me for implying that you acted impolite but that's my opinion.
Go to the top of the page
 
Quote Post
SimDing0
post Jun 27 2006, 04:27 PM
Post #16





Forum Member
Posts: 106
Joined: 14-August 04




QUOTE(jastey @ Jun 27 2006, 03:04 PM)
QUOTE(SimDing0 @ Jun 27 2006, 03:45 PM)
QUOTE(Sikret @ Jun 27 2006, 01:17 PM)
Furthermore, my point about using "SpellNoDec" instead of "ForceSpell" makes that particualr part of his tutorial entirely redundant. The code will not need to include any timer.

Had you posted this anywhere else, I'd explain why this is untrue. But this is BlackWyrm, so nobody will be reading. smile.gif

I'd be happy if you'd explain nontheless. (You could open a new thread in the Quest Pack forum, if you do not want to post here. smile.gif)

Okay, sure.

The timer's purpose isn't primarily to ensure that there's a delay when you use ForceSpell(), although it does do this. If you use Spell() without a timer, your creature casts a spell, then immediately tries to cast again. It can't legally do so, so it stands around with the action queued until it can. The timer allows you to track the standing around period, and perform other actions (throwing Melf's Minute Meteors is a classic) inbetween casting, just as the player can do. As such, the timer is similarly useful for SpellNoDec().
Go to the top of the page
 
Quote Post
Avenger_teambg
post Jun 27 2006, 05:10 PM
Post #17





Forum Member
Posts: 78
Joined: 13-July 05




You need the timer, because it is a cast n attack stuff. If i recall correctly SpellCastNoDec has time, if you don't have a delay, the forthcoming attack will break it, no?


--------------------
See GemRB !
Go to the top of the page
 
Quote Post
Sikret
post Jun 27 2006, 05:28 PM
Post #18


The Tactician
Group Icon

Distinguished Developer
Posts: 7673
Joined: 1-December 05




QUOTE(Avenger_teambg @ Jun 27 2006, 08:40 PM)
You need the timer, because it is a cast n attack stuff. If i recall correctly SpellCastNoDec has time, if you don't have a delay, the forthcoming attack will break it, no?

No, it won't! The forthcoming action will not start till the spell is finished.

Furthermore, I didn't start this topic to discuss "cast and attack". It was about the delay between spells and I informed everyone that they can use "SpellNoDec" without any need to a timer if they want to ensure the delay between spells.

The error which I reported from inside the tutorial was also about a false claim about the delay.

PS: Cast and attack can also be performed without the timer, but I'm not going to discuss it here and now, because this thread is about the delay only.


--------------------
Improved Anvil




Cheating is not confined to using external software or the console commands. Abusing the flaws and limitations of the game engine to do something that a human Dungeon Master would not accept or allow is cheating.
Go to the top of the page
 
Quote Post
Creepin
post Jun 27 2006, 06:40 PM
Post #19





Forum Member
Posts: 35
Joined: 21-September 04
From: Moscow




QUOTE(Baronius)
While your comment in question may look just ambigious, and not explicitly false, it's obvious that its general interpretation will be: pause between the end of casting a spell and the start of casting the next one, which will result in malfunctioning for those who interpret it in this way.
Just for the sake of objectivity: long time ago, when I was studying scripting to create my own PC combat scripts, there was 3 major sources of knowledge: Trigger tutorial by Vasqez, Action tutorial by KensaiRui (both are now integrated in IESDP) and Scripting tutorial by Ding0. I couldn't recollect now exact flow of my study, but one thing is certain: I was never, ever, having any problems with interpretation of cast'n'attack concept or mechanics, including delay between spells.

QUOTE(Sikret)
Furthermore, I didn't start this topic to discuss "cast and attack". It was about the delay between spells and I informed everyone that they can use "SpellNoDec" without any need to a timer if they want to ensure the delay between spells.
There's no any reasonable need to ensure delay between spells - game engine is perfectly doing this job on it's own. What one really need to ensure is not to waste this delay doing nothing - hence C'n'A routine and timer of 6. As the only reason of timer existance is C'n'A, it makes no sense to discuss timer but not to discuss C'n'A.

This post has been edited by Creepin: Jun 27 2006, 06:47 PM
Go to the top of the page
 
Quote Post
Baronius
post Jun 27 2006, 07:13 PM
Post #20


Master of energies
Group Icon

Council Member
Posts: 3307
Joined: 9-July 04
From: Magyarország




QUOTE
I couldn't recollect now exact flow of my study, but one thing is certain: I was never, ever, having any problems with interpretation of cast'n'attack concept or mechanics, including delay between spells.
That wasn't the point. The question (one of the questions, actually) was whether it's unclear or explicitly wrong. In my previous post, I pointed out that in case of technical problems, unclear/ambigious descriptions may result in malfunctioning in the practice.

In this concrete case, there won't be any malfunctioning probably, as most modders just copy & paste the code, and this is not a very severe issue anyway.

However, making accurate statements/explanations is a must in technical descriptions. It's a principle, regardless the actual effects in practice. It's okay not to make a big problem from such a minor issue, however, defending it i.e. introducing it as something insignificant is not okay.


--------------------
Mental harmony dispels the darkness.
Go to the top of the page
 
Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 19th May 2024 - 04:12 AM