Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hi all,

So I recently been tossing around an idea for a skill that requires X number of various items to use. When used the skill would add a specific actor to the party. The concept is this would be a ritual so it would not take place in battle and you would be conjuring or creating a new life form with a level equal to the users level. After the actor is added to the party the skill is then forgotten. I am planning on using Yanfly's Skill Cost Item Plugin to meet the requirements of the skill cost.

http://yanfly.moe/2015/12/12/yep-43-skill-cost-items/

I believe adding the actor and forgetting the skill would both be a called common event. What I haven't figured out is how to check to see if the party is full, I don't want to use reserve party members and I don't want the player to waste items on a skill to have nothing happen because the group is maxed out. Also would it be possible to create another separate skill that allows me to select an actor other than the user and remove them from the party? I know this last bit I could create one skill per actor and remove a specific actor with a specific skill targeting them but setting it up that way feels a little unfinished.

So if anyone has any suggestions in both concept or any good ways to create any aspect of this skill please feel free to suggest them. Thanks ahead of time!

My attempt below. Any alterations or comments?
 

Attachments

  • Screenshot (21).png
    Screenshot (21).png
    231.7 KB · Views: 5
Last edited:

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
So let me get this straight
The skill, basically:
  1. Summons a new party member with level equal to the summoner's level
  2. Costs items
  3. Can only be used once before it is forgotten.
  4. Must check whether the party is full or not. If not, the skill can't be used
I think you can solve 2 with that plugin, so I'll skip that
Moving to 4, you can use the notetag <Custom Requirement>:
Code:
<Custom Requirement>
var maxPartyMember = 4;
if ($gameParty.members().length < maxPartyMember) {
value = true;
} else {
value = false;
}
</Custom Requirement>
where maxPartyMember is the maximum amount of party members in your game. That notetag comes from SkillCore, which you have to use anyway. Put that notetag in your Summon Vampire skill's note.

In the Skill's effects, call a common event (I think you got this one already, but just to remind you). Solving 1 and 3, your event already did so. You just have to remove the If block, as that's already handled by te <Custom Requirement> notetag.

For the skill that removes anyone chosen, I don't really understand the concept of this skill, so correct me if I'm wrong.
If you use the default choices event, I think there's not a lot of options other than creating one event for every 'user' of this skill. If Actor A and B have this skill, while C and D does not, then you make 2 events - one for Actor A, the choices of which excludes Actor A, and one for Actor B.
There's a plugin that disables certain choices, though, but I don't know them yet, so just look for it if you want.

P.S this paragraph is made rather hastily, so there might be errors
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thank you for the quick reply. I just got off work. That note tag on the first skill is exactly what I was looking for. I haven't tested it yet but will this weekend. As for the second skill my game does not use a reserve party so if a player gains the first skill I needed a way to remove an actor and make enough room in the party. I haven't decided how I want to implement the first skill story wise but am leaning towards either a ritual or tome that you discover and learn the skill from. I may even restrict where you can use the skill at, especially if it is a ritual. Anyways thanks so much, and I will look into your suggestions for the second skill too.

Update: So far the first skill works perfectly except the actor using the skill does not forget it. I've tried this as both the party forgetting the skill and the specific actor. Nothing seems to work. Any suggestions why this would be the case?
 
Last edited:

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Update: So far the first skill works perfectly except the actor using the skill does not forget it. I've tried this as both the party forgetting the skill and the specific actor. Nothing seems to work. Any suggestions why this would be the case?
 

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
If the event method didn't work, you could use the script method:
To remove the skill from a specific actor:
Code:
<Custom Execution>
var actorId = 1;
var skillId = 4;
$gameParty.members()[actorId].forgetSkill(skillId);
</Custom Execution>

To remove the skill from the entire party:
Code:
<Custom Execution>
var skillId = 4;
var members = $gameParty.members();
for(int i = 0; i < members.length; i++) {
    members[i].forgetSkill(skillId);
}
</Custom Execution>
Where actorId is the Actor's ID in the database, and skillId is the Skill's ID in the database. Put either of these notetags in the skill.

I don't know why the event method didn't work though. Maybe try rearranging the events?
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thank you for your reply,

