Technology Temerity

Runtime Grapple Editor

Please note: The scripts in this post are depreciated and no longer supported. My grapple functionality is now handled by the DC Elmers library.

OpenBOR is an extraordinarily powerful game engine, but one severe design flaw is the lack of any reasonable grappling support. Holding strikes and a horribly animated back toss are all it can really do out of the box.

Fortunately script support alleviates this problem, as one can simply script a throwing system for themselves. Quite some time ago I did just that and am pretty proud of it. It supports everything from simple hurling all the way up to multi part chain slams ala Tekken. It even supports one character grappling several opponents at once and/or tag team throws. The best part is by use of careful standardization, the defender does not need any additions beyond a standard set of animations given at creation time. Thus adding grappling moves to a character requires only modifications to that one character as opposed to every other entity in the game.

Even with those conveniences, adding a throw was still prohibitively time consuming. It required countless starting and restarting of the engine while tweaking the bind settings pixel by pixel. Creating a single simple throw could take a day or more. So even though I dreaded dealing with menu codes again, I decided to create an on the fly throw editing system.

Throw Example 1

The premise is simple: Edit the grappling poses at run time, record the resulting parameters, and copy/paste them into the model text. The code is such a mess I’m almost embarrassed to post it here, but ahh well. It desperately needs some cleanup, but from a functionality and stability standpoint works just as I had hoped:

  • ESC + UP/DOWN: Toggles debug modes. Mode 4 is the grappling editor. Specific settings can be adjusted by holding an action key and using the direction control as follows.
  • Jump
    • Left/Right: Bind mode. Several types of binds are available to deal with various grapple maneuvers.
      • 0: Standard – Defender is bound to Attacker by an adjustable X/Y/Z offset.
      • 1: Standard w/Auto Height – Same as one, but Y offset is automatically adjusted to reflect difference between Attacker and Defender’s height.
      • 2-4: Not used as of 2011_04_22.
      • 5: Reverse – Attacker is bound to Defender by an adjustable X/Y/Z offset.
      • 6: Reverse w/Auto Height – Same as 5, but Y offset is automatically adjusted to reflect difference between Attacker and Defender’s height.
      • 7: Reverse w/Auto Height Float – Same as 6 with a tosstime addition to prevent premature landframe activation.
  • Attack
    • Left/Right: Toggles bind indexes. The throwing system allows for multiple opponents to be grappled at once, with each identified by an index.
    • Up/Down: Toggles defender’s frames. Each character has a single identical animation with each frame representing one of its standardized “thrown” poses.
  • Attack2
    • Left/Right: X (horizontal) binding offset.
    • Up/Down: Y (vertical) binding offset.
  • Attack3
    • Left/Right: Direction binding.
    • Up/Down: Z (lateral) binding offset.
  • Attack 4
    • Left/Right: Attacker’s frame.
    • Up/Down: Toggle “Rebind”. If off, the animation’s current binding (if any) won’t be overridden by debug version so comparisons can be made.
  • Special: Prints completed function call to log, ready for copy/paste into grappling animation.

Ultimately, this should cut creation time for a single throw from about a day to around 30 minutes. In turn, my module production time should decrease an order of magnitude, especially if I can find ways to modify and apply the concept to other areas.

Code Samples:

Author: Damon Caskey

Hello all, Damon Caskey here - the esteemed owner of this little slice of cyberspace. Welcome!

11 Comments

  1. So you take these scripts & run them, having setup your entities, animations & indexes; then your able to just move the sprites where you want them, after which you can simply copy the log.

    Well, not only is this a huge time saver for anyone using standardization for their beat em up, it’s also a pretty good example of what scripting is capable of (not that I had any doubt, I just never thought about it) & it’s also a pretty convincing argument of how standardization can be a vast improvement over the default throw system (assuming any one else was still wondering). Impressive work Damon. I’d be interested to see if you add any other future debug mode scripts, really nice work.

    One other thing I was curious about (unrelated): is there no way whatsoever to call any other entity (except the player character) during the Select Screen? I haven’t tried it but having read what you said about it puts a dampener on some of my plans (or perhaps makes certain things more difficult).

    1. Thanks FW! The catch is that this editor works with my own throwing standardization. Unless that standard is adopted for everyone, it won’t do anyone but me any good.

      OX and I tried several times to get a standard going, but the community always balked on us. That’s too bad, this would have been something everyone could use.

      As far as the select screen goes, there isn’t a whole lot you can change with it. This is because of some optimizations made quite a while back that allow only loading what’s needed. Entities in selection don’t really exist in the same form as they do during gameplay; trying just about anything out of the ordinary will be ignored or produce an instant shutdown.

      You could always set up your own custom select screen from scratch, but that’s not something I’ve ever bothered with so I can’t help you much. OX would be the man to talk to about that.

    1. Is this new debug mode included in the latest version of OpenBOR, or is it something we need to patch on ourselves to an existing version? Probably a stupid question, I know, but either way, this is a fantastic tool for the likes of me, who find the concept of binding (And most script in general) utterly bewildering. Great work!

      1. Hi Jake, thanks for the reply.

        The debug mode is not part of OpenBOR, at least not in the way you are thinking. It’s a feature I added to my modules using OpenBOR’s script support.

        DC

        1. Cool, in which case will you make it public for us lesser mortals to use, or, alternatively, do you consider it okay for us to unPak one of your Mods to get access to it? The one thing that always stalled my own projects was lack of a decent throw system within OpenBOR and the daunting task of trying to learn script so that the BOR engine could behave more like the CPS one used in Capcom beat-em-ups. This debug tool would be beyond invaluable in that aspect and I’m sure I’m not the only one who feels that way.

        2. I think you may be misunderstanding. The first thing is that it is public. This very post contains code samples; more completed and updated versions are in the Script Catalog. I also have no problem with others using my modules as a template.

          However, you need to be aware this isn’t a magic button that will give OpenBOR grappling. It’s a function that speeds up preparing individual moves for modules that already use my grappling scripts. You still need some scripting proficiency to make any use of it.

          DC

  2. Hello,

    These scripts look very interesting but I’m not sure how to get started with them. Furthermore, key0006.h and bind0014.h are missing from your script catalog.

    Could you provide some links for these two ? Thanks.

Leave a Reply