Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
@PopeUrban No, more like...if a unit's Speed is twice as much as another's, it'll act twice as often. Or if there's a unit w/ 30SPD and another w/ 20SPD, the faster unit will act 1.5 times for every time the slower unit's turn passes. Ya know, like where all the battlers have a portrait/icon that runs on a timeline to dictate turn order. Basically, I'm trying to modify the core turn order logic in BattleManagerTBS.
 

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
Ah I see, so you want to modify the turn order stuff so its not "rounds" and more dynamic ala final fantasy tactics. unfortunately I checked out on that front the moment I opened LeTBS_TimelineControl to try to fix it and got immediately lost. The turn order stuff as is is kinda busted as is. I know Pharonix successfully messed about with turn order, and has it recalcultaing properly based on agi but as far as actually changing the logic from "every round gives each battler a turn" I wouldn't even have a concept of where to start.

Any thoughts on my passive state issue? I know you're way further along with your project than mine and wonder if you've had any similar issues with autostates that might give me some insight.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
@PopeUrban Ok, here are a few things I thought of that may help u...
1) Instead of using states, u can directly add code to either the weapon(s), the actor, or both. For example, I use stuff like the following to give my weapons custom stats. Such data can be manipulated anywhere u use JS.
<On Creation Eval> item._weaponDmg = 20; item._blunt = 2; item._slash = 6; item._pierce = 2; </On Creation Eval>
You can do the same for actors. But since we are using LeTBS, you must use BattleManagerTBS.activeEntity()._battler or BattleManagerTBS.activeBattler() or some other equivalent that returns a Game_Actor. Simply add any flag you want to the end, like ._dualWield or w/e you like.

2) You can also try @waynee95's WAY_CustomOnEquipEval plugin. Idk if it'll help you, but just throwing it out there. These are just suggestions if you wanted to avoid the State approach. But if you wanna stick w/ that approach then...

3) Try Yanfly's YEP_Z_PassiveCases plugin extension. I know you already use <Custom Passive Condition> so it's just an extension of that.

Edit: May I ask how you're applying the changes to the passive stats in battle? I was thinking your Disarm skill could simply have a <Custom Execution> or <Pre-Damage Eval> that forcibly removes the "flag" state (the one that the other state depends on for passive conditional).
 
Last edited:

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
States just overall play nicer with other plugins,events, etc. and so on so I prefer to stick with em for my own sanity.

I prefer the state approach as it more cleanly transitions between battle and not with the same items, and it is a design decision that disarmed units don't actually lose the equipment or its bonuses, as weapons on the ground and the acts of retrieving them, using them as targets for other skills, etc. is the purpose of the disarm system more than actually weakening the disarmed unit.

What MIGHT work though, if I could use the proper syntax in the dual wield states to directly call LeTBS's add and remove state functions. What would be the syntax for that?

states reference user, but if I wanted to call the battler associated with the current user of this state for instance so my swordANDshield state would go from:


Code:
<swordANDshield>
  <Custom Passive Condition>
  if (user.isStateAffected(204) && user.isStateAffected (205)) {
    condition = true;
  } else {
    condition = false;
  }
  </Custom Passive Condition>

to adding the pseudocode


Code:
<swordANDshield>
  <Custom Passive Condition>
  if (user.isStateAffected(204) && user.isStateAffected (205)) {
    ********call up this state user's battler and run a LeTBS function*******
    condition = true;
  } else {
    **********call up this state user's battler and run a LeTBS function*****
    condition = false;
  }
  </Custom Passive Condition>

I already wrote a lil function to just evaluate the states and change the states the trick I'm just not sure what the syntax would be to run LeTBS onNewState, or a custom updateSprite function added to LeTBS etc.

Doing it this way would let me use the rest of yanfly's state core normally while getting the weapon sprite sheets to display properly.

Like I said it already works from a functional standpoint, it just doesn't call the LeTBS functions which update the LeTBS sprite sheets, and these functions also run crucial LeTBS stuff like applyMovePointsAlteration, which means if I add a leTBS modifier to these states I really want to make sure those are called so that all my modifier work properly with such "combo state" mechanics as referencing this implementation would allow me to do, for instance, an item that gives the user haste when blinded+bleeding etc. and properly call all the LeTBS state related code.
 
Last edited:

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Try this:
BattleManagerTBS.activeEntity()._battler.addNewState(stateId);
BattleManagerTBS.activeEntity()._battler.eraseState(stateId);

or
BattleManagerTBS.activeBattler().addNewState(stateId);
BattleManagerTBS.activeBattler().eraseState(stateId);


The activeEntity/Battler just means whatever your cursor target is on, so it's essentially the same.
 

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
Try this:
BattleManagerTBS.activeEntity()._battler.addNewState(stateId);
BattleManagerTBS.activeEntity()._battler.eraseState(stateId);

or
BattleManagerTBS.activeBattler().addNewState(stateId);
BattleManagerTBS.activeBattler().eraseState(stateId);


The activeEntity/Battler just means whatever your cursor target is on, so it's essentially the same.
nope, that actually just functionally breaks it completely. Seems like yanfly can't interpret what a battler is.

Edit: A better option might be to run a custom sprite update function after an ability it used from LeTBS itself. Since the states already work, if I just evaluate them in LeTBS at the point then it should solve the sprite/pose problem right?

Yanfly's stuff appears to be working as designed, running its auto-state note tag stuff after all other operations (including LeTBS, which is the problem) so because this is happening in the space between where LeTBS has done its stat change code and where LeTBS runs its next line, LeTBS can't tell that the swordAndShield state actually changed.

Is there a place in LeTBS that runs, like, after sequences but before it returns control the the player, displays the menu again etc. ? I could run a function that JUST updates sprite/pose stuff there and it should theoretically work just as well as it does in onBattleStart

Ineffectiant, sure, since I'd be checking it every ability in stead of only when states change but since I'm only using poses for this purpose I could actually just completely remove all the sprite setup from the state changes anyway

1635738927404.png
 
Last edited:

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Sry, it's really hard to help w/o being able to work on the project directly. Can you screenshot what you put in the notebox?
 

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
Sry, it's really hard to help w/o being able to work on the project directly. Can you screenshot what you put in the notebox?
1635741378615.png
Code:
<swordANDshield>
  <Custom Passive Condition>
  if (user.isStateAffected(204) && user.isStateAffected (205)) {
    BattleManagerTBS.activeBattler().addNewState(210);
    condition = true;
  } else {
    BattleManagerTBS.activeBattler().eraseState(210);
    condition = false;
  }
  </Custom Passive Condition>

Tried both syntaxes. Seems like in either case yanfly can't properly talk to LeTBS. maybe I got the syntax wrong or something.

I'm considering just ripping out the auto-state stuff and doing the same condition comparisons directly in the LeTBS functions in stead. That would work, but it wouldn't solve the problem I'd really like to solve which is getting the yanfly conditional tags to work so I can use them for other stuff later in a similar fashion to automate state interactions.

Edit: SOLVED it.

Turns out the real problem was that yanfly auto passives aren't ACTUALLY removed under any circumstances, and thus the LeTBS functions weren't triggering because according to LeTBS the SwordANDShield state was still there (even though its icon stopped existing in the buff monitor and any effects it had were removed)

So here's what I did, very simple:
Made a single global auto-state, called it Dual_Wield_Manager
Removed the custom scripting from the SwordANDshield state so it just has the meta tag my sprite changing code checks.

Set up the yanfly note tags thus:
Code:
  <Custom Passive Condition>
  if (user.isStateAffected(204) && user.isStateAffected (205)) {
    user.addState(210);
  } else {
    user.removeState(210);
  }
  </Custom Passive Condition>

Then just repeated that for each dual wield case. Now that the state is actually added or removed appropriately, it works just like it should. Arban spawns in to battle with both his sword and shield, I dispel the sword, his sprite is updated to be holding just the shield. I can still read the dual wield states for evals on abilities and stuff like I wanted, and in general everything works perfectly (aside from needing to add some note tags to remove the popups from the invisible states when removed)

Turns out I the problem all along wasn't that LeTBS wasn't seeing a state change, but that as far as LeTBS was concerned the state wasn't changing at all!

Here's a video!

 
Last edited:

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Hello, fellow LeTBS users! I just finished modifying LeTBS_Commands.js so that we can use Guard as a command now! The syntax is just like for Attack. So for example:
JavaScript:
<Replace Guard: 9>
<letbs_commands>
guard 81
</letbs_commands>
The <Replace Guard: 9> is from Yanfly's Weapon Unleash plugin btw. Anyway, I've attached the modified LeTBS_Commands.js. The only change I made was to this function:
JavaScript:
Window_TBSCommand.prototype.addCommand_guard = function () {
    this.addCommand(TextManager.guard, "skill[" + this._battler.guardSkillId() + "]", this._entity.canGuardCommand());
};
 

Attachments

  • LeTBS_Commands.js
    19 KB · Views: 3

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Has anyone gotten a Victory Aftermath working w/ LeTBS?
 

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
Has anyone gotten a Victory Aftermath working w/ LeTBS?
I gave up almost immediately after discovering it wasn't natively compatible since its more of a "nice to have" than "need" situation. If anyone did get it working I'd probably use it though.

Personally I've been trying and failing to get Galv's simple shadows to work with leTBS as I really love those little cookie shadows for the aesthetic of what I'm working on. Step 1, get the plugin to not crash the game when a battle starts. Step 2, get it to support LeTBS battlers.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
I'm thinking of just having slain enemies stay as corpses you can loot then lol...
 

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
I'm thinking of just having slain enemies stay as corpses you can loot then lol...
Personally I don't have much of a problem with the default "loot scroll" but then again I'm not showering the player with loot and my game doesn't have nearly the number of systems for the player to keep track of yours seems to. I don't even use the standard EXP system lol.

You could use yanfly's custom window plugin and just track an array of looted item IDs, diplay a custom window at the end of battle from LeTBS, then run a loop to dump all the items in the array to the player's inventory after the battle and clear the array.
 

StarMaker

Villager
Member
Joined
Sep 14, 2021
Messages
6
Reaction score
1
First Language
Russian
Primarily Uses
RMMV
Thanks! U seriously made my day, lol. :kaojoy:
Hi. Can you tell me how to make a TP like yours? What would be shown as HP and MP. And how did you create the bonus action system? I was also able to create something similar, but the enemies still only use one action.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Hi. Can you tell me how to make a TP like yours? What would be shown as HP and MP. And how did you create the bonus action system? I was also able to create something similar, but the enemies still only use one action.
For the Bonus Action mechanic, you need to set "One Time Move" to false and One Time Offense to true. Then you need to make 2 Common Events, assuming you want it exactly like mine, which is to have a Main Action & a Bonus Action. Also, you'll need 2 states.
1636827490758.png

Main Action Common Event:
1636827671348.png

Bonus Action Common Event:
1636827710300.png

Notice the StateId's above and how they switch places. You'll need to create 2 states as well. Mine are states 8 & 9, but your can be any stateId. Just make sure they match. The 2 states you need to create are just blank states, but your going to need 2 separate states. I'll show you what they're used for next.

Once you got all the above set up, go to your Skills tab and give all skills you want to be considered "Main Actions" the Main Action Common Event. Then you need to add the following notetag:
JavaScript:
<Custom Requirement>
if (user.isStateAffected(8)) {
  value = false;
}
</Custom Requirement>
Don't forget to add the Common Event to the skill.
1636828121300.png

Ok, now we can move onto the Bonus Actions. It's basically exactly the same as Main Actions, except we're using the other State ID & Common Event. So in your skills tab, pick a skill you want to be considered a "Bonus Action" and add the following notetag:
JavaScript:
<Custom Requirement>
if (user.isStateAffected(9)) {
  value = false;
}
</Custom Requirement>
...and also the Bonus Action Common Event.
1636828292386.png

That's it! Just remember that you need to do this for ALL skills. They are all going to fall under either Main Action or Bonus Action, your choice. Just remember what State ID you use. Mine are 8 & 9 in my project, but yours can be different. Good luck!

For the TP bar/gauge...you just need to edit the following in LeTBSWindows.js:
Window_TBSStatus.prototype.refresh = function () {
 

StarMaker

Villager
Member
Joined
Sep 14, 2021
Messages
6
Reaction score
1
First Language
Russian
Primarily Uses
RMMV
For the Bonus Action mechanic, you need to set "One Time Move" to false and One Time Offense to true. Then you need to make 2 Common Events, assuming you want it exactly like mine, which is to have a Main Action & a Bonus Action. Also, you'll need 2 states.
View attachment 206573

Main Action Common Event:
View attachment 206574

Bonus Action Common Event:
View attachment 206575

Notice the StateId's above and how they switch places. You'll need to create 2 states as well. Mine are states 8 & 9, but your can be any stateId. Just make sure they match. The 2 states you need to create are just blank states, but your going to need 2 separate states. I'll show you what they're used for next.

Once you got all the above set up, go to your Skills tab and give all skills you want to be considered "Main Actions" the Main Action Common Event. Then you need to add the following notetag:
JavaScript:
<Custom Requirement>
if (user.isStateAffected(8)) {
  value = false;
}
</Custom Requirement>
Don't forget to add the Common Event to the skill.
View attachment 206576

Ok, now we can move onto the Bonus Actions. It's basically exactly the same as Main Actions, except we're using the other State ID & Common Event. So in your skills tab, pick a skill you want to be considered a "Bonus Action" and add the following notetag:
JavaScript:
<Custom Requirement>
if (user.isStateAffected(9)) {
  value = false;
}
</Custom Requirement>
...and also the Bonus Action Common Event.
View attachment 206577

That's it! Just remember that you need to do this for ALL skills. They are all going to fall under either Main Action or Bonus Action, your choice. Just remember what State ID you use. Mine are 8 & 9 in my project, but yours can be different. Good luck!

For the TP bar/gauge...you just need to edit the following in LeTBSWindows.js:
Window_TBSStatus.prototype.refresh = function () {
Thanks for your help. I am going to test different systems. But you never answered. How do you force enemies to take multiple actions? I tried the simple way and action points, but the enemies only take one action and ignore everything else.
TP. Yes I know, but I could only change the size, but I don't know how to show "TP" and "Numbers".
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
TP. Yes I know, but I could only change the size, but I don't know how to show "TP" and "Numbers".
I just made a copy of the MP one, and renamed it TPx.
JavaScript:
Window_TBSStatus.prototype.drawActorTpX = function (actor, x, y, width) {
    width = width || 96;
    var color1 = this.tpGaugeColor1();
    var color2 = this.tpGaugeColor2();
    this.drawGauge(x, y, width, actor.tpRate(), color1, color2);
    this.changeTextColor(this.normalColor());
    //this.drawText(TextManager.tpA, x, y + 4, 44);
    this.drawCurrentAndMax(actor.tp, 100, x, y + 3, width,
                           this.tpColor(actor), this.normalColor());
};
 

StarMaker

Villager
Member
Joined
Sep 14, 2021
Messages
6
Reaction score
1
First Language
Russian
Primarily Uses
RMMV
I just made a copy of the MP one, and renamed it TPx.
JavaScript:
Window_TBSStatus.prototype.drawActorTpX = function (actor, x, y, width) {
    width = width || 96;
    var color1 = this.tpGaugeColor1();
    var color2 = this.tpGaugeColor2();
    this.drawGauge(x, y, width, actor.tpRate(), color1, color2);
    this.changeTextColor(this.normalColor());
    //this.drawText(TextManager.tpA, x, y + 4, 44);
    this.drawCurrentAndMax(actor.tp, 100, x, y + 3, width,
                           this.tpColor(actor), this.normalColor());
};
Thank you friend. I figured it out.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,370
Reaction score
1,985
First Language
English
Primarily Uses
RMMV
Hey @Pharonix, I was wondering if you ever got around to updating your PHX_Counter.js plugin. Thx!
Btw, plz ignore some of the old messages I sent you, I was actually able to figure out and fix most of the bugs I've been experiencing.
 

Attachments

  • PHX_Counter.js
    10.8 KB · Views: 3

PopeUrban

Villager
Member
Joined
Oct 19, 2021
Messages
20
Reaction score
7
First Language
English
Primarily Uses
RMMV
Hey @Pharonix, I was wondering if you ever got around to updating your PHX_Counter.js plugin. Thx!
Btw, plz ignore some of the old messages I sent you, I was actually able to figure out and fix most of the bugs I've been experiencing.
Is this a repost or a newer edit of the counter plugin?
 

Latest Threads

Latest Profile Posts

So technically I just ate sausages that were a year old. Use by date was 12/27/2021. But since those dates are just guesses with no scientific reasoning behind them I'll prolly be fine. Guess I know soon if I'm praying to the Porcelain God.
People laughed at me when I said that Activision Blizzard would get bought up by another company if they didn't fire their execs. Now their value has dipped so much Microsoft is willing to buy the company, likely followed by some heavy terminations if they want to purify the current toxic image of Activision Blizzard.
Pro tip: don't be this person.1642536788532.png

Forum statistics

Threads
118,492
Messages
1,116,357
Members
155,480
Latest member
aSasSSasdadw
Top