Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Rowan on March 22, 2005, 02:16:31 AM

Title: Similar items at different prices.
Post by: Rowan on March 22, 2005, 02:16:31 AM
I've been out of the Tut business for a LONG while now, and this will probably be my only one for a LONG while now. As the title dictates, if you dont know already its possible to have 2 items at different prices.
Its quite simple and not hard to do at all. For begginers at RM2K/3 this may even give you a hint on what does a variable and a fork option do. (For more IN-Depth Tutorials regarding Variables, Switches, and/or Fork Options, I strongly advise you to look at some of the other wonderful Tutorials here on Charas or go to some other site If need be.)

Back on topic. Here is a step-by-step direction on what to do. Let's begin:

1: Create two different items: "Ring" (Normal Price)
"Ring" (Higher/Lower Price. Let's say higher for the time being.)

2: Place the "Higher Ring" in a call shop event or some sort.

3: Next go to the common events tab. And make a common event called "Items at different prices" (Or something else.) First input a Variable (Name it whatever you want. I'm going to say the name is XXX for example.) with "Operand" set on the items button. Then scroll down the box beside it and select the "HIGHER" Ring Item. Then scroll down the box next to it and select Owned#. Then press O.k

4: Input a fork condition in the white box beside it. Click the second tab and select "If item (HIGHER)Ring has it. and press okay. "MAKE SURE THE ELSE CASE IS NOT CHECKED."

5: Make another fork condition in the fork you did a bit ago. and select Variable from the first tab. Click the button next to it (It has 3 dots.) and select the Variable you just made, and press Okay. Set the "Set#" 1 and click "above" in the scroll box below and press OK.

6: Now within the "fork condition that you just did in step 5." Make another "Add item" command. This time put "ADD ITEM" on the set section. Then in the Add/drop item section select the (NORMAL PRICED!!) Ring. Next, select variable in the operand section, and select the XXX variable that you have made and click OK.

7: Last but not least. Open the event command box and select "add item." Click on the Drop Item button in the "Set" section. then in the Add/drop section click item and then select the (HIGHER) Ring. Next, in the Operand section. Choose the Variable button, then Click the 3 dot button beside it. Select the variable name XXX and press OK, and OK out of the Add item command.

The ENTIRE event should look something like this:

<>Variable Change: [000: XXX] Set, (HIGHER)Ringhld#
<>FORK OPTION: (HIGHER) Ring, Got item
<>FORK OPTION:Varbl [000: XXX]-1 above
<> Add/Remove item: (NORMAL) Ring-> V000Incr.
<> Add/Remove item: (HIGHER) Ring-> V000Decr.
<>
:END Case
:END Case

All it says is that for every (HIGHER) Rings you have Increase your (NORMAL) Rings by that # and decrease your (HIGHER) Rings by that #. This event will ONLY do it if you have a (HIGHER) Ring in you item box. It will switch it for a (NORMAL) Ring. Basically getting rid of the annoying 2 Items, Same Item thingy that shows in the game. Repeat for each item.

You can do this if you want a specific item to be lower also. Just change the (HIGHER) Ring name to (LOWER), or just simply create a new one.

NOTE: This coding will become VERY Tedious if you plan to do this with EVERY Item in your game. (Depending on the # of items you have of course.)

Thank you for your time and I hope this will be of some further assistence, Thank you. ~Rowan
Title:
Post by: SleepAid on March 22, 2005, 02:23:06 AM
Oh, thank god. I've been looking for something like this forever.
Title:
Post by: GhostClown on March 22, 2005, 02:36:54 AM
Nice tut, man.
Title:
Post by: Enduo_Ril on March 22, 2005, 04:38:55 AM
Or, you could have it like in real life...

Two shirts/hats/suits of armor/etc. with the EXACT SAME usefulness, except one's about 5 times more expensive and has a shiny logo on it. One store sells the cheaper stuff while others sell the horribly overpriced ones... you just have to find the right store. Heh.
Title:
Post by: SleepAid on March 22, 2005, 04:48:09 AM
Just a question: Have you ever thought of making a tut on how to make shops buy your item for less, and sell it for more?
Title:
Post by: Rowan on March 22, 2005, 08:26:49 PM
Are you asking me if there is a way to buy an item at (normal, higher or, lower) Then sell it for more (or less) then it is usually worth? Sure, though Im not sure if it will work.


I think this will help Sleep Aid:

NOTE: This Tut won't be as in depth as before. Im on a time constraint right now.

Step #1:
Create a new item worth a lot. (The more its worth the higher it will sell for.) Name the item anything you want. (Im naming it (HIGHER) Ring. For future ref.)

Step#2
Create your variable. Name it anything you want (Ill name it XXX. For future reference.) DONT PUT IT IN EVENT JUST YET.

Step#3:
Create a fork condition. If "(NORMAL) Ring", Party Has it.

Step#4:
Do the switcharoo. Put the variable you just made in the fork condition. Set the operation to "Set", and Operand to "(NORMAL) Ring." "Number Possessed"

Step#5:
Select "Item Management" in the Event Selection Box. Set The Operation to "Remove ITEM" Set the Select item to "(NORMAL) Ring.
Then Set the Amount to "Amount Stored In..." Then select the variable that you made a while ago and press okay.

Step#6
Select "Item Management" in the Event Selection Box. Set The Operation to "Add Item" Set the Select item to "(HIGHER) Ring. (The Item you made with the hugh amount at the beginning of the tut.)
Then Set the Amount to "Amount Stored In..." Then select the same variable again.

Step#7
Then select "Open Shop Window." And select your items you want to be sold at the shop. MAKE SURE IT IS NOT IN THE FORK OPTION ITSELF. Place it right below it after ":End"

Step#8
Do the switcharoo once again. Put the variable you just made in the fork condition area. This time, Set the operation of the variable to "Set", and Operand to "(HIGHER) Ring." "Number Possessed"

Step#9:
Select "Item Management" in the Event Selection Box. Set The Operation to "Remove ITEM" Set the Select item to "(HIGHER) Ring.
Then Set the Amount to "Amount Stored In..." Then select the same variable once again and press okay.

Step#10:
Select "Item Management" in the Event Selection Box. Set The Operation to "Add Item" Set the Select item to "(NORMAL) Ring. (The regular priced Item.) Then Set the Amount to "Amount Stored In..." Then select the same variable... again.

That's It. Now lets take a look at what it is supposed to look like.
(This is from RM2k3) (Yes, Both Tuts I posted can work in RM2k)

<>Branch if (NORMAL) Ring Possessed
    <>Variable Oper: [0001: XXX] Set, (NORMAL) Ring Possessed
    <>Change Items: (NORMAL) Ring V[0001] Remove
    <>Change Items: (HIGHER) Ring V[0001] Add
    <>
:End
<>Open Shop: *Items you want to be sold here*
<>Brance if (HIGHER) Ring Possessed
    <>Variable Oper: [0001: XXX] Set, (HIGHER) Ring Possessed
    <>Change Items: (HIGHER) Ring V[0001] Remove
    <>Change Items: (RING) Ring V[0001] Add
    <>
:End

This will begin by checking if you have any Normal Priced Rings. If You do, It will remove all the Normal priced rings and replace them with the higher priced rings. Next it will display the shop
(Regardless of the Rings.) Once your done buying and selling it will replace the Higher Rings that you have left (If you sold any) and switch it back to the regular priced rings.

Again do this multiple times for multiple items. (I think you can keep the same variable for checking the amount of items.)

And I though I wasn't going to make another Tut for like a month or so... I need an Orange Soda.. >_<.

Title:
Post by: dragoninja on March 22, 2005, 08:30:11 PM
woah, good to know this... the thing is, I don't get it :P
Title:
Post by: Rowan on March 22, 2005, 08:33:57 PM
Quote
Originally posted by dragoninja
woah, good to know this... the thing is, I don't get it :P


My first tut, was about how to not show the "Two of the same item thing in the menu" Like:

PotionX4
PotionX1

My second Tut was a request written for SleepAid, which I kinda didn't understand his question either. All that tut is on how to Sell a normal priced Item at a Higher (Or lower) price then normal.