[Modding] Adding custom loading screen - CommanderBeelo/DayZ-Expansion-Scripts GitHub Wiki

ExpansionSample-LoadingScreen

Source Code

https://github.com/LieutenantMaster/DayZ-Expansion-LoadingScreen-Sample/

DISCLAIMER !

We are not going to teach you how to create a mod or convert to paa. Youtube already have enough tutorials for this !

Contents

You will need to setup a mod with the usual config.cpp for a basic mod.

The hierarchy of the mod we have provided looks like this.

Hierachy mod

Config.cpp

class CfgPatches
{
    class MyModName
    {
        units[]={};
        weapons[]={};
        requiredVersion=0.1;
        requiredAddons[]=
        {
            "DayZExpansion_Scripts"
        };
    };
};
class CfgMods
{
    class MyModName
    {
        dir="MyModName";
        picture="";
        action="";
        hideName=1;
        hidePicture=1;
        name="MyModName";
        credits="MyName";
        author="MyName";
        authorID="0";
        version="1.0";
        extra=0;
        type="mod";
        dependencies[]=
        {
            "Game"
        };
        class defs
        {
            class gameScriptModule
            {
                value="";
                files[]=
                {
                    "MyModName/Scripts/3_Game"
                };
            };
        };
    };
};

CustomLoadingScreen.c

LOADING_SCREENS_PATH

The path of the LoadingImages.json

LOADING_SCREEN_LOGO

The path of your custom edds logo

LOADING_MESSAGES_PATH

The path of the LoadingMessages.json

UseCustomLoadingPictures

If enabled (true), the mod will use your own loading images instead of the images from expansion.

UseCustomLoadingMessages

If enabled (true), the mod will use your own loading messages instead of the messagesfrom expansion.

UseCustomLogo

If enabled (true), the mod will use your own logo instead of the logo from expansion.

UseCustomLoadingBarColor

If enabled (true), the mod will use your own colors for the loading bar instead of the default red from expansion.

CustomLoadingBarColor

The color of the loading bar.

  • A = Alpha (opacity)
  • R = Red
  • G = Green
  • B = Blue

LoadingImages.json

[
    {
        "MapName": "default",
        "Path":
        [
            "Path/To/My/Image.edds",
            "Path/To/My/Second_Image.edds",
            "Path/To/My/LastImageSoThereIsNoCommaAtTheEnd.edds"
        ]
    }
]

If you want to load a set of pictures based on a map here is a example:

[
    {
        "MapName": "chernarusplus",
        "Path":
        [
            "Path/To/My/Image.edds",
            "Path/To/My/LastImageSoThereIsNoCommaAtTheEnd.edds"
        ]
    },
    {
        "MapName": "enoch",
        "Path":
        [
            "Path/To/My/LastImageSoThereIsNoCommaAtTheEnd.edds"
        ]
    }
]

LoadingMessages.json

[
    {
        "message": "My First message !",
        "submitter": "Player One"
    },
    {
        "message": "My Message",
        "submitter": "My Name !"
    }
]

Converting your image to edds

Use Workbench (from dayz tools) to convert .tga files to .edds. Simply add the .tga files to the dir you wish, right click, and "Register Resource and import"