So I've inserted the script into the skill being used. I think I did it correctly but please verify that I did. I am having an error message when I attempt to use the skill. I have not tried rearranging the event as of yet but will this weekend if this method is a total fail. I uploaded two screen shots I hope they help in solving this issue. If you need more info. please let me know. Thank you again.
 

Attachments

  • Error.png
    Error.png
    142.7 KB · Views: 3
  • Script Used.png
    Script Used.png
    298.7 KB · Views: 2

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
You're not supposed to change the variable names, but the number on the right side of the equal sign.
So if the actor ID is 1, and the skill ID is 248, the code became this:
Code:
<Custom Execution>
var actorId = 1;
var skillId = 248;
$gameParty.members()[actorId].forgetSkill(skillId);
</Custom Execution>

Or, in your case, you could just remove the variables and plug it in directly:
Code:
<Custom Execution>
$gameParty.members()[1].forgetSkill(248);
</Custom Execution>
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thanks for looking at it, but both options are giving me errors still. Could plugins be a cause? I haven't added any, but could something mess with the script?
 

Attachments

  • New 1st Script.png
    New 1st Script.png
    294.6 KB · Views: 3
  • New 1st Script.png
    New 1st Script.png
    294.6 KB · Views: 3
  • New Error on no variable script.png
    New Error on no variable script.png
    311 KB · Views: 4

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
The code's cut off on its first character. Have you tried the 2nd code (plugging in the numbers directly)?
There's probably a conflict, because that code worked on my end when I tested it, but maybe I misunderstand the notetag. Try changing the notetag to <After Eval> like this:
Code:
<After Eval>
var actorId = 1;
var skillId = 248;
$gameParty.members()[actorId].forgetSkill(skillId);
</After Eval>
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
I tried both codes and have even retried them to make sure they are correct. I'm not sure what the conflict would be if there is one.

The <After Eval> seems to allow the skill to work without the error, however the skill is still not forgotten and on the second use of the same skill I get Failed to load: data/Map003.json I'm not sure what that means. Perhaps theres a way to hide this skill after it is used instead?

Thanks for helping so much. I really do appreciate it. I'm not sure what to do next though.
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
712
Reaction score
231
First Language
English
Primarily Uses
Try this, it'll make whoever uses the skill forget the skill.

<After Eval>
var skillId = 248;
user.forgetSkill(skillId);
</After Eval>

Or this if you want a specfic actor to lose the skill:
<After Eval>
var skillId = 248;
var actorIds = 1;
$gameActors.actor(actorIds).forgetSkill(skillId);
</After Eval>
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
@ Zarsla Thank you but the skill still not being forgotten when used.

This method causes no errors but the skill is still not forgotten. It's a shame too because this looks to be exactly the kind of note tag I wanted to use. I'm still wondering if maybe something else is conflicting with these note tags. Any more ideas?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ UPDATE: So I've been playing with the system. I have successfully created a state that seals the skill after it has been used. It still shows up but it is now grey and makes a buzzer sound when you attempt to reuse it.

I was also thinking perhaps I would place the skill on an item such as a book instead of the actual actor. If the skill is used the book is consumed. That should be easily accomplished with a common event. Unless I misunderstand how the function of learning a skill with an equipped item works. I assume the skill is forgotten when the item is unequipped, removed or consumed.

I still do not know why I can't just simply use a common event to forget the skill after it is used, or why none of the note tags we have tried work as they should. I will let you know how my skill item goes.
 
Last edited:

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
Well, if forgetting the skill didn't work (which I don't know why, it works on my end), try hiding it instead using switches.
On the skill, either 1) Call a common event which set a certain switch to on, or 2) Use <After Eval> or <Custom Execution> notetag and set the switch via javascript - $gameSwitches.setValue(switchId, true);

Then, still on the skill, use <Custom Requirement>:
Code:
<Custom Requirement>
if($gameSwitches.value(switchId)) value = false;
else value = true;
</Custom Requirement>

I'll be doing some tests to see why.
About the book, you could also have the book be used directly rather than consumed upon skill use. You could have a Necronomicon-like book which summons Vampires upon use - calling the same common event without the hassle of forgetting skills. To get that book requires a certain item, which is the skill cost. This depends on your implementation, though.

