User Tag List

Page 1 of 6 1 2 3 ... LastLast
Results 1 to 10 of 58

Thread: Zelda Classic 2.11 Beta 12.9

  1. #1
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,711
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.51%

    Zelda Classic 2.11 Beta 12.9

    Get It HERE!
    FULL WINDOWS BUILD
    FULL LINUX BUILD(new)

    This is called 12.9 because we KNOW this will be a buggy beta. We'll save the 13 designation for when most of the major bugs have been caught and fixed.

    What's new? Lots of stuff. Mostly, the scripting language has been vastly matured since the last iteratrion. Look at the next post for a tutorial on ZCScript, the C compiler for the scripting language.

    Also of note is two things: First, items. When editing items, you'll notice several new options. The explanation of the item attributes is as follows:

    Class Number: What type of item this is. Determines ifit's aword, a shield, an arrow, etc. Don't change this unless you know what you're doing.
    Class Level: A number from 1-8 representing the level of that particular item class. For example, 1 would refer to the wooden sword, while 3 would refer to the magical sword.
    Counter: In the save file, there are now 32 all-purpose counters that can be used for counting just aout anything. however, you can't use said counters except for those already defined. There are currently 7 counters defined, and the number from 0-31 specifies which one. -1 means that no counter is referenced. 0 is life. 1 is rupees. 2 is bombs. 3 is arrows. 4 is magic. 5 is keys, and 6 is super bombs. (For counters 1 and 4, check dcounter next to the amount. For the others, leave it unchecked)
    Increase amount: Increase the amount of the specified counter by a certain amount. For example, an item with a counter of 1 and an increase amount of 30 would increase your rupees by 30 when picked up.
    Full Max: The absolute maximum that the item can increase the maximum of the counter to. For example, a heart container will have a value of 256, which is 16 hearts (one heart is 16 HP), which means that a heart container cannot increase the heart count to above 16.
    +Max: The amount to increase the maximum counter by. For a heart container, this is 16, representing one heart. Note that the increase amount for a heart container is also 16. Yes, you can increase the active counter AND the maximum counter at the same time :)
    Keep Item when Collected: specifies whether you keep an item in your inventory when collected. For example, a sword and a shield would have this checked. A rupee and a heart would not.

    This is the start of making fully custom items. The next step is giving items scripts, and that may possibly be in the next beta :) Also note that you now have 255 items to edit. The remaining items besides the defaults are identified by z### (where ### is the item number)

    The second major new thing is the SFX. Now he SFX are stored in the quest file. You now have 127 sounds to work with. Just go to the SFX Data dialog in the quest menu to import sound effects and to listen to current sound effects. Keep in mind that saving an old quest in beta 13 will cause it to take on the sound effects of the current sfx.dat file. Of course, that's of little consequence since only the included SFX file is compatible with this version.

    besides the ZScript tutorial below, that should be it. Have fun, and remember:

    BACK UP YOUR QUESTS OR DIE. ALSO, BACK UP YOUR SAVE FILE AS WELL, JUST IN CASE. THAT IS ALL
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  2. #2
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,711
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.51%

    Re: Zelda Classic 2.11 Beta 12.9

    By DarkDragon:

    The ZScript compiler is now available as an alternate way of scripting freeform combos and items. To access this new compile, go to Tools->Compile ZScript in ZQ.

    Each quest now has an associated ZScript buffer. This buffer is saved with the quest. Enter a script by hand or load the contents of a file, then hit Compile to launch the ZScript compiler.

    ZScript is a language heavily based off of C, with some modifications to accomodate ZC features. Consider, for instance, our first ZScript example:

    Code:
    int distancesq(int x1, int x2, int y1, int y2)
    {
    	return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
    }
    The above should compile happily. Notice that the above looks just like a normal C global function declaration; and in fact is just that in ZScript as well. I've declared a function of return type int, which takes in four int parameters.
    The current built-in simple types for ZScript and int, float, bool, and void. Both int and float are provided for the sake of convenience, but both simply mean fixed-point number with 4 digits of decimal point precision.
    The function above returns the square distance between (x1,y1) and (x2,y2). ZScript supports most of C's math and logic operators, and enforces the correct precedence.

    You'll notice the above snippet doesn't actually DO anything when compiled; that's because we've just declared a global function, and not an actual script. Let's look at the next example:

    Code:
    int distancesq(int x1, int x2, int y1, int y2)
    {
    	return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
    }
    
    ffc script followlink {
    	int x;
    	int y;
    
    	void run() {
    		while(true)
    		{
    			x = this->X;
    			y = this->Y;
    			int dist = distancesq(Link->X, this->X, Link->Y, this->Y);
    			this->Vx = (Link->X - x)*Abs((Link->X-x))/dist;
    			this->Vy = (Link->Y - y)*Abs((Link->Y-y))/dist;
    			Waitframe();
    		}		
    	}
    }
    I've now added a script to the source file. Notice the syntax: "ffc script <name> { }". The ffc specifies that this script can be assigned to an FFC Script slot in ZQ; "item" is also a supported script type. Global scripts will be added in later betas.

    You'll notice I've declared two variables in script scope: x and y. Any variables declared in the scope of a script are global variables, and accessible to all scripts; you'll see this feature used in the next example.

    In addition to x and y, there is a function declared in script scope: void run(). All scripts must implement this function, as this is the function that is run when the script is started. A script may have additional functions besides run(), which may be called by you explicitly, but run() is the only one called automatically.

    Inside run() you can see a while loop; while and for loops are both implemented.

    You can see I use several implicit "pointers" to get at various pieces of data using dereference (->) notation. "this" is a pointer whose type is dependent on the type of the scripts; since currently all scripts are ffc or item scripts, "this" refers to an ffc type, which contains the ffc's position, velocity, data, etc, or an item type. Link, Screen, and Game are global pointers that encapsulate the current state of link, the screen, and the game, respectively. A full list of the available pointer types will be listed at the bottom of this tutorial.

    I said earlier that int, float, bool and void were ZScript's simple types. ZScript also has complex types, ffc, item, and itemclass, which are like pointers. They are provided implicitly through "this" pointers as described above, but can also be declared explicitly, and are returned from some library functions. Like the global pointers they can be dereferenced. For instance, in the following snippet, I move the screen's second item to x=10:
    Code:
    item i = Screen->LoadItem(1);
    i->X = 10;
    In any case, back to the FFC example. The first thing I do in the while loop is set the values of x and y. Other FFCs can't read the X position of this FFC directly, since no ASM instructions can do that currently; what I can do, though, is store the current X position in a globally accessible variable, x, each frame, and this is what I do in the above example.

    Next I do some more complicated math to set the current FFC's velocity to point towards link with magnitude 1; notice that I take advantage of my global function squaredist() here. Then I call a global function, Waitframe(). Global functions are like user-defined global functions, but are provided for you by the ZScript compiler. A list of all the global functions follows this tutorial.

    At this point you can run the script in a sample quest: compile the above, assign "followlink" to some FFC Script slot, and assign that slot to some FF combo, save, run ZC, and that FF should now follow link.

    Unlike in ASM, you can define multiple ZScripts in one source file, and in fact it is encouraged that you do so. Here is the final sample script:

    Code:
    int distancesq(int x1, int x2, int y1, int y2)
    {
    	return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
    }
    
    ffc script followlink {
    	int x;
    	int y;
    
    	void run() {
    		while(true)
    		{
    			x = this->X;
    			y = this->Y;
    			int dist = distancesq(Link->X, this->X, Link->Y, this->Y);
    			this->Vx = (Link->X - x)*Abs((Link->X-x))/dist;
    			this->Vy = (Link->Y - y)*Abs((Link->Y-y))/dist;
    			Waitframe();
    		}		
    	}
    }
    
    ffc script satellite {
    	void run() {
    		for(int i=0; true; i++)
    		{
    			this->X = followlink.x + 10*Sin(i);
    			this->Y = followlink.y + 10*Cos(i);
    			Waitframe();
    		}
    	}
    }
    I've added a new script, "satellite", which orbits the FFC defined above by using some trig functions. Notice that I can use the dot operator to access another script's global variables.

    There's one more useful feature not used in the above examples: suppose a community member writes a very useful library of global functions or scripts, and you want to include them in your quest. No problem! Using the "import" keyword lets you add the contents of another file as if they were copied into the current file. So for instance if I moved the declaration of distancesq() into library.z, I could just do

    import "library.z"

    ff script followlink {
    ...

    and it would compile the same.

    One last postscript: as you can see when you're assigning script to slots, we've added three slots for "global" scripts. One of these scripts is run the first time you start a new quest. ZScript does a lot of behind-the-scenes work (you can declare a lot more than 9 variables in a script!) but as a consequence must be allowed to place a special auto-generated script, ~Init, in global slot 0. This is all done automatically - but I don't want you to be surprised when ZQ doesn't let you overwrite ~Init in the slot assignment dialog.

    Here is a brief reference of what's currently implemented in the ZScript language:

    Pointer types: (use -> to access)
    ffc: (accessible using the "this" pointer, or explicit pointer)
    float Data;
    float CSet;
    float Delay;
    float X;
    float Y;
    float Vx;
    float Vy;
    float Ax;
    float Ay;
    bool wasTriggered();

    link: (accessible through the global "Link" pointer)
    float X;
    float Y;
    float Dir;
    float HP;
    float MaxHP;
    float MaxMP;
    float Action;
    void Warp(int, int);
    void PitWarp(int,int);
    bool InputsEnabled;
    bool ForcedUp;
    bool ForcedDown;
    bool ForcedLeft;
    bool ForcedRight;
    bool ForcedA;
    bool ForcedB;
    bool ForcedL;
    bool ForcedR;
    bool APressed();
    bool BPressed();
    bool LPressed();
    bool RPressed();
    bool UpPressed();
    bool DownPressed();
    bool LeftPressed();
    bool RightPressed();
    bool StartPressed();

    screen: (accessible through the global "Screen" pointer)
    float D[8];
    float ComboC[176];
    float ComboD[176];
    float ComboF[176];
    float ComboI[176];
    float ComboT[176];
    float ComboS[176];
    int NumItems();
    item LoadItem(int);
    item CreateItem(int);

    item: (accessible through the "this" pointer, or explicit pointer)
    float X;
    float Y;
    float DrawType;
    itemclass Class;
    float Tile;
    float CSet;
    float FlashCSet;
    int NumFrames;
    int Frame;
    float ASpeed;
    float Delay;
    bool Flash;
    float Flip;
    float Extend;

    itemclass: (accessible through explicit pointer)
    float Family;
    float FamilyType;
    float Amount;
    float Max;
    float MaxIncrement;
    bool Keep;
    float Counter;

    game: (accessible through the "Game" pointer)
    int GetCurScreen();
    int GetCurMap();
    int GetCurDMap();
    int NumDeaths;
    int Cheat;
    float Time;
    bool HasPlayed;
    bool TimeValid;
    float GuyCount[];
    int ContinueScreen;
    int ContinueDMap;
    float Counter[];
    float MCounter[];
    float DCounter[];
    float Generic[];
    float Items[];
    float LItems[];
    float LKeys[];
    float CurMapFlag[];
    float GetMapFlag(int, int);
    void SetMapFlag(int, int,float);
    float GetScreenD(int, int);
    void SetScreenD(int,int,float);
    itemclass LoadItemClass(int);

    Global Functions:
    float Rand(float);
    void Quit();
    void Waitframe();
    void Trace(float);
    float Sin(float);
    float Max(float,float);
    float Min(float,float);
    float Pow(float, float);
    float InvPow(float,float);
    int Factorial(int);
    float Abs(int);
    float Sqrt(float);

    Lastly, all of the keywords implemented in the language:
    script
    float
    for
    bool
    void
    if
    else
    return
    import
    true
    false
    while
    ffc
    itemclass
    item

    Operators:
    =
    .
    ->
    <<
    >>
    &
    |
    ^
    &&
    ||
    !
    ~
    ++
    --
    <=
    <
    >=
    >
    !=
    ==
    +
    -
    *
    /
    %
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  3. #3
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,030
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: Zelda Classic 2.11 Beta 12.9

    One last thing I forgot to put in the above tutorial:

    Although the ffc and item scripts, once compiled, should be compatible with all future versions of ZQuest, I do not guarantee the ZScript syntax will remain unchanged in future betas, as compilation is a fairly elaborate process with multiple steps, rendering support for multiple versions of the grammar extremely painful if not impractical.

  4. #4
    Keese
    Join Date
    May 2005
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    880
    Level
    10
    vBActivity - Bars
    Lv. Percent
    33.67%

    Re: Zelda Classic 2.11 Beta 12.9

    ...
    .........
    ...........................
    ...holy...sh...

    C?! In ZC scripting?!

    Item editing?!?!

    A new age of greatness has just dawned over ZC... o.o

    *downloads faster than his bandwidth will allow through pure excitement*

  5. #5
    Wizrobe Tygore's Avatar
    Join Date
    Apr 2001
    Age
    37
    Posts
    4,246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    4,826
    Level
    21
    vBActivity - Bars
    Lv. Percent
    81.92%

    Re: Zelda Classic 2.11 Beta 12.9

    Even though I saw it coming, I'm STILL having fits of glee. GREAT job, guys!

    EDIT: In the items and Weapons/Misc data, there's a bit of what I'd call an "interface error". The fully custom entires are ordered starting with z100, with all <100 numbered entries coming AFTER 255. Not a bug per se, but still awkward (might I suggest using z090, z091, etc.?)
    Oh, if you want it to be possesive, it's just "i-t-s"; but if you want it to be a contraction then it's "i-t-apostrophe-s"... scallawag.

  6. #6
    Stegosaurus WindStrike's Avatar
    Join Date
    Jul 2005
    Location
    Cullowhee, NC
    Age
    32
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,931
    Level
    14
    vBActivity - Bars
    Lv. Percent
    62.15%

    Re: Zelda Classic 2.11 Beta 12.9

    /me starts pestering his brother on how to do C.
    It'd help. Great stuff!
    Creator of ZURPG, a Zelda game that's influenced by D&D and JRPGs to bring together a unique gameplay system combined with roleplaying.


  7. #7
    Wizrobe *b*'s Avatar
    Join Date
    Jul 2001
    Location
    The World
    Age
    37
    Posts
    4,491
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,206
    Level
    25
    vBActivity - Bars
    Lv. Percent
    93.85%

    Re: Zelda Classic 2.11 Beta 12.9

    Quote Originally Posted by jman2050 View Post
    Also of note is two things: First, items. When editing items, you'll notice several new options. The explanation of the item attributes is as follows:

    Class Number: What type of item this is. Determines ifit's aword, a shield, an arrow, etc. Don't change this unless you know what you're doing.
    Class Level: A number from 1-8 representing the level of that particular item class. For example, 1 would refer to the wooden sword, while 3 would refer to the magical sword.
    Counter: In the save file, there are now 32 all-purpose counters that can be used for counting just aout anything. however, you can't use said counters except for those already defined. There are currently 7 counters defined, and the number from 0-31 specifies which one. -1 means that no counter is referenced. 0 is life. 1 is rupees. 2 is bombs. 3 is arrows. 4 is magic. 5 is keys, and 6 is super bombs. (For counters 1 and 4, check dcounter next to the amount. For the others, leave it unchecked)
    Increase amount: Increase the amount of the specified counter by a certain amount. For example, an item with a counter of 1 and an increase amount of 30 would increase your rupees by 30 when picked up.
    Full Max: The absolute maximum that the item can increase the maximum of the counter to. For example, a heart container will have a value of 256, which is 16 hearts (one heart is 16 HP), which means that a heart container cannot increase the heart count to above 16.
    +Max: The amount to increase the maximum counter by. For a heart container, this is 16, representing one heart. Note that the increase amount for a heart container is also 16. Yes, you can increase the active counter AND the maximum counter at the same time :)
    Keep Item when Collected: specifies whether you keep an item in your inventory when collected. For example, a sword and a shield would have this checked. A rupee and a heart would not.

    This is the start of making fully custom items. The next step is giving items scripts, and that may possibly be in the next beta :) Also note that you now have 255 items to edit. The remaining items besides the defaults are identified by z### (where ### is the item number)
    I'm going to pray that this is like, options to check, uncheck, input, so on and so forth in the item/sprite editor, and NOT scripting, right?

  8. #8
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,030
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: Zelda Classic 2.11 Beta 12.9

    Both. These are set in the item editor at quest creation time, but can be subsequently read or modified by item scripts.

  9. #9
    Gibdo Dlbrooks33's Avatar
    Join Date
    Aug 2005
    Age
    31
    Posts
    524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,374
    Level
    16
    vBActivity - Bars
    Lv. Percent
    1.87%

    Re: Zelda Classic 2.11 Beta 12.9

    ZC won't start. Windows keeps saying it has an error and needs to close T.Y but Zquest qorks fine.

  10. #10
    Administrator DarkDragon's Avatar
    Join Date
    Oct 2001
    Posts
    6,228
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    11,030
    Level
    31
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: Zelda Classic 2.11 Beta 12.9

    How did you install 12.9? Since the sfx.dat file in this beta is new, you need to be sure that you installed these files AFTER you install the support files from 12d.

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