Jump to content

Vintage Dreams Tileset

Photo

Vintage Dreams Help Thread


  • Please log in to reply
3 replies to this topic

#1 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 11 January 2020 - 09:42 PM

If you have any questions in regards to the tileset, it's functionalities, or straight up just need help to figure out how something works; this is the thread for you!
While I might not check in often, I will try to answer as many things as possible, and hopefully helpful users on pure will provide answers as well!

Before you ask though! It might be good to check the thread to make sure what you want to know hasn't already been answered!
  • Jenny and Matthew like this

#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 14 January 2020 - 04:58 AM

In VD_Pause.z
 
 
void VD_Pause_Screen_init(){
    if(Link->Item[CONST_No_Item_A] == true){
        L_Button_Item = CONST_No_Item_A;
        R_Button_Item = CONST_No_Item_A;
        
        if(Link->Item[CONST_No_Item_B] == true && Link->Item[CONST_No_Item_C] == true ){
            
            if(GetEquipmentB() == CONST_No_Item_A) Link->SelectBWeapon(3);
            
            while(GetEquipmentA() != CONST_No_Item_A){    //Gotta be at start
                Link->SelectAWeapon(3);
            }  
        }
    }
}
 
I handled a user help issue over this last week, due to a bugfix in ZC with Init script timing and an infinite loop condition in this function.
 
While I added a QR for strict 2.50 timing, the true issue is that this function lacks a sanity break. Ere adding the QR, I provided this:
 
 
void VD_Pause_Screen_init()
{
    int tries;
    if(Link->Item[CONST_No_Item_A] == true)
    {
        L_Button_Item = CONST_No_Item_A;
        R_Button_Item = CONST_No_Item_A;
        
        if(Link->Item[CONST_No_Item_B] == true && Link->Item[CONST_No_Item_C] == true )
        {
            
            if(GetEquipmentB() == CONST_No_Item_A) Link->SelectBWeapon(3);
            
            while(GetEquipmentA() != CONST_No_Item_A)
            {    //Gotta be at start
                ++tries;
                if ( tries > 10000 ) return; //Sanity break from infinite loop softlock.
                Link->SelectAWeapon(3);
            }
        }
    }
}
 
 
I'd advise either changing it to that, or calling it in the global active, rather than the init script. The former is wise in any event, as the function itself may have an infinite loop softlock under other unforeseen conditions. You can of course assign defaults to your subscreen if it maxes out on tries instead of returning, and 10,000 was an arbitrary number.
 
Anyone working with the current VD in 2.55 will need to enable:
 
ZScript>>>Quest Specific Settings>>Use Old Init/SaveLoad Script Timing
 
As of this post, only the latest nightly build of 2.55A48 has this option, but it will be in the next full release.
 
Note that using this also means that you will need to suffer with timing bugs caused by the unintended late timing of global init scripts.
 
Anyone using VD on the current and supported ZC builds is also going to have a bad time with std.zh and string,zh hardcoded into the script files. Those will result in duplicate function errors and also use extremely non-optimal code generation, and lack extensions provided in 2.53.x.
 
[hidden]I have no clue why you did this, as the S docs have always stated not to do it, and not to modify std.zh... [/hidden]
 
 
Pruning that and making the normal, sane call to import std.zh is warranted in a VD future beta, as this will reduce issues with people using it properly, and also provide as much as a 40% efficiency increase when running <std> function calls..
 
We've had numerous issues helping users fix this issue and provided them patched scripts, but it is in your court now.
 
As of 2.53.1, ZC fully supports include paths and a real #include directive (and automatic header guards), so bear that in mind in the coming months.
 
The current std.zh files are on github, if you need them to do tests:
 
This is the version for 2.53.x:
https://github.com/A...dZH/tree/1.5011
 
It is built with 2.53.1 as a target, but the only requisite conversion to use it in earlier versions is to replace #include with import.
 
You can download the latest public 2.53.1 beta on ZeldaClassic.com, and a patch to the current internal version is available. The next public build will be up within a week.

#3 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 14 January 2020 - 08:38 AM

I will look into these matters the next time I look over the script shenanigans, there is much that needs to be done (even outside what is noted here).



#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 15 January 2020 - 07:36 AM

I will look into these matters the next time I look over the script shenanigans, there is much that needs to be done (even outside what is noted here).

 

Very good. If anyone else reports usage issues to us, we'll relay them here. This one was tricky as 2.50.2 had a timing issue where Link's equipment would be set to valid IDs ere the script runs, but the init script was meant to run first, so that loop was infinite. :shrug:

 

2.53.1 has both read and write of Link-Equipment, btw. Worting towards Gamma on that version.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users