Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

NewZ Style Loading Screen

Initiate Mage
Joined
Jan 4, 2016
Messages
65
Reaction score
29
Here is a Loading screen like the one used in New. Its an easy thing to do for most of the people on here but took me some time to learn how to do. Thought i would share it.





P.S. If anyone knows how to get the map name to work properly please let me know. Thanks!!

Credits to Bombillo for helping me with the TIP OF THE DAY and Map name.
 
Last edited:
☆Dying Dawn☆
Joined
Jan 30, 2012
Messages
971
Reaction score
727
try Game.cpp
Look for this
Code:
const char* levelName = "NO NAME";
	const char* levelDesc = "No description";
	int gameMode = -1;

And Paste This Below
Code:
if(strstr(LevelFolder, "wz_colorado"))
	{
		//levelName = gLangMngr.getString("Colorado"); // map string name - name in loadingscreen
		levelDesc = gLangMngr.getString("DescColorado"); // level description here
		gameMode = GBGameInfo::MAPID_WZ_Colorado;// gameworld map 
    }
	else if(strstr(LevelFolder, "wz_colorado"))
	{
		//levelName = gLangMngr.getString("Cliffside"); // map string name - name in loadingscreen
		levelDesc = gLangMngr.getString("DescCliffside"); // level description here
		gameMode = GBGameInfo::MAPID_WZ_Cliffside; // gameworld map 
    }
compile the src and enable the map name in flash
 
Experienced Elementalist
Joined
May 28, 2017
Messages
225
Reaction score
127
You mean that "Connecting to x server" ? If you mean that display than its much much easier todo than you think... you get all informations from the masterserver its copy pastarino .
 
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
I did everything as it was said, but when I go to the server I have some hieroglyphs
 
Initiate Mage
Joined
Jan 4, 2016
Messages
65
Reaction score
29
You have to make sure the name of the maps match what you have in the levels folder and you src. You will then need to add DescColorado=Colorado to your .lang file. Do not forget to enable "text" in the flash source code. You will need to actually change the alpha in Textanim.
 
Experienced Elementalist
Joined
May 28, 2017
Messages
225
Reaction score
127
Something what maybe helps you or you could use, thats what I have made maybe you want that its nothing special and there is also some things missing

Code:
void LoadingScreen::updateUIDataText(const char* name, const char* desc, const char* tip)
{
    /*if(g_num_matches_played->GetInt() == 1 && g_num_game_executed2->GetInt()==1) // first time launch of the game, show keyboard schematic
    {
        Scaleform::GFx::Value::DisplayInfo dinfo;
        dinfo.SetVisible(true);
        m_GFX_Main2.SetDisplayInfo(dinfo);
        dinfo.SetVisible(false);
        m_GFX_Main.SetDisplayInfo(dinfo);
    }
    else*/
    {
        //Scaleform::GFx::Value::DisplayInfo dinfo;
        //dinfo.SetVisible(true);
        //m_GFX_Main.SetDisplayInfo(dinfo);
        //dinfo.SetVisible(false);
        //m_GFX_Main2.SetDisplayInfo(dinfo);
    }

    Scaleform::GFx::Value tmp, tmp2, tmp3;
    /*m_GFX_Main2.GetMember("Name", &tmp);
    tmp.GetMember("Name", &tmp2);
    tmp2.GetMember("Text", &tmp3);
    tmp3.SetText(name);*/
    m_GFX_Main.GetMember("Name", &tmp);
    tmp.GetMember("Name", &tmp2);
    tmp2.GetMember("Text", &tmp3);
    tmp3.SetText(name);

    /*m_GFX_Main2.GetMember("Desc", &tmp);
    tmp.GetMember("Text", &tmp2);
    tmp2.GetMember("Text", &tmp3);
    tmp3.SetText(desc);*/

    //----------------------------------------------------------
    //Tobi double GD Icon
    // m_EventStatus / 1 - true / 0 - false
    int apiCode = gUserProfile.ApiGetServerStatus();
    if(apiCode != 0)
    {
        gfxMovie.SetVariable("_root.Main.DoubleGD.visible", false); 
    }
    else {
        for(size_t i=0; i<gUserProfile.m_ServerStatus.size(); i++)
        {
            const CUserProfile::ServerStatus_s& ss = gUserProfile.m_ServerStatus[i];
            if(ss.IsGameDollarEvent == 1) {
                gfxMovie.SetVariable("_root.Main.DoubleGD.visible", true); 
            } else {
                gfxMovie.SetVariable("_root.Main.DoubleGD.visible", false); 
            }
        }
    }
    // end
    // Tobi
    // Loadingscreen servername
    char ServerName[256];
    if( g_bEditMode )
    {
        sprintf(ServerName, "Level Editor");
    }
    else if(!gClientLogic().m_gameInfo.IsValid())
    {
        sprintf(ServerName, gLangMngr.getString("$LG_Connecting"));
    }
    else {
        sprintf(ServerName, "%s", gClientLogic().m_gameInfo.name);
    }

    m_GFX_Main.GetMember("Desc", &tmp);
    tmp.GetMember("Text", &tmp2);
    tmp2.GetMember("Text", &tmp3);
    tmp3.SetText(ServerName);
    //----------------------------------------------------------

    m_GFX_Main.GetMember("Tip", &tmp);
    Scaleform::GFx::Value::DisplayInfo dinfo;
    dinfo.SetVisible(tip!=NULL);
    tmp.SetDisplayInfo(dinfo);
    if(tip)
    {
        tmp.GetMember("Tip", &tmp2);
        tmp2.GetMember("Text", &tmp3);
        tmp3.SetText(tip);

        tmp2.GetMember("Caption", &tmp3);
        tmp3.SetText(gLangMngr.getString("TipOfTheDay"));
    }

    /*Scaleform::GFx::Value vFrame[1], vImages;
    m_GFX_Main.GetMember("Images", &vImages);
    vFrame[0].SetInt(int(u_GetRandom(1.0f, 4.99f)));
    vImages.Invoke("gotoAndStop", NULL, vFrame, 1);*/
}

//------------------------------------------------------------------------

void
LoadingScreen::SetProgress( float progress )
{
    R3D_ENSURE_MAIN_THREAD();
    if(!m_GFX_Main.IsUndefined())
    {
        Scaleform::GFx::Value tmp, tmp1, tmp2, tmp3, tmp4;
        m_GFX_Main.GetMember("Bar", &tmp);
        tmp.GetMember("RankBar", &tmp1);
        tmp1.GetMember("Bar", &tmp2);
        float baseWidth = 1510;
        tmp2.GetMember("width", &tmp4);
        tmp4.SetNumber(baseWidth*R3D_CLAMP(progress, 0.01f, 1.0f));
        tmp2.SetMember("width", tmp4);

        //----------------------------------

        // Tobi
        // loading Progress Text
        char loadingProgressText[512];
        if(!gClientLogic().m_gameInfo.IsValid())
        {
            sprintf(loadingProgressText, gLangMngr.getString("$LG_ProgressConnecting"));
        }
        else {
            sprintf(loadingProgressText, gLangMngr.getString("$LG_ProgressText"), progress* 100);
        }

        if( g_bEditMode )
            sprintf(loadingProgressText, gLangMngr.getString("$LG_ProgressText"), progress* 100);

        m_GFX_Main.GetMember("Bar", &tmp);
        tmp.GetMember("RankBar", &tmp1);
        tmp1.GetMember("Text", &tmp2);
        tmp2.GetMember("Text", &tmp3);
        tmp3.GetMember("Text", &tmp4);
        tmp4.SetText(loadingProgressText);
        //----------------------------------

        /*baseWidth = (float)tmp4.GetNumber();
        tmp2.GetMember("width", &tmp4);
        tmp4.SetNumber(baseWidth*R3D_CLAMP(progress, 0.01f, 1.0f));
        tmp2.SetMember("width", tmp4);*/

//        Bar._width = Math.round(Scale._width*_global.LocalPercent/100)-5;

    }
    //gfxMovie.SetVariable("_global.LoadedPercent", progress*100);
}

//------------------------------------------------------------------------
 
Junior Spellweaver
Joined
Oct 25, 2017
Messages
158
Reaction score
17
Thanks for your code, I'll try it, if it works, I'll write and again thank you for being with us <3
 
Experienced Elementalist
Joined
May 28, 2017
Messages
225
Reaction score
127
Dont forget to include missing header files Im sure that the ClientLogic has to get included!



#include "Multiplayer\MasterServerLogic.h"



extern bool g_bEditMode;
 
Back
Top