PDA

View Full Version : Custom Shops



Tygore
09-13-2006, 03:21 PM
Obviously, there's the Z3 style of shop: walk up to the item, press A, you choose the item, continue shopping. Much more convinient than the current style. Now, I haven't had time to really get into ZScript (too much other programming on my plate, go figure). However, I would go about it by assgning each shop item to a FFC, each running similar code. Have it check Link's rupees, and if he has enough then deduct the rupees and have him add the item to inventory. Otherwise, nothing happens (once/if we get dialogue coding, maybe a special "you can't buy that!" message to go along).

Some other ideas to mess with:

-A barter system: maybe the chieftan of a local tribe has no intrest in your money, but his tribe could use the arrows. Or maybe an explosives expert needs more bombs for an experament, and is willing to buy yours from you (I would set that up to act as a shop with him "selling" you a rupee item at the cost of one bomb).
-One-time items. This could work as either a "you buy it and the FFC becomes permanently disabled/switched to a 'Sold Out' graphic", or "you buy it and now we sell ammo (ideal for the Bow/Quiver, Bomb Bag, etc.)".
-Healers. This could be tricky, as I'm not sure how ZScript handles decimals, but someone who charges a price relative to your current damage. For conveying the price, I would give each digit a FFC, have it run the formula, then change the graphic to that particular digit. (So, if the price came to 123 rupees, the 100s FFC would divide by 100, drop the decimal, and display the graphic for 1. The 10s FFC would divide by 10, drop the decimal, then continuously subtract 10 until the answer was less than 10. 1s would subtract 100 until <100, then subtract 10 until <10.)
-Discount shops. Make the letter act as a member's card of sorts, and adjust the price. The price display would obviously run through another FFC. Maybe, once custom items are fully in, there can be multiple levels of Letter for the Regular and Premium members.
-Non-uuniversal Potion Shops. This could actually make for an interesting puzzle, requiring Link to "show" the Letter
-Other item triggers for shops. For instance, the Shopkeeper sees that you have the Master Sword and recognizes you as the legendary hero, so he feels comfortable about selling you other weapons. Obviously, that might be hard to convey to the player right now since we don't have any dialogue scripting.

So there's some ideas. As I said, I have not the workload to support learning and messing with ZScript at the time, but I'd love to see what those of you who have delved into it could produce. By looking at the library, I assume that the item passing functions are doable.

Have at it.