Stranded: Alien Dawn

Stranded: Alien Dawn

Not enough ratings
How to import assets created with Blender via Mods
By kkroasan
Detailed guide on the steps for enabling the Exporter tool in Blender that comes with the game, how the scene should be structured and how it should be added as an entity with a mod.
2
   
Award
Favorite
Favorited
Unfavorite
Disclaimer
Hi all,

This guide is an addition to the provided Modding documentation. Before jumping in, make sure you've read the Entity section under Assets. It explains how a scene should be structured and this structure is crucial for the export. Here is a quick reference from the Modding docs regarding the scene and the materials.

Scene Structure
Origin
  • An empty object or an armature - this is mandatory. The origin is parent of the mesh.
  • Everything will be positioned relative to this object.
  • This way you can organize the scene better.
Entity Mesh
  • Meshes are what's visible inside the game.
  • It's a mesh object parented to an Origin.
  • Multiple mesh objects can be part of the same entity mesh. (Note that this is different to Blender mesh object structure; it allows Stranded-Alien Dawn to use sub-meshes.)
  • Mesh objects are associated with Entities.
  • Mesh objects must be a part of at least one state (enforced by the UI).
Spot
  • Spots are logical points attached to a mesh.
  • Represented as an empty object parented to an entity mesh.
  • When a mesh is animated, the spots must be parented to the specific bone they should move along with (Ctrl+P → Bone).
  • Note that an origin spot is added automatically.
Surface
  • Surfaces are mesh objects used for things like Collision (check the dropdown list “Surface type” to see possible usages).
  • Surfaces are mesh objects parented to an entity mesh.
  • Surfaces cannot be animated.


A Note on Materials

Stranded - Alien Dawn uses PBR-based materials using the Metalness workflow. Textures should be supplied in 24-bit or 32-bit uncompressed TGA format. Material settings can be edited only inside the Haemimont Material panel in the Material properties (other changes will be ignored/overridden). All textures should use the first (and only) UV map. The following textures can be associated with an object:

Base colour

  • The albedo for diffuse surfaces, or the specular colour for glossy surfaces. If the BaseColor texture contains alpha channel, the option Use Alpha Test under Haemimont Material in Material tab, should be checked.

Normal
  • Normal map - DirectX.

Roughness/metallic
  • R channels - “roughness” (0 - polished surface, 1 - rough surface). B channel - “metalness” (0 - dielectric, 1 - metal).

AO
  • Grayscale ambient occlusion.

Self illumination
  • Grayscale emissive level (self-illumination). Pure white (1.0) is treated as extra emissive (HDR), e.g. the surface of light sources.

Colorization
  • Texture used for colorizing meshes.

The Blender Add-on will try to replicate what will be seen in the game as closely as possible using the Eevee engine. Use this as a reference only - the entity will appear differently in the game, since the Eevee engine is not identical to Haemimont Games engine. In case the add-on doesn't update the shader nodes automatically, you can use the “Recreate shader nodes” button in the HGE Tools panel.
Also, an appropriate number should be set for the “Number of masked colors in CM” property, depending on the number of parts the model is separated into. This property can be found inside the Haemimont Material. This can be found in Blender by following the steps:

