Skip to content

Conversation

@bobtista
Copy link

Summary

  • add ScriptCompiler tool to Core/Tools with bidirectional SCB JSON support
  • use nlohmann-json via vcpkg and CMake
  • support full roundtrip for scripts, groups, conditions, actions, params, preserving unknown chunks

Testing

  • cmake --build build/unix --target core_scriptcompiler
  • ./Core/Debug/scriptcompiler -in ~/Downloads/Scripts/SkirmishScripts.scb -out SkirmishScripts.json
  • ./Core/Debug/scriptcompiler -in SkirmishScripts.json -out SkirmishScripts_roundtrip.scb
  • Verified script/action/condition counts match between original and roundtrip outputs

@xezon
Copy link

xezon commented Nov 14, 2025

The first observation is that the tool is decoupled from engine. Changing format in Engine will break the tool, unless changes are replicated to tool.

@bobtista
Copy link
Author

The first observation is that the tool is decoupled from engine. Changing format in Engine will break the tool, unless changes are replicated to tool.

That's true. The point of that is so it's cross platform now. Some ideas:

  • Extract the chunk structs + read/write helpers from the engine into a new library that’s platform-neutral
  • Just have a process for updating the standalone tool whenever needed - how often will we need to do this really?
  • Dual build: Add a Windows-only target and a macOS/Linux one, where only Mac users need to manually sync changes
  • Scrap cross platform for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SCB to plain text to SCB compiler

2 participants