I wrote a plugin that makes States permanent, they persist after the three “this.clearStates();” checks are done, so I can use them for a dynamic Skill Types system.
I want to make this plugin only works with States marked with a specific Note Tag, but I couldn’t figure out how to make the checks.
Something like this?
const Game_Actor_setup = Game_Actor.prototype.setup;
Game_Actor.prototype.setup = function (actorId) {
// Call the original function
Game_Actor_setup.call(this, actorId);
this._states = $dataStates[id].meta["Permanent"].meta.state || null;
};
if (actor.state) {// Script here later
I was trying to use a tutorial that I found here, but it was about Actors and Nicknames. I’m not sure how to translate it to States.
I only found one tutorial about tags, how to check tags in the plugin, but it was about Actors and Nicknames. I tried to change things to work with States, but I’m not sure what to do.
I just wanted the plugin to recognize a tag in a State.
I couldn’t find a good simple plugin or an updated one, that worked on the project so I was trying to learn how to make my own.
I needed something simple to happen, which I managed to make it work, but I needed to attach a tag to make sure it only worked when necessary.
Game_BattlerBase.clearStates() = function(stateId) {
var checkState = $dataStates[stateId].meta.state;
if (checkState === "Permanent") {
//The part bellow here is already working:
// When dying:
Game_BattlerBase.prototype.die = function() {
this._hp = 0;
this.clearBuffs();
};
// When healing:
Game_BattlerBase.prototype.recoverAll = function() {
this._hp = this.mhp;
this._mp = this.mmp;
};
// When escaping battle:
Game_Battler.prototype.escape = function() {
if ($gameParty.inBattle()) {
this.hide();
}
this.clearActions();
SoundManager.playEscape();
};
};
};
Would the Plugin Request thread helps me finish that? How should I request it?
A way to finish this code that I wrote? Should I request a full code that does this one thing?
Could I do that without plugins or at least without tags?
I never used a forum request before.
Following your recommendation, I prepared a post for the “JS Plugin Requests”, detailing what I need and what I had done so far, I’ll see if I can get help completing the plugin or if there is another solution there.
Thank you for your time mr. ATT_Turan.
Case closed.
I need help to finish a plugin script that I was working on for a Skill Type Swap System. The script itself is about a simple State persistence thought the three “this.clearStates();” checks, I need to apply this effect only in States that have a Note Tag associated (e.g.: <state: permanent>).
// When dying:
Game_BattlerBase.prototype.die = function() {
this._hp = 0;
this.clearBuffs();
};
// When healing:
Game_BattlerBase.prototype.recoverAll = function() {
this._hp = this.mhp;
this._mp = this.mmp;
};
// When escaping battle:
Game_Battler.prototype.escape = function() {
if ($gameParty.inBattle()) {
this.hide();
}
this.clearActions();
SoundManager.playEscape();
};
I tested the script and it already works, but I don’t know how to implement Tags in it, so the script applies itself to all States in the project. I needed to attach it only when necessary, the States associated with the Skill Types, to avoid breaking all the other vanilla States.
The idea behind all that is to use States that hold Skill Types for customizing characters between two Classes. When the character activates a specific event, it will have its Class changed and a “major” Skill Type attributed to it, all other Skill Types will be removed. Afterwards the character can add a second “minor” Skill Type, as long it knows at least one Skill from that Skill Type.
This will help with the customization of Class Builds, it also helps on a separated system of Dynamic Leveling already implemented and I guess it could be used to apply passive effects as well, like diseases/blight, which can be only be cured with events and script calls.
Would it still need to use Note Tag functionality?
Because my main issue is that I still don’t understand how Tags are checked, I think that checking a Tag and running this script will fulfill my goals based on the tests I did so far.
When you mean “other property on the actor to hold them”, you mean like a custom script property?
Or is it like using a hidden Equipment to hold the Skill Type?
Would be something like this?
Game_Temp.prototype.dualClass = function() {
return this.actor._primary;
return this.actor._secondary;
};
if (this._classId == 1){
this.actor._primary == 41
}
Checks the class and assign a number to Primary, then I should convert Primary to a State?
Then I do the same for Secondary and call individual triggers for each?
Then I make Primary and Secondary skip the previous checks. Could I program the reserved States to skip the previous check instead?
I’m not very good at scripting, so I thought that assigning a Tag on the previous script that was already working would be simpler for someone like me.
Yes, I did try some Visustella plugins before, but they are a bit complex and sometimes messed up other things in the project, most likely a problem in my end, not theirs.
So I was building all the project’s mechanics and systems by trying to use as little scripts as possible, with focus in finding the simplest scripts to solve the hurdles that I couldn’t solve with events.
I tried a script from 姫HimeWorks that solved the issue, but it was for RMMV and it didn’t work with FOSSIL. So I had gone to the forums to understand better how everything works and see if I could find a solution, in the end I came up with the original script that broke the States, so the last piece of the puzzle was to add that Tag thing, which I thought would be simple to learn, but in this case I need to “Commission a Plugin” then, not “Plugin Request”, correct?
I did managed to solve the initial problem for now, I found a way to bypass the breaking of the States in the correct instances with events, so I can continue working on the Skill Type Swap System, but you are right I need to study more, I’ll check w3schools and if you have more places to recommend I’ll check it out as well.
Sorry if I caused any issues.
Ah, I made a mistake. I had read the page about “Plugin Request Rules” and clicked on the “Convince Strangers to Write Scripts for You!” inside it, so I got things mixed up.
I thought that I could “request” help for finishing a script if it was partially done and if it was a good idea to get helped, as I don’t have the know-how of how to do it.
So in this case, for “JS Plugin Requests”, I should ask for specific recommendations of plugins that I may had not find while looking in the internet, is that correct?
If I wanted help with coding something, that I don’t know how to finish, is there a forum page that I can ask for help to finish it? Or do I need to commission it?
In the case of commissions, is there a specific forum page I could find someone or I need to approach people individually?