• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Attempting to create a skill merge system...

  • phlim2
  • 02/23/2014 01:02 AM
  • 1971 views
When I moved Searching for Mother onto RMVXAce, I wanted to add a twist to the skill learning methods in the game.

So I decided to plan out a Skill Merging system.

What this basically does is:

Combine Skill ID # of one Skill Type with another Skill ID # of another type to create Skill ID # of a third Skill Type.
(In this case, Skill ID 1 (Special) with Skill ID 2 (Magic) to create Skill ID 3 (Combine) )

I know it can be done somehow. I just need to plan further. Here's what I've picked up so far:


So far, I've managed to split two "Window_SkillList" windows to show different categories. Next, I need to create arrays to determine which skills can/cannot be combined.

What this will then make this scene do is display a message showing which skill is created... or if it fails, show an "incompatible" message, and then reset back to the "Start" button. If successful, the "combined" skill will be added to the actor's skill list, then everything resets back to "Start".

However, I haven't quite mastered how to do this just yet. If anyone wants to assist me in making this system possible, please let me know.

Oh right, I forgot to mention; I also plan to add CP (Combine Points), which are only earned in battle AFTER a certain event switch is triggered.

Posts

Pages: 1
Skill fusion...? Well, maybe not bad, but... Good luck. The execution might be awry.
This sounds like a really cool way of making old weaker skills useful again. Combine points are interesting, too. Do you need help with the logistics of it or the actual scripting?
author=Link_2112
This sounds like a really cool way of making old weaker skills useful again. Combine points are interesting, too. Do you need help with the logistics of it or the actual scripting?
To be honest, I really need help just making sure things work together; arrays, CP earning, and the combine scene itself. So yeah, mostly scripting.

I'm kinda hoping the arrays would look something like this:
Array[0] = 1,2,3; # 1+2=3
Array[1] = 1,4,5; # 1+4=5
(Can't remember how arrays work in RGSS3, so forgive me if this is completely wrong, lol...)
So despite all efforts, I still can't manage to get this to work as I planned. If anyone wants to help me out, let me know. ^^
This is definitely all pseudo-code. Really. Replace the ( ) with the appropriate brackets. It's also just rough ideas, not exacts - I'm not looking at VX Ace at the moment. I also haven't slept in two days, so I hope it makes sense.

Try something like a 2D array:

ArrayVar(0,1) = new skill id; - if Skill #0 can merge with Skill #1
ArrayVar(0,2) = -1; - if Skill #0 can't merge with Skill #2

You'll have to manually define them in script, or write up a script to scan their notebox for definition tags and define them there (seriously, dealing with with regex might be more frustrating than writing them by hand). Just to be sure the program isn't screwing up, you'd have to do something like this first:

for loop - 0 to number of skills, x increasing
for loop - 0 to number of skills, y increasing
ArrayVar[x,y] = -1;
loop
loop

If ArrayVar(0,1) is a positive number, then you teach the skill to the character... and set ArrayVar(0,1) to -1 so they can't do it yet again (and, if it's your intention, you'll have to remove the old skills as well) and then also set ArrayVar(1,0) to -1 (so you can't repeat the process the other way round). If you have multiple characters with the same skills, you'll have to add another index to the array (z, in the format ArrayVar(x,y,z)) which will refer to each individual character.

You'll need to find a way to determine how many Combine Points a character gets per battle - it's not overly difficult to only initiate a section of code if a switch is on (and it may or may not be a literal game switch); after all, it's literally an if statement - you can put it in the same area that figures out experience handling, for the most part. As I said, you mainly need to figure a way to determine how many Combine Points you'll get out of each combat. If you know that, it's just a matter of showing that number after the battle is over (like you show how many experience you earn in a battle) and then adding it to a running total variable (which may or may not be a literal game variable).

... I hope that makes some semblence of sense and that I haven't overestimated your knwledge of RGSS3. After I've got some sleep I might be able to clarify/help a little more.

(Also, randomly re: the CSS; I usually hate the text-shadow effect, but it somehow works for me here. Huh.)
Thanks for the help. :3

If I recall, the "for" loop is written something like:
for x in 1..199 #example range of 1 to 199
    for y in 200..398 #example range, 200 to 398
         ArrayVar[x,y] = -1
    end
end
Not 100% sure, but it's close. :D

I think the main trouble I'm having is getting the selection boxes to "choose" the skill's ID number.

So:
- Press Skill 1 - Set Variable 1 to Skill 1's ID.
- Press Skill 2 - Set Variable 2 to Skill 2's ID.
- Check for variable combination in array.
- If valid, show skill 3's name.
- Enable confirm. Pressing teaches the actor the skill.

I'll get to thinking about it more later after work. ┬ŽD

author=Travio
(Also, randomly re: the CSS; I usually hate the text-shadow effect, but it somehow works for me here. Huh.)
I guess it depends on how it's used most of the time. The CSS for this page is a bit messy though, so I might clean it up eventually.
Yeah, when I'm writing on the forums, I tend to only give people pseudocode so they'll have to figure the exact implementation themselves. My main focus is getting people to think about what the program's doing at each individual stage.

So how far in your process currently works? Can you select Skill 1 and 2, but the game doesn't yet set your selections to a variable? How are you currently handling the selection - do you have both lists show up at the same time? Or do you select one from the first list, and then the second list appears?

I've got some vague ideas on a way to accomplish all of this, but I'm interested in seeing/hearing how you're currently doing it first.
At the moment, I am still trying to figure out how to activate the second window after selecting the first skill. It could be something as simple as "if C is pressed, disable window 1 and enable window 2" for all I know. xD

But yeah, making it change the variable based on the selected skill ID does seem a bit difficult for me at least. ;u;
Pages: 1