Lecode Tactical Battle System 0.77.2B

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

  1. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    Use FlipelyFlip's Large Troops.
    But use my modified one, as it didn't work out of the box, there were a few issues, but my modded one works.
    https://www.dropbox.com/s/psfdkp3t8m8z8n3/FFP_MultipleTroops.js?dl=0
    I can confirm this works with at least 100 enemies. The lag is insane, but it works.


    As for the <enemy cell: x> sometimes I found that you may need to place them in order. So its a good practice to make the "boss" or rather, the ones you actually need to position as the first entities that actually take part in battle.
     
  2. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    Yeah, I figured out it wasn't working because A) the ID was the ID of the enemy within the troop, not the ID in the Enemies database and B) I was trying to put more enemies than the troop could contain. I'll give your plugin a try and see how that goes. Just out of curiosity, what's the most enemies you've used without serious lag?


    Also, with this script, what would the enemy ID be for a second troop? So for instance, in the main troop I launch the battle with, there are 8 enemies. I add troop2 with 5 more enemies, how would I specify those 5 enemies in the notetags? Would they just become 9-13?
     
    Last edited: Oct 22, 2019
  3. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    25 enemies with a decent computer. It depends on the machine. My laptop was able to handle 40 though.

    Problem is all the calculations and such

    Also the enemy icons woll run off screen if you dont modify the turn order display.(I've done this as a loop that makes each line a max of 16 or so). Let me check my code. Give me q bit of time

    And yes, once added, the enemy ids would continue from 9 onwards.


    EDIT:
    Here's my updated
    TBSTurnOrderVisual.prototype.setPositions
    function. This makes it so if there's more than 26 enemies, it'll draw their turn order icons on a new line.
    Supports up to about 100 enemies right now, but you can easily continue it on with more if statements
    ie: if(i>101)... etc.
    This goes in the LeTBSTurnOrderA.js file
    Code:
    TBSTurnOrderVisual.prototype.setPositions = function () {
        var pos = Lecode.S_TBS.TurnOrderVisual.pos;
        var rightMargin = Lecode.S_TBS.TurnOrderVisual.rightMargin;
        var leftMargin = Lecode.S_TBS.TurnOrderVisual.leftMargin;
        var topMargin = Lecode.S_TBS.TurnOrderVisual.topMargin;
        var bottomMargin = Lecode.S_TBS.TurnOrderVisual.bottomMargin;
        var size = Lecode.S_TBS.TurnOrderVisual.size;
        var space = Lecode.S_TBS.TurnOrderVisual.space;
        var sx, sy, dx, dy, shiftX, shiftY;
        switch (pos) {
            case "right":
                sx = Graphics.width - rightMargin - size;
                sy = topMargin;
                shiftX = 0;
                shiftY = size + space;
                break;
            case "left":
                sx = rightMargin;
                sy = topMargin;
                shiftX = 0;
                shiftY = size + space;
                break;
            case "top":
                sx = rightMargin;
                sy = topMargin;
                shiftX = size + space;
                shiftY = 0;
                break;
            case "bottom":
                sx = rightMargin;
                sy = Graphics.height - bottomMargin;
                shiftX = size + space;
                shiftY = 0;
                break;
        }
        var counterI = 0;
        for (var i = 0; i < this._turnOrder.length; i++) {
            var turn = this._turnOrder[i];
            var entity = turn.entity;
            if (entity.isTurnHidden()) {
                counterI++;
                continue;
            }
            var sprite = turn.mainSprite;
            sprite.x = sx + shiftX * (i - counterI);
            sprite.y = sy + shiftY * (i - counterI);
            if(i>25)
            {
                //console.log("for testing");
                sprite.x = sprite.x-(shiftX*26);
                sprite.y = sprite.y+(shiftX*1.5);
            }
            if(i>50)
            {
                //console.log("for testing");
                sprite.x = sprite.x-(shiftX*26);
                sprite.y = sprite.y+(shiftX*1.5);
            }
            if(i>75)
            {
                //console.log("for testing");
                sprite.x = sprite.x-(shiftX*26);
                sprite.y = sprite.y+(shiftX*1.5);
            }
           
    
        }
    };
     
    Last edited: Oct 22, 2019
  4. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    I assume I should overwrite the same bit of code in the plugin with that. If not, then...oops.
     
  5. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, only replace that function.
     
  6. staf00

    staf00 Veteran Veteran

    Messages:
    83
    Likes Received:
    9
    First Language:
    English
    So I'm kind of tired of waiting for v0.8 and just gonna go ahead and use v0.77, but I just realized that all the old documentation for v0.77 is gone w/ the WIP documentation for v0.8 in its place...what do? >.<
     
  7. Doktor_Q

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

    Messages:
    616
    Likes Received:
    346
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    Click "old documentation" from the new doc page. It's all still there, it's just not the front page anymore.
     
    staf00 likes this.
  8. staf00

    staf00 Veteran Veteran

    Messages:
    83
    Likes Received:
    9
    First Language:
    English
    Omg yes! Thx, ur a life saver
     
  9. Ygdrassill

    Ygdrassill Game dev Veteran

    Messages:
    105
    Likes Received:
    11
    First Language:
    English
    Hey guys, so just wondering, I made a new skill called Shoot, and I want to set that as the default attack command in battle for certain classes. But im
    not sure how to change the default attack command, I can make shoot a special skill but I just want to it be the default attack for certain
    classes.
     
  10. TheWorldOfCM

    TheWorldOfCM Villager Member

    Messages:
    13
    Likes Received:
    7
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    Guys, how can I make the Boss as the condition in the game? What I mean is...if the player defeated the enemy Boss, game over...even if there are still minions of monsters in the field? can you show me how?
     
  11. staf00

    staf00 Veteran Veteran

    Messages:
    83
    Likes Received:
    9
    First Language:
    English
    Use Yanfly's Weapon Unleash plugin, which has the notetag <Replace Attack>
     
  12. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    I use lettbs commands to actually set each character to NOT have an attack.
    Then on each weapon i just have a line that sets the Extra skill

    Ends up looking like this:

    upload_2019-10-31_19-47-21.png


    upload_2019-10-31_19-47-51.png


    So to do this, I put this tag in each actor:

    <letbs_commands>
    move 82, [extra], skills 64, items 176, scan 243, pass 84
    </letbs_commands>

    Then on the weapons I use this notetag:
    <letbs_commands>
    skill[403]
    </letbs_commands>
    In this case this is a Dagger weapon, which gives the character the [Extra] skill [Dagger]
     
  13. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    That plugin you sent me works perfectly. A few more questions though:
    1. Are you aware of any way, either through the TBS or another plugin or within the MV engine itself, to calculate a damage falloff? I have energy weapons in my game and ideally I'd like them to do full damage 1 square away, 75% at 2 squares, 50% at 3 and 25% at 4. This is just an example, actual numbers would be different depending on the actual range of the weapon and the weapon itself, but that's basically what I'd like to do.

    2. Is there a way to remove corpses from the battlefield? I already have them set to not show up, but they're phsyically obstructing movement still (at least for the player's party, enemies don't seem to care). Chaosicaa posted something in 2017 about an edit to config.js, but the section they mentioned changing doesn't seem to exist anymore, at least not in that file. Might even be better if there was a way just to make the corpses passable.

    3. Lastly, how do I change the death animation? I have the default one set the way I want it and it works great for my space battles, but giant explosions on human characters hit by laser guns during land battles doesn't quite work. I would imagine there's a way to call a different animation for death in those instances.
     
    Last edited: Nov 2, 2019
  14. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    https://forums.rpgmakerweb.com/inde...ttle-system-0-77-2b.71572/page-94#post-897627
    Check out this post i made last year.
    AFAIK, it still works.

    You'll just need to finagle the math a bit to have tiers, but that should be easy enough
    Yanfly's Damage Formula is a godsend.

    As for #2, all my enemy entities use these notetag values in the <letbs> tags
    sequence(dead): dead_vanish
    has_no_corpse
    And I haven't had any issues
    There's also the tag
    passable_on_death
    you'd put this between the <letbs> tags in the enemy notetags.


    As for #3, i believe you want the tag
    collapseAnim: x
    where x is the animation id of the collapse you want, otherwise it uses the set value in the LeTBS.js plugin configuration.
     
  15. TheWorldOfCM

    TheWorldOfCM Villager Member

    Messages:
    13
    Likes Received:
    7
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    Can anyone guide me?...

    (1) How can I implement the "Player's turn" and "Enemy's turn" in the battle? I have the pop-up message going but I can't make it right using troop turn condition.

    (2) How to make combo skills between 2 characters in a party? If both party members is in the field, the combo skill can be used.

    (3) Just a suggestion. Hope someone can make different skills sample and put it in a demo. So everyone has an easy access and samples to copy.

    Thank you for whoever answer my questions. Have a great day.
     
  16. TheWorldOfCM

    TheWorldOfCM Villager Member

    Messages:
    13
    Likes Received:
    7
    First Language:
    Tagalog
    Primarily Uses:
    RMMV
    sorry for double post...edited it.
     
  17. staf00

    staf00 Veteran Veteran

    Messages:
    83
    Likes Received:
    9
    First Language:
    English
    Has anyone tried implementing Lecode's TBS in such a way so that u go from walking/exploring the map out of combat to entering combat seamlessly on the same map? As in enemies are visible on the map when out of combat, then when the player gets close enuf to aggro them or trigger something, combat is initiated w/o moving to a different map? I was thinking of using Yanfly's Event Proximity Activate, Event Region Trigger, and/or Region Events to create an aggro radius. But how would I configure Lecode's TBS side of things for something like this? Is it even possible?
     
  18. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    For the enemy/player turn Popups, it can be a little tricky, you'll likely need a plugin/script for that.
    Troop conditions are no good for that.

    As for the sample skills,
    I can probably
    I did.

    Boy can it be difficult.

    There's an error in some of the code that prevents events that change location to show up properly in the LeTBS battle.

    THEN, you need to account for all possible number of enemy placements and ally placements.
    Then use "Event Touch" and then you'll need to relocate the events that dictate player/enemy locations.

    Finally, you need to make sure all events on screen actually have an empty page with no conditions as page 1, as events that only have switch conditions, will crash the system.

    I did this for 2 of my maps,
     
    staf00 likes this.
  19. Doktor_Q

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

    Messages:
    616
    Likes Received:
    346
    Location:
    Denial
    First Language:
    English
    Primarily Uses:
    RMMV
    @staf00 I'll second @Pharonix on this one- a big part of the issue is that LeTBS has a completely separate battle scene that just happens to load map data, with no connection to the fact that you're on said map.

    I've had quite a bit of luck setting this up with SRPG Core though, since that one does the battles using the map scene instead of the battle scene. Of course, it has its own set of limitations and quirks.
     
    staf00 likes this.
  20. Pharonix

    Pharonix Shadow Walker Veteran

    Messages:
    635
    Likes Received:
    274
    Location:
    Alpha Centauri Cluster
    First Language:
    English
    Primarily Uses:
    RMMV
    LeTBS, won't really support "seamless" transition.
    unless you disable the battle transition (and even then its not completely 'seamless"

    This is the closest I can get, and it involves rearranging all the actor and enemy placements with every single enemy you can touch.
    And will never work with random battles unless you really finagle with the event placements.

    https://www.dropbox.com/s/1gnqktadroh99f1/Two Worlds 2019-11-03 11-11-22.mp4?dl=0

    upload_2019-11-3_11-16-35.png

    in this map i use 4 ally cells and 6 enemy. and adding even 1 more of each adds like 4 additional commands.
    I store them "off-screen" and move them when the enemy is touched.
    It took a while to get these working correctly, but once you get a general idea, then it works fine.
    upload_2019-11-3_11-17-58.png

    The biggest issue is that since it is centered around the enemy touch, you need to make sure there's enough buffer that all the player cells are valid.
    As such since my area is 2 behind, I had to add region barriers (a-la yanfly)
    upload_2019-11-3_11-19-59.png

    Took maybe a few hours getting it configured right lol.

    An alternative is making regions and cutting the map into 1 battle map per region, and using the LeTBS_encounters to say,
    if region 1 - use map xxx.
     
    staf00 likes this.

Share This Page