From 0eb27a6a271e2fd3d65c399d81793f7ce44b768d Mon Sep 17 00:00:00 2001 From: Son-Guhun <22954418+Son-Guhun@users.noreply.github.com> Date: Sun, 22 Dec 2019 19:59:14 -0300 Subject: [PATCH] Final changes for 1.4.0-beta1 - Updated .w3i - Removed debug messages - Unselectable blocker decorations now saved with selection type 3. - Added PreloadEnd speed improvement to size.txt preload files. - Made Return to original location ability functional for RectSaveLoader - Readded Ancient classification to Race Selector. --- CHANGELOG.md | 45 +++++++++++++++++++ release/table/unit.ini | 2 - release/table/w3i.ini | 8 ++-- .../06-Map System/09-System Cleanup Removal.j | 2 +- .../45-CommandsD Select No.j | 5 ++- release/trigger/28-Save System/15-SaveNLoad.j | 4 +- release/trigger/28-Save System/16-SaveIO.j | 6 +-- .../28-Save System/17-RectSaveLoader.j | 9 +++- 8 files changed, 66 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5875a9d..ee076e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,51 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - New units for an existing race can be added in a patch version. - New decorations for an existing deco builder can be added in a patch version. +## [v1.4.0] - YYYY-MM-DD + +### Added +- Save System improvements: + - Saves made with Rect Generators (-tsav, -dsav, -usav) will now spawn a special Rect Generator when loaded into the game. This Rect Generator can be used to move the save around, so it can be loaded anywhere on the map. + - If you want to automatically load a Rect save at its original location, use the **-req** instead of **-request**. +- New commands: + - **-usav:** This command can be used to save all your units inside of a Rect Generator, but not any unit outside of it.. + - **-compat:** This command must be used to load old saves (made between 1.2.1 and 1.3.0) instead of the -request command. +- Riderless Horses and Pack Horses now have a **Pick Up Rider** ability, allowing them to be ridden by a unit. +- New tip/hint for the **-count** command. +- Save Files now have integrity checks. If a file is missing or can not be read, the game will now warn the player. If a single unit's data is corrupted, the game will also warn the player. + +### Fixed +- Fixed an issue that caused unselectable non-decoration units to be loaded incorrectly. +- Fixed a crash that could occur when converting certain orc spellcasters into heroes. +- Fixed an issue that would cause Ancients to always face the defeault angle when loaded from a save. +- Strange behaviour of inverting a rect's size when making it smaller than minimum size has been removed. +- Fixed a crash that could occur when using Staff of Mimic. + +### Changed +- Changed commands: + - **-req:** This command is no longer used to load old saves. Instead, it is used to automatically load saves made with Rect Generators at their original position, instead of choosing a new position. +- Saves will now be located in the folder: **Documents\Warcraft III\CustomMapData\TLLoP\Saves** +- Ancients' rooted/unrooted status is now saved by the Save System. +- Neutral units are now also loaded as neutral units. +- Improved Rect Generator behaviour near map borders: + - Rect Generator lightning indicators will no longer behave strangely when near a map border. + - Rect Generator will now remember its old size when leaving a map border. + - You can now expand a Rect Generator when it is near a map border. +- Vastly improved loading performance: + - Saves will now load twice as fast (still testing) + - Loading will no longer cause frame losses for the requesting player. + - Improved performance when loading terrain. + - A message is now shown to the loading player when finished. +- Vastly improved saving perfomance: + - Players can now save the entire map's terrain and trees without causing the game to freeze for many seconds. +- When setting a save center while selecting a unit, a message will now pop up with the new coords. +- Added colored text to -count command. + +### Removed +- The external SaveNLoad program is no longer supported. Old saves from before 1.2.1 can no longer be loaded into the game, and must be converted in a version that supports both systems (1.2.1 to 1.3.5). +- All units that had been deprecated after version 1.3.0 have been removed from the game entirely. To load old saves that contained this unit, use a version up to 1.3.5. +- The map no longer uses the UnitEvent library. This may avoid crashes when removing a unit from the game. + ## [v1.3.5] - 2019-10-18 ### Added diff --git a/release/table/unit.ini b/release/table/unit.ini index 68cc85f..4bb6bb0 100644 --- a/release/table/unit.ini +++ b/release/table/unit.ini @@ -24969,8 +24969,6 @@ preventPlace = "" spd = 0 -- Categorization - Special special = 1 --- Unit Classification -type = "townhall" -- Ground Texture uberSplat = "" -- Upgrades Used diff --git a/release/table/w3i.ini b/release/table/w3i.ini index fad59dd..5fea233 100644 --- a/release/table/w3i.ini +++ b/release/table/w3i.ini @@ -1,8 +1,8 @@ [map] file_version = 25 -map_version = 9989 +map_version = 10462 we_version = 6060 -map_name = "Titan Land: LoP 1.3.5" +map_name = "Titan Land: LoP 1.4.0-beta1" author_name = "Guhun" map_desc = [=[ Titan Land map based on RoK and BotE. Inspiration received from KoT. @@ -63,9 +63,9 @@ Special thanks to: Mori, LichKing76, King_Katanova and Aillish. |c00ffff00Got suggestions? Join the discord:|r discord.gg/FDAMDBS -|c00ffcc001.3.5:|r New Games decorations, Decorations now use hotkeys. 2 new heroes. New -count command. Decorations will now float on water. Units can now be made unselectable. Improved Controller (see F9).]=] +|c00ffcc00beta1:|r Various improvements to saving & loading. Fixed loading of unselectable non-decorations. Removed deprecated units. New Mount/Ride ability for horses.]=] title = "|cff0000ffGuhun Presents|r" -subtitle = "|cffffffffTitan Land: Lands of Plenty 1.3.5|r" +subtitle = "|cffffffffTitan Land: Lands of Plenty 1.4.0-beta1|r" [prologue] path = "" diff --git a/release/trigger/06-Map System/09-System Cleanup Removal.j b/release/trigger/06-Map System/09-System Cleanup Removal.j index 1db36fe..eb7bfe0 100644 --- a/release/trigger/06-Map System/09-System Cleanup Removal.j +++ b/release/trigger/06-Map System/09-System Cleanup Removal.j @@ -12,7 +12,7 @@ library LoPCleanUpRemoval requires LoPCleanUpDeath, UnitEvents, optional Redefin function LoP_onRemoval takes integer userData returns nothing local unit whichUnit = udg_UDexUnits[userData] - call BJDebugMsg("OnRemove") + debug call BJDebugMsg("OnRemove") call UnitEvents.evalOnRemove(whichUnit) diff --git a/release/trigger/07-Player Commands/45-CommandsD Select No.j b/release/trigger/07-Player Commands/45-CommandsD Select No.j index 3dc77df..9987896 100644 --- a/release/trigger/07-Player Commands/45-CommandsD Select No.j +++ b/release/trigger/07-Player Commands/45-CommandsD Select No.j @@ -32,8 +32,8 @@ private function EnumFunc takes nothing returns nothing call DisplayTextToPlayer(trigP, 0, 0, "Heroes cannot be unselectable." ) else if LoP_Command.getArguments() == "no f" then + call LoP_TakeFromNeutral(enumUnit) // This is required, otherwise neutral units must be enumed when a unit is made unselectable. call PauseUnit(enumUnit, true) - call SetUnitOwner(enumUnit, trigP, false) // This is required, otherwise neutral units must be enumed when a unit is made unselectable. call GUMSMakeUnitLocust(enumUnit) else call DisplayTextToPlayer(trigP, 0, 0, "You must use |cffffff00-select no f|r to make non-decorations unselectable." ) @@ -42,7 +42,8 @@ private function EnumFunc takes nothing returns nothing else if GetUnitAbilityLevel(enumUnit, 'Awrp') > 0 or (IsUnitType(enumUnit, UNIT_TYPE_STRUCTURE) and GetUnitFlyHeight(enumUnit) < GUMS_MINIMUM_FLY_HEIGHT()) then - call GUMSMakeUnitUnSelectable(enumUnit) + call LoP_TakeFromNeutral(enumUnit) + call GUMSMakeUnitLocust(enumUnit) else if CheckCommandOverflow() then call ToEffect(enumUnit) diff --git a/release/trigger/28-Save System/15-SaveNLoad.j b/release/trigger/28-Save System/15-SaveNLoad.j index 9443638..96375d0 100644 --- a/release/trigger/28-Save System/15-SaveNLoad.j +++ b/release/trigger/28-Save System/15-SaveNLoad.j @@ -497,8 +497,8 @@ function LoadUnit takes string chat_str, player un_owner, real centerX, real cen endif endif - // Only selectable decorations should become units. Except: structres with pathing map and no height, waygates. - if select != "2" or (IsUnitIdType(un_type, UNIT_TYPE_STRUCTURE) and un_flyH < GUMS_MINIMUM_FLY_HEIGHT()) or (un_type == 'nwgt') then + // Selection type 3 (locust) was only added in version 4, so version 3 saves must handle exceptions for unselectable decorations that should be loaded as units + if select != "2" or (SaveIO_GetCurrentlyLoadingSave(un_owner).version < 4 and ((IsUnitIdType(un_type, UNIT_TYPE_STRUCTURE) and un_flyH < GUMS_MINIMUM_FLY_HEIGHT()) or (un_type == 'nwgt'))) then //Create the unit and modify it according to the chat input data set resultUnit = CreateUnit (un_owner, un_type, un_posx, un_posy, un_fangle ) diff --git a/release/trigger/28-Save System/16-SaveIO.j b/release/trigger/28-Save System/16-SaveIO.j index f27a447..1f9b947 100644 --- a/release/trigger/28-Save System/16-SaveIO.j +++ b/release/trigger/28-Save System/16-SaveIO.j @@ -183,6 +183,9 @@ function SomeRandomName takes nothing returns nothing //") // Not calling Prelo */ call Preload(metaString) // call Preload(endifStr) + call Preload( "\" ) +endfunction +function SomeRandomName takes nothing returns nothing //") // Not calling PreloadEnd in a preload file greatly improves loading performance. call PreloadGenEnd(filePathSize) endif @@ -313,9 +316,6 @@ struct SaveLoader extends array set .totalFiles = 1 endif - call BJDebugMsg(R2S(.centerX) + "," + R2S(.centerY)) - call BJDebugMsg(R2S(.extentX) + "," + R2S(.extentY)) - return this endmethod diff --git a/release/trigger/28-Save System/17-RectSaveLoader.j b/release/trigger/28-Save System/17-RectSaveLoader.j index 9fc3227..1e3b901 100644 --- a/release/trigger/28-Save System/17-RectSaveLoader.j +++ b/release/trigger/28-Save System/17-RectSaveLoader.j @@ -37,7 +37,6 @@ public function onReceiveSize takes nothing returns nothing endif set saveData = SaveLoader.create(GetTriggerPlayer(), nextSave[GetPlayerId(GetTriggerPlayer())], syncData) - call BJDebugMsg(nextSave[GetPlayerId(GetTriggerPlayer())]) if not saveData.atOriginal then set generator = CreateUnit(GetTriggerPlayer(), RectGenerator_GENERATOR_ID, saveData.centerX, saveData.centerY, 270.) @@ -101,7 +100,15 @@ private function onAbility takes nothing returns nothing call KillUnit(trigU) set trigU = null + elseif GetSpellAbilityId() == 'A062' then + set trigU = GetTriggerUnit() + set saveData = UnitData.get(trigU).saveData + + call SetUnitPosition(trigU, saveData.centerX, saveData.centerY) + call MoveGUDR(trigU, 0, 0, true) endif + + set trigU = null endfunction private function Init takes nothing returns nothing