[IMPORTANT] New syntax requirement in 0.7.3.x

1. Background

Version 0.7.3.37 and 0.7.3.43 available in open-dev reveals a new version of the Embedded DaEditor (also known as Mods Editor or Sandbox Editor), with the new feature that allows users to edit scene import files from within the GUI.

However, it had created a new syntax requirement in scene.blk, which would break some mods depending on how your imports are structured.
Here, I will explain it. Just comment down below if additional help is required.


2. What to do

2.0 What is an import block

An import block is a block in scene.blk (.blk literally means BLocK) that is named “import” instead of “entity”
Example:

import{
  scene:t="%ugm/scene_items/scene_zombie_spawn_mode.blk"
}

import{
  scene:t="%ugm/scene_items/scene_zombie_spawns.blk"
}

import{
  scene:t="gamedata/scenes/_common_sounds.blk"
}

Note:

  1. The scene:t property is a string that describes where the target file is
  2. The target files for import is just another scene.blk formated BLK
    • You can, in fact, just copy over the contents of the target file, since importing is just telling the game to load an extra file in simplified terms
  3. %ugm is mapped to your mod’s folder, i.e. where scene.blk itself is.
    • Note: In my example, I have a folder called scene_items in my mod folder that stores all my imports
  4. gamedata is a special path that references the game internal files, specifically enlisted-game.vromfs.bin/gamedata
    • Note: these imports are part of the packed game files and cannot be easily accessed. It is a much more advanced level if you need to edit them.
    • Click on my profile and click on the invite link for more information if you need.
2.1 What changed???

In 0.7.2.99 and before, import blocks accepts 2 formats

Format A
import{
  scene:t="%ugm/scene_items/scene_zombie_spawn_mode.blk"
  scene:t="%ugm/scene_items/scene_wallbuys.blk"
  scene:t="%ugm/scene_items/scene_animated_bridge.blk"
  scene:t="%ugm/scene_items/scene_powered_doors.blk"
  scene:t="%ugm/scene_items/scene_animated_buyable_doors.blk"
  scene:t="%ugm/scene_items/scene_invis_barriers.blk"
  scene:t="%ugm/scene_items/scene_invis_barriers_static.blk"
  scene:t="%ugm/scene_items/scene_zombie_spawns.blk"
  scene:t="%ugm/scene_items/scene_zombie_barrier_decor.blk"
  scene:t="%ugm/scene_items/scene_mystery_boxes.blk"
  scene:t="%ugm/scene_items/scene_battle_music_containers.blk"
  scene:t="%ugm/scene_items/scene_ammo_box_spawner.blk"
  scene:t="%ugm/scene_items/scene_pap_unlock_mechanism.blk"
  scene:t="%ugm/scene_items/scene_perk_machines.blk"
  scene:t="%ugm/scene_items/scene_traps.blk"
  scene:t="%ugm/scene_items/scene_easter_egg.blk"
  scene:t="gamedata/scenes/_common_sounds.blk"
}
Format B
import{
  scene:t="%ugm/scene_items/scene_zombie_spawn_mode.blk"
}

import{
  scene:t="%ugm/scene_items/scene_wallbuys.blk"
}

import{
  scene:t="%ugm/scene_items/scene_animated_bridge.blk"
}

import{
  scene:t="%ugm/scene_items/scene_powered_doors.blk"
}

import{
  scene:t="%ugm/scene_items/scene_animated_buyable_doors.blk"
}

import{
  scene:t="%ugm/scene_items/scene_invis_barriers.blk"
}

import{
  scene:t="%ugm/scene_items/scene_invis_barriers_static.blk"
}

import{
  scene:t="%ugm/scene_items/scene_zombie_spawns.blk"
}

import{
  scene:t="%ugm/scene_items/scene_zombie_barrier_decor.blk"
}

import{
  scene:t="%ugm/scene_items/scene_mystery_boxes.blk"
}

import{
  scene:t="%ugm/scene_items/scene_battle_music_containers.blk"
}

import{
  scene:t="%ugm/scene_items/scene_ammo_box_spawner.blk"
}

import{
  scene:t="%ugm/scene_items/scene_pap_unlock_mechanism.blk"
}

import{
  scene:t="%ugm/scene_items/scene_perk_machines.blk"
}

import{
  scene:t="%ugm/scene_items/scene_traps.blk"
}

import{
  scene:t="%ugm/scene_items/scene_easter_egg.blk"
}

import{
  scene:t="gamedata/scenes/_common_sounds.blk"
}

However, in 0.7.3.x onwards, Format A is not valid.

Detailed explanation (skip if too confusing)

In 0.7.3.x, the blk reader behaves differently, in which it will treat the scene property as a field, much like the entity blocks.

In short, it will now store every property in memory first before executing them.

So for Format A import block:

import{
...
  scene:t="gamedata/scenes/_common_sounds.blk"
  scene:t="%ugm/scene_items/scene_pap_unlock_mechanism.blk"
  scene:t="%ugm/scene_items/scene_perk_machines.blk"
  scene:t="%ugm/scene_items/scene_traps.blk"
  scene:t="%ugm/scene_items/scene_easter_egg.blk"
}

The game in 0.7.3.x onwards will see that as:

import{
  scene:t="gamedata/scenes/_common_sounds.blk"
}

Because the first scene property is loaded, all others are ignored since they have the same namespace ID.

To conclude…

You need to change to Format B

2.2 What to look for?

To update your mods:

  1. Open the scene.blk of your mods in a text editor (e.g. notepad)
  2. Look for import blocks in the entire file (not just the top)
  3. Check if there are Format A import blocks, where there are more than 1 “scene:t” property within the single block
  4. Expand the Format A block to Format B:
Format A (invalid)
import{
  scene:t="%ugm/scene_items/scene_pap_unlock_mechanism.blk"
  scene:t="%ugm/scene_items/scene_perk_machines.blk"
}
Format B (valid)
import{
  scene:t="%ugm/scene_items/scene_pap_unlock_mechanism.blk"
}

import{
  scene:t="%ugm/scene_items/scene_perk_machines.blk"
}
  1. Save the file, and you have fixed it!
2.3 When to fix?

As soon as possible

  • The new syntax requirement is already valid in version 0.7.2.99 and below. Compatiblity is not an issue
  • Players will still have the older version of your mod if you don’t update quickly, which might break.

3. Conclusion

Thank you for reading my post. I hope everyone can update their mod before everything straight up breaks.
This syntax change is required to make the game more stable and allowing more features to be added.

Most mods should not be affected, since virtually nobody (knows how to) use imports.

Special thanks to my Enlisted Modders community and everyone here.
Check it out by searching for Enlisted Modders in Sandbox

7 Likes

ah yes.

when anyone has to look for infos regarding such important matters, one has to look for other modders more than officials going:

" hey, from the next update, WE changed X to be Y. be on the look out ".

nah, none of that.

not even worthy of a mention lmao.

man… it really feels like this game modding was a mistake, and the unwanted child of enlisted.
the way it has been treated.

but anyway, thanks for looking out for others.
it truly means alot.

6 Likes

Well, the guys who know what they have done can’t reach us, and the guys that can actually reach us don’t understand what have been done.

I don’t think that it a big issue, I will do my part as long as there are people who care about this

i seriously doubt that:

image

and that number may be higher or lower.

but they just choose not to.

2 Likes