I know, I ask a lot lol
I'm kinda new to RPG MV lol
Anyway, my question, I wanted to make generalized skills that certain classes could learn, like .. Tome of Fire, teaches you the Fire skill. But I dont want characters/classes that cant even use the magic skill category to be able to use that item and learn a skill they cant even use, effectively wasting the players money or treasure. Is there a way i can restrict certain items to certain classes/characters?
hm, im not sure the skill shop plugin suits what i desire here. A nice plugin i might use in another game though. But for this i was really wanting items that teach skills, but only to certain classes. Cause I wanted them to be able to open a chest and find rare magics or technique scrolls or whatnot, not a shop that you buy skills directly from : o
Make learning skills by common event
Put this in damage formula for the item
v[x]=b._classId; v[y]=b.actorId()
and make the item call common event
make common event
make conditional branch for variable(x) 'which is class id'
if condition met learn skill for variable(y) 'which is Actor Id'
remove the item from inventory
else
nothing or error message
p.s: don't forgot to change x & y to numbers ;P
with that formula, wouldnt i need to make a common event for each and every item that teaches a skill? cause that would be a LOT of events to have to make XD
i have a lot of general skills one could learn with this method, and id even make more if i can get this to work lol
as for the plugin, im not sure if it works, i cant seem to get it to work, i tried using the custom condition notetag, but i keep getting errors, i tried ..
<custom action condition>
result = v[10] = 2, 4, 7, 8, 10
</custom action condition>
and making hte item have the formula to set the id to the class id of the char it's used on, but i end up not able to use it at all.
I even tried ...
<custom action condition>
result = b._classId = 2, 4, 7, 8, 10
</custom action condition>
but then, opening up the inventory at all just gives me a reference error, b is not defined, message that wont go away, even though the plugin says it uses codes just liek the formula does so you can use a and b to reference o.0
then you need add v[z]= 'skill id you want learn'
so it become like this
v[x]=b._classId; v[y]=b.actorId(); v[z]=n
and in common event learn skill with script
$gameActors.actor(variables y).learnSkill(variables z);
so you just need one common event only
so let me see if i understood that
for, Tome of Fire, id set it to something like, hp recovery,, so i can put that formula in there, and id make the formula..
v[10]=b._classId; v[11]=b.actorId(); v[12]=20
20 being the id of my Fire skill
then in the params area, make it call the common event, and make the event something like
If v[10]=2
>if v[11]=3
>> $gameActors.actor(variables 11).learnSkill(variables 12);
>if v[11]=4
>> $gameActors.actor(variables 11).learnSkill(variables 12);
else
>if v[10]=4
>>if v[11]=7
>>> $gameActors.actor(variables 11).learnSkill(variables 12);
>>if v[11]=8
>>> $gameActors.actor(variables 11).learnSkill(variables 12);
>else
>>if v[10]=7
>>>if v[11]=13
>>>> $gameActors.actor(variables 11).learnSkill(variables 12);
>>>if v[11]=14
>>>> $gameActors.actor(variables 11).learnSkill(variables 12);
that look right? just keep putting more branches in the class id branch until there is no more classes that could learn that skill? Then in the last else, instead of another class id branch, put the item return part?
and what of returning the item if it's used on a char that cant learn the skill? is there a way to make it set a variable to the items id?
though i suppose i could just make it ..
v[10]=b._classId; v[11]=b.actorId(); v[12]=20; v[13]=(item id here)
right?
but then whats the script i'd use to return the item in that id in the else cases? : o
hmmm, you want check actors too?!! i thought you just want check for classes.
anyway you can make it easier and you right about item id i forgot about it.
put in damage formula
v[10]=b._classId; v[11]=b.actorId(); v[12]=20; v[13]=(item id here) // ( or write v[13]=item.id it will take itemId from the item)
you make the item's consumeable to no
then you make script in common event
put
var x = $gameVariables.value(10);
var y = $gameVariables.value(11);
var z = $gameVariables.value(12);
var i = $gameVariables.value(13);
if ((x==1 || x==2 || x==3) && (y==2 || y==4 || y==6)) <----- you can add as many check you wantyou want
{$gameActors.actor(y).learnSkill(z);
$gameParty.loseItem($dataItems,1); } else
{$gameMessage.add("You can't learn the skill")};
i thought it needed to check actor to make sure the script knew who the skill was being taught to lol
i thought the branches helped make the script knew the actor it is was being taught to, so you dont click on one actor yet another one get the skill lol
and, with that script, i dont need all the additional branches? i can just do the one script that auto checks all conditions? hm : o
ill try to make this work, if i cant figure it out, ill post again XD
var x = $gameVariables.value(6);
var y = $gameVariables.value(7);
var z = $gameVariables.value(8);
var i = $gameVariables.value(9);
if ((x==2 || x==4 || x==7 || x==8 || x==10)
$gameActors.actor(y).learnSkill(z);
$gameParty.loseItem($dataItems,i); } else
{$gameMessage.add("You can't learn the skill")};
that's exactly what i put in the common event script, and the only thing i put in the common event, whenever i use the item, it keeps saying, Syntax Error, Unexpected Identifier
i even made the ($dataItems,i) into ($dataItems,1)
because you forgot ")"
if ((x==2 || x==4 || x==7 || x==8 || x==10))
or make it
if (x==2 || x==4 || x==7 || x==8 || x==10)
and you forgot "{"
{$gameActors.actor(y).learnSkill(z);
$gameParty.loseItem($dataItems,i); }
okay i did that one just as you put it there, liek this ..
var x = $gameVariables.value(6);
var y = $gameVariables.value(7);
var z = $gameVariables.value(8);
var i = $gameVariables.value(9);
if ((x==2 || x==4 || x==7 || x==8 || x==10))
{$gameActors.actor(y).learnSkill(z);
$gameParty.loseItem($dataItems,i);} else
{$gameMessage.add("You can't learn the skill")};
and it's working, but, it wont take away the tome of fire, do i need to add in a 1 somewhere so it knows how many of item (var i) to take away?
so whats the "var i" part for? how does the script know which item to remove? 😮
okay, tyvm, it's working now
im sorry i was so hard to deal with, i have trouble understanding things, dyslexia can do that, course im not helping it probably by putting myself into something like this with all the scripting and how exact every lil thing has to be or it blows up XD
but tyvm for helping me out with this, it seems to be working fine ^^
this makes it much easier too, now i can just do 1 common event per type of skills, magic, prayer, technique, etc lol