Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits) (+1)

For the various tools, I have a public Mega link that contains most of them: https://mega.nz/folder/O4lX0QRY#uD7AEuyTgJa5iZRZIHRICg

I noticed I did not upload the Animation Viewer, so I just added it today.

The ship lantern code is spread throughout a few files.  If you have my version of COAS, GOF 1.2, or ERAS, that will contain everything needed.  The following are the places to review and copy from:

SEA_AI/AIShip.c, set .Ship.Lights

void Ship_SetLightsOff
void Ship_SetLightsAndFlares

Called in Ship_Add2Sea and Ship_UpdateParameters, also within AIShip.c

Locations/locations_loader.c

void LocLoadShips

I suggest looking at my versions of COAS, GOF 1.2, or ERAS, because the original game only adjusted the ship lights when you first loaded a location, or entered/exited the sea.  For example, if you entered sea mode during the day, then stayed in sailing mode (did not enter map), and sailed into night, the lights would never change, so would not turn on; same for reverse, if you entered the ship at night, then stayed in sail mode, the lights would not turn off at daytime.  I added a feature to the engine to reset them and added some code to use that feature in the hourly weather change that did not exist in the original game:

void Whr_UpdateWeatherHour(), added this bit of code

    if( Whr_IsDay() != bOldIsDay )
    {
        Whr_ChangeDayNight();
        Event("eChangeDayNight");
        //#20190211-01
        doLightChange = true;
     }

...and later, below in same function

        //#20190211-01
        if(doLightChange && isSeaEnt) {
            ref rChar;
            Sea.Lights = aCurWeather.Lights;
            for(j = 0; j < iNumShips; j++) {
                iCharIdx = Ships[j];
                if (iCharIdx < 0 || iCharIdx >= TOTAL_CHARACTERS) continue;
                rChar = GetCharacter(Ships[j]);
                Ship_SetLightsAndFlares(rChar);
                SendMessage(&characters[iCharIdx], "l", MSG_SHIP_LIGHTSRESET);
            }
        }

With that bit of code in the hour change, the lights now turn on/off when the appropriate time changes, on the fly.

As for your NH interface issue, I have never played POTC and I have also never played NH, so I will need both a save game with two ships to trade, and some coaching of where/how to call that screen, so I can debug it for you.  If you want to send me a save to email:  chezjfrey@hotmail.com, with some instructions of what save profile name to place it, and how to launch that screen, I will take a look into what the problem is.  This is what pedrwyth had to do for me to debug the various issues he brought up that I worked through to resolve some of the NH bugs he encountered.  Also, if you know the exact interface .c program file that screen uses, that would also be helpful, but not necessary, I can probably figure it out, but it would save me some time if you already know it.