UPDATE: Here's my test setup:
upload_2018-9-16_15-33-52.png
The 9 there is this skill's ID:
upload_2018-9-16_15-37-42.png
Now, before I used the Ice- skill, here you see 6 skills:
upload_2018-9-16_15-35-15.png
After using the Ice- skill:
upload_2018-9-16_15-36-42.png
It is forgotten.
 
Last edited:

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Try testing the note tag with all the note tags I am running with the skill.

<Item 42 Cost: 2>

<Custom Requirement>
var maxPartyMember = 4;
if ($gameParty.members().length < maxPartyMember) {
value = true;
} else {
value = false;
}
</Custom Requirement>


<After Eval>
var skillId = 248;
user.forgetSkill(skillId);
</After Eval>

The top not tag is an Item cost one used with one of Yanfly's plugins. The 2nd note tag should check the party size before the skill is allowed to be used. I will attempt hiding the skill using your methods but variables are still kind of new to me and I'm not sure I understand your first method using the switch. I can create a common event that calls a switch but how would I use that to hide the skill?

As far as the book goes, I still want to use a skill not an event because I like how Yanfly's Plugin lists the skill item requirements and I plan on using more than one required item in the actual game.
 
Last edited:

mmgfrcs

The Programmer
Member
Joined
Jul 30, 2018
Messages
29
Reaction score
26
First Language
Indonesia
Primarily Uses
RMMV
Sorry for the delay, I was busy with my own project
Anyway, I did some testing in a new project, and it worked well
upload_2018-9-19_15-55-1.png
The notebox is filled with this:
Code:
<Item 5 Cost: 2>

<Custom Requirement>
var maxPartyMember = 4;
if ($gameParty.members().length < maxPartyMember) {
value = true;
} else {
value = false;
}
</Custom Requirement>

<After Eval>
var skillId = 11;
user.forgetSkill(skillId);
</After Eval>
11 is that skill's ID, and this is the item:
upload_2018-9-19_15-56-37.png
And here's the result:
upload_2018-9-19_15-57-27.png
As you can see, the skill is disabled, with proper cost written. I got the items it needed:
upload_2018-9-19_15-59-5.png
Then I used it. Here's the common event:
upload_2018-9-19_15-59-42.png
upload_2018-9-19_16-0-5.png
Then the skill menu becomes this:
upload_2018-9-19_16-0-43.png

And here's how hiding it will work:
Event Commands > Control Switches
upload_2018-9-19_16-5-3.png
Choose any switch you want, and turn it ON. You got this one, right? Just reminding you.
Remember the switch ID that you set.
On your Create Vampire skill, use <Custom Show Eval>:
Code:
<Custom Show Eval>
if ($gameSwitches.value(switchId)) {
visible = false;
} else {
visible = true;
}
</Custom Show Eval>
Replace switchId with the switch's ID that you set above.
 
Last edited:

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
138
Reaction score
11
First Language
English
Primarily Uses
RMMV
Your reply was worth waiting for! Hiding the skill works! I'm still interested as to why forgetting it does not work. Even when I copy an paste your exact note tag to forget the skill and I only alter the item cost and skill id it does not work. I am using Yanfly's Equip Battle Skills and Skill Learn System plugins. I am wondering if maybe one of those plugins is interfering with forgetting skills because it does not work with an event either. I am very excited with our current results though. Hiding the skill is an acceptable solution. If anyone figures out the whole not being able to forget the skill issue or has encountered it before I would be very curious to learn the cause. Thank you everyone who has posted or will post in the future.
 

Latest Threads

Latest Profile Posts

A repost of an old meme I had made, now with music

I have a really hard time keeping all these goodies secret til December... but I swear, it is worth the wait!
Working on a Premium version of my minimap plugin that will have advanced functionalities such as drawing a Terrain map based completely on the users tilesets, whatever they may be, and drawing minimap radar icons automatically based on texture of the event the note is applied to.
Psttt come look, this is the secret technique to tenderizing steaks, it makes it extra beefy. :rwink:

pixeldailyaxemeatsheild.gif

Forum statistics

Threads
115,856
Messages
1,093,489
Members
151,069
Latest member
hoodieraady
Top