Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

COAS / AOP 2 Melee Fighting and Class Style?

A topic by KillPhilx created Oct 02, 2020 Views: 309 Replies: 7
Viewing posts 1 to 2

Hi,

is it in any way possible to change the melee fighting system to that of COAS / AOP? I already saw in the program/controls/init_pc.c that the control defines are there, but I am unable to actually activate them.

Developer(+1)

I added them to the NH controls, because that was a simple copy/paste.  But the reason they don't work is that the corresponding animations also need to be defined.  My guess is that they don't exist in any of them.  They could probably find suitable ones from COAS and GOF, that work for their models, but I will not spend the time doing the research and editing the animation files for that; my intent was to give them the opportunity to get NH running in a later version of the engine, but their community needed to do the rest of the work to fully integrate it.  They have never done the work to finish up the working version despite my having done 90% of the work to get it this far...I don't know their reasons.

(2 edits)

thanks for your reply, and yeah its really sad you made an awesome porting that works to 95% , even with most of the modded scripts from NH.. and they refuse to take the chance, even if they have minimal work to do.. (I would like to do it but not competent enough in coding)

so the thing it is not working is, if I understand correctly, because the character models (.gm-files?) of NH dont have the animations for the heavy attack / parry.. etc? Couldn't I just replace all NH models with GOF models?

EDIT: nah, no bugs, just errors on my own and a corrupted option file - nothing new

Developer

I would have figured that the missing parts were things like the parry move missing from the .ani file (it is a text file) and a workaround would be just copy some frame-range of an existing move, but add the necessary info in the text .ani file.  But, if you are now saying it was just an option file problem?  Well, there was one person who did some work on NH, user name pedrwyth that may have done that work.  He supplied me with a bunch of changes he made...so there was a solo effort by him to get some things working.  Maybe he did that animation part, if it works.

(1 edit)

ah sorry, I edited beyond understanding.. the corrupted options file was for a bug with the sails.

If I just copy the ani-files from e.g. GOF for testing, would that probably already help? Are the definition for the animations in the module-folder?


EDIT: Well I just tried, it works, altough, the markers dont match between the GOF and NH models. BUT iirc, almost every model in NH exists in GOF too, correct? I could just replace every model with the GOF one (with the matching file name ofc).. should work, right?


Does this apply for the ship lanterns too? Because right now they are all dark, I guess that the engine itself knows what to do with a lantern, but the model doesnt say where the lanterns are, correct?

Developer (1 edit)

You have to be careful what animation .an files and .ani files are applied to models...just because some models contain the same name, they may not contain the same bone elements and that will mess up the animations if they are not meant to correspond.  Of course a safe way is to copy both the model and animation .an file (the binary file used is listed at the top of the .ani text file), and the .ani file, but that might also screw up the look of the model if the character's textures are not also copied...again, the same applies that textures with the same name between games are not always really the same file because someone may have edited them.

As for lanterns, you are correct that the POTC/NH ship models probably don't have the light/lantern locators defined in the model because that feature did not exist in the earlier Storm 2.0; this source is derived from Storm 2.8.  Even if some ship models were copied that do have the locators, there is also some script code that would need to be added to turn them on/off when the time of day changes to night/day.

thanks a lot Chez,

well I tried to copy and replace some models and anims, but I had only luck with two models so far that worked right with the animations, prolly because of the different bone elements as you stated. So far, I was unable to get textures for GOF-character models to work. But even with the very odd bone elements, it is already a lot better than using the storm 2.0 combat system.

Do you have by any chance the tool animation view somewhere, so I can look into the ani-files with that and just correct and match up the NH-models with the animations myself?

Can you tell me where the script(s) for the lanterns are? I already managed to replace the Wicked Wench / Black Pearl from GOF to NH without any problems, so I want to try if simply inserting the script will really make the lanterns work.

I encountered one game-breaking-bug so far, maybe you can help: The transfer-goods interface (transfering between ships) doesnt work and gives me a black screen or a blank screen with water in the background - but unfortunally, the game isnt really aware of that error because there is no error.log and no crash either (I have to ALT-F4 from there). I already tried to use code from other NH-Versions but it all doesn't work. All other transfer-screens work, only this specific one doesn't

Developer (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.