BACKPORT#
A very helpful community member named Alrysc helped back-port awaited 2.5 features into the older 2.0 engine.
He did this so that everyone can enjoy new content sooner and iron out innaccuracies in PVP.
This effort, dubbed "the backport" was unplanned and volunteered by him because he is very cool.
Because he was also helpful, he was brought into the official team for 2.5 to work on the C++ codebase.
2.1 CHANGELOG#
Hit.Flinchis now allowed to queue withHit.Drag, so you will flinch when hit byHit.Dragif you don't have armor/DefenseRule-s.Hit.StunandHit.Freezereplace each other instead of allowing you to be stunned and frozen at the same time.- Grass heal works properly.
- Fixed an issue where you could skip the battle start text when form changing if any Player took weakness damage since the last transform state.
- Fixed TFC softlock if you did TFC on the last possible frame.
-
Breaking change:
Player.charged_time_table_funcwas renamed toPlayer.charge_time_func, and now takes Player (self) and the Charge level as input.Note
You will not get errors if you don't fix this, but it will not work as expected!
-
Breaking change:
PlayerForm.calculate_charge_time_funcwas renamed toPlayerForm.charge_time_func, and now takes Player (self) and the Charge level as input, so it works the same as the Player's version.Caution
This will make the mod unnusable if you don't fix this.
-
Fixed mistake on
Player.charge_time_func. - Added
Entity.is_draggedso you can check if you're currently under the effects of Drag, which prevents all action. - Fixed
Entity.can_attack. - Drag now returns false for
is_movingandis_slidingafter movement ends for the rest of the duration of Drag. - Added Confuse status, which lasts for 110 frames when applied. You can access with
Hit.Confuse.- Added
Entity.is_confusedso you can check if you are under the effects on Confusion. - Enemies may want to use this to choose different logic. Kirby summarizes how enemies tend to react to Confuse in later games.
- Added
- TimeFreeze attacks don't-counter hit anymore.
- Turns now last 512 frames by default (~8.5 seconds vs. old 10 seconds).
Battle.get_turn_count, which returns the current turn number.0.0initially, then increases by1.0every Battle Start banner.Battle.get_cust_gauge_value, which returns a double ranging from0.0to1.0, as a percentage of the Cust gauge (or maybe it can go over1.0, but1.0is full. I'll update this text later once I check.).Battle.get_cust_gauge_time, which returns a number in frames for the current gauge time (e.g.256.0when gauge is half full with default duration).Battle.get_cust_gauge_max_time, which returns a number in frames for the current max gauge time (e.g.512.0for default time).Battle.get_default_cust_gauge_max_time, which returns the default gauge time,512.0frames.Battle.set_cust_gauge_time, takes in a frametime (likeframes(256)) to set current gauge time to.Battle.set_cust_gauge_max_time, takes in frametime to set max time to (current time is automatically readjusted to match the percentage of total time it had before, e.g. max time 512 and current time 256 will have current time 100 if you set max time to 200).Battle.reset_cust_gauge_to_default, sets max time to default time.- Added secondary element to HitProps, called
element2. You can access withprops.element2. - Form change resets emotion.
- The old HitProps constructor is deprecated! But it exists for now. In the future and now, you can create a HitProps with
HitProps.new()orHitProps.new(context). Then you use a series of functions (builder design pattern) to customize. - Fixes duplicate name that made it impossible to read a HitProps Drag. The function drag is now
drg. - Obstacles cannot become blind or confused.
- The player session tracks BugFrags, and then can be set (and rewarded with battle rewards) from the server.
- Fixed a crash related to leaving the server in recent builds
- Obstacles are now deleted immediately when hitting 0 health, rather than waiting for their next update like all other Entities.
- Unfinished
Battle.UIComponentis included, but does not yet support layering. - Low health beep is back, but plays at slightly wrong times. To be fixed later.
- Because the timing of battle results signals has changed, liberations may react sooner than expected.
- Opacity is set correctly by the server for drawn sprites.
- Hiding the HUD will no longer allow you to open an invisible menu.
- Pressing Start will still interrupt other inputs. For example, moving and pressing Start will stop moving for a frame.
- Instead of saying "No Data", results will say "Pending" in the text box if the server indicated a card would be received but had not finished installing.
- Fixed a crash when editing folder.
- UIComponents now respond to layering and can be drawn over the Cust gauge at certain layers.
- UI component draw fixes when perspective flipping.
mob:no_results()skips showing battle results, but results still go to servers (for tourney style battles).- Battle results
runis now replaced withreasonon the server.win- when the battle is over b/c the player wonlose- when the battle is over b/c the player lostdraw- when the battle is over but the match was a drawrunaway- " " b/c the player requested to run awaydebugesc- " " b/c the user player aborted (panic)
- The engine now responds to a unique heuristic: if the user presses
ESCthree times in a row within a second, the scenes can respond to a user panic operation. This trigger aborts the battle scene and the overworld online scene. This is useful if you get stuck and replaces the debugESCbehavior entirely.- 2 scenes now implement this: battle + overworld online. Performing this operation will return you to the previous scene.
-
Custom battle hit SFX. This makes the engine more accurate in behavior.
Entity:set_hurt_sfx(audio)changes the entity hurt sfx.Entity:use_default_hurt_sfx(bool)toggles whether to use the default hurt sfx from before.DefenseFrameStateJudge:set_hit_sfx(audio)changes the final sfx to play. Adopts the victim entity's hurt sfx if one is provided.DefenseFrameStateJudge:hit_spawn_gfx(bool)adds a hint to the defense frame state judge whether or not to spawn a hit graphic effect.DefenseFrameStateJudge:hint_spawn_gfx()- used in hitbox attack + collision func to read if the entity should obey the hint to spawn image graphics or not.- Additionally, attack and collision callbacks now receive an optional last parameter
judgeobject so you can read this hint and respond to it.
Tip
For those who care about mod accuracy, custom sfx during combat resolution is a must. For most people, this means you don't have to provide hit sounds in most of your mods anymore, or handle playing them.
-
Hit.cancelis automatically added toHit.stun,Hit.freeze,Hit.flinch, andHit.drag. - You can add a callback event to react to this.
Hit.cancelcan be erased by defense rules.- The purpose of this flag is to cancel a chip or interrupt an enemy.
- This behavior used to be applied to everything that used a
CardActionfor attacking or behavior, but was inconsistent with the games. So now it's still "automatic" but you can opt-out of this behavior. - For example: when viruses are stunned, they do not have their action interrupted. They continue after un-stun. However, bosses do handle interrupts.
- Side effects: if you are dragged and remove
Hit.cancel, it's now possible to move mid-action. This may or may not be what you want, if it happens. Just handle this case. - TL;DR if you're programming a virus, use virus body defense rule or remove
Hit.cancelin the defense rule step. This assumes you're usingCardAction-s for behaviors (correct).
- This behavior used to be applied to everything that used a
- FullSynchro is no longer removed accidentally in places where it shouldn't be (when
DefenseOrder.Alwaysblocked the attack, or when anybody using aCardAction). ActionOrder.Immediatenow causes the last action added to go first, so queuing multiple actions withActionOrder.Immediatewill have reversed order now (FILO aka stack).- Losing in PvE battles can no longer end in a
draw. Eitherwinorlose(with the exception ofuserAbort). - The fade time after battle was changed, for people who noticed it was different last build. The results widget now stays around while fading out. This is like the games.
- New title screen. May be the final title screen depending on if we get custom art by the time public release happens.
bg_blue.png->bg.png- added
vnum.pngwhich you can customize but the location is pre-coded.
- Servers can play the email ring.
- Servers can provide card mod assets and cause them to load on the client.
-
Servers can send battle rewards, which display in battle for real!
- There can be multiple rewards sent at the same time.
-
Servers can tell the client to draw sprites on the screen in the overworld.
-
Servers can toggle the HUD between health and PET.
Note
the PET and face shown are currently just the ones in the resource folder, but they may read from the mod in the future.
- New API endpoints for:
- Battle rewards
- Toggling HUD
- Sending emails
- Ringing PET
- Drawing sprites on screen
- Server sprites are drawn in an optimized manner for potentially hundreds of sprites over the network.
mob:no_results()skips results presentation for tourney-style battles- Asset type and package type hints (optional) when providing assets to your users (makes chip rewards work)
- For the sprite API, the
achannel is now an alternative name foropacitychannel. - Sprite API supports
color_modeandrgbchannels. - James released "Stardust" - a simple particle system plugin for ONB servers.
- Stardust API updated to support rgb color channels
- Added
enums.luato the server libs to start documenting enum values. - Added
Net.virtual_input(event={player_id, events={{name, state}})for the server to handle input.
Note
Be sure to lock the player's client-side input first!
- New API endpoints for:
-
Server-side sprite anims loop now like they were supposed to.
-
When providing assets, you can now give an optional asset type and mod type on the server-side.
Tip
This helps resolve chips for giving them as rewards in battle.