Hi Everybody, I've been a long-term lurker for a couple of years, and thought I'd say hello, and I'm asking for some advice please.

I'm looking to bridge between ORK and Ootii Frameworks. From what I read on the forums, I think @Keldryn might have some experience with this.

I'm creating a RPG Third Person style. Any advice or experience would be greatly appreciated. I'm thinking about using ORK for all the usual RPG elements, and use Ootii for Spellcasting, Archery and Hit detection etc. Do you think it wold work well that way?

I'm assuming adding ORK Damage Dealers and Damage Zones will tie it into ORK's systems for calculating damage?

Thanks!
  • @Vog - Yeah, that would be me. :-) I have some pretty in-depth experience with this.

    I didn't end up using ORK Damage Dealers for the weapons and spells. For weapons, I created a customized Damage Reactor (that goes on the Actor Core) that more or less duplicates how a Damage Dealer inflicts damage on a Damage Zone. Keeping the DD was an unnecessary step that just made the integration more complicated than it needed to be. For spells, I created a custom node for ootii's Spell Editor that runs the Calculate() for the specified (ORK) Ability.

    I created a demo with a small but "complete" gameplay loop, and I'm in the process of cleaning up and refactoring my custom libraries and integration code, so I don't want to share all of that publicly until it's in a more releasable state -- it would be a nightmare to provide support for it. I also don't want to make any promises that I may not deliver on because I change my mind about how I want to approach things (sorry, ORKsive fans). So at least in the short term, we can talk about the details via PM.

    The primary issue that I struggled with was AI. I was never able to get the AI Combatants moving the way I wanted them to with the built-in Move AI. Most likely, I'll end up using NodeCanvas in place of both Battle AI and Move AI.



  • Thanks so much @Keldryn! I'll take a look! Its great to know someone else has been down this road already!

    I'm not much of a coder myself, so I've been trying to get things working together out-of-the-box. But I'm a little confused about how I'm going to calculate damage, so that's good to hear.
  • Also in this boat as Keldryn already knows. Has anybody used Makinom to drive the AI and interfaced with MC to move the player? Would that just be an extension of battle AI and move AI or would that be something altogether different?
  • This isn't the complete code for the ORK Damaged Reactor, but it's the part where I change how damage is calculated/applied from how Tim does it in the Basic Damaged Reactor.

    (CombatantBridge is one of my components that simplifies access to the ORK Combatant and ootii Combatant components)

    // Get the ORK Ability used for the attack
    CombatMessage lMessage = mMessage as CombatMessage;
    if (lMessage != null)
    {
    GameObject lAttacker = lMessage.Attacker;

    if (lAttacker != null)
    {
    CombatantBridge lCombatantBridge = lAttacker.GetComponent<CombatantBridge>();

    BaseAction lAttackAction = lCombatantBridge.GetAttackAction();

    lAttackAction.SetTarget(mCombatantBridge.Combatant);

    float lDamageFactor = 1.0f;

    // The Combatant SHOULD have been set up with at least one Damage Zone component:
    DamageZone hitDamageZone = mOwner.GetComponent<DamageZone>();

    if (hitDamageZone != null)
    {
    hitDamageZone.Damage(lAttackAction);

    }
    // But if for some reason it wasn't, we can still calculate the damage:
    else
    {
    lAttackAction.Calculate(
    new List<ORKFramework.Combatant> { ComponentHelper.GetCombatant(mOwner) },
    lDamageFactor, false);
    }

    // check if dead
    if (!IsAlive())
    {
    mMessage.ID = CombatMessage.MSG_DEFENDER_KILLED;
    mActorCore.SendMessage(mMessage);
    ORK.Game.CheckGameOver();
    // Disable the reactor
    Deactivate();
    return true;
    }
    }
    }


    So what I'm essentially doing here is:
    - get the attacker game object from the ootii combat message
    - get the ORK Combatant from the attacker
    - get the attacker ORK Combatant's current Base Attack Ability and wrap it inside a Base Action
    - get the ORK Combant from the character that is being damaged, and set that as the target of the Base Action

    Now we have a complete Base Action, with the correct attack Ability set, as well as the attacking and defending Combatants. Now we can feed that Base Action into a Damage Zone on the target, or we can just run the Calculate() method on the Base Action itself.

    If that's clear as mud, then no worries; I'll try and get the integration polished enough that you don't have to mess around with the scripts if you don't want it. :-)
Sign In or Register to comment.