• 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!

Debug Mode change dates

jmaisc

Landlubber
I found out that instead of the 2 options to advance 5 and 20 days you can change it to move back in time for a certain amout of days. The original code for 20 days is:



string descF30 = "add 20 days";
void CalculateInfoDataF30()
{
totalInfo = descF30;
// -->
LAi_Fade("", "");
AddDataToCurrent(0, 0, 20);
// <--
totalInfo = totalInfo + NewStr() + NewStr() +
"The command is executed successfully!";
SetFormatedText("INFO_TEXT",totalInfo);
}



You can change it to the follow:



string descF30 = "Back 5 day";

void CalculateInfoDataF30()
{
idLngFile = LanguageOpenFile("ItemsDescribe.txt");
totalInfo = descF30;
LAi_Fade("", "");
AddDataToCurrent(0, 0, -5);
totalInfo = totalInfo + NewStr() + NewStr() + "The command is executed successfully!";
SetFormatedText("INFO_TEXT",totalInfo);
}



If you start getting out of time to complete a quest, just get back on time :)
 
Nice pal! Been playing the game running GOF and i enjoy it so much! But, can you please point out what file we should edit? Cuz i don't know what to do with the code without certain direction.
 
You can use a console file.

Copy the next code; save it as console.c in Program COAS folder. Run game, hit F4. Debugger mode NOT needed, can be used in normal games.

Use a text editor (NotePad) to change Years, Months and/or Days warped to fit your needs.

DISCLAIMER: May broke quests. Use with care. May cause dependency.

Code:
void ExecuteConsole()
{
Log_SetStringToLog("Executing Console"); 
//

////////////////////////
int iYears = 0;
int iMonths = 0;
int iDays = -5;
////////////////////////
/*
Change iYears, iMonths, iDays to change the game date.
- Negative values: warp back.
- Positive values: warp forward.
If you don't see 3 messages (Executing Console, Time Warped, Console Ended) 
something went wrong with your typing.
The screen date may take a couple seconds to update.
*/

LAi_Fade("", "");
AddDataToCurrent(iYears, iMonths, iDays);
Log_SetStringToLog("Time Warped.");

//
Log_SetStringToLog("Console Ended"); 
}
 
Back
Top