{"id":565,"date":"2010-09-07T18:28:47","date_gmt":"2010-09-07T22:28:47","guid":{"rendered":"https:\/\/www.caskeys.com\/dc\/?p=565"},"modified":"2020-07-10T11:40:21","modified_gmt":"2020-07-10T15:40:21","slug":"565","status":"publish","type":"post","link":"https:\/\/www.caskeys.com\/dc\/565\/","title":{"rendered":"Runtime Grapple Editor"},"content":{"rendered":"<p><strong><span style=\"color: #ff0000;\">Please note: The scripts in this post are depreciated and no longer supported. My grapple functionality is now handled by the <a href=\"https:\/\/github.com\/DCurrent\/openbor-script-elmers\">DC Elmers<\/a> library.<\/span><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"http:\/\/caskeys.com\/arc\/games\/openbor\/wiki\/images\/b\/b6\/Ani_andy_throw_0002.gif\" alt=\"\" width=\"125\" height=\"125\" \/>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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" title=\"Throw Example 1\" src=\"http:\/\/caskeys.com\/arc\/games\/openbor\/wiki\/images\/2\/21\/Ani_andy_throw_0003.gif\" alt=\"Throw Example 1\" width=\"188\" height=\"124\" \/><\/p>\n<p>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&#8217;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:<\/p>\n<ul>\n<li><strong>ESC + UP\/DOWN<\/strong>: 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.<\/li>\n<li><strong>Jump<\/strong>\n<ul>\n<li><strong>Left\/Right:<\/strong> Bind mode. Several types of binds are available to deal with various grapple maneuvers.\n<ul>\n<li><strong>0:<\/strong> Standard &#8211; Defender is bound to Attacker by an adjustable X\/Y\/Z offset.<\/li>\n<li><strong>1:<\/strong> Standard w\/Auto Height &#8211; Same as one, but Y offset is automatically adjusted to reflect difference between Attacker and Defender&#8217;s height.<\/li>\n<li><strong>2-4:<\/strong> Not used as of 2011_04_22.<\/li>\n<li><strong>5:<\/strong> Reverse &#8211; Attacker is bound to Defender by an adjustable X\/Y\/Z offset.<\/li>\n<li><strong>6:<\/strong> Reverse w\/Auto Height &#8211; Same as 5, but Y offset is automatically adjusted to reflect difference between Attacker and Defender&#8217;s height.<\/li>\n<li><strong>7:<\/strong> Reverse w\/Auto Height Float &#8211; Same as 6 with a <em>tosstime<\/em> addition to prevent premature <em>landframe<\/em> activation.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Attack<\/strong>\n<ul>\n<li><strong>Left\/Right:<\/strong> Toggles bind indexes. The throwing system allows for multiple opponents to be grappled at once, with each identified by an index.<\/li>\n<li><strong>Up\/Down:<\/strong> Toggles defender&#8217;s frames. Each character has a single identical animation with each frame representing one of its standardized &#8220;thrown&#8221; poses.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Attack2<\/strong>\n<ul>\n<li><strong> Left\/Right:<\/strong> X (horizontal) binding offset.<\/li>\n<li><strong>Up\/Down:<\/strong> Y (vertical) binding offset.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Attack3<\/strong>\n<ul>\n<li><strong> Left\/Right:<\/strong> Direction binding.<\/li>\n<li><strong>Up\/Down:<\/strong> Z (lateral) binding offset.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Attack 4<\/strong>\n<ul>\n<li><strong>Left\/Right:<\/strong> Attacker&#8217;s frame.<\/li>\n<li><strong>Up\/Down:<\/strong> Toggle &#8220;Rebind&#8221;. If off, the animation&#8217;s current binding (if any) won&#8217;t be overridden by debug version so comparisons can be made.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Special:<\/strong> Prints completed function call to log, ready for copy\/paste into grappling animation.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright\" src=\"http:\/\/caskeys.com\/arc\/games\/openbor\/wiki\/images\/0\/09\/Ani_andy_throw_0001.gif\" alt=\"\" width=\"119\" height=\"97\" \/>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.<\/p>\n<p><strong>Code Samples:<\/strong><\/p>\n<ul>\n<li><a title=\"bind0010\" href=\"https:\/\/www.caskeys.com\/dc\/?p=1314#bind0010\">bind0010<\/a><\/li>\n<li><a title=\"debu0001\" href=\"https:\/\/www.caskeys.com\/dc\/?p=1314#debu0001\">debu0001<\/a><\/li>\n<\/ul>\n<div class=\"jetpack-video-wrapper\"><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/QHOBzuCbC8w?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A debug system to create grapple sequences in a WYSIWYG style.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[71],"tags":[232],"class_list":["post-565","post","type-post","status-publish","format-standard","hentry","category-technology-temerity","tag-applications-openbor"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s5lNM5-565","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/comments?post=565"}],"version-history":[{"count":30,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/posts\/565\/revisions"}],"predecessor-version":[{"id":6900,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/posts\/565\/revisions\/6900"}],"wp:attachment":[{"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/media?parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/categories?post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caskeys.com\/dc\/wp-json\/wp\/v2\/tags?post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}