[XP] attach skills to equipment

Started by GatsRoller, November 28, 2016, 01:51:32 am

Previous topic - Next topic

GatsRoller

November 28, 2016, 01:51:32 am Last Edit: November 28, 2016, 02:10:59 am by GatsRoller
 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

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

GatsRoller

 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?

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

Quote from: Blizzard on November 28, 2016, 04: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.


  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?

KK20

Map events and common events only run when the $scene is currently Scene_Map.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

Quote from: Blizzard on November 28, 2016, 02: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.


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:

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

Quote from: Blizzard on November 28, 2016, 04:46:36 pm
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?

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

GatsRoller

Quote from: KK20 on November 28, 2016, 09:44:54 pm
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....

KK20

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 Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

December 02, 2016, 12:34:29 pm #15 Last Edit: December 02, 2016, 01:17:02 pm by GatsRoller
 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.


Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

Quote from: Blizzard on December 02, 2016, 01: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.


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?

Blizzard

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 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

GatsRoller

 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?