User Tag List

Results 1 to 10 of 10

Thread: Picking up Zscript a bit

  1. #1
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,559
    Level
    30
    vBActivity - Bars
    Lv. Percent
    51.59%

    Picking up Zscript a bit

    It's been awhile since I used Zscript and I want to mess around a bit. If anyone has any ideas theyve been tossing around about a script let's talk about it and maybe I can give it a shot. Nothing too complicated right now though. I don't have time to dig in too far yet.

    I just did a simple enemy for something and I think it came out well. It's basically just a walking enemy edited by a script. I'll post it when I get the chance if anyone is interested.

  2. #2
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Quote Originally Posted by SUCCESSOR View Post
    It's been awhile since I used Zscript and I want to mess around a bit. If anyone has any ideas theyve been tossing around about a script let's talk about it and maybe I can give it a shot. Nothing too complicated right now though. I don't have time to dig in too far yet.

    I just did a simple enemy for something and I think it came out well. It's basically just a walking enemy edited by a script. I'll post it when I get the chance if anyone is interested.
    Hmm... I don;t know if you would find it amusing, but you could try some of the new stuff we've been doing, see what works, what;s broken, and give some feedback, if you are mostly looking to flex your digits.

    Spoiler: show
    Code:
    // Beta 52
    
    /////////////////
    ///  ZScript  ///
    /////////////////
    
    The ZScript language now supports function pointers, using the AT_SIGN token (@) as a delimiter.
    
    The ZScript language now supports C-Style comment blocks using the traditional syntax of:
    
    /* 
    	COMMENT BLOCK
    	
    */
    
    
    Arrays now support being declared with a formula:
    
    int arr[10*4]; 
    
    This is now the same as int arr[40];
    
    Nesting array calls should now work properly. (e.g. arrA[ arrB[ arrC[ arrd[4] ] ] ] )
    
    //////////////
    //  Global  //
    //////////////
     
    void OverlayTile(int firsttile, int secondtile);		
    Overlay one tile onto another.
    
    int SizeOfArrayBool(bool array[]);
    * As SizeOfArray(int *ptr), save that it works specifically with bool typed arrays. 
    
    int SizeOfArrayFFC(ffc array[]);	
    * As SizeOfArray(int *ptr), save that it works specifically with ffc typed arrays.
    
    int SizeOfArrayNPC(npc array[]);
    * As SizeOfArray(int *ptr), save that it works specifically with npc typed arrays.
    
    int SizeOfArrayItem(item array[]);	
    * As SizeOfArray(int *ptr), save that it works specifically with item typed arrays.
    
    int SizeOfArrayItemdata(itemdata array[]);	
    * As SizeOfArray(int *ptr), save that it works specifically with itemdata typed arrays.
    
    int SizeOfArrayLWeapon(lweapon array[]);	
    * As SizeOfArray(int *ptr), save that it works specifically with lweapon typed arrays.
    
    int SizeOfArrayEWeapon(eweapon array[]);	
    * As SizeOfArray(int *ptr), save that it works specifically with eweapon typed arrays.
    
    
    /************************************************************************************************************/
    
    ////////////
    //  Game  //
    ////////////
    
    
    void PauseSound(int soundid)	
    * Pauses one of the quest's playing sound effects. Use the SFX_ constants in
    
    void ResumeSound(int soundid)
    * Resumes one of the quest's paused sound effects. Use the SFX_ constants in
    
    void EndSound(int soundid)
    * Kills one of the quest's playing sound effects. Use the SFX_ constants in
    
    void PauseMusic()	
    * Pauses the present, playing MIDI or Enhanced Music file. 
    
    void ResumeMusic()
    * Resumes the present, playing MIDI or Enhanced Music file. 
    
    void GreyscaleOn()
    * Renders the entire display in greyscale.
    
    void GreyscaleOff() 
    * Returns the display rendering to colour. 
    
    int DMapPalette[512]
    * Set or get the Level Palette for each DMap
    
    void SetMessage(int message, int str[])
    * Places string 'str[]' into ZQ Message 'message'.
    
    void SetMapName(int dmap, int str[])
    * Places string 'str[]' into DMap Name for DMap with ID 'dmap'
    
    void SetMapTitle(int dmap, int str[])
    * Places string 'str[]' into DMap Title for DMap with ID 'dmap'
    
    void SetMapIntro(int dmap, int str[])
    * Places string 'str[]' into DMap Intro for DMap with ID 'dmap'
    
    bool CappedFPS		
    * Check if the game is uncapped. 
    
    int Version;				
    * Returns the version of ZC being used.  
    
    int Build;			
    * Returns the Build ID of the version of ZC being used.  
    			
    int Beta;				
    * Returns the Beta ID of the version of ZC being used. If the build is not a beta, this returns 0. 
    	
    bool DisableActiveSubscreen;		
    * If set true, the active subscreen will not fall into view ehen the player presses Start.
    
    int GetPointer(bool *ptr[]);
    * Returns the pointer of a bool array as a float. 
    
    
    /************************************************************************************************************/
    
    /////////////
    ///  FFC  ///
    /////////////
    
    int ID;	
    * The screen ref of the ffc. Used primarily for this->ID.
    
    int GetPointer(ffc *ptr[]);
    * Returns the pointer of a ffc array as a float.
    
    ffc SetPointer(int value);
    * Converts an int pointer to the ffc type, for assigning.
    
    /************************************************************************************************************/
    
    //////////////
    ///  Item  ///
    //////////////
    
    float UID;	
    * Returns the UID of an item.
    	
    int GetPointer(item *ptr[]);
    * Returns the pointer of a item array as a float.
    
    item SetPointer(int value);
    * Converts an int pointer to the item type, for assigning.
    
    int AClock 
    * The clock used for the item's animation cycle. 
    
    /************************************************************************************************************/	
    
    /////////////////
    ///  *weapon  ///
    /////////////////
    
    float UID;
    * Returns the UID of an *weapon.
    
    int GetPointer(lweapon *ptr[]);	
    * Returns the pointer of a *weapon array as a float.
    
    lweapon SetPointer(int value);	
    * Converts an int pointer to the lweapon type, for assigning.
    	
    float Misc[32];		
    * Epanded from a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
    
    
    ///////////////////////////
    ///  LWeapon  Specific  ///
    ///////////////////////////
    
    int Range;				
    * The range of boomerang and hookshot lweapons in pixels; and arrow lweapons inb frames.
    
    int AClock 
    * The clock used for the item's animation cycle. 
    
    /************************************************************************************************************/		
    
    /////////////
    ///  NPC  ///
    /////////////
    
    float UID;	
    * Returns the UID of an npc.
    
    int GetPointer(npc *ptr[]);
    * Returns the pointer of a item array as a float. 
    
    npc SetPointer(int value);	
    * Converts an int pointer to the npc type, for assigning.
    
    int ScriptDefense[10];		
    * The npc's Script Weapon Defense values. This corresponds to the 'Defenses 3' tab in the Enemy Editor. 
    
    int InvFrames;				
    * Returns the number of remaining invincibility frames if the enemy is invincible, otherwise 0. 
    
    int Invincible;			
    * Returns if the enemy is invincible, because of ( superman variable ). 
    
    bool HasItem;				
    * Returns if the enemy is holding the screen item.
    
    bool Ringleader;			
    * Returns if the enemy is a 'ringleader'.
    
    float Misc[32];	
    * Epanded fron a size of [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
    
    /************************************************************************************************************/
    
    //////////////
    ///  Link  ///
    //////////////
    
    int Animation;				
    * Link;s Animation style, as set in Quest->Graphics->Sprites->Link
    					
    int WalkASpeed;				
    * Link's Walking Animation speed as set in Quest->Graphics->Sprites->Link
    
    int SwimASpeed;				
    * Link's Swiming Animation speed as set in Quest->Graphics->Sprites->Link
    
    int InvFrames;				 
    * This returns how long Link will remain invincible, 0 if not invincible. Can be set. 
    
    bool InvFlicker;			
    * If set false, Link will neither flash, nor flicker when invincible. 
    
    int HurtSound;				
    * The sound that plays when Link is injured. By default this is '16', but you may change it at any time.  
    
    int HitHeight;				
    * link's Hitbox height in pixels starting from his 0x,0y (upper-left) corner, going down. 
    		
    int HitWidth;				
    * Link's Hitbox width in pixels starting from his x0,y0 (upper-left) corner, going right. 
    
    int HitXOffset;				
    * The X offset of Link's hitbox, or collision rectangle.
    	
    int HitYOffset;				
    * The Y offset of Link's hitbox, or collision rectangle.
    
    int Eaten;				
    * It returns 0 if Link is not eaten, otherwise it returns the duration of him being eaten.
    
    int Equipment;				
    * Link->Equipment is now read-write, and needs testing.
    
    int ItemA;				
    * Contains the item IDs of what is currently equiped to Link's A button.
    
    int ItemB;				
    * Contains the item IDs of what is currently equiped to Link's B button.
    
    int SetItemSlot(int itm_id, bool a_button, bool force);				
    * This allows you to set Link's button items without binary operation. Needs testing. , and to decide whether to 
    
    int Extend;			
    * Sets the extend value for all of Link's various actions.
     
    int GetLinkExtend(int sprite, int dir);		
    * Gets the extend value for one of Link's various actions based on a direction.
    
    void SetLinkExtend(int sprite, int dir, int extend);		
    * Sets the extend value for one of Link's various actions.
    
    void SetLinkTile(int sprite, int tile, int dir)			
    * Sets the tile for Link's various actions. This is intended to work as OTile for Link. Unverified.
    
    int GetLinkTile(int sprite, int dir)			
    * Returns the OTile for one of Link's various actions. Unverified. 
    
    int WalkTile, SwimTile, DiveTile, SlashTile, JumpTile, ChargeTile, StabTile, CastingTile, PoundTile, FloatTile
    	Hold1LandTile, Hold2LandTile, Hold1WaterTile, Hold2WaterTile;				
    * A series of fourteen individual setter/getter ints to set or return the tile for all of Link's various actions.
    
    int WarpEffect;		
    * Sets a warp effect type prior to doing Screen->Warp
    
    int WarpSound;			
    * Setting this to a value other than '0' will play that sound when Link warps.
    
    bool SideWarpSounds;		
    * If you enable this setting, the warp sound will play in side warps.
    
    bool PitWarpSounds;	
    * If you enable this setting, the warp sound will play in a pit warp, one time.
    
    int UseWarpReturn;		
    * Setting this to a value between 0 and 3 will change the target return square for Link->Warp
    
    int UsingItem;			
    * Returns the ID of an item used when Link uses an item. Returns -1 if Link is not using an item this frame. 
    
    int UsingItemA;		
    * Returns the ID of an item used when Link uses an item on button A. Returns -1 if Link is not using an item this frame. 
    
    int UsingItemB;	
    * Returns the ID of an item used when Link uses an item on button B. Returns -1 if Link is not using an item this frame. 
    
    bool Diagonal;	
    * This corresponds to whether 'Diagonal Movement' is enabled, or not. 
    
    bool BigHitbox;		
    * This corresponds to whether 'Big Hitbox' is enabled, or not. 
    
    float Misc[32];			
    * Expanded from [16] to [32]. An array of 32 miscellaneous variables for you to use as you please.
    
    /************************************************************************************************************/
    
    //////////////////
    ///  itemdata  ///
    //////////////////
    
    int GetPointer(itemdata *ptr[]);	
    * Returns the pointer of a itemdata array as a float.
    
    itemdata SetPointer(int value);
    * Converts an int pointer to the itemdata type, for assigning.
    
    int ID;		
    * Returns the item number of the item in question.
    
    int Modifier;	
    * The Link Tile Modifier
    
    int Tile;	
    * The tile used by the item.
    
    int CSet;	
    * The CSet of the tile used by the item.
    	
    int Flash;		
    * The Flash value for the CSet
    	
    int AFrames;		
    * The number of animation frames in the item's tile animation. 
    
    int ASpeed;		
    * The speed of the item's animation.
    	
    int Delay;	
    * The Delay value, before the animation begins. 
    
    int Script;		
    * The Action Script for the item.
    
    int PScript;	
    * The Pickup Script for the item.
    
    int MagicCost;	
    * The item's maic (or rupees, if this is set) cost.
    
    int MinHearts;		
    * The minimum number of hearts required to pick up the item.
    
    int Attributes[10] 
    * An array of ten integers that correspond to the ten <Misc> text entries on the item editor Data tab.
    
    int Sprites[10]
    * An array of ten integers that correspond to the ten sprite pulldowns on the item editor Action tab.
    
    bool Flags[5]
    * An array of five boolean flags that correspond to the five flag tickboxes on the item editor Data tab.
    
    int Misc1, Misc2, Misc3, Misc4, Misc5, Misc6, Misc7, Misc8, Misc9, Misc10;
    * These correspond to the pull-down options in the item editor 'Data' tab. 
    
    int Attribute1, Attribute2, Attribute3, Attribute4, Attribute5, Attribute6, 
    		Attribute7, Attribute8, Attribute9, Attribute10;
    * These correspond to the pull-down options in the item editor 'Action' tab. 
    
    bool Combine;	
    * Corresponds to 'Upgrade when collected twice'.
    	
    bool Downgrade;	
    * Corresponds to the 'Remove When Used' option on the Action tab of the item editor. 
    	
    bool KeepOld;
    * Corresponds to 'Keep lower level items on the Pickup tab of the item editor. 
    	
    bool RupeeCost;	
    * Corresponds to the 'Use Rupees Instead of Magic' option on the item editor 'Action' tab.
    	
    bool Edible;	
    * Corresponds to the 'Can be Eaten by Enemies' box on the Pickup tab of the item editor. 
    	
    bool GainLower;	
    * Corresponds to the 'Gain All Lower Level Items' box on the Pickup tab of the item editor. 
    	
    bool Flag1;
    * This corresponds to the box directly below 'Equiment Item'. For swords, this is 'B.H. is Percent'.
    	
    bool Flag2;
    * This corresponds to the box directly below 'Flag 1, or two boxes down from 'Equiment Item'.
    * For swords, this is 'B.D. is Percent'.
    	
    bool Flag3;
    * This corresponds to the box directly right of 'Equiment Item'. For swords, this is 'B.  Penetrates Enemies'.
    
    bool Flag4;
    * This corresponds to the box directly right of 'Flag 2'. For swords, this is 'Can Slash'.
    	
    bool Flag5;
    * This corresponds to the box directly below 'Flag 4'. For swords, this is '<Unused>', and greyed out.
    	
    bool Unused;	
    * ? - An extra script-only flag. It's a mystery to everyone.
    	
    /************************************************************************************************************/
    
    ////////////////
    ///  Screen  ///
    ////////////////
    
    void WavyIn();
    * Replicates the warping screen wave effect (inbound) from a tile warp. 
    
    void WavyOut();		
    * Replicates the warping screen wave effect (outbound) from a tile warp. 
    
    void ZapIn();			
    * Replicates the warping screen zap effect (inbound) from a tile warp. 
    
    void ZapOut();		
    * Replicates the warping screen zap effect (outbound) from a tile warp. 
    
    void OpeningWipe();	
    * Replicates the opening wipe screen effect (using the quest rule for its type) from a tile warp. 
    
    
    void DrawBitmapEx	( int layer, 
    			int bitmap_id, 
    			int source_x, int source_y, int source_w, int source_h, 
    			int dest_x, int dest_y, int dest_w, int dest_h, 
    			float rotation, int cx, int cy, int mode, int lit,  bool mask);
    
    * As DrawBitmap(), except that it can do more things. 
    
    /************************************************************************************************************/
    Game->DEBUGGING: These might find their way into namespace Debug-> instead of Game-> in the future. 
    /************************************************************************************************************/	
    
    int RefFFC; 				ZASM Instruction:
    					REFFFC
    	/**
    	* Returns the present ffc refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int RefItem; 				ZASM Instruction:
    					REFITEM
    	/**
    	* Returns the present item refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int RefItemdata; 			ZASM Instruction:
    					REFIDATA
    	/**
    	* Returns the present itemdata refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int RefLWeapon; 			ZASM Instruction:
    					REFLWPN
    	/**
    	* Returns the present lweapon refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int RefEWeapon; 			ZASM Instruction:
    					REFEWPN
    	/**
    	* Returns the present eweapon refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int RefNPC; 				ZASM Instruction:
    					REFNPC
    	/**
    	* Returns the present npc refrence from the stack. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    	
    /************************************************************************************************************/	
    
    int SP; 				ZASM Instruction:
    					SP
    	/**
    	* Returns the value of the stack pointer. FOR DEBUGGING ONLY!
    	* THIS WILL BE DISABLED IN RELEASE BUILDS !
    	*/ Example Use:
    
    
    ////////////////////////
    /// Not Implemented  ///
    ////////////////////////
    
    BitmapQuad
    //sdci[1]=layer
        //sdci[2]=x1
        //sdci[3]=y1
        //sdci[4]=x2
        //sdci[5]=y2
        //sdci[6]=x3
        //sdci[7]=y3
        //sdci[8]=x4
        //sdci[9]=y4
    	//sdci[10]=sourcex
    	//sdci[11]=sourcey
    	//sdci[12]=sourcew
    	//sdci[13]=sourceh
        //sdci[14]=width
        //sdci[15]=height
        //sdci[16]=tile/combo
        //sdci[17]=polytype
    
    void ComboArray	( int layer, int number_of_combos, 
    			int combos[], 
    			int x_positions[], 
    			int y_positions[], 
    			int csets[]);
    			
    			ZASM: COMBOARRAY
    			
    /**
    *
    * Draws a number of combos specified by 'number_of_combos' to 'layer'.
    * Specify the combos by populating an array with their IDs and passing the array ointer to 'combos'.
    * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
    * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
    * Specify the CSet for each by passing an array with their csets to 'csets'.
    *
    * This function counts as a single draw.
    *
    * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
    *// Example:
    
    int combos[4] = {16,19,31,20};
    int cmbx[4]= {0, 16, 32, 48}:
    int cmby[4]={8, 8, 8, 8);
    int cmbc[4]={0,0,0,0};
    Screen->ComboArray(6, 4, combos, cmbx, cmby, cmbc);
    
    
    /************************************************************************************************************/
    
    //! This new mode does not work as intended, and will likely be deprecated by Screen->SetRenderSource
    void Quad	( int layer, 
    			int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4,
    			int w, int h, int cset, int flip, int texture, int render_mode);
    	
    					ZASM Instruction: 
    					QUADR
    	
    	/**
    	* Draws a quad on the specified layer with the corners x1,y1 through x4,y4.
    	* Corners are drawn in a counterclockwise order starting from x1,y1. ( So
    	* if you draw a "square" for example starting from the bottom-right corner
    	* instead of the usual top-left, the the image will be textured onto the
    	* quad so it appears upside-down. -yes, these are rotatable. )
    	*
    	* From there a single or block of tiles, combos **or a bitmap** is then texture mapped
    	* onto the quad using the arguments w, h, cset, flip, and render_mode.
    	* A positive vale in texture will draw the image from the tilesheet pages,
    	* whereas a negative value will be drawn from the combo page. 0 will draw combo number 0.
    	* Both w and h are undefined unless 1 <= blockh, blockw <= 16, and it is a power of
    	* two. ie: 1, 2 are acceptable, but 2, 15 are not.
    	*
    	* To specify a bitmap as a texture, sum 65520 with the bitmap ID, or use the constant TEX_BITMAP + Bitmap
    	* Example: Screen->Quad(6, 0, 0, 40, 25, 18, 50, 60, 110, 0, 0, 0, 0, TEX_BITMAP+RT_BITMAP0, PT_TEXTURE);
    	*
    	*
    	* Flip specifies how the tiles/combos should be flipped when drawn:
    	* 0: No flip
    	* 1: Horizontal flip
    	* 2: Vertical flip
    	* 3: Both (180 degree rotation)
    	*	(!)  See std.zh for a list of all available render_mode arguments.
    	*/ Example Use: !#!
    
    void TileArray	( int layer, int number_of_tiles, 
    			int tiles[], 
    			int x_positions[], 
    			int y_positions[], 
    			int csets[]);
    			
    			ZASM: TILEARRAY
    			
    /**
    *
    * Draws a number of tiles specified by 'number_of_tiles' to 'layer'.
    * Specify the tiles by populating an array with their IDs and passing the array ointer to 'tiles'.
    * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
    * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
    * Specify the CSet for each by passing an array with their csets to 'csets'.
    *
    * This function counts as a single draw.
    *
    * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
    *// Example:
    
    int tiles[4] = {16,19,31,20};
    int tilx[4]= {0, 16, 32, 48}:
    int tily[4]={8, 8, 8, 8);
    int tilc[4]={0,0,0,0};
    Screen->TileArray(6, 4, tiles, tilx, tily, tilc);
    
    
    /************************************************************************************************************/
    
    void PixelArray	( int layer, int number_of_pixels, 
    			int x_positions[], 
    			int y_positions[], 
    			int colours[]);
    			
    			ZASM: PIXELARRAY
    			
    /**
    *
    * Draws a number of pixel, similar to PutPixel, specified by 'number_of_pixels' to 'layer'.
    * Specify the X coordinate for each by passing an array with their x coordinates to 'x_positions'.
    * Specify the Y coordinate for each by passing an array with their y coordinates to 'y_positions'.
    * Specify the colour for each by passing an array with their csets to 'colours'.
    *
    * This function counts as a single draw.
    *
    * Transparency is not yet imlemented, but you may draw to a bitmap and render it translucent.
    *// Example:
    
    int pix[4] = {16,19,31,20};
    int px[4]= {0, 16, 32, 48}:
    int py[4]={8, 8, 8, 8);
    int pc[4]={0x12,0xB0,0xDA,0x4F};
    Screen->TileArray(6, 4, pix, px, py, pc);
    
    /************************************************************************************************************/
    
    CreateBitmap(int id, int xsize, int ysize)
    
    * Min size 1, max 2048
    /************************************************************************************************************/
    
    SetRenderSource(int target, int x, int y, int w, int h)
    
    /************************************************************************************************************/
    
    void Polygon	( int layer, ... );
    			
    			ZASM: POLYGON
    			
    * Adding to Beta 9 : Postponed -Z
    
    /************************************************************************************************************/
    
    // Game->
    
    //! These do not yet work:
    
    //Returns Screen->Door[index] for a given DMap and Screen
    int GetDMapScreenDoor( int dmap, int screen, int index )
    
    
    //Sets Screen->Door[index] for a given DMap and Screen to 'value'
    void SetDMapScreenDoor( int dmap, int screen, int index, int value)
    
    
    //Returns Screen->State[index] for a given DMap and Screen
    bool GetDMapScreenState( int dmap, int screen, int index )
    
    
    //Sets Screen->State[index] for a given DMap and Screen to 'value'
    void SetDMapScreenState( int dmap, int screen, int index, bool value)
    
    /************************************************************************************************************/


    Other than that, any idea I might have, is one of the following (1) convoluted, (2) else something I could easily do, (3) something I'm too lazy to do, or (D), something that I might shove into the language instead of making a mad workaround to accomplish. :p

    I'd say, perhaps finish your items header, and you know, put it in the databases?

    One thing that would be exceptionally useful are any scripts that we can pool into scripted template quests for the userbase. Any enemies, items, game events, minigames, bosses, or similar that are missing from the present lexicon.

  3. #3
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,106
    Level
    11
    vBActivity - Bars
    Lv. Percent
    43.68%
    Here's something stupid simple, at least probably stupid simple for you.

    I'd like to build a quest where certain doors will become opened when you possess a certain number of a particular item. Basically like the system Final Fantasy Legend 2 uses to determine if you could move forward in the quest by the number of Magi you possess. One method I thought of would be to use an item that is tracked. Then when that item gets to a specific threshold, the script would add a "key item" invisibly into your inventory which would then be used with the "Authentic Dungeon Doors" Script on PureZC.

    It would be preferable if I could somehow do the same thing without using item slots though....
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

  4. #4
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Are you planning to use NES dungeon doors, lock b locks, or something else?

    I scripted a lockblock system that uses a desired item/counter to simulate lockblocks, and I made chests that open if you have a special item; but this could also work for doors. NES dungeon doors are a bit special, as they set both sides of a mapscreen when opened.

  5. #5
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,106
    Level
    11
    vBActivity - Bars
    Lv. Percent
    43.68%
    Quote Originally Posted by ZoriaRPG View Post
    Are you planning to use NES dungeon doors, lock b locks, or something else?

    I scripted a lockblock system that uses a desired item/counter to simulate lockblocks, and I made chests that open if you have a special item; but this could also work for doors. NES dungeon doors are a bit special, as they set both sides of a mapscreen when opened.
    In theory I'd use a NES Dungeon. And chests you say? I might have a use for that as well. I didn't even think of it.

  6. #6
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    Quote Originally Posted by ZoriaRPG View Post
    Are you planning to use NES dungeon doors, lock b locks, or something else?

    I scripted a lockblock system that uses a desired item/counter to simulate lockblocks, and I made chests that open if you have a special item; but this could also work for doors. NES dungeon doors are a bit special, as they set both sides of a mapscreen when opened.
    I'll be honest with you. Door Sets need a new implementation. "The Old one must remain and|or it must be built around it, preferably the former". In the future it would be nice if we had multiple doors per wall, sbomb doors (for NES dungeons where secrets cannot be permanent unless you treat as interior), custom door widths, and the ability to move the doors along the walls and away from the wall if we choose.

  7. #7
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,106
    Level
    11
    vBActivity - Bars
    Lv. Percent
    43.68%
    Quote Originally Posted by Tamamo View Post
    I'll be honest with you. Door Sets need a new implementation. "The Old one must remain and|or it must be built around it, preferably the former". In the future it would be nice if we had multiple doors per wall, sbomb doors (for NES dungeons where secrets cannot be permanent unless you treat as interior), custom door widths, and the ability to move the doors along the walls and away from the wall if we choose.
    Based on that, I think I better use lockblocks instead of dungeon doors. Sounds like it's either impossible to use the doors or just really annoying to try.

  8. #8
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Quote Originally Posted by Tamamo View Post
    I'll be honest with you. Door Sets need a new implementation. "The Old one must remain and|or it must be built around it, preferably the former". In the future it would be nice if we had multiple doors per wall, sbomb doors (for NES dungeons where secrets cannot be permanent unless you treat as interior), custom door widths, and the ability to move the doors along the walls and away from the wall if we choose.

    I could say the same for mapscreen in general. As I mentioned to Gleeok recently, the entire way that we do maps is a bastard to change. It would be better, for a future version, to make a wholly new map system, and then we would be stuck with a big switch of:

    if ( version >= 3 ) { DoNewStuff(); } else { PrayOldStuffWorks(); }


    For the present, at the least, I added a whole bunch of stuff work working with maps in the script language to 2.54, 2.55, 2.60, 2.sheep. I ran into a fun time when i wanted to make save state functions, when the screens used NES DUngeon doors, because there was no way to remotely read, or set them.

    Quote Originally Posted by Lelouche Vi Britannia View Post
    Based on that, I think I better use lockblocks instead of dungeon doors. Sounds like it's either impossible to use the doors or just really annoying to try.

    If you want to look at how I did any of this, I have scripts posted both on ZC.com and Pure.


    Scripted Lockblocks, Doors (ZC.com)
    Scripted Chest Game, and Chests (ZC.com)

  9. #9
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,106
    Level
    11
    vBActivity - Bars
    Lv. Percent
    43.68%
    Thanks! That will help!
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

  10. #10
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,759
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.52%
    Quote Originally Posted by Lelouche Vi Britannia View Post
    Thanks! That will help!
    The uploads include demo quests, so they might help. The chest game code is a bit complex, as it is obviously designed for the minigame itself. I have a chest script that is mostly finished, that I designed so that it could not be broken by F6, here:

    https://pastebin.com/mM5rg1dP

    This one is somewhat complex as well, but the idea is to prevent the player from either being able to duplicate chest contents, or to lose chest contents that they acquire, if they press F6 during the process of awarding or setting the item or the screen values. It is absolutely something that you will want to consider for chests, and possibly for doors, as the timing involved can be tricky.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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