Lecode Tactical Battle System 0.77.2B

Discussion in 'JS Plugin Releases (RMMV)' started by Lecode, Nov 28, 2016.

  1. Padramyr

    Padramyr Veteran Veteran

    Messages:
    92
    Likes Received:
    75
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Hey there :)

    I've got a quick question: Does anyone know if this is compatible with mobile games?
     
  2. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    620
    Likes Received:
    268
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    Should be
     
  3. Cellbind

    Cellbind Villager Member

    Messages:
    14
    Likes Received:
    5
    First Language:
    English
    Is there a way to remove dead summons from turn order?
     
  4. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    581
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    I've been trying to get the demo set up, but it's not having much luck, to say the least. I grabbed the archive from the topic, then the one linked a couple pages ago, but winzip, winrar, and 7zip all say it's a corrupted archive.

    From there I downloaded the demo files, as linked on the web demo page, and tried pasting them into a new project- so far I've gotten two different bugs:
    1) Choosing "scan" softlocked the game, with "pending auto mode" floating in the bottom right of the screen. None of the buttons seemed to actually do anything, though it's possible I just didn't find the option.
    2) A crash when placing my third character on the basic battle map (possibly from mashing through the direction prompt? It looks like it couldn't find the actor object).

    Is this a known issue with the "demo files in a new project" method? Does it not have the plugin settings configured, possibly? Also, has anyone dug into why the demo archive is so finicky?
     
  5. myenemy

    myenemy Villager Member

    Messages:
    26
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    So... Now the link of the terms of use are down. What are the terms of use? I know free as in money to use for commercial and non commercial use, but may alter the code?
    I wonder if I have to make my own from scratch...
     
  6. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    620
    Likes Received:
    268
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV

    I have mine super-heavily modified to the point it'll take about 2 months if I ever upgrade from 0.77.2 (newest is 0.77.2B which changes how sprites are configured, it'll be a pain).


    Follow the github link on his page, the readme works there

    TERMS OF USE
    Copyright (c) 2018 Lecode
    -Free for use in commercial and non commercial Rpg Maker MV projects with credit.
    -Keep the header of all my plugins.
    -You are allowed to edit my plugins.
    -Do not sell the plugins itself (even if the materials were edited, processed, or modified)
    as a whole or any of its parts.
    -Do not claim as your own work even when edited.
    -Contact me if you're using LeTBS in a commercial project. I want to
    know how my work is used.


    Try this link:
    Just zipped it myself.
    https://www.dropbox.com/s/v3lken92crff4sf/LeTBS_0772B.zip?dl=0

    This other link is my modified version of the LETBS.js file that includes various new tags for cells as well as various other changes(see spoiler)
    https://www.dropbox.com/s/j0wrmtcsubofifv/LeTBS.js?dl=0

    So here's the changes I made.

    Added: <Entity Cell>
    which will allow a cell to be neutral - it will place enemies first. So make sure there is at least one <Actor Cell> or you know for a fact you have enough <Entity Cell> to cover enemies and ally positioning.

    Added Neutral Color:
    In Plugin Manager, you will see a new parameter for "Neutral Cell Color" this will be the color that displays in the positioning phase. Currently set to the purple you saw in my video. This can be changed.

    ===================
    Additional Cell Tags by me.
    Use these at your own risk, though I've used these and they work fine.
    But let me know if any of them confuse you.

    <Leader Cell>
    this will default and place the actor who is first in party (The one that walks around) - Helpful for maps where you want to place the leader in a specific place. - You should try to refrain from combining this with <Actor Cell: x> as it can cause the actor to be placed twice. (Unless you only use <Actor Cell: x> for guest party members that cannot be positioned - in which case "Guest" Characters that you can "Hire" should be Switches instead, which makes things easier in my opinion - as you could have a common event checking the Hire Period and turning the switches OFF when the hire period ends.

    <Var Cell: x>
    replace "x" with a variable ID. This cell will pull in the actor who's ID matches the value of this variable.
    If the variable is 'null' or '0', it will not pull any actors, and will be treated as a normal placement cell.
    Useful if you split the party up, and use variables to track the "Second Party's" party members.
    Example: <Var Cell: 55> variable 55 is currently set to the value of [11]. This means actor 11 will display here.

    <Switch Cell: x>
    replace 'x' with a switch ID. If this switch is ON, it will pull the actor who's ID matches the Switch ID:
    Example, <Switch Cell: 15>
    If switch 15 is ON, then actor 15 will display, otherwise if OFF, it will be treated as a normal placement cell.
     
    Last edited: Oct 3, 2018
    Doktor_Q, Chaosicaa and onipunk like this.
  7. Queengames

    Queengames Queen of Games Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    so how does one actually download the plugins for this? I couldn't find anything on their Github page, and the dropbox demo doesn't seem tone openable in anyway.
     
  8. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    581
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    @Pharonix Thanks! That one unzipped perfectly.
     
  9. Cellbind

    Cellbind Villager Member

    Messages:
    14
    Likes Received:
    5
    First Language:
    English
    Hello,

    I noticed that some people were trying to change sprites mid-battle.

    I managed to accomplish this, at least for actors, by having an extra state that gets added after the transformation skill effect.

    The version I am using is 0.77.2B, and the project is based on the demo.

    The plugins required include yanfly's state core, skill core, and any dependancies. I followed the instructions in the documentation to determine the order of plugins.

    First I made a state to represent the transformation, and I included the following note tags:
    Code:
    <Custom Apply Effect>
    user._prevCharName = user._prevCharName || user._characterName;
    user._prevCharIndex = user._prevCharIndex || user._characterIndex;
    user.setCharacterImage("Nature9", 1);
    $gamePlayer.refresh()
    </Custom Apply Effect>
    
    <Custom Remove Effect>
    var charName = user._prevCharName;
    var charIndex = user._prevCharIndex;
    user.setCharacterImage(charName, charIndex);
    user._prevFaceName = undefined;
    user._prevFaceIndex = undefined;
    $gamePlayer.refresh()
    </Custom Remove Effect>
    The code is based partly on yanfly's actor transformation tip, and partly on a post previous from Pharonix.

    This state actually works fine outside of battle if you want your skill to work there. The problem is, the $gamePlayer.refresh() doesn't seem to work in the battle scene for LeTBS. That said, adding a state to your battler seems to trigger a refresh of the sprite.

    Because of this, adding this note tag to the skill allows the sprite to update to the new character image:

    Code:
    <After Eval>
    user.addState(329);
    </After Eval>
    The state used is just an empty state that wears off at the end of turn, or battle.

    I hope someone finds this helpful.
     
  10. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    620
    Likes Received:
    268
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV

    One of my goals was a transfiguration skill that would turn the target into a rock,frog/puppy/etc, making them useless for a turn.
    This is great.
    I'll try this later.
     
  11. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    581
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    So how does move_to_cell work if the cell in question is occupied? I'm trying to make an attack that can automatically walk you up to the enemy before smacking them, using your MP to set the range. I could technically use "reach target," but that teleports you right away, so it doesn't look as nice.
     
  12. Acer2020

    Acer2020 Villager Member

    Messages:
    23
    Likes Received:
    20
    First Language:
    English
    First of all, a huge thank you to Lecode for making this amazing battle system!

    Secondly, does anyone know if it is possible to change the casting animation/sequence for individual actors? My game uses two types of actors: mages and non-mages, and I wanted these two categories to have different casting animations when they use skills.

    I know it's possible to change from the default animation for the regular attack command, but I haven't fund a way to do that for skills. Any help would be greatly appreciated. Thanks!
     
  13. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    581
    Likes Received:
    321
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    @Acer2020 you can always change the sequence used by a given skill, to differentiate between physical or magical to skills.
     
  14. Cellbind

    Cellbind Villager Member

    Messages:
    14
    Likes Received:
    5
    First Language:
    English
    I seem to be getting some issues with counter attacks.

    The triggering attack will deal x damage, the counter will deal y damage to the initial attacker, then the counter attacker will take another x damage. The counter attacker deals z(many times both x and y) damage with a normal attack. It seems like counter attack uses the initial attacker's stats.

    I also tested this in the unchanged demo.

    My question, is this an intentional effect? I would prefer counter attack damage to be based on the counter attacker's stats rather than the attacker.

    Edit: I managed to remove the extra damage dealt the the counter attacker by lightly modifying the processCounterAttack function, but I haven't been able to fix the bigger issue of the initial attacker's stats being used.
     
    Last edited: Oct 6, 2018
  15. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    620
    Likes Received:
    268
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    try using yanfly's counter control:
    http://yanfly.moe/2016/03/11/yep-82-counter-control/

    I'd like to help you, but counters don't work in my 77.2b demo or my own project, maybe I have something misconfigured/missing. /shrug/
     
  16. Acer2020

    Acer2020 Villager Member

    Messages:
    23
    Likes Received:
    20
    First Language:
    English
    I somehow completely forgot this was an option. :rswt Cheers for the reminder. I tested it out and every is working perfectly now.
     
  17. Cellbind

    Cellbind Villager Member

    Messages:
    14
    Likes Received:
    5
    First Language:
    English
    I do use counter control, it doesn't appear to be affecting this particular issue. In fact, I'm not sure if it's even fully/partially compatible based on the counter code.

    I did notice that my previous adjustment prevents an endless loop of counter attacks though.

    Edit: Turns out the previously mention adjustment was actually a bad plan, but I did manage to resolve my issue. I had to make several changes in the LeTBS, however:

    1st Change - processCounterAttack: added a clear result to the entity (counter attacker) in order to remove the double dip of damage from the source attacker.

    2nd Change - forceAction: added a line to change the _activeAction to the current action, this fixed the issue of the counter using the enemies' stats, it seems to have been stuck on the source attacker's action.

    3rd Change - added a _counters flag to the TBSEntity, and made the processCounterAttack flip it, then have it flip back at the end of turn in onTurnEnd().
    This fixed the problem of infinite counter loops in the case of 100% counter rate on both targets.

    Keep in mind, these changes might effect other parts of the code somewhere, and I have not tested them thoroughly.

    Code:
    BattleManagerTBS.processCounterAttack = function (targets, subject, action) {
        if (!action) return;
        this.setCursorCell(subject.getCell());
        targets.forEach(function (entity) {
            if (entity) {
                var dist = LeUtilities.distanceBetweenCells(subject.getCell(), entity.getCell());
                if (dist <= 1 && Math.random() < action.itemCnt(entity.battler()) && !entity._counters) { //Cellbind modified
                    var skill = $dataSkills[entity.battler().attackSkillId()];
                    subject.battler().clearResult();
                    entity.battler().clearResult(); //Cellbind added
                    entity.lookAt(subject.getCell());
                    entity.addTextPopup("Counter");
                    entity.startSequence("counter");
                    entity._counters = true; //Cellbind added
                    this.forceAction(skill, entity);
                }
            }
        }.bind(this));
    };
    Code:
    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();
        this._activeAction = action; //Cellbind added
        entity.lookAt(this._activeCell);
        entity.appendSequence(id, action);
    };
    Code:
    TBSEntity.prototype.initialize = function (battler, layer) {
        this._battler = battler;
        this._counters = false; //Cellbind added
        this._cell = null;
        this._cellX = 0;
        this._cellY = 0;
        this._moving = false;
        this._movePoints = 0;
        this._movingDistance = [0, 0];
        this._movePath = [];
        this._movingNextCell = null;
        this._moveReducePoints = false;
        this._movePerformed = false;
        this._actionPerformed = false;
        this._dead = false;
        this._flag = null;
        this._isMouseOver = false;
        this._turnHidden = false;
        this.createSprite(battler, layer);
        this.createSpriteValues();
        this.createComponents();
        this.setMovePoints();
        this.initializeSpeed();
    };
    Code:
    TBSEntity.prototype.onTurnEnd = function () {
        this._battler.onTurnEnd();
        this.addPopup();
        this._battler.clearResult();
        this.setMovePoints();
        this._turnPlayed = true;
        this._movePerformed = false;
        this._actionPerformed = false;
        this._counters = false; //Cellbind added
    };

    If I run into any issues that my own changes brought about, I will edit this post again.
     
    Last edited: Oct 6, 2018
  18. PixelPunk

    PixelPunk Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    engrish
    hey there,
    I apologize if this has been answered but, I've been searching all 96 pages of this thread and haven't found a simple explanation. I could have just missed it tho.


    What would be the process for adding additional enemies to the fight after the first wave has been cleared?
    Would it be called with a common or a battle event that triggers when all enemies have been ko'ed?
    and what tags should I be using to call the enemy into battle?

    I assume its something like this?
    LeTBS SelectCell (x,y)
    LeTBS AddEntity Enemy(7) (x,y) Order(remake) 0 bandit2 - (what is "order(remake) 0 bandit2 "mean?)

    I copied the above from the bandit event in the demo, wasn't sure what all the "wait 30 frames" or "LeTBS HideCursor" were used for.

    I want a larger monster to jump out and move a few spaces to the party once the third (final of the initial encounter)goblin has been killed, before continuing the fight.

    I might just be going about this all wrong, so sorry if this is just super nubish of me. :kaoback:
    just trying to get a grasp on how this plugin functions.
     
  19. Amarok

    Amarok Veteran Veteran

    Messages:
    288
    Likes Received:
    710
    Location:
    Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    anyone knows anything about when the new version might come? cant wait for the optimization changes and the bigger battlers across multiple tiles
     
    Chaosicaa likes this.
  20. Semolous29

    Semolous29 Veteran Veteran

    Messages:
    45
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMVXA
    When I go into a tactical battle, I get this error? Anyone know what it is and how to resolve it?
     

    Attached Files:

Share This Page