I'd like to be able to create a number of battle spot definitions and assign specific ones to specific combatant groups.

Is this something that is possible currently? It seems like I only get 1 global battle spot for all battles to use.
  • The default battle spots defined in Battle Systsem > Battle Spots can be overridden by each Battle component's Battle Spot Settings, where you can use game objects in the scene to place them where needed.

    Both allow setting up separate spots for the player group, allies and enemies, but you can't set up different spots for different enemy groups. However, if you set up spots for an individual battle and know the groups and their sizes, you can just place the spots needed for them :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I see, so how would that work with random battles? For example, I have 5 possible groups of enemies that can spawn in a certain area, but each group needs a fairly specific battle spot layout or it looks silly.

    Just trying to understand how I can accomplish this.
  • Hm, I don't think this is currently possible - I'll look into it, maybe add battle spot options to combatant groups.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ill make a plugin for it, assume you have better things to be working on :)
  • Had nothing better to do - combatant group members will be able to define optional custom battle spots (which will override the default spots, but will be overridden by a battle component's battle spots).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Well then sounds great! Thanks!
  • Any thoughts on when you might push the next release with this upgrade? I'm in no rush just getting a sense of when i can start using this feature.
  • Next update will be mid to end of April, as it'll also include a massive change in the asset system (supporting asset bundles and resources) and needs to be tested for some time :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Roger that, sounds awesome!
  • Question here, the battle spots stuff works great for my enemies, but now I am facing 2 issues.

    1) Battle spot locations are affected by the combatant model localscale, so it is hard to make a sort of universal unit to use here. I tried updating it by the inverse scale at runtime, but I cant seem to change the actual underlying battle spot data easily, and this likely isnt the best solution.

    2) I would like to use different battle spot configurations depending on the size of my party. I'm not sure the best answer to this, is there some way I can assign a combatant group to the party whenever a member is added or removed? How would that work with explicitly specifying the combatants that are part of any discrete group?

    As always, thanks for your help!
  • 1) Actually, no - battle spots and their locations are not affected by the local scale of the combatant placed on it. The battle spot's scale can affect the combatant's scale if you enable Use Scale in the battle spot settings.
    Battle spots can be accessed in battle events (and battle start events) via the Waypoint objects.

    2) Hm, probably best to handle this in the battle start event moving the battle spots (via Waypoints).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1) So i have a battle spot defined as follows:

    x: 4.5 y: 0 z: 3.5

    The combatant prefab has a scale of (3,3,3)

    When the combatant is placed, it is placed at (relative position) (13.5, 0, 10.5)

    This suggests that it is observing the scale on placement, though maybe I am missing something?

    2) How can I reference the battle spots and move them from an event?
  • 1) How's the battle started?
    It's definitely not happening on my end, at least when starting the battle via a Battle component.

    2) They're available using the Waypoint object selection. In battle start events they're referencing all battle spots of a group (e.g. Player Spots), in battle events they're referencing the spots of user or target (e.g. User Base).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2019
    1) Its an autostart battle event I am using right now. I am appyling runtime scale to the objects, but even if i adjust by the inverse scale, the next time they move to their battle spot it is the scaled spot. Hmm I will look and see if its something on my end.

    2) Can i set the individual positions in an event though? I see that in a Change Position node I can select the player spots or enemy spots as groups, but not individually.
    Post edited by mattehr on
  • OK figured it out, still 1 issue.

    1) IN my scene the event object that started the battle was rooted 2 children deep in a component that had a scale of 3 on it.

    obj (scale 3,3,3)
    |_ obj (scale 1,1,1)
    |_ event object (scale 1,1,1)

    But when my battle scene loaded, the battle event object to which the player spots are rooted was scale 3,3,3.

    Its likely that my poor understanding of the mechanics going on here are to blame for this.

    2) Ok I have a simple script which distributes my player spots based on the number of party members:


    using UnityEngine;

    namespace ORKFramework.Events.Steps
    {
    [ORKEditorHelp("Move Player Spots", "Automatically distribute the player spots evenly across the arena center.", "")]
    [ORKEventStep(typeof(BattleStartEvent))]
    [ORKNodeInfo("Custom")]
    public class MovePlayerSpotsNode : BaseEventStep
    {
    private const float LineHeight = 3.5f;

    private const float ZPosition = 3.5f;

    public override void Execute(BaseEvent baseEvent)
    {

    //get the player spots, get the current party members

    var playerSpots = baseEvent.GetWaypoint(0);
    var playerParty = baseEvent.GetActorObject(0);

    var totalSize = (playerParty.Count - 1) * LineHeight;

    int index = 0;
    playerParty.ForEach((p) =>
    {
    var currentSpot = playerSpots[index];
    var spotLocation = new Vector3((index * LineHeight) - (totalSize / 2), 0, ZPosition);

    currentSpot.transform.localPosition = spotLocation;

    index++;
    });

    baseEvent.StepFinished(this.next);

    }
    }
    }


    This mostly works great, except the initial placement of the player is at its original battle spot, pre transformation.

    In my battle start event i am 100% calling spawn combatants *after* calling MovePlayerSpots.

    Will continue to debug this.
Sign In or Register to comment.