1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

New Horizons on JLB Maelstrom 2.8.2 engine

Discussion in 'POTC: New Horizons Mod' started by pedrwyth, Oct 28, 2017.

  1. LarryHookins

    LarryHookins Buccaneer Staff Member Storm Modder

    Joined:
    May 20, 2006
    Messages:
    2,342
    Location:
    Texas
    If you mean anywhere near the mainland or Cuba, that's because the scale is different there and things don't quite work right. Haven't figured out anything that can be done about it.

    Hook
     
    Pieter Boelen likes this.
  2. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    I have addressed a few things here:

    I added support for an option to revert your last command, upon escape, back to the main character, if desired as a default.
    I added support to highlight the currently active ship the commands correspond to.
    I removed the 'Give Order' since it no longer applies.

    The two, new options can be set with two different attributes, found in BI_InitializeCommands (I turned them on in the example):

    BattleInterface.HighlightActiveShip = true;
    BattleInterface.EscRevertMainChar = true;

    MEGA

    NHProgramUpdate2.zip
     
  3. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    The colonies screen was a problem in Tradebook.c. I fixed that.

    The particle XML format file read is in fact already built into the game (I added a start.ini value to indicate use the XML particles), and I actually have already output all the existing .xps files as .xml. I haven't offered the XML files themselves, or given the option value out, but I have tried it and the particle effects work as usual.
     
  4. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    One certainly was at the mainland (although I wasn't) anyway enough for this purpose to know it is inherent so thanks for the confirmation.

    Thanks and good scheme to have them as user selectable, it may be that I soon see the're better turned off too after a bit more familiarity.:D
    Ok good to know the particle effects is not only conceptually covered but functional.
    I'm still away travelling and that part of real life is about to kick in again :8qso I'll just try a bit more in the background and stop bombarding this thread for a week or so. Thanks for all the support this far though. :bow
     
  5. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    Having looked at the almost identical code I compared storms in NH between the two engines and storms seem to persist longer with the new engine mostly lasting for several days, the call is different so obviously some changes in storm coding (sorry couldn't resist that) have taken place in the later engine. The weather "on sea" dying back so you can enter map and the storm on world map don't correspond. I then looked at AOP2 and saw quite a bit of different front end coding too. Rather than get into that I set an attribute when a storm forces you back to sea from world map so that next time it happens you can go back to world map you can stay there even when under the storm cloud - however I decided to wipe the attribute within daily crew update, so you have to be quick to get out the storm and sometimes you are dropped back in if daily crew update runs before you have escaped.

    I added
    Code:
    if (CheckAttribute(pchar, "stormIndex")) return; // PW storm immunity otherwise locked in storm
        pchar.stormIndex = stormIndex;//PW set up variable for storm immunity (cleared in daily crew update)
    
    at the end of wdmEvent_PlayerInStorm() in worldmap_event.c and a cancelling
    Code:
    DeleteAttribute(pchar, "stormIndex");// PW end temporary immunity from storm
    
    at the end of DailyCrewUpdate.c
    I'm sure a more attractive solution could be found, or even moving to AOP2 code may solve the issue but for now it works so I have moved on.


    There is an instance of locking up on world map. This one involves the non-appearance of the skip encounter option screen when you come across hostile ships. Instead only the word "engage?" appears and the game locks. You need to stop the whole process to escape and I haven't managed to get a screen dump either.

    Another thing I have seen is a flag remaining in the battle screen when I lost a mast - no graphical anomalies just the flag at the right position as though on an invisible mast where the ship was at the time - it remains at that position. So this is not fully resolved in the new engine for NH but there were always problems previously.

    Also when sailing away from an island the added structures (towns, ships etc) are opaque rather than textured and in some instances ships are there on the compass display and locking your escape to world map but not visible on screen although obviously ought to be in visual range. So still some texture issues. Next time I get the effect I'll save a game and get some screenshots.

    I decided to play through "Tales of a seahawk" for a more structured test and have so far progressed to the search for Raoul Rheims - there are a few old bugs (most of which have been fixed in the latest version anyway) no showstopper down to the change in engine though. I have been using god mode and arcade so as many features are skipped of course.
     
    Last edited: Nov 30, 2017
    Levis likes this.
  6. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,950
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Out of curiostity, are these storms in 3D Sailing Mode or on the WorldMap?
     
  7. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    They are storms on the world map - which drop you back to sea in the storm. When the world map icon eventually appears, and usually the storm has reported now a breeze, press for world map it tries but since you are still in the storm (on world map) you don't get there and drop back to sea (ad infinitum). I have experienced up to three returns to storm with the original engine but usually by then the storm had disappeared from world map.
     
  8. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,950
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Thanks! Indeed that definitely sounds like an engine thing.
    Pretty cool actually that storms persist in the 2.8.2 engine! They definitely don't in 2.0, which is... unrealistic to say the least.
     
  9. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    431
    Gender:
    Female
    I was already superstoked, but with working higherpoly models I feel like Im gonna burst into flames :bounce dunno if I can help as much as @pedrwyth as I dont know as much about the engine and I have a severely short attention span but Id love to help chase bugs if thats of use. but where do I find the engine..? :eek:
     
  10. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,950
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I've known people with short attention spans who never get anything done because of that.
    You are clearly not one of those people. ;)
     
  11. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    Though I've not looked into the detail, I suspect that the early versions had the storm abatement time (in worldmap) coded into the engine -- arbitrary and inflexible, whereas later version probably allows for the programs scripts to make that determination/handling. I suspect if you continue to compare COAS code, there is some sort of message or attribute to remove the worldmap storm.
     
  12. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    Yep a matter for me to chase up, like the possibility of changing companion cannon charge types, once I have migrated to the latest code for NH on return from travelling. In fact given the intention to post another NH version on Moddb in the new year I will be aiming to conform to that one as I try to match up to the new code.

    I would leave looking at this until I can confirm it and provide some more info (I could be imagining the difference in the structures) although the invisible ships were real enough (if you follow that logic). However with the companion choice enabled I have seen which ship I am looking at/from step through different ships and views from them on sail to rather than from your vessel even when looking at say a port, beach combination, don't know if this was always the case with the new engine (I don't really pay much attention to the ship details). So I might just have got confused as to which ship perspective I was actually looking from.

    EDIT the above is a bit incoherent if you haven't seen the effect - so here is a saved game where moving along the command icon line changes ship perspective which should make my rambling clearer. ENDEDIT
     

    Attached Files:

    Last edited: Dec 1, 2017
  13. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    Here's a screen dump from in 2.8.2 and a comparison in the old engine.
     

    Attached Files:

  14. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    That is the same problem as that quest character screen. The path to the .ini file no longer needs RESOURCE\INI\ and you can remove that portion of it. Looks like I missed several of those. The one in question for your specific error is in boal_map.c. Change to:

    if(bAnimation && bNewInterface) iniName = "NEW_INTERFACES\ANIMATION\boal_map.ini";

    Since this has happened a couple time, I took a further look and some more were missed in:

    endgame.c
    fortcapture.c
    transfer_goods.c
    Reinit.c
    transfer_cannons.c
    etc.

    You may want to check them out and change if necessary.

    ETA: BTW, the system.log will show this error and gives the path it tried to use, where you will see the RESOURCE\INI is repeated in the path being sought. That's how I found the root problem.
     
  15. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    OK thanks, looks like we're at a point where the problem is more likely to be changes required in the front end scripts and as such a matter for NH modders to resolve. For example the change in boal_map.ini does bring up the full engage yes/no screen but a choice of no takes us back to the locked equivalent of the storm situation. That is because at world map you are still at encounter the question (with sail ho sound) repeats ad infinitum. So either needs the attribute approach (which I originally saw for collisions) or a deeper study of how COAS treats world map stuff (a move further away from "stock" NH).

    I think all the instances you quote above do need RESOURCE\INI removed and it just shows how much more depth to testing is required (NH in all its storylines and playstyles is big). I would I suppose have got to all of those above in due course following TOSH but under no other circumstances would I be getting to fortcapture and thence colony capture (for example) because I don't do that. Given your "etc" a search for RESOURCE\INI shows a number of examples where it is either a comment or part of a file path and where further consideration may be required on whether they need to stay.

    So from now on I may well note stuff here for reference as I find it (and if I can fix it). I will study the logs carefully and try to resolve whatever, this will mean slower progress - good thing I will be back home in a week or so (not really). It may remain here as the equivalent of a bug report thread. If I can't fix it (quite likely!) and have no clue I will probably tag @ChezJfrey in the post but if it is a note of a resolved something will not.

    Hope this makes sense.
     
    Last edited: Dec 3, 2017
  16. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    In worldmap encounters, it looks like an attribute is precisely how they deal with opting out of encounters from worldmap.

    worldmap_events.c::wdmEvent_ShipEncounter sets pchar.eshipindex and calls LaunchMapScreen()
    Interface\map.c, on cancel, sets pchar.SkipEshipIndex = pchar.eshipIndex;
    Then later in the subsequent firing of wdmEvent_ShipEncounter
    This line skips having to repeat (CheckAttribute(pchar, "SkipEshipIndex") && pchar.SkipEshipIndex == eshipIndex) return; // boal

    For worldmap encounters/storms, it might also be beneficial to review the liveTime and needDelete attributes/settings used in worldmap files; those appear to particular to the new approach for managing.
     
  17. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    249
    Ah, I found something for you about worldmap release of events/encounters that is also relevant.

    In COAS wdmReloadToSea() and Map_ReleaseQuestEncounter, the following line kicks of the logic within the engine to review liveTime <= 0 and the needDelete attribute of the various elements roaming the worldmap.

    worldMap.deleteUpdate = "".

    I know it looks strange that would accomplish anything, but within the engine, that is considered an attribute change for the worldmap object (script assigning a value), and when that particular attribute is deemed 'changed', then the engine will iterate the live worldmap objects (ships, storms) and remove whatever has a liveTime <= 0 and also anything with the needDelete attribute set.
     
  18. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    Yes where do you think I stole the idea from, you had already added most of that into NH wdmEvent_ShipEncounter() although it wasn't being used for the weather of course, I'm not generally that creative especially if there is something to hand.

    However it was what setting needDelete accomplished and where that had an impact which I couldn't quickly follow in the COAS code so this

    is certainly useful when I come to implement COAS like behaviour rather than just a quick attribute workround. In fact I originally set the index for the storm with a check for the same storm based on the encounter equivalent index method but then realised it was always going to be the same storm whilst the attributed existed so just the existence of the attribute was test enough.
    In the event for encounters changing your pchar.eshipIndex = eshipIndex; in wdmEvent_ShipEncounter() to pchar.SkipEshipIndex = eshipIndex; is enough to get it working to avoid the encounter for now.

    For the future with storms rather than marking them for deletion because you blundered into them it might be good to put your ship just outside their effect radius on return to world map after riding out the storm (but checking that's not into a landmass:)) but leave nature taking its course with the storm on world map. The running check for nearest land could help here too I would think.
     
    Last edited: Dec 4, 2017
  19. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    671
    Gender:
    Male
    I think it is likely that non-performing elements of NH on 2.8.2 will now mostly if not entirely be down to front end coding not the engine change per se as such I would be happy to see others looking for any such areas that need resolving.

    This is currently a matter of trying to get the earlier version (roughly moddb latest) running as well as possible (or as least as well as the original!), so one step back for now before (hopefully) migrating to latest WIP which by then may also be current moddb published.

    Several changes to the engine and associated files have taken place so only @ChezJfrey can provide a link/links to what is currently required to generate the latest, particularly with regard to integrating the larger poly model, so I suggest you PM him (if you haven't already).
     
    Last edited: Dec 4, 2017
  20. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,950
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Just a thought: We intend to get another version ready for ModDB soon.
    Do you think it would make sense to get that version running with 2.8.2 instead of the one currently on ModDB?
     

Share This Page