• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Included in Build Looting Uniforms from Soldiers

@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.
 
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.
 
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.
Are you using it witn "assign true" or "assign false"?

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.
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
 
Are you using it witn "assign true" or "assign false"?
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
 
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?
 
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?
I think that functionality existed before I ever created "GiveModel2Player", so I don't think that is affected one way or another. :no
 
Alright then. I'll leave the other stuff in there, commented out.
Just in case anyone finds it interesting in the future.
 
@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;
}
 
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
 
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
Nah, as far as I'm concerned, this mod is yours. I just gave you the suggestions on how to do it. :doff
 
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
 
replaying "Hornblower" to see if it works under official Beta 4. (It doesn't. Fixes are due soon...)
Really? What broke it this time? :modding

You did the work, so you should get the credit. At the very least, credit yourself as well. :D
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
 
That's the point - you helped. Thanks!
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
 
Back
Top