I was wondering if there is a way to use this but for only certain fights, I'm using a Yanfly plugin for a different combat system but i wanted to make a boss which is a tactics based rpg instead. Is there anyway to make it only work for certain battles/events?
It looks like it isn't possible with this Tactics System, but I think SRPG works, at least as a side view battle.
https://forums.rpgmakerweb.com/inde...for-creating-turn-based-strategy-game.110366/
It might be possible with LeTBS too, but I haven't checked.
While I'm writing, these are a few features that would be cool to get working with this system:
- AoE
- Directional Attack bonus (side/back attacks add ATK points)
- Further shapes to the 'line', 'rectangle' and 'diamond' - 'saltire' (cross), 'chequered', 'octagonal', any others - EDIT: Check below! It freakin' works, and more!
- Summoning
- Damage Tiles / Slow Down move points (think this should be possible, but haven't got it working yet)
- 'Protection Zone' tiles that give +1 DEF if they're next to a defensive area (a bit like X-Com)
- Push/Pull for any enemy/ally (need to find a way of working out which event/enemy is active)
- Make certain actions free actions, like using an item doesn't end your turn. (Could that be done with Yanfly's Instant Cast plugin? Will try it out. EDIT - didn't work, as far as I could tell - back to the drawing board! There's another plugin, dingk's Multicast plugin, which does something similar, but that also doesn't work, as the TBS reads the first action as the final one and then moves to the next player regardless - may need some Javascript tweaking here.)
- Make movement possible after an attack (similar to the previous point).
If anyone's using or used the system previously and managed to get any of these functions working, please let us all know as they'd be fantastic to implement with this plugin, or any other interesting ones. I'm trying to get the 'push'/'pull' effect working that someone gave details to a few pages ago, and getting there with that, but not quite sure how to make it possible for multiple enemies yet. Did anyone else manage to work this or any of the other additional features out?
@Zayriel @Dralctig @gydiwon @meteomage @Frostorm
EDIT: Asked a pal of mine who codes a bit to look at the function I isolated that draws the range shapes. He's a bit of a maths wizard, and managed to create the additional shapes of 'cross' (aka saltire), 'checkerboard', 'octagonal', 'ball' and 'sine'. If you go to the first line of code in 'Tactics_Basic' (Game_Action.prototype.createRange = function(d1, d2, x, y, shape) { ), you should be able to paste the code below over the existing code for that function to get these new shapes to work. The notetag ranges work as standard to the original shapes, but you can change some of the variables in the code for the sine wave and ball to adjust their shapes and positions. We're working on a few more, so any suggestions welcome! You don't need to credit him for the edit, but if you want to you can as 'flyingbroadbean'.
Game_Action.prototype.createRange = function(d1, d2, x, y, shape) {
var range = [];
var randangle = Math.random() * 2 * Math.PI;
for (var i = x - d2; i <= x + d2; i++) {
for (var j = y - d2; j <= y + d2; j++) {
if (i >= $gameMap.width() || j >= $gameMap.height() || i < 0 || j < 0)
continue;
if (Math.abs(i - x) + Math.abs(j - y) > d1) {
switch (shape) {
case 'diamond':
if (Math.abs(i - x) + Math.abs(j - y) <= d2) {
range.push([i, j]);
}
break;
case 'rectangle':
range.push([i, j]);
break;
case 'line':
if (i === x || j === y) {
range.push([i, j]);
}
break;
case 'cross':
if (i + j === x + y || i - j === x - y) {
range.push([i, j]);
}
break;
case 'checkerboard':
if (i + j % 2 === 0) {
range.push([i, j]);
}
break;
case 'octagonal':
if (i === x || j === y || i + j === x + y || i - j === x - y) {
range.push([i, j]);
}
break;
case 'ball':
var ballx = x-3;
var bally = y-2;
var ballsize = 5;
if ((i - ballx) * (i - ballx) + (j - bally) * (j - bally) <= ballsize * ballsize) {
range.push([i, j]);
}
break;
case 'sine':
if (Math.abs(j - y - Math.sin(i * 0.5) * 2) <= 5) {
range.push([i, j]);
}
break;
case 'randomsine':
var posx = i - x;
var posy = j - y;
var pos2x = posx * Math.cos(randangle) + posy * Math.sin(randangle);
var pos2y = posy * Math.cos(randangle) - posx * Math.sin(randangle);
var dist = Math.abs(pos2y - Math.sin(pos2x * 0.5) * 2);
if (dist * dist <= 5 * (3 + 2 * Math.random()) && pos2x * pos2x <= Math.random() * d2 * d2) {
range.push([i, j]);
}
break;
case 'star':
if ((Math.abs(i-x)<=d2/1.41 && Math.abs(j-y)<=d2/1.41) || Math.abs(i-x)+Math.abs(j-y)<=d2) {
range.push([i, j]);
}
break;
case 'octagon':
if ((Math.abs(i-x)<=d2/1.41 && Math.abs(j-y)<=d2/1.41) && Math.abs(i-x)+Math.abs(j-y)<=d2) {
range.push([i, j]);
}
break;
case 'target':
var dist = (i - x) * (i - x) + (j - y) * (j - y);
if ((dist >= d2 * d2 * 0.8 && dist <= d2 * d2) || i === x || j === y) {
range.push([i, j]);
}
break;
case 'spiral':
var dist = (i - x) * (i - x) + (j - y) * (j - y);
var angle = ((Math.atan2(j - y, i - x) * 180 / Math.PI) + 180) * d2 / 360;
if (dist >= r * r * 0.5 && dist <= r * r) {
range.push([i, j]);
}
break;
case 'randomcircle':
var dist = (i - x) * (i - x) + (j - y) * (j - y);
if (dist <= Math.random() * d2 * d2) {
range.push([i, j]);
}
break;
}
}
}
}
return range;
};
I've also added
@Raizen's excellent edit from earlier in the thread to avoid the shapes spilling onto the far side of a map on smaller maps, which tidies everything up nicely.
What needs to be worked on next is somehow figuring out the best way to establish directional attacks (maybe with GALV's directional movement plugin or a Yanfly event movement detection plugin, perhaps) and also how to connect particular shapes like 'ball' to the direction that the current player is facing (at the moment, having 4 different skills for each direction seems best). I also think that the Push/Pull common event for any enemy issue might be solved with the Yanfly MoveRouteCore and SelfSwVar plugins along with Galv's Spawn Event one as originally suggested, but need to test this out. Did anyone get that working with various enemies? It works if you know the enemies on the map in a single battle, but as soon as you change to other battles, the event number varies, so it isn't possible to replicate in different battles. I just need to work out at which point in the battle is best to read the 'current battler' variable to get it to work with the common event. This also looks as if it'll only work with single enemies and not multiple ones, unless anyone can see differently?
Working on how terrain tags can affect movement and buffs as well, potentially through states.
Hope people enjoy the new development, anyhow.
