Do not overwrite special node files that are unchanged #690

Open
opened 2025-03-08 19:07:12 +00:00 by CelticMinstrel · 0 comments
CelticMinstrel commented 2025-03-08 19:07:12 +00:00 (Migrated from github.com)

This is to enable the creation of a scripting language, such as the one @fosnola designed, without altering the core game engine.

The concept would be that an external program parses the custom scripting language and translates it into special node files which are then loaded by the game. The external program might produce output that's formatted differently from the output produced by the game – for example, it might use named constants and rely on them for a decompilation process. (That might seem unlikely in the case of an AvernumScript-style scripting language, but we should support other things too. Maybe someone wants to make a visual block interface akin to Scratch.)

Thus. the scenario editor shouldn't overwrite special node files unless they've actually changed. For packaged scenarios, it should store the raw taxt and write it back unchanged if the actual nodes weren't edited. For unpacked scenarios it would suffice to simply skip the step of writing the nodes if they weren't edited.

This is to enable the creation of a scripting language, such as the one @fosnola designed, without altering the core game engine. The concept would be that an external program parses the custom scripting language and translates it into special node files which are then loaded by the game. The external program might produce output that's formatted differently from the output produced by the game – for example, it might use named constants and rely on them for a decompilation process. (That might seem unlikely in the case of an AvernumScript-style scripting language, but we should support other things too. Maybe someone wants to make a visual block interface akin to Scratch.) Thus. the scenario editor shouldn't overwrite special node files unless they've actually changed. For packaged scenarios, it should store the raw taxt and write it back unchanged if the actual nodes weren't edited. For unpacked scenarios it would suffice to simply skip the step of writing the nodes if they weren't edited.
Sign in to join this conversation.
No description provided.