Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Scytheria23 on April 14, 2016, 01:59:48 pm

Title: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Scytheria23 on April 14, 2016, 01:59:48 pm
Hi Folks,

Has anyone had any luck editing the loading screen tips?  I can change their content via the gametips dbc, and alter their colour with cff codes, but I cannot seem to find any frame or glue info regarding their font, on-screen position and size.  Ideally, I want to locate them centrally, make them larger and use a different font.

Any ideas?

Thanks
Scy
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: schlumpf on April 14, 2016, 03:25:24 pm
That's all hard coded.
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Kobiesan on April 15, 2016, 02:51:55 am
Quote from: "schlumpf"
That's all hard coded.

What else is hard coded?
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Scytheria23 on April 15, 2016, 07:32:31 am
That's a good question, Kobiesan.  

I'm slightly suspicious that Schlumf may be wrong about this one.  It seems odd to hard code something that would require localization (for example, in the Chinese client the loading tips are - of course - in Chinese, and in a substantially larger font).  There is, however, no difference between the US and CN client (at least, the wow.exe).  This seems to indicate that the font information for these tips is elsewhere.
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Amaroth on April 15, 2016, 09:00:18 am
Some chinese (and other) files seem to be in all clienths though. For instance logo of game. One can find chinese one even in enGB client. So, Wizzard Entertainment may have actually hardcoded things like this.
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Alastor on April 15, 2016, 03:38:08 pm
Lizzard Entertainment is doing quietly black magic about this but i would recomend you to not underestimate schlumpfs opinion - he is always right :D
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: schlumpf on April 16, 2016, 01:14:43 pm
Code: [Select]
void LoadingScreenEnable(int mapId, bool loadingWorld)
{
  if ( s_loadingScreenEnableCount++ <= 0 )
  {
    ObjectAllocFreeEmptyPages(0);

    if ( CGGameUI::AreScriptFunctionsLoaded() )
    {
      FrameScript_SignalEvent(0x338u, 0LL);
    }

    s_customLoadScreenSpellID = -1;
    s_customLoadingScreensID = 0;
    s_customLoadingScreenPathID = 0;
    s_customLoadingScreenLegIndex = 0;
    s_drawingCustomLoadingScreenBackground = 0;
    s_drawingCustomLoadingScreenSpline = 0;

    UserClientLoadingScreenNotify packet;
    packet.mapID = mapId;
    packet.showing = 1;
    ClientServices::Send(&packet);

    CGGameUI::SetAspect();

    if ( s_gameTip && *s_gameTip )
    {
      if ( !s_textFont )
      {
        char fontName[260]; // Locale.db2
        GetLocaleDefaultFont(GetCurrentWowLocale(), fontName, sizeof (fontName));
        s_textFont = TextBlockGenerateFont(fontName, NDCToDDCHeight(0.017999999), 1u);
      }

      float aspect_compensation = CoordinateGetAspectCompensation();
      float v18 = 0.50292969 / aspect_compensation;
      C3Vector position
        ( 0.5 - v18 * 0.5
        , aspect_compensation < 1.0  : 0.1 ? ((1.0 - aspect_compensation) * 0.5 + 0.1);
        , 1.0
        );

      trim_trailing_newlines (s_gameTip);

      GxuFontCreateString(
        TextBlockGetFontPtr(s_textFont),
        s_gameTip,
        0.017999999,
        &v22,
        v18,
        1.0,
        0.0049999999,
        &s_tipStr,
        (EGxFontVJusts)2,
        0,
        0,
        0xD7C8C8C8,
        0.0,
        1.0,
        1.0,
        0.0);

      GxuFontAddShadow(s_tipStr, COLOR_BLACK, {0.001, -0.001});

      if ( !s_batch )
      {
        s_batch = GxuFontCreateBatch();
      }
      GxuFontAddToBatch(s_batch, s_tipStr);
    }

    s_simpleMapID = mapId;
    InitializeProgressBar(loadingWorld);
  }
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Alastor on April 16, 2016, 01:51:34 pm
So Core handle it ? i thought its all in exe
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: schlumpf on April 16, 2016, 03:14:14 pm
Quote from: "Alastor"
So Core handle it ? i thought its all in exe
???

That's client code.
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Scytheria23 on April 16, 2016, 11:29:52 pm
Thanks, Schlumpf.  I didn't doubt you.  Well, I did, but only in the sense that I couldn't understand why this would be buried in the client.

Time to start hacking...
Title: Re: [QUESTION] [WotLk] Loading Screen Tips - editable?
Post by: Alastor on April 17, 2016, 01:53:43 am
wuh .. how did you digged it out ?