Author Topic: [XP] attach skills to equipment  (Read 1335 times)

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
[XP] attach skills to equipment
« on: November 28, 2016, 08:51:32 AM »
 Greetings!

 Wondering how can one event having skills attached to certain equipment, so as an example if the character has certain accsesory equiped it shall learn "heal" if not equipped then forget heal, thus toggling the skill ON/OFF depending if the item is equipped. Very important to mention it should only make the skill "usable" during battles.

EDIT: I have already tried having a parallel event with a conditional branch if a certain item is equipped then learn some skill, if not equipped then forget skill, but it didnt work quite the way I wanted lol, liek it happened but it only triggered only after a battle has starter or finished, not immediatly after equiping or unequiping the item...so it is clear its a bit more sophisticated than my first guess...

 Recommendations? thanks before hand for putting your time into this :D
« Last Edit: November 28, 2016, 09:10:59 AM by GatsRoller »

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3039
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] attach skills to equipment
« Reply #1 on: November 28, 2016, 09:20:03 AM »
http://forum.chaos-project.com/index.php/topic,105.0.html
EQUAP skills in Part 2
Quote
#   If you give a skill negative max AP, the skill will be completely bound to
#   the equipment part and will be forgotten when it is unequipped.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #2 on: November 28, 2016, 09:27:39 AM »
 Well I think I got it figured by events, I have the character know on level 1 a certain set of skills, then run a parallel event on the map blocking by default all skills (forget) then I added a conditional branch for  "when equipped" then "learn "x" skill", branch end forget skill again.

 It works, but I have to toggle  the menu screen every time,or wait for a battle to occur, sure there is no way to have it all evented?

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3039
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] attach skills to equipment
« Reply #3 on: November 28, 2016, 09:43:18 AM »
I mean if a script exists that all it requires is configuring in the script itself, you just end up making more work for yourself by eventing it. "Why reinvent the wheel" so to speak.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #4 on: November 28, 2016, 11:23:26 AM »
Yes, the more skills and actors you have, the more additional conditions you will need to check constantly. At one point the game will start to lag since it has to check a huge number of conditions every frame.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #5 on: November 28, 2016, 06:53:10 PM »
Yes, the more skills and actors you have, the more additional conditions you will need to check constantly. At one point the game will start to lag since it has to check a huge number of conditions every frame.

  I kinda figured that out, thing is I'm actually going forward with as it is a 1 character game, dungeon crawler with like 4 levels, so its relatively light to run? and Im talking about some 5 to 6 skills to have like this, as the game has to be short or "speedrunable", but in the end you guys have a better idea, and I can still use the addon!  :D

 Up to this moment was just curious to understand the logic of the event to iminate the mechanic, was running a parallel with a conditional branch, but it triggered only after I toggled between the menu screen...it kinda works just looks sloppy, any idea why though?

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3039
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] attach skills to equipment
« Reply #6 on: November 28, 2016, 09:21:29 PM »
Map events and common events only run when the $scene is currently Scene_Map.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #7 on: November 28, 2016, 09:57:12 PM »
What KK20 said.

If your game is small like that, then you could technically event it. :) But you still get the problem KK20 mentioned: Your skills won't change until you go to the map scene again.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #8 on: November 28, 2016, 10:32:29 PM »
What KK20 said.

If your game is small like that, then you could technically event it. :) But you still get the problem KK20 mentioned: Your skills won't change until you go to the map scene again.

 Yes might have to paste the event on every map lel, so Im going to keep the ability by default on the character ,so the parallel events will be auto cancelling the skill, but with the conditional to grant the skill upon being equipped. Tested it and well, it looks  a bit clumsy, since you have to get back into the menu, unless maybe I can have equipment on one menu, and skills on the other, so it would make sense to toggle between menus to check the effect of the equipment.

 Im very close to have a demo for what would be the tutorial level, so I might actually show a video of the alpha demo, its way easier to have feedback when you have a visual product  :cclove:

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #9 on: November 28, 2016, 11:46:36 PM »
No need to paste it everywhere, there are global events in the database that you can set up.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #10 on: November 29, 2016, 04:23:01 AM »
No need to paste it everywhere, there are global events in the database that you can set up.

 How would you set those global events? I dont get how they work, all they seem to do is jam/crash/ loop the game, how do you turn them off?

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3039
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] attach skills to equipment
« Reply #11 on: November 29, 2016, 04:44:54 AM »
Make a Parallel Process common event that is nothing but a series of conditional branches checking if a certain piece of equipment is equipped. If so, add skill, else remove skill.

