• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Graphics Reload

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
Hey
Is there some kind of code to be executed via console to reload the graphics?
My game sometimes turns black (after unintentional sleep or screen saver) but the game still continues to run...
And my full screen is off
Sometimes when I am testing installers while the game is actually running and I get the Windows security "are you sure?" black screen, the game is also black when I go back to it.
There is no solution that I know of. You could try to press F1 and see if you get the Main Menu at all.
If not, the only way to proceed is to close the game and start it again.

Sleeping or screensavers don't affect me, because I deliberately have those functions disabled.
But I suspect the same applies for those.
 
The game still runs with all sounds. Both F1 and F2 work fine. I just cant see anything!
There must be a code! I'm sure!
I must find it! :)

Isn't there any manual or code reference for storm engine to look at?
 
The game still runs with all sounds. Both F1 and F2 work fine. I just cant see anything!
There must be a code! I'm sure!
I must find it! :)
If F1 works fine, you can make a save, then load that save. That might work.
Not as direct, but if it works without doing any code digging....?

Isn't there any manual or code reference for storm engine to look at?
I wish! We've been going with "figure everything out by yourself" for 11 years now. :rofl
 
If F1 works fine, you can make a save, then load that save. That might work.
Not as direct, but if it works without doing any code digging....?
Yes! I figured out myself! But I wanna find solutions! And contribute to the game! That would be great to have the game reload graphics via F12!


I wish! We've been going with "figure everything out by yourself" for 11 years now. :rofl
Wow! LOL
I still continue to investigate :)

Another question!
There are 9 cases in my console! How can I trigger a specific case? For example case 4!
 
But I wanna find solutions! And contribute to the game! That would be great to have the game reload graphics via F12!
I certainly wouldn't object to it, that's for sure. Might be tricky though.
Perhaps your best bet is to look through whatever code is responsible for loading savegames.

There are 9 cases in my console! How can I trigger a specific case? For example case 4!
There should be a switch(0) at the top of that file.
Change that value to whichever case you want to run.
 
I certainly wouldn't object to it, that's for sure. Might be tricky though.
Perhaps your best bet is to look through whatever code is responsible for loading savegames.
Yeah! I was thinking of the exact same thing :D Do you have any idea where that code (load/save) would be?
There should be a switch(0) at the top of that file.
Change that value to whichever case you want to run.
Thanks!
 
Do you have any idea where that code (load/save) would be?
If you haven't seen it yet, the tricks I posted in this thread usually allow me to track down whatever code I want to find:
http://www.piratesahoy.net/threads/modding-tips-tricks.24942/
Does take some "Sherlock Holmes-ing" though.

In this case, you can start your search in PROGRAM\seadogs.c because there is definitely some loading functionality in there.
Search for "load".
 
I just tested Loading a save game and also instant teleport to a location (via console)! None of them restore the game graphic!
 
You could try a reload to your current location. That should reload the graphics.
Search for the function "DoQuestReloadToLocation" or "ChangeCharacterAdress"
 
You could try a reload to your current location. That should reload the graphics.
Search for the function "DoQuestReloadToLocation" or "ChangeCharacterAdress"
Sounds like @Kpa7 already tried that one. "DoQuestReloadToLocation" is what the console reload does.

I just tested Loading a save game and also instant teleport to a location (via console)! None of them restore the game graphic!
What if you make a save, close the game, then load that save? Does that work at all?

I fear this might not be a quick fix.
 
Yes, It DOES work, And YES it's not what I want LOL. I want quick fix
This seems to be the loading code from seadogs.c:
Code:
void LoadGame()
{
   string saveName = GetEventData();

   DeleteEntities();
   ClearEvents();
   ClearPostEvents();

   CreateEntity(&LanguageObject,"obj_strservice");
   CreateEntity(&reload_fader, "fader");
   SendMessage(&reload_fader, "ls", FADER_PICTURE, FindReloadPicture("loading_game.tga")); // KK
   SendMessage(&reload_fader, "lfl", FADER_IN, RELOAD_TIME_FADE_IN, true);
   ReloadProgressStart();
   ref pchar = GetMainCharacter(); // KK
   pchar.savegamename = saveName;
   SetEventHandler("frame","LoadGame_continue",1);
}

void LoadGame_continue()
{
// KK -->
   ref pchar = GetMainCharacter();
   DelEventHandler("frame","LoadGame_continue");
   LoadEngineState(PChar.savegamename);
   DeleteAttribute(PChar, "savegamename");
// <-- KK
   trace("Done loading");
}
Either the CreateEntity lines would do it or I fear the engine simply cannot do it for some strange reason. :facepalm

There is also the OnLoad() function, but that doesn't contain a lot of useful stuff.
Maybe this one?
Code:
EngineLayersOffOn(true);
 
Are you playing in full screen mode?
 
Either the CreateEntity lines would do it or I fear the engine simply cannot do it for some strange reason. :facepalm
There is also the OnLoad() function, but that doesn't contain a lot of useful stuff.
Maybe this one?
Code:
EngineLayersOffOn(true);

That's just a fader. Plus the fact that Loading the game doesn't cure the problem so none of the functions of loading are useful
As I was researching I figured out the problem is with the Directx renderer. There's a graphic buffer called Back_Buffer which gets relocated/flushed when screen locks or goes to sleep and then the game still wants to use the former location and can't find it. I guess this is the case.
I didn't find any ingame commands to control Directx8 calls. Are you guys familiar with d3d8 or dx8renderer used in this game?
 
I have absolutely no clue about that. My suspicion is that those things are controlled on the engine side and therfore we can't do anything with this.
 
Back
Top