Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Level and attribute Requirements

Started by SirMagus, October 03, 2007, 02:30:40 PM

0 Members and 1 Guest are viewing this topic.

tSwitch



FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

SirMagus

Awesome =D now I'll test it out.
But do i have to edit a part of the script for every weapon i set a requirement for?


tSwitch

you just need to add the requirements to the arrays
the instructions are included

change the tags btw


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

SirMagus



tSwitch



FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

SirMagus

arh...
problems.. should i insert something where is says "nil" ?
If so, what should i insert?


tSwitch

just insert stuff into the arrays, like the instructions say
see the line that says

#===============================================
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING
#===============================================


you don't need to do ANYTHING beyond that line
just imput the values you want into the arrays above that line
(as per the instructions)


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

djkdjl

#32
SirMagus,,follow this step by step...

1) Add the two scripts that NAMKCOR made,,add them above Main.

Name the first script you added: ERSv1.0
Name the second script you added: Scene_Equip

2) Test play your game, and go to the EQUIP screen.  You MIGHT get an error at this point.  If that happens then,,find lines (8-9 I think) in Scene_Equip script [which should be just above Main]and modify those lines
from:
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
to:
   self.contents.font.name = "Arial"
   self.contents.font.size = 24

3) To set the requirements,,you have to modify the ERSv1.0

example:       @weapon_level_req[0, 3, 10]
means that:    weapon ID# 1 has no (or 0) level requirement, weapon ID# 2 has a requirement of level 3,,and weapon ID#3 has a requirement of level 10

*Note* The array goes in order @weapon_level_req[LvReq_of_weaponID#1, LvReq_of_weaponID#2 ,LvReq_of_weaponID#3, LvReq_of_weaponID#4, LvReq_of_weaponID#5...]

So you modify (line 66 I think) of the ERSv1.0 script to what you want/need
Further lines set other requirements such as strength and dexterity required.

Hope that helps....
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

tSwitch

Quote from: djkdjl on October 13, 2007, 02:10:24 AM
SirMagus,,follow this step by step...

1) Add the two scripts that NAMKCOR made,,add them above Main.

Name the first script you added: ERSv1.0
Name the second script you added: Scene_Equip

2) Test play your game, and go to the EQUIP screen.  You MIGHT get an error at this point.  If that happens then,,find lines (8-9 I think) in Scene_Equip script [which should be just above Main]and modify those lines
from:
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
to:
   self.contents.font.name = "Arial"
   self.contents.font.size = 24


3) To set the requirements,,you have to modify the ERSv1.0

example:       @weapon_level_req[0, 3, 10]
means that:    weapon ID# 1 has no (or 0) level requirement, weapon ID# 2 has a requirement of level 3,,and weapon ID#3 has a requirement of level 10

*Note* The array goes in order @weapon_level_req[LvReq_of_weaponID#1, LvReq_of_weaponID#2 ,LvReq_of_weaponID#3, LvReq_of_weaponID#4, LvReq_of_weaponID#5...]

So you modify (line 64 I think) of the ERSv1.0 script to what you want/need
Further lines set other requirements such as strength and dexterity required.

Hope that helps....

yeah, I always get that error with new scripts
I use Blizzard's Tons of Addons - Shaded Text addon to solve that problem all the time

also, make sure Scene_Equip goes below ERSv1.00

otherwise, you've got it right


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

SirMagus



djkdjl

IF you are still getting an error that says something about,,nil,,or some nonsense like that,,then that is because your array is let's say only 5 items long,,

but the weapon you are trying to equip is like number 23 in your database weapons list.

So obviously your array would have to be AT LEAST 23 items long.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

SirMagus

#36
but i'm gonna have LOADS of weapons and armors... and i mean LOADS..
For now i have 21 Blades, and then i'll have to make swords, bows and so on.
LOL can the script handle it? XD

And also,, NAMKCOR, on the topic you posted with the script..
you wrote the requester was SirMagnus XD
Many people make that Mistake XD
Why? =P   lol, plz edit it to   SirMagus
Thnx


djkdjl

Yup,,it should.  The works awesome.


LoL imagine putting requirements for some 999 weapons,,LoL!  That would be one loooooong array.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

tSwitch

Quote from: djkdjl on October 13, 2007, 02:39:15 AM
IF you are still getting an error that says something about,,nil,,or some nonsense like that,,then that is because your array is let's say only 5 items long,,

but the weapon you are trying to equip is like number 23 in your database weapons list.

So obviously your array would have to be AT LEAST 23 items long.

the nil error is because if nil was a value in the array when you went to equip an item
it would crash
so I put that message in to let the maker know "hey, you need to fix up your arrays"

Quote from: SirMagus on October 13, 2007, 03:10:51 AM
but i'm gonna have LOADS of weapons and armors... and i mean LOADS..
For now i have 21 Blades, and then i'll have to make swords, bows and so on.
LOL can the script handle it? XD

And also,, NAMKCOR, on the topic you posted with the script..
you wrote the requester was SirMagnus XD
Many people make that Mistake XD
Why? =P   lol, plz edit it to   SirMagus
Thnx

yes, the script can handle it, you can use as many elements in the arrays as you need, you just need to keep adding commas and values inside the brackets (no comma after the last value)

yeah, they will be long arrays, I tried to find an easier, neater, way to get the job done
but it had to be done with arrays if you wanted every last weapon/armor to be included

and yeah, I noticed that earlier and fixed it up right away


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

SirMagus



tSwitch



FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon