- Joined
- Jul 23, 2019
- Messages
- 180
- Reaction score
- 129
- First Language
- English
- Primarily Uses
- RMMV
whatever the latest version isWhich version?
whatever the latest version isWhich version?
In LeTBS.js line #9349 you'll find this block: (this is my edited version, just find the stock version in yours)Does anyone know how to change the move speed of an actor or enemy?
TBSEntity.prototype.setMovePoints = function () {
var legacyMove = this.battler().getLeTBSTagNumberValue("movePoints", Lecode.S_TBS.defaultMovePoints);
this._movePoints = Math.ceil((this.battler().luk / this.battler().level) * 2) + legacyMove;
if (this._movePoints < 0)
this._movePoints = 0;
};
this._movePoints
can be changed to any equation you see fit to determine how movement speed/range is calculated.move_points: number
move_points: +number
Go to the plugin option for LeTBS.js in your plugin manager. Then find "Battlers Move Speed" under the subcategory "-- Motions --".My bad, I don't mean the move points I meant the literal speed. Like so they move between tiles faster. I noticed when this part executes "set_speed: {aoe}_battlers, +6" that the unit is knocked back but the knockback is just a faster movement. I'm trying to make an actor/enemy move that speed all the time if I can. Similar to setting the movement speed on an event or the player's walk speed.
Hmm, if there is then I'm not aware of it. Doesn't mean it doesn't exist or can't be done though. Hopefully @Pharonix or someone more experienced will chime in.I'm left wondering, though, is it possible to change the speed for certain actors/enemies? Like maybe through a state or a <letbs> tag?
Im not entirely sure.Hmm, if there is then I'm not aware of it. Doesn't mean it doesn't exist or can't be done though. Hopefully @Pharonix or someone more experienced will chime in.
BattleManagerTBS.forceAction = function (obj, entity) {
var battler = entity.battler();
var center = entity.getCell().toCoords();
var action = new TBS_FloatingAction(battler, false);
action.setItemObject(obj);
entity.battler()._itemOnUse = obj;
var data = obj.id === battler.attackSkillId() ? entity.getAttackScopeData() : entity.getObjectScopeData(obj);
this.makeActionScope(entity, data, obj);
var aoeData = obj.id === battler.attackSkillId() ? entity.getAttackAoEData() : entity.getObjectAoEData(obj);
var aoeCenter = this._activeCell.toCoords();
var param = this.makeObjAoEParam(obj, entity, aoeCenter);
var aoe = this.getScopeFromData(aoeData, aoeCenter, param);
this._actionAoE = aoe;
var item = action.item();
var id = action.isAttack() ? entity.getWeaponSequenceData() : entity.getObjectSequenceData(item);
battler.useItem(item);
action.applyGlobal();
entity.lookAt(this._activeCell);
entity.appendSequence(id, action);
};
<Damage Formula>
if (user.isWtypeEquipped(3)) {
value = (a.atk + a.atk + a.agi) / 2;
} else {
value = (a.atk + a.atk + a.agi) / 3;
}
</Damage Formula>
a.atk
, the game uses the stats of the unit receiving the counter-attack and not the unit doing the counter. This goes back to the stat block bug from before. I believe my use of "user.isWtypeEquipped()" will work once the correct unit is selected for the counter/attack. I have an if (entity.battler().isActor())
conditional in the BattleManagerTBS.processCounterAttack
function that's supposed to select the correct skill ID for the counter depending on whether the counter-attacker is an actor or not. It would work beautifully if not for the stat block bug... -.-a.atk
or b.atk
, the result is the same. I made sure our Hero's stats are WAY higher than the enemy's so there would be no confusion. Sigh, what could the root of this problem be?!Actually, I recently reinstalled a bunch of SRD's plugins, including Super Tools Engine & HUD Maker, and got them running w/ no issues. The only SRD plugin I haven't been able to get working is the SkillExtender. How is your's setup exactly?Today, I finally attempted to implement LeTBS (from the working demo) to my project, and got hit with errors upon launching it. After carefully turning off the additional plugins that I've been using, and turning them back on to identify the culprit, it seems that LeTBS has compatibility issues with some of SRDude's plugins. Two plugins in particular--Super Tools Engine (which is needed to use the Character Creator EX plugin) and Game Upgrade (which is needed to use the CCEX Dynamic Actors plugin)--won't allow you to load the project if they're turned on. This is major bummer to me, since my JS skills aren't strong enough to figure out how to make those plugins compatible with each other.
Has anyone else come across these issues?
<letbs>
scope: line(2)
sequence: atk_push(2)
</letbs>
<letbs_AI>
type: offense, push
</letbs_AI>
PHX_LeMod.old_getObjectSequenceData = BattleManagerTBS.getObjectSequenceData;
TBSEntity.prototype.getObjectSequenceData = function (obj) {//Modified by PHX
var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence;
var e = BattleManagerTBS.activeEntity();
//Check if the obj has a sequence
if (obj.TagsLetbs.sequence)
{
//If it does, collect it into a variable, and check if it is a function.
//Added Regex to check if function has variables
objSequence = obj.TagsLetbs.sequence;
//var regex =
if(objSequence.includes("()") || objSequence.match(/(\(.*\))/i))
{
//console.log(objSequence);
//If it is a function, evaluate it, and return the sequence
str = eval(objSequence);
return str;
}
return obj.TagsLetbs.sequence;
}
//Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function.
//But whatever
console.log("stuff fail");
return obj.TagsLetbs.sequence || defaultSeqId;
};
What does the full console say?@Pharonix So I recently tried a skill w/ the "push" effect. I basically copy-pasted from the demo:
<letbs>
scope: line(2)
sequence: atk_push(2)
</letbs>
<letbs_AI>
type: offense, push
</letbs_AI>
However, when the monster I gave the skill to uses the skill, I get the following error:
View attachment 166033
It only appears when PHX_LeMod.js is turned on, otherwise the skill works just fine. Seems like the error is point to this:
Btw, just so I'm sure...what's the correct plugin order for your plugin relative to LTBS and YEP_WeaponUnleash?JavaScript:PHX_LeMod.old_getObjectSequenceData = BattleManagerTBS.getObjectSequenceData; TBSEntity.prototype.getObjectSequenceData = function (obj) {//Modified by PHX var defaultSeqId = DataManager.isSkill(obj) ? Lecode.S_TBS.defaultSkillSequence : Lecode.S_TBS.defaultItemSequence; var e = BattleManagerTBS.activeEntity(); //Check if the obj has a sequence if (obj.TagsLetbs.sequence) { //If it does, collect it into a variable, and check if it is a function. //Added Regex to check if function has variables objSequence = obj.TagsLetbs.sequence; //var regex = if(objSequence.includes("()") || objSequence.match(/(\(.*\))/i)) { //console.log(objSequence); //If it is a function, evaluate it, and return the sequence str = eval(objSequence); return str; } return obj.TagsLetbs.sequence; } //Return normal stuff. Redundant actually as we check above if obj has a sequence and we return it if it is not a function. //But whatever console.log("stuff fail"); return obj.TagsLetbs.sequence || defaultSeqId; };
Edit: Oh, and I did make sure "atk_push" exists in LeTBSconfig (it's there by default).
"atk_push": [
"play_pose: user, atk",
"wait: 10",
"effects: {aoe}_battlers, current_obj, obj_anim",
"if: i****('{aoe}_battlers')",
"set_speed: {aoe}_battlers, +6",
"push: {aoe}_battlers, user_cell, $1",
"set_speed: {aoe}_battlers, reset",
"end_if",
"wait: 60"
],
I use this instead:I tried, it doesn't work.
<Custom Regenerate Effect>
var hpRegen = Math.round(target.level * 10);
target.gainHp(hpRegen);
target.addTextPopup(hpRegen);
</Custom Regenerate Effect>
entity.battler().addTextPopup(hpRegen);
& entity.addTextPopup(hpRegen);
& user.addTextPopup(hpRegen);
to no avail...I'd also like to know the solution to this question as well. ^.^Btw, does anyone know how to get numbers to popup? Like I have a healing potion that heals some amount every turn, but it doesn't show the number amount healed above the unit. The gauges do update correctly at least.