Select object → “Materials Properties” tab → Haemimont Material → Maps → “Colorization mask” and “Colorization mask colors”.
The maximum number of parts is 4. The texture will act as four masks combined into one:

  • Black color (#000000ff) will be ignored.
  • Red color (#ff0000ff) will mark the “first” part.
  • Green color (#00ff00ff) will mark the “second” part.
  • Blue color (#0000ffff) will mark the “third” part.
  • The alpha channgel (#00000000) will mark the “fourth” part.
There cannot be any mixing at the edges between two different parts and all colors must match those hex codes exactly. The Base Color texture should also be prepared. Parts that will be colorized should be grayscale. Recomended values range from 190 to 220.

Enable Exporter Add-on
Open Blender and load the Haemimont games Exporter Add-on.

1. From top menu -> Edit -> Preferences
2. Add-Ons -> Install -> Locate the file in …Steam\steamapps\common\Stranded – Alien Dawn\ModTools -> HGBlenderExporter.zip -> Enable add-on



3. This will add a new panel – HGE tools - for the settings of the mesh when exported.

Create your scene
We will use a colorful cube as an example for this guide.

1. Place an empty object and name it "Origin"
2. Place a cube
3. Duplicate the cube and name the second one "Collision" - you can make this invisible so you don't edit it by mistake.
4. Parent the objects as the order above -> Origin is parent of cube ->Cube is parent of Collision.
5. You can load texture files using the Haemimont Material/Maps panel under Material Properties. In this case we'll use Blender to create and paint a texture:

  • Select the cube and open the Image Editor tab (Shift F10). Draw your texture.
6. Save the image - there is a menu the texturing panel, under the top menu that is labeled "Image"
7. Select the cube and use the Haemimont Material/Maps panel under Material Properties to select your texture

Click on the image below for zoomed view and check out the structure of the scene and the Materials settings.
Exporting the Blender scene
When you are ready with the scene, you can export it. The tool will provide sufficient information if there are any errors, keep an eye on the following:
• Entity name – name of the Entity in the engine
• Mesh – Name of the mesh object in Blender
• State - States are defined variations a given Entity. For example, the Entity 'ElectricHeater' has two states - 'idle' and 'working' States are defined in two places - State name field in the Object panel of the HGE Tools sidebar. Plants have the following entity spec <ENTITY_BASE><STATE><SEASON><VV>:
- ENTITY_BASE is selected depending on the plant's growth from the entities below and its variant (the digits at the end) are removed;
- STATE is "Decay_" if the plant is in decay, "Fruits_" if it has fruits or "";
- SEASON is one of the several season suffixes for the current season - the first one which produces valid entity is selected; e.g in winter the entities tested are "Winter_", "LateFall_", "" - so if no special winter entity is provided the plant will use its LateFall or default (summer) entity;
- VV is a two digit variant - each entity can have any number of variants and the plant will choose randomly one

When ready, press export. The new entity will be placed in %AppData%\Roaming\Stranded - Alien Dawn\ExportedEntities. The file will have .ent extension.
Importing the entity in a Mod
To use your entity in a Mod, you will need to add an Entity mod item first. Create a new mod, fill in name, id and description and add an Entity Mod item (Assets -> Entity).

1. Import the entity by pressing […] button and locating the exported entity in %AppData%\Roaming\Stranded - Alien Dawn\ExportedEntities. Press import. This will autofill in Name and Entity name. Save.



2. Create the mod item type that you want to use the entity for. You can start by copying from already existing preset in the game. In this case, statue is used as an example.



3. Replace the entity in the building section with the one just imported. Change names and descriptions.



4. If you want the Statue to be enabled in the beginning, define the lock state as “enabled” in the Lock state.



5. In my case the “Build menu” section defines how the Statue will be visualized and in which category it will be placed.
a. Reminder: Icon should be in the Mod folder. The size for this icon is 100x100


Approach points and collision - useful tips for testing
An example asset was provided by the creators of Beyond Stranded mod and the asset was adjusted by the devs with additional approach points and collision, so the stool works as the chairs in the game.




You can download and examine the structure of the scene at this link:download here[drive.google.com]

Mod editor helps!
When you are in the Mod editor, there are a few useful tricks you can apply to check if your entity is working properly, Cheats are enabled by default on the modding map. Let's start with some cheats that will unlock everything and provide resources, so you can start testing right away.
  • Alt + O - will spawn resources
  • Alt + U - will unlock everything in the build menu
  • Alt + B - will automatically construct the buildings

When you select an object, you will also see the info panel cheats - in our case we need collision, spots and approach points.


Those can be enabled/disabled, and they can help you arrange your Blender scene. The spots will also come in handy for naming the empty objects in Blender that are used for spots. Mind that the annotations (after the Spot name) should be filled in as well.

7 Comments
Snaetsh Aug 30, 2024 @ 5:49am 
Hello. I import an own workbench to the Game, but No surviver has an Animation until the Work in that. How can i Chose an Animation for that ?
Sir Ni May 27, 2024 @ 9:39am 
hello, I noticed you have a good understanding on blender and importing stuff, I am a JA3 modder and I am having troubles importing animated stuff into the game, I wonder if you could help because the engine is very similar and both uses the same addon for blender
kkroasan  [author] Apr 8, 2024 @ 1:46am 
@FalloutBoy hey mate :) I am not sure I understand the question entirely, but as far as I understand (which is not a lot) you are refferting to colorizing the entitiy and the two options:
1. Using base color - You need a fga file or png file with the colorts you want to apply. The easiest way to do this one is to bake the textures in blender or use another software for texturing.
2. Using colorizatin map - the rgb colors in the mask will mark the places in which you can apply different colors via the ingame editors. If you use this option, you will also need to set the colorization mask colors - if you want to apply 3 different colors - you will need to set the colors to 3 in the exporter addon - in the materials tab. I will check if I can actually add description for this :)

If that does not answer your question, please let me know - a description of the entity you are working on and what you want to achieve will be very useful a a case. :)
VaultDweller Apr 1, 2024 @ 12:05am 
@kkroasan Hi there, I have been writing modes and creating models for S:AD for a couple of months now, I notice that as part of the exporting process here you mention the "colours" black red green blue and alpha ( not that black and alpha are strictly colours ) but I notice that the map is not set under the exporter within Blender by default and that in a directory "\AppData\Roaming\Stranded - Alien DawnModAssets\TextureCompressTemp\bc" you have a file named 6999003.tga which seems to contain the Red value for the first Masq. If I were to place the other Masq values in here would it need to be as separate files or would I simply use line two of the four pixel wide Masq Green, the third line Blue and the last line Alpha? I would also like to know how one would generate the "Base Colour Texture" which seems to have values from 0 to 31 in Greyscale - but how are the values represented in that range? Thanks for your time - I'm still learning a lot of this stuff.
8f2358 Dec 7, 2023 @ 4:48am 
Thanks for your advice! :steamthumbsup:
kkroasan  [author] Dec 6, 2023 @ 5:13am 
The textures should be image files and should be placed in Haemomont Material section.
Select the mesh and open the Materials tab in the leftside panel. Look for Haemimont Material and open the Maps section. Upload or select the images for each texture there.

If you are not sure how to convert texture to an image - here's a video that might help - https://www.youtube.com/watch?v=RQyAsi_Jvmc

If that is not the case, please upload the file ans share a link so I can take a look.
8f2358 Dec 5, 2023 @ 9:55pm 
I tried to import an asset. But the asset had a white surface in the game. I guess the asset lost its texture shown in Blender. How can I solve this problem?