Title: Extra details on Mawootad's codes from Brawl Minus Post by: Smash Boy on July 26, 2017, 07:50:45 PM For references, read this post by KingJigglyPuff regarding on the topic: http://forums.kc-mm.com/index.php?topic=75336.0 (http://forums.kc-mm.com/index.php?topic=75336.0)
What I'll do here is elaborate on extra details that was not clarified nor pointed out in the above thread. I personally DM'ed Mawootad for numerous insights and the information below is a collection of knowledge during our discussion regarding his codes. I also talked to KingJigglyPuff himself regarding some of the codes so I'll include his insights as well. Independent Subroutines So as per the thread above, these are just subroutines that are not affected by any action changes. The following line of coding should always be placed in Wait1 (doesn't matter which tab, but usually Mains and Other are ideal): Code: If Thread is Null: *Thread ID in Hex* Now for the format of the independent subroutine itself. Usually, for regular subroutines, you had to insert a Set Loop X iterations and the rest of your personal coding for stuff like graphic effects or hitboxes, that's not necessary with independent subroutines. All you need is a Synchronous Timer and a Goto command at the end of the coding, since the independent subroutine does the looping for you. Let's say, you want to give Zero Suit Samus a buff move when she down taunts. That and have it run for a limited time, well in her down taunt, you would set this code (in any frame): Code: If Compare: LA-Float[70]<=0 Code: If Compare: LA-Float[70]>0 In the subroutine, you can set this standard coding: Code: If Compare: LA-Float[70]>0 This is the coding for the countdown of the timer after she down taunted. Or, if you want to differentiate between default and buffed ZSS easily, simply add an External Graphic Effect from the common GFX file in the subroutine and with your desired number of frames. You'll need to set the anchor to False if you want the GFX to last throughout the timer. I'll use six frames per second as an example: Code: If Compare: LA-Float[70]>0 What this does is, as the buff is set, and the timer runs, the graphic effect lingers for six frames. The number of frames you want the graphic to run should be equal to the total amount of Float Variable subtractions. As the timer needs to countdown per each frame the graphic lingers. One last thing, set this line of coding in your character's wait1 in the Main tab: Code: Set Loop Infinite So that's basically pretty much it for independent subroutines in itself. Limited Specials Here comes the meat. According to the thread regarding these codes, the 2718XXYY is in binary format DDUUSSNN, D for down specials, U for up specials and you get the idea. Mawootad gave me a simple method to translate that to the hex format, basically, this is the mathematical formula: 4 x (4 x (4 x down specials+up specials)+side specials)+neutral specials However, I myself realized this gives ambiguous results if you want to give, for example either 2 side specials or 2 down specials alone, instead, you can use this method (which is exactly how it was done for hitbox flags): Code: Enter [b]2718[/b] in your calculator as Hex. Then convert to binary. Copy that format. Press [i]CE[/i] to reset to 0. Then in binary format, paste the binary you copied previously, and with the format DDUUSSNN in mind, Now for ways to use this code: Just the limits If you only want purely the Limitations, simply add Code: Basic Variable Set: LA-Basic[71]=2718XXYY Cooldowns This was the part I had to deal a lot with Mawootad. I personally did not have successful results with the example he provided in the linked thread, however, he did guide me to another way, a few ones actually that we discussed together, so I'll share the formats below *I'll use [70 as an example]: Code: In your specials set NOTE: Usually, you'd set XX=YY, but that depends how fast the character's special behaves or how it's coded in the Actions. Though XX and YY are usually the same because you'd want the max number to equal the currently available, but thing is, the code reads as soon as you perform the special to begin with, so that's one down already, so in practice, you'd set YY<XX by one unit. If you only want specials limited to one use only, XX and YY should be the same, and the variable counts those uses down. In Water resets Mawootad filled me in on the case if the character lands in water and in swimming action, this case is coded inside the subroutine the following manner: Code: If Is in Water Code: If Is in Water Hitstun Mawootad also filled me in on this and you use a comparison statement to check if LA-Basic[56]>0, then set the Basic Variable. If you want to refresh when damaged, set it to 2718XXYY, if you don't, then 2718XX00 works or simply set the Basic Variable[71]=0 (value). All cases You simply combine all the commands. The case of in water and hitstun should be separate and above the cooldown coding. And that's it for limited specials. On-The-Fly-Attributes This was personally my hardest code to deal with Mawootad, but after discussions, basically, the code uses variables from 3000-3116; and you count the Attributes down excluding the asterisked ones in the Attribute table of your character's PSA. Starting from 0. So, say, you want to change your character's Ground Friction, you use IC-Basic [3] (it can be any variable, but IC Basic is the default and easiest to use here). Now, discussing with Mawootad, the guy advises to stick with the Attribute Range Set command over the others. Reason is, as I tested, was that if the characters' attributes are modified with arithmetic factors (add, subtract, multiply, divide), it will be risky and might cause the character to either glitch the screen graphically or freeze the game. So automatically setting the value with the Attribute Range Set is the safest route to take. Another reason is the Attribute Range Divide. Depending on the attribute and what value it has, dividing it's risky and especially if you multiply by, say, 3 and then in another frame, divide by same said number. So again, it is recommended you stick with command 12200200 (Attribute Range Set) if your attribute values are sufficiently greater than the default ones. If you want to use the others, I would recommend to use very small numbers, and in the Attribute Range Divide's case; greater numbers. These variables can be set anywhere, you can even set it in ZSS's up taunt, and everytime she up taunts, her attributes changes until she is KO'ed or dies. NOTE: If you want to do timers with Independent Subroutines in conjunction with the On The Fly Attributes, apparently it won't work since the code was made to automatically reset upon death. I haven't personally figured out how to get it working around that still. When I do and discuss it with Mawootad I'll update the thread with some examples how. And that's pretty much all there is to share about Mawootad's codes. Codes are in the linked thread above along with some initial insights by Mawootad and KJP. Any questions or doubts, feel free to message Mawootad himself or KJP. ~Credits: KingJigglyPuff (for the insight on the independent subroutines, and the coding to check if character has respawned as well as graphic effect PSA coding) Mawootad (for his amazing codes and for insight on the limited specials and the On The Fly Attributes and guiding me on the information gathered to make this thread possible) *This thread will be updated if any errors need correction or additional information is in need to be implemented to this thread provided by either KJP or Mawootad himself. |