Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: TrueCynder on January 19, 2014, 11:31:46 am

Title: [SOLVED] Key Items into Skill scrolls ?
Post by: TrueCynder on January 19, 2014, 11:31:46 am
Hello everyone
i just realized that the RPG Maker XP does not have a pre made skill scroll
item catagory so i was wondering if there is a way to turn a selected Key item ID
into a consumable item that will then teach the selected actor a skill

Is there allready a script like this ? Or am i just to stupid to figure out how to make this in XP
yet again im way to used to the old Rm2k / 2k3 mechanics

I hope you guys can help me out :)
Title: Re: [unsolved] Key Items into Skill scrolls ?
Post by: AliveDrive on January 19, 2014, 01:31:12 pm
I think this is what you are looking for?

This will make it so a character who does not know this skill will learn it, but they can only learn it once.

Items: ShowHide
(http://img17.imageshack.us/img17/9788/o5m9.png)


Common Events: ShowHide
(http://i.imgur.com/utBw9xR.png)


You could probably do this without a common event for just one spell, but if you wanted multiple spells you would need to copy/pasta that conditional branch for each skill/item.

Also you would need a separate common event for each character.
Title: Re: [unsolved] Key Items into Skill scrolls ?
Post by: TrueCynder on January 19, 2014, 02:36:08 pm
OH MY GOD ! *facepalm* i havnt even thought about that >_<"
that was stupid of me

thanks alot  :shy:

EDIT
But hold on how do i do this that one CERTAIN actor will learn this skill ?
its consumable allright but how do i do it so itchecks who is suppose to learn it ?
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: Twb6543 on January 19, 2014, 03:58:40 pm
Choice Command should work, use \p[partymemberposition] (I believe its 1-4 (1 for the first party member) to display the party member names for each choice, and then just perform the add skill for that player. You may want to think about how many member are in the party at any time (Cant remember if there is a function for this) and use conditional branchs for each party length.

Choice:
Should \p[1] learn this skill
   - PartyMember1 Learns Skill
Should \p[2] learn this skill
   - PartyMember2 Learns Skill
Etc

I would do a proper mock up but currently am on my phone :)
Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: TrueCynder on January 19, 2014, 04:11:26 pm
hmmmm this is not what i meant at all :(
it suppose to be like a potion - you´re not suppose to leave the menu
its just suppose to work like they used to in Rm2k
you selected the actor and if they could learn the skill you used the item
and they learned the skill and if not well then not

Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: AliveDrive on January 19, 2014, 04:26:10 pm
Quote from: TrueCynder on January 19, 2014, 02:36:08 pm
But hold on how do i do this that one CERTAIN actor will learn this skill ?


Oh well in that case just use Tons of Add-ons or this script.

Skill Items: ShowHide
http://forum.chaos-project.com/index.php?topic=3476.0


Tons of Add-Ons: ShowHide
http://forum.chaos-project.com/index.php/topic,105.0.html


Sometimes scripting is a lot easier than eventing.

EDIT:

Eventing would work if you had only one character or specialized items/skills for each character (Characters cannot learn the same move).

You can imagine the amount of work that script will probably save you.
Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: PhoenixFire on January 19, 2014, 08:22:34 pm
If you would like to use eventing, it would be really easy to set up actually.. Use a class specific item, and a conditional branch.

Example: Aluxes is a fighter; assign him an item called "fighter token". Make a common event, that contains the skill to learn in a conditional branch, and have the conditional branch check to see if item "fighter token" is in inventory. If yes, consume one of those potions, and learn the skill. If not, display text "your characters class cannot use that potion", or yanno, whatever you want it to say...

The only downside to this, is that you cannot allow the player to change their class, or if they do, that you remove the token and assign a new one (like "wizard token" or whatever you have for classes), that way your potions will seem to be dynamically reacting to the player. You should also keep in mind that this will only work to read the token in your main characters inventory, not your other party members. If you want to make this work for other characters too, you would need to use variables, one for each character, and you would need to ask one of the great scripters here, how to go about using a script call to assign a numerical value to each variable, based on each characters class. So for instance, if actor 1 is a fighter class, assign variable 51=1. If they're a cleric 51=2, and so on. Then use a common event to ask which character wants to use the potion on, y cycling through "if" branches. Within each branch, have the event check the variable values, and if the value matches the required class for the potion, use the potion, and if not, tell them the character can not use the potion.



A quick mock-up of it is below... It should look something like that when you're done...  Hope this all helps you out!!


::fighter potion
Would you like $actor1 to use the potion?
If Yes > is $actor1 a fighter? (script call should be somewhere right here to check this)
  If Yes > PotionX -1
           >GoTo labelEND
  If No  > Text: This character cannot use this potion
           > GoTo labelEnd
If No >
Would you like $actor2 to use the potion?
If Yes > is $actor2 a fighter? (script call should be somewhere right here to check this)
  If Yes > PotionX -1
           >GoTo labelEND
  If No  > Text: This character cannot use this potion
           > GoTo labelEnd
If No >
Would you like $actor3 to use the potion?
If Yes > is $actor3 a fighter? (script call should be somewhere right here to check this)
  If Yes > PotionX -1
           >GoTo labelEND
  If No  > Text: This character cannot use this potion
           > GoTo labelEnd
If No >

:labelEND
Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: G_G on January 19, 2014, 09:39:17 pm
In this case, a script is going to make it a lot easier to pull this off.
Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: PhoenixFire on January 19, 2014, 10:57:33 pm
Oh, yes... Forgot to mention that part. A script will definitely make your life easier on this part... I just wanted to point out there is an alternative method, if for some reason you really did want to keep it as events, or as close as possible to that.
Title: Re: [re-open] Key Items into Skill scrolls ?
Post by: TrueCynder on January 20, 2014, 05:25:35 am
thanks guys but AliveDrive
allready linked me to a script :)
i forgot to close this thread ^^"

thanks for your help tho :3
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: AliveDrive on January 20, 2014, 11:08:42 am
Still though,  DigitalSoul brought up some good points.

Just goes to show that in RMXP there are often many approaches to the similar issues.
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: PhoenixFire on January 22, 2014, 02:04:00 pm
Honestly, I wish more people used events.. They're easier to change, and can sometimes do more than a script even can, or at least, without some complex scripting. I mean, Eddard Stark over on RMRK has just done up yet another fully evented, no scripting, custom battle system.. (it's for the RTP-only challenge some of us are doing over there....)
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: TrueCynder on January 22, 2014, 02:15:02 pm
oh im a Rm2K veteran im used to events =)
it´s just RGSS makes thing much more nicer to use
also apperently the common events dont work on parallel anymore so =/
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: Zexion on January 22, 2014, 02:21:40 pm
Common events work parallel as long as a switch is on.
Title: Re: [SOLVED] Key Items into Skill scrolls ?
Post by: TrueCynder on January 22, 2014, 02:23:08 pm
ow ._." that´s kinda silly
but thanks for the info