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.

WIP Increasing Companion Limit

Discussion in 'Build Beta and Brainstorming' started by irR4tiOn4L, Aug 10, 2006.

  1. irR4tiOn4L

    irR4tiOn4L Landlubber Storm Modder

    Joined:
    Jan 31, 2004
    Messages:
    268
    Gender:
    Male
    I just really wanted to foster some discussion (again) on whether its possible to get more than 4 ships.

    Now i know that you cant have more than 4 companion slots -

    But what if you had AI ships that generated whenever you entered the sea map, and were given your nationality and orders to defend you. Perhaps a second interface method might be used to give orders to these ships.

    This would be just like an encounter with lots of other AI ships, albeit on your side and with you having limited control over them.

    Perhaps you might treat these ships as an independent squadron. Would allow for fleets.

    Ideas?
     
  2. benedickt

    benedickt Landlubber

    Joined:
    Sep 4, 2006
    Messages:
    64
    I don't know but something similar to the crewmembers on shore mod could be done. I mean like hireing other captains with their ships to escort you.
     
  3. Kazeite

    Kazeite Privateer Storm Modder

    Joined:
    Aug 26, 2006
    Messages:
    712
    Location:
    Polish Commonwealth
    I can't see <b>why</b> anyone would want to have an entire fleet to command...

    My reasoning is: It's the game about pirates, not about Admiral Nelson career <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> The way it is presented now satisfies me: nominally you have one ship, but you have three extra slots in case you want to bring home your prizes <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
     
  4. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    This is Akella's reasoning for four ships: If they'd add more ships, they'd need to add a whole tactical system for very big ship-to-ship battles.
     
  5. benedickt

    benedickt Landlubber

    Joined:
    Sep 4, 2006
    Messages:
    64
    My idea was something like this: Some vagabonds you meat in town, may turn out to be captains, with their own fleet of 1 to 4 ships you should have an option to hire them to travel with you for some time. His/Her ship(s) are not under your control, they only appear as allies and fight by your side but that's all.

    I don't know but maybe the game has something similar to this. If it ain't exactly like what I said, this advice could be an improvement... in my oppinion.
     
  6. ReiFukai

    ReiFukai Landlubber

    Joined:
    Aug 21, 2006
    Messages:
    68
    Ahh if only it could be done... sadly I believe all this code is rather buried in the core files of the game... heck, even AoP is still locked at 4 companions... to some extent this historically holds true for most the examples of pirates and piracy in general... small ships, big crews, heavily armed, small numbers (of ships)... I would have to do some homework to recall any pirates or privateers for that matter, that where known to opperate any flotillas beyond 4 for any significant period of time (more then a month, while they would take a prize and canibalize her in some lonely bay). The only outstanding exceptions to this general rule was when there where planned expeditions to take/sieze/harrass an enemy port... and these events usually consisted of military and suplimental privateers... and rarely lasted very long.

    On this note I would like to see perhaps some expansion on the concept of the flotilla... set officers to it... (not just a pilot) couple extra commands... things of that nature to facillitate there function... which at the present mostly consist of them eating me out of house and home... I dont even think any of the officer available commands (leveled up perks) work asside from launching boarders to a fort.

    I like your ideas on this though, and can think of some excellent working examples in other games... the "x" series for example... notably x-3 the reunion, has the ability to own and opperate hundreds of ships and bases simultaneously, performing any number of functions remotely such as trading, defense, attack, mining... all sorts of goodies.

    At the end of the day though, PoTC/SeaDogs is a decent 'underated' game (pirate adventureish thing), but it falls short of a sailing simulation... unfortunately for those of us who enjoy the age of sail, as it where... we really have no game that defines our genre to any great extent; atleast not in a quality modern format.

    If all I needed was a cooking pot, and a spoon... I would mix PoTC, SHIII, X-3, and a couple other little titles (space rangers 2) together... for flava'.
     
  7. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    What irR4tiOn4L suggests might be possible. But somebody would need to code it in. And I don't know who would want to.
     
  8. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    - THREAD MERGE -

    I’ll bet this one has been discussed a’plenty! Anyway, this is more for personal pleasure, I couldn’t imagine the developers thinking about allowing more than four ships unless a concept is a) very stable and b) very balanced.

    So far I have managed to bring up the “Assign Officer” window when capturing a ship while I already have four at sea including my own. However, it is not allowing me to move a passenger over to any of the slots, all I have is the luxury of staring at a screen I shouldn’t be able to access. So what it is I need to be looking at? Since I have gotten this screen up in the first place I’d expect to be able to move people into the empty slots, without regard for what happens after I leave the ransack menu (the game might die horribly for all I know, but that would be a start).

    I assume I need to look at the right file, which is obviously not the one I’ve already edited. What I have noticed in several files is lots of ‘for’ statements checking if a value is less than 4, which I presume to be related to the current number of companions, and changing those is how I got the screen up. I’m quite new to this code but I imagine it’s easy enough to change every single one of those to a variable instead of a raw number, and then I simply set that variable to whatever I need, let’s just say 4 for simplicity. In other words, instead of saying “if x is less than 4” it says “if x is less than y”, where ‘y’ is the maximum number of companions. This way I could change the variable on-the-fly without having to edit lots of files. I mean, characters.h has already defined the maximum number of companions, can I just use that or do I have to assign a variable to match it somehow? If I do set a variable then do I need to declare it as global, plonk it in a file which contains what are essentially global variables, or what?

    UPDATE - Mission Accomplished!

    [​IMG]
     
    Last edited: Apr 21, 2016
    Pieter Boelen likes this.
  9. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Indeed replacing the "4" with a MAX_COMPANIONS variable should be quite doable.
    As you noticed, that variable already exists, but it isn't consistently in use.

    That is just the simple part though, even if it will be annoying as you need to crawl through all files and update those values of "4" to use the correct variable.
    Then assuming that the game will be OK with having more companions (no guarantees on that!),
    the nasty part is updating all the interfaces to display properly for more than 4 companions.
    I don't think doing that would be simple at all. Interfaces are notoriously labourous to update correctly.

    My recommendation is always for people to start modding with small and relatively simple projects.
    So I must ask if you are absolutely certain that you want to try this.
     
  10. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    I’ve already changed a lot of those variables to exceed 4 but at first I wasn’t getting anywhere because they didn’t seem to affect ransacking, probably more to do with berthing and doing swaps with player ships. I’ll see what happens if I replace “4” with “COMPANION_MAX”.

    It’s all experimental at the moment, I’m just curious as to whether or not I can actually capture, and control, a fifth ship at sea. I was thinking about the idea of being able to do this in the mod, but the catch could be (either due to balance, engine limitations or simply because nobody would have the enthusiasm to sort out the interface) that as soon as the player leaves the sea all additional ships disappear without a trace (this could mean sacrificing an officer, but that might be more beneficial than sinking the captured ship and especially so if two enemy fleets are present).
     
  11. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I think in theory the game can probably handle it. NPC fleets can have more than four ships as well, after all.

    Companions are notoriously stupid though, so having more of them doesn't necessarily help much.

    The main issue are the interfaces though. I don't see that being sorted out in a hurry as most of them pretty much rely on the "four squares".
    Adding a fifth/sixth square in there would require some substantial redesigning there.... :unsure
     
  12. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    I’ve noticed a lot of variables relating to “four pics” or the such, so I get what you’re saying. I can also imagine that if I had say 10 ships at sea, I’d probably spend more time navigating around (or into) them than I would shooting the enemy! At least if I can get something working for my own purposes I could maybe improvise to an extent. For example, any transfers between the additional ships would have to be done at sea. If I want to sell one then I’d probably have to berth my main ship, buy a dinghy and then swap ships at sea to the one I want to sell - that would be awkward, but workable.
     
  13. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Good luck! I hope you manage to get somewhere with it. :doff
     
  14. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    Thanks! I’ve just changed all of the relevant occurrences of “4” to equal “COMPANION_MAX”, which I have set to 10, and it works just fine... the “Assign Officers” screen becomes available. It definitely is not available if the maximum companions variable is default and I have four ships already. All I have to do now is get my officers in those slots. :)
     
    Pieter Boelen likes this.
  15. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    When you have something workable, please upload the files you changed.
    Might as well be included in the mod, even if the default value remains at 4. :doff
     
  16. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    I was thinking that. ;) Anyway, I can’t seem to find what is stopping me from moving officers across - I click the officers and the empty boxes but nothing actually happens.

    How can I force boarding to go straight to the cabin? It’ll really help me speed things up, but obviously I wouldn’t want to be doing that while playing the game properly.
     
  17. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Check the involved interface code.

    I'm not at all sure. Maybe set all ships in ships_init.c to have 0 decks, then press F11?
     
  18. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    Well, I’ve managed to narrow it down to line #123 in ransack_main.c...
    Code:
       if(newCurNod!="")
       {
         SetCurrentNode(newCurNod);
       }
       else
       {
         RecalculateCargoLoad( xi_refCharacter );
         RecalculateCargoLoad( refEnemyCharacter );
         DeleteAttribute(xi_refCharacter,"InterfaceParam");
         for(i=1;i<COMPANION_MAX;i++) /**/
         {
           if(GetCompanionIndex(xi_refCharacter,i)==-1)
           {
             pCharacter.InterfaceParam.i1 = i;
             break;
           }
         }
       }
    
    This is the only entry which needs to be changed in order to enable the assign captain button. I’ll look at the other transfer interfaces.
    I’ll certainly give that a try!
     
    Last edited: Apr 19, 2016
  19. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Check if GetCompanionIndex is able to handle more than 4 companions as well.

    You can probably do that with a single "override" line near the bottom of that file.
     
  20. Mere_Mortal

    Mere_Mortal Free Like a Radical Storm Modder

    Joined:
    Jan 18, 2011
    Messages:
    568
    Gender:
    Male
    Occupation:
    Courting the Frown
    Location:
    Middle England
    That’s one problem I have is that I don’t know where GetCompanionIndex is initially defined. I’ve ran a search for the variable, I have a lovely list now of something like 50 files. Interestingly enough, LogInterface.c is already using “COMPANION_MAX” in one place, but then proceeds to use “4” afterwards.

    Another thing I need to think about is that some of these functions could be referring to the amount of officer slots, not companions.
     

Share This Page