· 6 years ago · Dec 25, 2019, 02:20 AM
1# Major Changes:
2
3* **The Sprite Object**
4 + Added a basic masking system through `sprite.Mask`, which forcefully masks or cookie-cuts a sprite's children based on one of 5 different modes
5 + Added* a third argument to `CreateSprite` for the purposes of choosing a sorted position in the given sprite layer
6* **The Player**
7 + Added* the Game Event `BeforeDeath()`, which executes just as the Player is being killed, and allows you to execute code on the Player's death and even prevent the Game Over sequence from starting
8 + `Player.SetAttackAnim` now can take a third argument, in the same manner as `sprite.SetAnimation` (contributed by deonix)
9 * Made `Player.maxhp` settable for ease of access compared to using `Player.SetMaxHPShift`
10* **The Input Object**
11 + Added `Input.MouseScroll`, which allows you to track the scroll wheel movement supplied by the user's mouse or trackpad
12* **The Text Object**
13 * `Text.xscale`/`Text.yscale`/`Text.Scale` now functions the same at ANY time, compared to v0.6.3!
14 * `Text.SkipLine()` now takes `playerskipdocommand` into account
15* **File Manipulation**
16 + Added `Misc.DirExists`, `Misc.CreateDir`, `Misc.MoveDir` and `Misc.RemoveDir` to the Misc object for folder manipulation
17 + Added function `File.Move` to the File object (contributed by deonix)
18 + Added `File.Copy` for copying files!
19 + Added `File.filePath` to get the full path to the opened file on the user's computer!
20 + The File Object can now have the "b" attribute in its mode, which fetches a file's bytes rather than characters, and lets you read from and write to files with bytes and specific encodings
21 + Added the property `file.encoding`, which lets you choose the file encoding method used to read from and write to files in byte mode
22* **The Misc. Object**
23 + Added `Misc.MonitorWidth` and `Misc.MonitorHeight`, which always return the size of the user's monitor regardless of settings or fullscreen status
24 + Added `Misc.SetWideFullscreen`, which removes the left and right black pillars when in fullscreen if the player's aspect ratio is wider than 4:3. Can only be used in battles, and resolution resets on battle end.
25* **The Audio and NewAudio Objects**
26 * Changed several Audio-related functions: they no longer display a warning if an audio file could not be loaded; instead, they return a boolean representing if the file was successfully loaded or not (meaning you can now test for if given audio files exist!)
27 * `Audio.LoadFile`
28 * `Audio.PlaySound`
29 * `NewAudio.PlayMusic`
30 * `NewAudio.PlaySound`
31 * `NewAudio.PlayVoice`
32 * Added a second argument to `NewAudio.GetAudioName` which lets you get the actual name you'd enter into PlaySound/LoadFile and such, without the prefix
33* **The Script Object**
34 * Added* `Script.scriptname` to the script object, for getting the name of a script object's source lua file
35* **Misc. Functions**
36 * `SetAction` now has an extra use while in the state `ACTIONSELECT`: manually moving the Player onto the 4 different buttons
37* **Monster Scripts**
38 + Added a special variable `dialogueprefix` to monster scripts, which can be used to prefix text to the beginning of all monster dialogue. Especially useful for text effects (contributed by deonix)
39 + Added `defensemisstext` and `noattackmisstext`, which when set, will change the damage text displayed when dealing no damage to the enemy and not pressing Z to attack the enemy, respectively (contributed by Shiftenas)
40* **Text Commands**
41 + Added* `[texteffect:x,intensity]`, which allows for multiple different text effects in the same line of text
42 + Added* `[mugshot:x]` for use in the Overworld
43 + You may now use `[charspacing:default]` to reset a text manager's character spacing to its original value
44* **The Engine**
45 * In the Lua folder, you now only require an "Encounters" folder to load your mod
46 * Error messages are now automatically formatted to be more friendly to new users, pointing out which numbers are line numbers and which indicate characters on a line
47 * If your encounter text or battle dialog would go to 4 lines or longer, then the text will now move slightly upwards to compensate
48 * The disclaimer screen will from now on always say the current version of CYF
49* **The Overworld**
50 * Cleaned up and organized the Overworld. It's now in its best state ever since CYF's creation!
51 * You no longer have to restart CYF completely when you get an error in the overworld! Pressing Escape will take you back to the initial disclaimer screen.
52 * Changed the way you access a certain secret so you no longer have to edit code to reach it
53 + Added the utility functions `Event.Exists`, `Event.GetSpeed`, `Event.isMoving` and `Event.isRotating`
54 + Added `General.EndDialog`, which can be used from parallel process event functions to forcefully close the dialog box at any time
55 + Added `Player.ResetMaxHP()` which resets the player's max hp to what it would be based on their LV
56 + You can use a second argument in `General.EnterShop()` to skip the fading screen transition
57 * The second argument for `General.SetBattle` has been changed to a string. Use it to make the battle start animation play out normally, play out fast like Undyne's sequence in Undertale, or enter the battle instantly with no transition!
58 + You can use an argument* in `General.Save()` to instantly save the game without the player's knowledge
59 + Added support for `playerskipdocommand` in both Event scripts and shop scripts
60 * Made CreateSprite, CreateText and CreateLayer all usable in the Overworld, exactly the same as in battles
61 * `Misc.ResetCamera()` resets the camera to the player's position in the Overworld instead of moving the camera to (0, 0)
62 + The game now keeps track of your play time in the overworld instead of always saying 0:00
63 * Retrocompatibility mode now gets forcefully disabled whenever you enter the Overworld, to keep things compatible
64 * Added a more descriptive and helpful save file tester for CYF
65 * If you have an incompatible Overworld save, you can now press "R" on the error screen to remove the save file without needing to remove it manually
66 * Shops
67 + You can now set items to be marked as "SOLD OUT" after buying - there's an example of this in Examples 2/Lua/Shops/Dummy.lua.
68 + You can now mark items as unsellable in the engine's internal item database by setting their sell price to 0.
69 * Changed the way `FailSell` works, because it now has 2 error cases, not just one.
70 * Made shops play the proper sound effects that play in Undertale for buying, selling, and failing to sell items.
71* **The Documentation**
72 * Added a new feature indicator that will appear when something has changed since the last version of CYF
73 * Removed the "Create Your Frisk's new features" section and moved the items inside of it to more fitting sections
74 * Replaced the "Wave scripts" page with "The Arena Object", and moved its singular function and variable to "Misc. Functions" and "Special Variables" where they belong
75
76*(These features were already in the engine, but undocumented)
77
78***
79
80# Removed Stinkies (bug fixes and minor improvements):
81
82<details>
83 <summary>Click to expand!</summary>
84
85 * **Engine**
86 * Fix missing Lua folders causing the Error scene to be disabled completely
87 * Fixed a bug where entering fullscreen with a non-widescreen resolution (such as a square or portrait resolution) would incorrectly cut off the left and right sides of the screen
88 * All textures now have mipmapping disabled. Up to now, sprites scaled down certain amounts would start to display with much less detail because of this
89 * Fixed the famous "fullscreen bug", where upon entering blurless fullscreen, the player was able to see past the intended 640x480 area if they entered fullscreen at the exact same time as loading a mod. This behavior got moved to the new function `Misc.SetWideFullscreen`
90 * Fixed the FPS counter becoming desynced from the debugger so at least one of the two would always be visible in some cases
91 * **Audio and Sounds**
92 * Fixed a bug causing a + character anywhere in the full path to a mod's Audio or Sound files preventing said files from loading
93 * Fixed a bug where loading a song using `NewAudio.PlayMusic` with `loop` as `false` would force the song to not loop whenever played with `Audio.LoadFile`
94 * **Special Variables**
95 * Fixed a bug where the variable `waves` will be set to an empty table on encounter start and after a wave ends, and `Wave` is nil at encounter start. The intended behavior is that the variable `Wave` should be set to an empty table in these events, rather than `waves`.
96 * **Sprites**
97 * Fixed `sprite.Dust` forcing sprite objects to move to (0.5, 0.5) pivot
98 * **Bubbles**
99 * Changed the `<wideness>` tag in Speech Bubbles to `<width>` for clarity (but bubbles with only `<wideness>` set will still work the same)
100 * Fixed Text Object speech bubbles having less width than the entered maximum text width
101 * Fixed Text Object speech bubble tails having reversed directions when entering a number as opposed to a percentage
102 * Fixed Text Object speech bubble tails having a 10-pixel offset on any given side
103 * Fixed being unable to override the engine's dialogue bubbles in a mod in the same way you usually do for Default sprites
104 * **Functions & Events**
105 * `OnHit` and `Update` no longer execute in the reverse order as they did in v0.6.3
106 * No more error message when using `CreateLayer` if a sprite layer already exists
107 * Fixed calling `State` in `DefenseEnding` causing the new state to be entered twice
108 * Fix ability to enter "ACTMENU" with empty command list through `State` (contributed by deonix)
109 * Fixed errors in `WaveEnding` not providing a script name
110 * **The Player Object**
111 * Fixed `Player.SetMaxHPShift` behaving oddly towards the player's regular (yellow) hp
112 * Fixed a bug where reviving the player through `BeforeDeath` cancels invincibility frames they would have received
113 * Fixed a bug where setting the Player's hp to 0 or less in `BeforeDeath` would remove the player
114 * **Text Managers** (encounter text, battle dialogue, enemy speech bubbles, text objects and overworld dialogue)
115 * Fixed a bug where the second column of the ACT and ITEM menu had its x position altered by Misc object properties that move the camera
116 * Fixed using `State` with some states immediately in `EncounterStarting` sometimes leading to huge errors because the battle text manager didn't have a font set yet
117 * Fixed text effects in `BattleDialog` and `encountertext` persisting into other game states
118 * Fixed an infinite loop when placing a single `[` at the end of any Text Object's text
119 * Fixed a lot of issues with the "autolinebreak" system:
120 * Text managers no longer allow 1 character past their width limit in certain conditions
121 * Fixed an inconsistency where automatic line breaks would move an extra character down to the new line when it wasn't actually going past the width limit
122 * Fixed multiple infinite loops possible through passing very long words or lines to various text managers
123 * **Text Commands**
124 * Fixed a compatibility problem where `[waitall:0]` worked in Unitale but froze text completely in CYF
125 * Fixed a bug where using `[health:kill]` from BattleDialog would move the battle TextManager to a different scene entirely and have it be invisibly typing and producing sounds even in the mod selection screen
126 * Fixed an engine freeze when trying to skip text with certain arrangements of commands at the end
127 * Fixed `[lettereffect:shake]` not returning letters to their starting positions after each frame, causing them to fly away infinitely
128 * **Text Objects**
129 * Fixed a bug where giving a text object a sequence such as `{"[instant]ONE", "[instant]TWO", "[instant]THREE"}` would always instantly delete the text object when going to the next line
130 * Fixed a bug where using `SetFont` before `SetText` would ignore the `SetFont` call
131 * Fixed a bug where using `[func:x]` to call `SetPause` on a text object would still show the next character, regardless of speed
132 * `Text.SkipLine()` now takes `playerskipdocommand` into account
133 * **The Misc. Object**
134 * Fixed a bug where, when ending a battle with a displaced camera, for 1 frame the camera will move back to (0, 0) which can cause unwanted graphical behavior
135 * **The Overworld**
136 * Fixed error messages in the Overworld for good!
137 * Removed, edited and formatted some Overworld player names
138 * Even though `CreateSprite` was said to be added to the Overworld in CYF v0.6.3, it actually wasn't. So it's been added. For real this time. ಠ_ಠ
139 * Even though `CreateText` was added to the Overworld, it created the text object in a completely different scene than it was supposed to, so it was never seen anyway. This has been fixed, too.
140 * Fixed the player's speed getting set to 2/3rds of the intended speed whenever using the character selector
141 * Fixed the pivots of shared sprites between Overworld scenes and encounters being different depending on which occurence was seen first
142 * Fixed `General.Save()`'s undocumented boolean argument freezing code execution if used
143 * Fixed auto-interacting with events on the same frame as closing a text box opened from the menu (such as the cell phone text)
144 * Fixed SetDialog recognizing a Z press the same frame you start an event, which could combine with [instant] to skip a line immediately
145 * Fixed being able to press Z to activate confirm events during map transitions and during the fade in while loading your save
146 * Fixed a frame-perfect softlock if you open the menu the frame after closing it
147 * Fixed the overworld text manager always keeping the last effect applied through `[effect:x]`. Now it resets automatically whenever using your menu, calling `General.SetDialog`, and calling `General.SetChoice`
148 * Fixed `General.SetChoice` changing the overworld text manager's character spacing even after the choice dialogue has ended
149 * Fixed soul in menu sometimes becoming black
150 * Fixed invalid face sprites in SetDialog not showing an error
151 * Fixed face sprites in the Overworld not resetting between lines of text
152 * Fixed the Overworld camera always being 0.5 pixels off of where it should be vertically on big maps
153 * Attached Debugger to Overworld camera when using `Misc.cameraX`, `Misc.cameraY` and related functions
154 * Fixed the Overworld game over text being at the wrong height
155 * Fixed `General.GameOver` behaving strangely with no arguments
156 * Fixed `Player.SetHP(0)` erroring instead of triggering game over
157 * Fixed `Player.GetMaxHP()` returning only the max hp offset instead of the player's total max hp
158 * Fixed `Player.SetMaxHP()` being able to push the player into negative hp
159 * Fixed the player's EXP resetting to their LV's minimum required EXP upon exiting a battle to the Overworld
160 * Fixed the player's Max HP resetting to their LV's default Max HP when exiting a battle to the Overworld
161 * Events can now only have one of each type of C# coroutine active, per type of coroutine. You can have both MoveToPoint and Rotate active at the same time, for instance, but only one of each at a time per event object that gets moved/rotated.
162 * Fixed `Event.Rotate` always assuming its argument `waitEnd` was set to true, even if it was set to false
163 * Fixed events moving different distances based on your frame rate which could lead to them getting stuck in walls and the player.
164 * Fixed Event objects only being able to execute one "auto" page per event
165 * Fixed an invisible buildup of game objects every time you open the box UI
166 * Un-blurred many things, including the item box menu background, most maps and overworld sprites, and "press z or enter"
167 * Fixed errors involving NewAudio channels in the overworld
168 * **Shops**
169 * Fixed the Shop scene's music sometimes starting at the play time of the Overworld music
170 * Fixed shops always displaying the Talk text for option 1, regardless of which option you pick
171 * Fixed shops not having a debugger and, as such, making your FPS display stuck on screen if you press F9, and making `DEBUG` useless in Shops
172 * Fixed Text Objects appearing in the wrong scene when created in Shops
173 * Fixed being able to press C for an error message and weird behavior while exiting the shop
174 * Fixed being able to mash Z during the fade-out transition to stack up lots of screen transition objects
175 * **MoonSharp** (Advanced Lua users only)
176 * Fixed the second argument in `error(message, level)` being completely ignored. (ixjf on GitHub: [One](https://github.com/moonsharp-devs/moonsharp/pull/247), [Two](https://github.com/ixjf/moonsharp/tree/fix-callstack), [Three](https://github.com/ixjf/moonsharp/tree/implement-lua-error))
177 * Fixed a bug where using `debug.getinfo(n, "l")` - where `n` is any number - would still only return the line number as if `n` was 1
178 * After 3 years, error messages now properly display the name of the erroring file instead of `chunk_2`
179 * Fixed `debug.getinfo(..., "S")` not retrieving the name of the source. It can now properly retrieve the name of the current lua file
180 * Fixed a bug where some `string` library functions would match all characters that have the same lower byte as the character you are trying to match. ([masaedw on GitHub](https://github.com/moonsharp-devs/moonsharp/pull/184))
181</details>