Title: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: KingJigglypuff on November 01, 2015, 07:57:48 PM From Brawl Minus comes entirely new PSA commands! This was all done from Mawootad from the Brawl Minus Dev Team.
These new commands allow you to limit aerial Specials, have a Sub Routine that lasts outside the Action it was activated in, and changing Character Attributes on the fly. Code: Limited Specials [Mawootad] Code: Independent Subroutines [Mawootad] Code: On the Fly Attribute Modification (Item Crash Fix) [codes, Mawootad] This thread will be updated with more info, as Mawootad still needs to write down documentation on it (and I'm still asking him things). Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: Large Leader on November 01, 2015, 08:01:23 PM This is so hype.
But maybe too little too late v: Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: Mawootad on November 01, 2015, 09:01:39 PM Hey, just wanted to provide some technical info and usage tips for these codes. First off for independent subroutines, the currently available specials (last byte of the basic) are set to the max available specials whenever the fighter becomes grounded (grabs a ledge or physically makes contact with the ground and are decremented each time the corresponding special is used. When a given group of bits becomes 0 and it has a max number of specials set that special cannot be activated. This has a couple of important things to note: 1) if you have a special that changes to itself (specifically to the first 11X action) for some reason it will consume multiple uses of the special and potentially fail to work properly, 2) if the user becomes grounded during the special they will recover all uses (many DO NOT become grounded even when they touch the ground), and 3) if the user uses the special and remains grounded for the entire move the special's uses will be consumed and will not refresh until the user jumps or lands. The specials also do not refresh on taking damage, as this is not always intended behavior and refreshing on taking damage is fairly easy to implement. Create a subroutine setting LA-Basic[71] to the value of your choice and copy past that subroutine call to wait1, squat, swim, and if you want refresh on damage all of the damage and captureDamage subactions.
For the independent subroutines code threads 5-8 are generally safe to use (I think, 7 and 8 are safe on every fighter as far as I can tell). Thread 0 is the action thread, threads 1-4 are the subaction threads (main, gfx, sfx, and other tabs in PSA), thread 9 is the default concurrent infinite loop thread, thread A is the default independent subroutine thread. Articles and other non-fighter entities that run PSA commands do not necessarily have the same number of threads as fighters, and may not have any free threads. Also, the specific thread number does matter for some commands, flash overlay effects for instance behave differently when called from thread A. In terms of how to use independent subroutines, there are a couple of very nice general purpose uses. The first is for generating flashing effects for fully charged moves. The way that you'd implement one of these is something like: if flashing condition if thread is null: A independent subroutine: (Thread A): @flashing subroutine end if end if With the flashing subroutine of the form (this is actually how flashing effects are implemented in Brawl) Flash Overlay Effect: Color 1 Sync Wait: 1 frame Change Flash Overlay Color: Transition Time=4 Color 2 Sync Wait: 4 frames Terminate Flash Effect Synch Wait: 1 frame goto: @flashing subroutine The second general purpose method for independent subroutines is in conjunction with limited specials to create cooldowns for specials. This is implemented using two different threads, one of which runs once per character frame and one which runs once per actual frame. So if you wanted to give neutral special a 3 second cooldown starting from when it's activated you could put the following code in neutral special: Float variable set: LA-Float[255] = 180 Then in an independent subroutine in thread 8 you can run this code: if compare: LA-Float[255] > 0 Float variable subtract: LA-Float[255] - 1 End if Sync wait: 1 frame Goto start And in thread 7 run this code: If compare: LA-Float[255] > 0 Basic variable set: LA-Basic[71] = 27180100 else Basic variable set: LA-Basic[71] = 0 end if sync wait: .1 frames goto start This code turns on limited specials and sets neutral special to be limited and have no remaining uses whenever LA-Float[255] is non-zero. Because of how action changes are checked this very easily prevents neutral special from ever being activated when you don't want it to be. The final comment I'd like to make is to mention that attribute modification makes no attempts to limit the user to sane inputs. If you run Attribute Range Set: IC-Basic[10,000,000] = 0 the code will gladly attempt to 0 out the 5 kilobytes of memory you told it to zero out, probably crashing your game. At the same time, if you happen to know where some relevant piece of information occurs relative to the fighter's attribute table you may be able to use attribute modification to write to that value. Also, I suspect that the way attribute modification is written may remove certain safeguards on bad PSA commands, specifically 12 type commands with a subtype of 14-1F (commands which do not exist) may attempt to branch into random memory crashing the game. This is very easily avoidable though, since you shouldn't be using non-existent commands in the first place. Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: Mr. AI | Sluigi123 on February 06, 2016, 09:40:43 AM This is so hype. Still Super hype though!But maybe too little too late v: Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: Droid15.24.3 [DELTA] on March 05, 2016, 11:41:59 AM I never used Brawl Minus before so please excuse my question if it seems like the answer is obvious. Would I be able to have another action take place, be it a completely different move or a damage penalty (over exertion) for example?
Honestly, I have little experience when it comes to modding Brawl, I have messed with textures, attributes, and effects mostly. I haven't had the time to dive in and try out my ideas, assuming they would work. Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: KingJigglypuff on March 05, 2016, 03:04:13 PM You should have made a post in A/A Help, but to answer your question, if what you want is the character to go into a different Action upon spamming the same move over and over, then it can be possible. For damage reduction, there's already a mechanic in the game that stales the damage of moves if used over and over.
Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: LJSTAR on March 09, 2016, 02:47:40 PM Wait. "Character Attributes on the fly" ? Basically, making a character heavier and such on the fly, via PSA command instead of messing around with momentum ?
... This is beautiful. (and also, exactly what was needed for Shulk's PSA, lol) Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: KingJigglypuff on March 09, 2016, 03:00:10 PM That's correct.
Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: CaliKingz01 on March 23, 2016, 03:35:28 PM So question, would I need to use the GCT codes provided below or can I use subroutines and such in the PSA to actually edit the attributes? Need to know because I'm helping KTH and LJSTAR with the Shulk PSA which is coming along really nice I might say. :)
Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: KingJigglypuff on March 23, 2016, 04:17:03 PM You need to use the gct codes.
Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: JokerPTOH on March 22, 2017, 09:48:07 AM Does this code work with Project M?
Title: Re: Limited Specials, Independent Sub Routines, and On the Fly Attribute Switching Post by: KingJigglypuff on July 20, 2018, 01:33:31 PM This is gonna be a huge-ass necro, I know, but it's important.
Codes (also known as TheGag96) made a fix for the Attribute Modification code so it no longer breaks Rolling Crates, Lip's Stick, Springs, and Soccer Balls. The OP has been updated to use this fixed code. Does this code work with Project M? Yes. |