Repository navigation
Move object data into SLK tables with -slkobjects - #1626
Merged
Merged
Conversation
Bumps wc3libs to 19bf6ba502, which adds ObjMerger (inwc3/wc3libs#109). The opt-in -mergeobjects run arg moves a built map's object modifications into SLK tables and profile files, which the game loads faster. Whatever the formats cannot hold stays in a reduced object file, and the build log reports what was merged, what was kept and why. Map builds merge the output map before compression; Run Map launches a merged copy. The cached map keeps its object files, because the next build compares them with the objects it generates. Projects pinning a classic wc3Patch are refused before compiling, since the merged tables are Reforged game data.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SLK is the name map makers know this optimisation by.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
-slkobjectsrun arg that moves a built map's object modifications (war3map.w3u,.w3t,.w3b,.w3a,.w3h,.w3q) into SLK tables and profile.txtfiles with wc3libs' newObjMerger(inwc3/wc3libs#109). The game loads these faster than it applies object modification files.0542c41400to19bf6ba502. BesidesObjMerger, the only change visible to WurstScript isObjMod.Obj.copy()keeping file order, which WurstScript does not call.-slkobjects, off by default, named for the SLK optimisation map makers know. It comes fromwurst_run.args(+slkobjectsfor release builds only) or the command line, so it reaches CLI-build, Build Map and Run Map.MapObjectMerger): done in memory on the open archive. The base is the bundled game data for the data set the map'swar3map.w3iselects, and tables and profile files the map already ships take precedence. It writes the files, removes object files left empty and logs the report: objects merged per type, modifications moved and kept, and each skipped object with its reason.<cached>_slk.w3x). The cached map keeps its object files, because the next build compares them with the objects it generates.wc3Patchbefore 1.32 fails before compiling, since the merged tables are Reforged data.docs/OBJECT_DATA_SLK.md; CHANGELOG entry.Testing
SlkObjectsBuildTests: with the flag, the output map gets the tables, a reduced w3u and no w3h, and the cached map is unchanged. Without it, the output object files are unchanged and no tables are written. A classic target is refused before compiling.RunArgsTests: the flag is off unless requested.h000reads HP 1234 and its name from the tables. The cached map matched a build without the flag.Not covered