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.

Included in Build Looting Uniforms from Soldiers

Discussion in 'Features Archive' started by Pieter Boelen, Apr 5, 2016.

  1. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    @Grey Roger: Does my above post make sense to you? How do you want the final implementation to be?
    I've got something in my own game now, but it is your mod, not mine, so you have final say.
     
  2. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    If it's up to me then I'd rather not have the 'logit' in 'GiveModel2Player' if for no other reason than I already have a custom 'logit' in "Ardent" for when you get the uniform at the slave camp. But that can be removed so you get your proposed 'logit' telling you that you got the uniform, then I can add a questbook entry explaining what you're likely to do with it. So, whichever method is easiest to program and actually work.
     
  3. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Are you using it witn "assign true" or "assign false"?

    Advantage of having it IN the function is that you don't need to worry about it and it is taken care of automatically.
    That might make it simpler to use also in this context: Feature Request - Standard Storyline: Update Nathaniel's clothing as part of the main quest | PiratesAhoy!

    To program, they're both equally simple. But if the log message isn't IN the function, then custom log messages have to be added manually wherever appropriate.
    Allows more control for the people adding those, but it is also more work. Since I'm not actually going to be the one to DO that work, I personally do not really care either way.
    Whatever makes you, @Jack Rackham and @ColonelKetchup30 the happiest to work with. :doff
     
  4. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    That answers my question:
    Code:
          if (PChar.sex == "man")
           {
             logit("I'm taking one of the soldier's uniforms. A disguise might be useful later.");
    //         GiveModel2Player("soldier_spa6_17", false);
             GiveModel2Player("Ardent_S", false);
           }
    
    Three options I can think of:
    1. Keep your code in place and remove the automated text from GiveModel2Player itself
    2. Do as you suggested: keep the automated text and handle your comment through Quest Book
    3. Add a player character attribute you can use to "skip" the automated text if you want to use a custom message instead

    At the moment in my game version you would get a DOUBLE message here, so something still needs to be changed.
    All three are simple enough, so the choice is yours @Grey Roger. :doff
     
  5. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    Option 1 is probably the easiest.

    Note that any time you hire an officer, his outfit will get added to your collection if he's one of your three active party and you look at his outfit from the "Characters" interface. You do not, of course, instantly change to his outfit. Is this handled by "GiveModel2Player", and if so, do you now get 'logit' messages when you do 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,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I think that functionality existed before I ever created "GiveModel2Player", so I don't think that is affected one way or another. :no
     
  7. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    @Grey Roger: So, final verdict then is "no automated LogIt", right?
    Fine by me; I'll modify that in my game code. :doff
     
  8. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    That would be my preference, yes. Thanks! :onya
     
    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,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Alright then. I'll leave the other stuff in there, commented out.
    Just in case anyone finds it interesting in the future.
     
  10. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    @Grey Roger: Final version then, I think:
    Code:
        // GR: Stealing Soldier Uniforms -->
         if (!CheckAttribute(pchar, "receivemodel"))
         {
           if (frnd() < 0.2) pchar.receivemodel = GetRandomModelForTypeExSubCheck(true, "Land_Officers", "man", GetCurrentLocationNation() ); // 20% chance of an officer
           else  pchar.receivemodel = GetRandomModelForTypeExSubCheck(true, "Soldiers"  , "man", GetCurrentLocationNation() ); // otherwise a random soldier
         }
         // GR: Stealing Soldier Uniforms <--
    
    Code:
          // GR: Stealing Soldier Uniforms -->
           if (CheckAttribute(mchr, "receivemodel"))
           {
             if (!CheckAttribute(mchr, "clothes." + mchr.receivemodel))
             {
               GiveModel2Player(mchr.receivemodel, false);           // if you have just defeated a group of soldiers and reinforcements,
               LogIt("You take a uniform from one of the dead soldiers");   // get a free uniform as set by SoldierReinforcements in CCCFunctions.c
             }
             DeleteAttribute(mchr, "receivemodel");
           }
           // GR: Stealing Soldier Uniforms <--
    
    Code:
    void GiveModel2Player(string model, bool assign)
    {
       if(assign)
       {
         SetModelfromArray(GetMainCharacter(), GetModelIndex(model));
       }
    /*   else
       {
         if (!CheckAttribute(GetMainCharacter(), "clothes." + model))  LogIt("You got the " + model + " outfit: " + Models[GetModelIndex(model)].description);
       }*/
       Characters[GetMainCharacterIndex()].clothes.(model) = true;
    }
    
     
  11. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    Just one minor correction. Credit yourself, not me! I may have made the initial suggestion but you're the one who made it happen. :onya
     
  12. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Nah, as far as I'm concerned, this mod is yours. I just gave you the suggestions on how to do it. :doff
     
  13. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    Except that I didn't do anything because I've been busy with other things. More stuff for "Ardent", plus replaying "Hornblower" to see if it works under official Beta 4. (It doesn't. Fixes are due soon...) You did the work, so you should get the credit. At the very least, credit yourself as well. :D
     
  14. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Really? What broke it this time? :modding

    If it had been up to me, this mod would never have been done, because I never did care about it.
    But you do and I just helped. :cheeky
     
  15. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,405
    Nothing too serious, and easily fixed. I'll put updates in the relevant forum section. ;)

    That's the point - you helped. Thanks!
     
    Pieter Boelen likes this.
  16. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,609
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    If I have to be credited for everything I ever helped with, then I can be credited with virtually everything.
    As that would get a bit excessive, I generally credit myself only with stuff that is mine. :wp
     

Share This Page