When the game starts, have an autorun event turn on the switch required to start the parallel process.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #12 on: November 29, 2016, 05:10:42 AM »
Make a Parallel Process common event that is nothing but a series of conditional branches checking if a certain piece of equipment is equipped. If so, add skill, else remove skill.

When the game starts, have an autorun event turn on the switch required to start the parallel process.

 Yup I just tried that and it just freezes upon start....I give up I'll just set up the EQUAP addon....

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3039
  • LV: 372
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] attach skills to equipment
« Reply #13 on: November 29, 2016, 05:29:20 AM »
Do you know the difference between parallel process and autorun? At a glance they seem to do the same thing, but they're entirely different.

While both do immediately run event commands infinitely without requiring player input, an autorun executes its chain of events before anything else can be processed, not until it is finished doing what it needs to do (thus preventing player input or other events from running). A parallel process executes along-side other events, not halting any other event from running its commands.

The problem you seem to be having is making the autorun run forever without actually terminating it. The most common thing people do with their games when it comes to initializing certain switches or variables is to make an autorun map event on the map the player starts that, at the very end of its commands, turns on a self switch. Make a second page that requires this self switch to be on, but make sure its trigger is NOT autorun.



Other Projects
RPG Maker XP AceUpgrade RMXP to RMVXA performance!
XPA TilemapTilemap rewrite with many features, including custom resolution!


NNID: KK20-CP
Discord: KK20 Tyler#8901
Join the CP Discord Server

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #14 on: November 29, 2016, 08:46:11 AM »
There is another difference. Auto-runs run after the transition to the map is finished. Parallel process runs the first time when the transition starts.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #15 on: December 02, 2016, 07:34:29 PM »
 Thanks for the advice guys,  now I should have a very simple evented system that works for a single character without lagging the game. It was kinda simple, but so simple it got troublesome.

 So yeah in the end I have to make sure to have an autorun to turn on the switch that will activate the parallel, and also having a secondary page on the autorun activated by a self switch, the secondary page will be triggerd by action button thus ending the autorun loop right.

 EDIT: ok it works I almost have this figured, now I have a problem:

   1. I need to make a "you learned heal" message appears everytime you get out of the menu, but guess what I can only make it loop :facepalm:, so how to set a conditional to trigger a text screen once every time this item is equipped?

   I mean I was able to set the autorun event trigger the parallel process without freezing or looping, but adding the text was blue screen of death for my brain.

 
« Last Edit: December 02, 2016, 08:17:02 PM by GatsRoller »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #16 on: December 02, 2016, 08:26:58 PM »
Are you trying to add it on the map scene? You might need a custom script for that.

There is an alternative though. You could use the Show Picture command. Since you only have a few skills, you will need to make only a few pictures.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #17 on: December 02, 2016, 08:36:15 PM »
Are you trying to add it on the map scene? You might need a custom script for that.

There is an alternative though. You could use the Show Picture command. Since you only have a few skills, you will need to make only a few pictures.

 Yes I know is very "makeshift" but since the game is relatively short and simple my goal is to make it work.

 Ok so you mean for the picture to be the text window showing "learned Heal" so it would be easier to take out?

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19929
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] attach skills to equipment
« Reply #18 on: December 02, 2016, 08:49:08 PM »
No, I meant a literal picture. You can usually display any kind of pictures from the Pictures folder. You could make several image files, each having the text "Learned X" and simply display those. Just try the "Show Picture" event command and you'll see what I mean.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline GatsRoller

  • Trained Member
  • *
  • Posts: 31
  • LV: 0
    • View Profile
Re: [XP] attach skills to equipment
« Reply #19 on: December 02, 2016, 10:40:51 PM »
 Tried many ways and it just wont work the way Im looking, well I have another solution besides the "message", another option was possibly edit the main menu, to take off items and equip to have them on a separate menu, so it would make sense to toggle between menus, and the item shall indicate effect on description.

 Any idea how to have "items" and "equip" on a different menu? like to press "M" to open another window with these two?