User Tag List

Results 1 to 3 of 3

Thread: [2.50.2]High level b-rangs trigger screen secret on flag 97

  1. #1
    Gel Just registered Lunaria's Avatar
    Join Date
    Jun 2017
    Posts
    18
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    117
    Level
    3
    vBActivity - Bars
    Lv. Percent
    93.5%
    Daily Activity
    0%
    Weekly Activity
    1.58%
    Monthly Activity
    1.38%

    Sick Bug [2.50.2]High level b-rangs trigger screen secret on flag 97

    I don't know the full extent of this bug but, throwing a high item level boomerang onto a screen flag 97 causes the secret sound to play and the screen secret happening.
    In this scenario the B-rang is level 102, but I haven't tested other configurations. Since 97 is not a secret flag, and therefore does not go away when triggered this way, you can keep triggering it as well.

    I'm not including a quest file here since it's like five mins max to replicate the scenario.
    Video of the thing: https://cdn.discordapp.com/attachmen..._11-9-2018.mp4

    ZC version 2.50.2

    Edit: after some more testing I have narrowed it down a bit, this behaviour seem to start somewhere higher than item level 25, but below item level 40.
    Last edited by Lunaria; 09-11-2018 at 05:20 PM.
    If you want to reach me I recommend elsewhere, I'm not really active here.

  2. #2
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,225
    Mentioned
    106 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,130
    Level
    20
    vBActivity - Bars
    Lv. Percent
    39.02%
    Daily Activity
    0%
    Weekly Activity
    66.8%
    Monthly Activity
    33.2%
    Quote Originally Posted by Lunaria View Post
    I don't know the full extent of this bug but, throwing a high item level boomerang onto a screen flag 97 causes the secret sound to play and the screen secret happening.
    In this scenario the B-rang is level 102, but I haven't tested other configurations. Since 97 is not a secret flag, and therefore does not go away when triggered this way, you can keep triggering it as well.

    I'm not including a quest file here since it's like five mins max to replicate the scenario.
    Video of the thing: https://cdn.discordapp.com/attachmen..._11-9-2018.mp4

    ZC version 2.50.2

    Edit: after some more testing I have narrowed it down a bit, this behaviour seem to start somewhere higher than item level 25, but below item level 40.
    That's utterly bizarre. I'll try to sort it ASAP.

    This code, in weapons.cpp is suspicious:

    Code:
    for(int i=0; i<current_item(itype_brang); i++)
            {
                if(findentrance(x,y,mfBRANG+i,true)) dead=deadval;
            }
    It seems that someone was trying to simplify L1 to L3 triggers, except that no-one bothered to ever test it at higher levels!


    Fix:

    Code:
    int brang_level = vbound(current_item(itype_brang),0,2);
    	
            for(int i=0; i<brang_level; i++) //clamp to legal FLAG VALUES! 
            {
                if(findentrance(x,y,mfBRANG+i,true)) dead=deadval;
            }
    I'm pretty sure that the distinction between regular, magic, and fire is still based on level, although it could instead be based on range and power.
    Last edited by ZoriaRPG; 09-11-2018 at 07:00 PM.


    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.55 Alpha | 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..

  3. #3
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,225
    Mentioned
    106 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,130
    Level
    20
    vBActivity - Bars
    Lv. Percent
    39.02%
    Daily Activity
    0%
    Weekly Activity
    66.8%
    Monthly Activity
    33.2%
    Should be fixed now.

    Here is a Zelda.exe (2.53.0) Binary with the implemented fix, if anyone wishes to check for any continuing bugs or new issues.

    I ended up going with this, so that future flags would be easier to implement:

    Code:
    int branglevel = itemsbuf[parentitem>-1 ? parentitem : current_item_id(itype_brang)].fam_type;
    	
    	switch ( branglevel )
    	{
    		case 0:
    		case 1:
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval; break;
    		}
    		case 2: 
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfMBRANG,true)) dead=deadval;
    			break;
    		}
    		case 3:
    		{
    			goto brang_level_3_or_higher;
    		}
    		default: //level higher than 3
    		{
    			goto brang_level_3_or_higher;
    		}
    		brang_level_3_or_higher: 
    		{
    			if(findentrance(x,y,mfBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfMBRANG,true)) dead=deadval;
    			if(findentrance(x,y,mfFBRANG,true)) dead=deadval;
    			break;
    		}
    	}
    Last edited by ZoriaRPG; 09-12-2018 at 05:52 AM.


    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.55 Alpha | 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..

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