User Tag List

Results 1 to 8 of 8

Thread: [2.50.1/2] Spin Attack Magic Cost Glitches

  1. #1
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,039
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,606
    Level
    19
    vBActivity - Bars
    Lv. Percent
    22.3%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    212.19%

    [2.50.1/2] Spin Attack Magic Cost Glitches

    If a user sets a magic cost on the spin attack, and does not have enough MP to use it, ZC will repeatedly swing the sword for as long as the player holds the corresponding button, trying to charge it. This may also be true of quake hammer, but I have not verified it.

    Reported by Evan, video link here: https://youtu.be/GR1__1U7224

    Note: I believe this is because paymagiccost(itemid); isn't set at the correct time, when determining if the sword charge should occur. I do not know if he had this problem in 2.50.1, or 2.50.2, or both; or if it affects all builds of 2.50, as I have not yet had time to test it in all three.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  2. #2
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    819
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,094
    Level
    22
    vBActivity - Bars
    Lv. Percent
    33.4%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    54.18%
    the current version of link.cpp gleeok gave us isn't the one that is compiled into Zelda Classic right now.

  3. #3
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,039
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,606
    Level
    19
    vBActivity - Bars
    Lv. Percent
    22.3%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    212.19%
    I know. I don't know if this changed, or not, but I suspect that this particular problem will be identical.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  4. #4
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    819
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,094
    Level
    22
    vBActivity - Bars
    Lv. Percent
    33.4%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    54.18%
    If this is still occuring we can confirm this

  5. #5
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,039
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,606
    Level
    19
    vBActivity - Bars
    Lv. Percent
    22.3%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    212.19%
    It is, AFAIK. I also made a hackish fix for it, but engine correction would be good, although Evan will disagree as he abused it for an effect in a quest.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  6. #6
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    819
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,094
    Level
    22
    vBActivity - Bars
    Lv. Percent
    33.4%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    54.18%
    I can confirm something is seriously wacky here. Here is the code, and i didn't change a thing.
    Code:
        // charging up weapon...
        //
        if(((attack==wSword && attackclk==SWORDCHARGEFRAME && itemid>=0 && isWpnPressed(itype_sword)) ||
    #if 0
                (attack==wWand && attackclk==WANDCHARGEFRAME && itemid>=0 isWpnPressed(itype_wand)) ||
    #endif
                (attack==wHammer && attackclk==HAMMERCHARGEFRAME && itemid>=0 && isWpnPressed(itype_hammer))) && z==0 && checkmagiccost(itemid)) //this check prevents that
        {
            // Increase charging while holding down button.
            if(spins==0 && charging<magiccharge)
                charging++;
                
            // Once a charging threshold is reached, play the sound.
            if(charging==normalcharge)
            {
    			paymagiccost(itemid);
                sfx(WAV_ZN1CHARGE,pan(int(x)));
            }
            else
            {
                itemid = current_item_id(attack==wHammer ? itype_quakescroll2 : itype_spinscroll2);
                
                if(itemid>-1 && charging==magiccharge && checkmagiccost(itemid))
                {
                    paymagiccost(itemid);
                    charging++; // charging>magiccharge signifies a successful supercharge.
                    sfx(WAV_ZN1CHARGE2,pan(int(x)));
                }
            }
        }
    Last edited by Tamamo; 01-21-2016 at 11:09 AM.

  7. #7
    The Timelord ZC Developer ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,039
    Mentioned
    95 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,606
    Level
    19
    vBActivity - Bars
    Lv. Percent
    22.3%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    212.19%
    Quote Originally Posted by Tamamo View Post
    I can confirm something is seriously wacky here. Here is the code, and i didn't change a thing.
    Code:
        // charging up weapon...
        //
        if(((attack==wSword && attackclk==SWORDCHARGEFRAME && itemid>=0 && isWpnPressed(itype_sword)) ||
    #if 0
                (attack==wWand && attackclk==WANDCHARGEFRAME && itemid>=0 isWpnPressed(itype_wand)) ||
    #endif
                (attack==wHammer && attackclk==HAMMERCHARGEFRAME && itemid>=0 && isWpnPressed(itype_hammer))) && z==0 && checkmagiccost(itemid)) //this check prevents that
        {
            // Increase charging while holding down button.
            if(spins==0 && charging<magiccharge)
                charging++;
                
            // Once a charging threshold is reached, play the sound.
            if(charging==normalcharge)
            {
    			paymagiccost(itemid);
                sfx(WAV_ZN1CHARGE,pan(int(x)));
            }
            else
            {
                itemid = current_item_id(attack==wHammer ? itype_quakescroll2 : itype_spinscroll2);
                
                if(itemid>-1 && charging==magiccharge && checkmagiccost(itemid))
                {
                    paymagiccost(itemid);
                    charging++; // charging>magiccharge signifies a successful supercharge.
                    sfx(WAV_ZN1CHARGE2,pan(int(x)));
                }
            }
        }


    Is that the same version that I have, or did you get a fresher copy? (I need to sleep, or I;d just check.)

    So, anyhow, it certainly has some problems...

    I'm pretty sure that the culprit is the lack of a call to checkmagiccost() before starting the charge cycle. A call to that before this codeblock, should fix it in general, but you'd need to isolate these into individual items, as checkmagiccost() is item specific, and the charging cycle sort of combines items that have the ability. It's mandatory to split the hammer, and sword, in any event.

    I'd add a call to checkmagicost() to every item use function/block, as it'd make it possible to assign a cost to anything, and ensure it works. I'd prefer to make all of these blocks into isolated functions too, but that's another matter, as it might make it easier to debug, modify, and expand them.

    I'm just waiting for the open source stuff, so that I have a complete set of the absolute latest 2.50.3-ish code, before mucking with it. Not knowing what Gleeok changed, I'd rather not make changes to what I have, and need to do them over again.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  8. #8
    Nine-Tailed Goddess Tamamo's Avatar
    Join Date
    May 2011
    Location
    Kobe
    Age
    28
    Posts
    819
    Mentioned
    94 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,094
    Level
    22
    vBActivity - Bars
    Lv. Percent
    33.4%
    Daily Activity
    0%
    Weekly Activity
    40%
    Monthly Activity
    54.18%
    @Saffith @Gleeok
    Hiya guys get your asses your in here so we can fix this,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social