Chaos Project

RPG Maker => Tutorials => Topic started by: war-famine_strife-death on March 12, 2009, 07:55:16 pm

Title: How to set Initial Items, Gold, Weapons, and Armor through the script.
Post by: war-famine_strife-death on March 12, 2009, 07:55:16 pm
I thought that it would be a good idea to post this simple to do tutorial.
This Applies to RPG Maker XP, I'm not sure about VX, but it should work as well.

1. Go to the Script Editor and select Game_Party
Spoiler: ShowHide
(http://img13.imageshack.us/img13/5098/initialgiwa1.th.jpg) (http://img13.imageshack.us/my.php?image=initialgiwa1.jpg)


2. for gold go to line 22 and enter any amount, let's say 5000.
for items, weapons, and armor (lines 25,26, and 27 respectively) enter the number for the item, weapon or armor you want then a comma (,) and then the amount you want to start with Example: @item = {1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10} that would give you items 1-8, with 10 of each.
Spoiler: ShowHide
(http://img13.imageshack.us/img13/1871/initialgiwa2h.th.jpg) (http://img13.imageshack.us/my.php?image=initialgiwa2h.jpg)

*ALSO at line 64 you can edit the maximum allowed amount of items etc, just change the default 99 to whatever you want like 999 or 9999(crazy I know). Tested and confirmed that it works by me personally.*

In Game Screen Shots
Spoiler: ShowHide

(http://img25.imageshack.us/img25/5336/initialgoldx.th.jpg) (http://img25.imageshack.us/my.php?image=initialgoldx.jpg)
(http://img6.imageshack.us/img6/8893/intialitemsn.th.jpg) (http://img6.imageshack.us/my.php?image=intialitemsn.jpg)

Thanks Landith for the tips. :)
Title: Re: How to set Initial Items, Gold, Weapons, and Armor through the script.
Post by: Landith on March 12, 2009, 09:15:28 pm
For images, you should upload them on to Imageshack (http://www.imageshack.us) or Photobucket (http://www.photobucket.com)
then they will give you the code to post it in BBC Code (This forums code, kinda like HTML code for forums)

To place them in a spoiler you put the [ spoiler ] code then the [ img ] code then the [ / spoiler ] code.

Nice tut by the way :)

Ps. I suggest you use imageshack because you don't have to register and it's easy to use, it also hardly ever takes images down unless it doesn't follow their terms and conditions (if your wondering what it is, look at their website)
Title: Re: How to set Initial Items, Gold, Weapons, and Armor through the script.
Post by: Blizzard on March 13, 2009, 05:34:18 am
Actually items, armors and weapons should be defined like this:

@items = {ITEM_ID1 => QUANTITY1, ITEM_ID2 => QUANTITY2}


Also, I think it's way easier to overview with a parallel process event at the beginning of the game. :/
Title: Re: How to set Initial Items, Gold, Weapons, and Armor through the script.
Post by: war-famine_strife-death on March 13, 2009, 10:56:34 am
@ Blizz - yeah it works either way. Using events can be easier and all, but it is a lot quicker to do it in the script database, once you get the hang of it.
EDIT- I usually use events myself. Using the script is just a suggestion for people that don't want to make too many events. (although it would only take one event, switch, and self-switch.)
Title: Re: How to set Initial Items, Gold, Weapons, and Armor through the script.
Post by: Blizzard on March 13, 2009, 01:22:57 pm
I still prefer using an event over a script for hardcoded stuff.