Does anyone have a mirror of this library? The download links are all dead, most likely due to dropbox killing public folders.
Does anyone have a mirror of this library? The download links are all dead, most likely due to dropbox killing public folders.
I have some of his functions cloned in my old ItemHandling.zh header. I may have the newer one, on a server somewhere.
Is there a specific function, or set of utilities that you needed from it, failing that?
THis old, ugly weapon script uses some of them, but it does not have L/R Ex item buttons in it. The general premise for that, is this:
Store an item ID to a button somehow.
When the button is pressed, read the item stored to it.
Set that item to A or B.
Fake a press of A or B (respectively).
Not pretty, and the one frame graphical glitch will probably irritate you; which means scripting a visual fix for it.
Future ZC Notes and Notions
Spoiler: show
Last edited by ZoriaRPG; 10-08-2017 at 06:41 PM.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
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 | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
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.
Well I was both wanting to look into how it handled things in code as well as maybe implementing it depending on how it worked, I'm not yet certain exactly what kind of solution I want so I really can't see exactly what I need from it. If you do find it that would be appreciated.
Also paging @SUCCESSOR in case you're still around and have it.
Sorry for the late reply. I have updated the OP with a new link on my onedrive. I don't really know what is happening with dropbox. I'll try getting that one fixed as well.
Sorry, I have not really updated this. Lost touch with ZC and ZScript. If there is anything lacking, faulty, or other such let me know! I realize this reply is coming a year late, but it goes to anyone else who might have a similar question.
@SUCCESSOR : You may want to consider adding it to the databases on zeldaclassic.ocm and pureze.com.
One nice thing that I added to 2.54 and above, thatwill benefit this, and to which you may want to update it (once released), is:
int SetItemSlot(int itm_id, int slot, int force);
/**
* This allows you to set Link's button items without binary operations, and to decide whether to
* obey quest rules, or inventory.
*
* When using this, 'itm_id' is the ID number of the item.
* Set 'slot' to one of the following: 0 == Slot B, 1 == Slot A
* Other buttons may be added in the future, and other values for 'slot' are thus, reserved.
* Set the flags on 'force' as follows:
* const int ITM_REQUIRE_NONE = 0
* const int ITM_REQUIRE_INVENTORY = 1
* const int ITM_REQUIRE_A_SLOT_RULE = 2
* Thus, require both inventory, and following quest slot rules, force == 3.
Thus, needing to set up a subscreen, or using idiotic functions to page through items, is a duck.
I want to add either, or both, RunitemScript(int script) and Useitem(int item_id) at some point--I may have mentioned this in the thread earlier, but I've forgotten--and I want to add bitem slots for the extra buttons, plus L and R; hence the configuration for SetItemSlot(), which can be expanded to cover additional slots, if we add more.
The real issue, is the suibscreen: I could add item slots for more buttons, but making the subscreen show them would be hellish.
One of the things that I did, to suppress the graphical inconsistency, was this:Originally Posted by Lunaria
Set the tile positions for A and B item slots (the subscreen icons) as constants:
const int SUBSC_PSV_ITEM_A_X = n;
const int SUBSC_PSV_ITEM_A_Y = n;
const int SUBSC_PSV_ITEM_B_X = n;
const int SUBSC_PSV_ITEM_B_Y = n;
Draw a solid black tile over the item that I am substituting.
Draw the item tile for the item the item that is truly held in that slot (the one that I am temporarily shifting out) over the black tile.
This overrides the graphics of the item that I am using for a frame, so that the graphical glitch is less obvious.
I was more clever with 2.54, and in that version, I do:
Code://global const int TEMP_ITM_B_ID = 0; const int TEMP_ITM_B_TILE = 1; const int TEMP_ITM_A_ID = 2; const int TEMP_ITM_A_TILE = 3; const int TEMP_ITM_L_ID = 4; const int TEMP_ITM_L_TILE = 5; int tempitem[8]; //holds the item that should be in the slot, and its tile. // Item that should be there: item id (B), tile (B), item id (A), tile (A) //item that we are using this frame tempidtem_id, tempitem_tile void UseItemOnL(int itm_id) { itemdata temp = Game->LoadItemData(GetItemSlot(SLOT_B)); itemdata itmL = Game->LoadItemData(itm_id); //store the original item information for the slot tempitem[TEMP_ITM_B_ID] = temp->ID; //what was in the slot. tempitem[TEMP_ITM_B_TILE] = temp->Tile; //.. tempitem[TEMP_ITM_L_ID] = itm_id; tempitem[TEMP_ITM_L_TILE] = temp->Tile; //the original tile for the temporary item itmL->Tile = tempitem[1]; Link->SetItemSlot(itm_id, SLOT_B, 0); Link->PressB = true; Waitframe(); } void RestoreItemB() { itemdata temp = Game->LoadItemData(tempitem[TEMP_ITM_L_ID]); itemdata real = Game->LoadItemData(tempitem[TEMP_ITM_B_ID]); Link->SetItemSlot(tempitem[TEMP_ITM_B_ID], SLOT_B, 0); //restore the true item temp->Tile = tempitem[TEMP_ITM_L_TILE]; //restore the original tile. }
Last edited by ZoriaRPG; 10-10-2017 at 11:11 AM.
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
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 | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
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.
Maybe, if I get around to it.
You don't need to set up a subscreen for this. subscreens by default let you toggle linearly through all items. It's custom subscreens that can be a problem for this header. Other than that cycling through items isn't really so much of an issue so far as I can tell. And seems to rarely be visible. If people actually start using it in quests we might get a better idea though. Most people generally just want to have an extra button for a single constant item, from what I've seen.
Eh? Of course you need a subscreen. You can't change the item on A or B to another item without a subscreen, as the 2.50 functions to set Link's equipment make use of the subscreen layout, to page through items until you find the one that you want. Thus, if you want to temporarily substitute an item into B, if you do not have it on the subscreen, or paging through the subscreen in a linear manner would not land upon it, you would not be able to set it.
The default subscreens allow you to cycle through the default items in ZC, if that is what you mean. That is not true, if you add special/new items to a quest. This method is also horrific and slow, as it requires iterating the subscreen objects, and that does quite a lot (internally).
http://www.zoriarpg.com/zc/LoE_Userbar.png http://zoriarpg.com/zc/EiyuuUserbar.png
http://www.zoriarpg.com/zc/CIS_Original.pnghttp://www.zoriarpg.com/zc/CIS_II_Userbar.png
Latest ZC 2.53 (Win32) | (Technical Specification | Changelog)
Latest ZC 2.55(Win32) | 2.55 Modules | (Techical Specification | Changelog)
ZC Source Code | ZClaunch Source Code
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 | ZC Dev & Builds | ARCHIVED ZC Dev & Builds | YouTube Channel | Quests and ZScript Repository
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.
There are currently 5 users browsing this thread. (0 members and 5 guests)