• 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!

Fixed Random Sailors Sit Tavern Dialog: Various Errors

Sorry, i'm back. For now at least. If i remember correctly, the tavern soldiers and random patrols still need doing, of which the former steel needs a lot of discussion on what we actually want them to do. It's quite uncertain right now.
 
Some related points:
- I'll see about sorting out some LAi groups to prevent this problem: Confirmed Bug - Friendly guards attacking you | PiratesAhoy!
- Had to fix some typos in here: Fixed - Random Pirates without dialogue | PiratesAhoy!
- I think those random pirates still need their "turning hostile" code moved to an "exit" case like I did for some of those other dialogs

Who does and doesn't turn hostile when you get caught is indeed still somewhat up for debate.
But if nobody cares to comment, my suggestion is to keep that as it currently is.
 
Who does and doesn't turn hostile when you get caught is indeed still somewhat up for debate.
But if nobody cares to comment, my suggestion is to keep that as it currently is.

I think that would be best. This is going far enough over my head as it is.
 
- I think those random pirates still need their "turning hostile" code moved to an "exit" case like I did for some of those other dialogs

Here you go. This should have the typo you fixed in there as well.
 

Attachments

  • random_pirates_group_dialog.c
    3.8 KB · Views: 162
I'm unsure of which parts of the random sitting sailors still needed adjusting. Problem of not working on it for several weeks i guess. I'll have another dig through the file to see if we've got everything covered.
 
I've made some more adjustments to the random sitting sailors. Some of the IF checks were not quite right yet, and some circumstances were not covered, like not using a false flag while being personally hostile. It should work better now.
 

Attachments

  • Random_sailors_sit_tavern_dialog.c
    13.3 KB · Views: 173
  • Random_sailors_sit_tavern_dialog.h
    2.7 KB · Views: 156
Slight correction. I've made it so that soldiers don't spawn in pirate towns. It was already partially in place, but it's now more efficient.
 

Attachments

  • Random_sailors_sit_tavern_dialog.c
    13.3 KB · Views: 184
Thanks, @morgan terror! :doff

For reference, this is how I set up the checks in the guards dialog:
Code:
        // PB: You are a KNOWN enemy because you're flying a hostile flag
         if (GetFlagRMRelation(sti(Npchar.nation)) == RELATION_ENEMY)
         {
           [...]
         }
         else
         {
           //MT: If at war with the nation the guard belongs to, there is a chance to be detected (false flags should only occur when at war):
           if (GetNationRelation(PERSONAL_NATION, sti(Npchar.nation)) == RELATION_ENEMY && frnd() < GetChanceDetectFalseFlag())
           {
             [...]
           }
           else // Everything is OK
           {
             [...]
           }
         }
Seems a bit shorter than what you've got in place now, so maybe you could use that to simplify things a bit. :doff
 
Thanks, @morgan terror! :doff

For reference, this is how I set up the checks in the guards dialog:
Code:
        // PB: You are a KNOWN enemy because you're flying a hostile flag
         if (GetFlagRMRelation(sti(Npchar.nation)) == RELATION_ENEMY)
         {
           [...]
         }
         else
         {
           //MT: If at war with the nation the guard belongs to, there is a chance to be detected (false flags should only occur when at war):
           if (GetNationRelation(PERSONAL_NATION, sti(Npchar.nation)) == RELATION_ENEMY && frnd() < GetChanceDetectFalseFlag())
           {
             [...]
           }
           else // Everything is OK
           {
             [...]
           }
         }
Seems a bit shorter than what you've got in place now, so maybe you could use that to simplify things a bit. :doff

That's what it used to look like for the sailors as well, but i thought it failed to take personal hostility into account. Now i see that the hostile flag check does just that, since that includes the personal flag. I'll change it back.
 
Here's the adjustment. It's a little bit larger than what the guards have, since the sailors include a branch for when you're not personally hostile but are using a hostile flag. The soldiers don't really need this, since their dialogue makes sense either way. Hopefully this will finally be bug-free now. Player's are constantly running into these guys, so this really needs to work. The bugs this code originally had were relatively harmless, but now not so much.
 

Attachments

  • Random_sailors_sit_tavern_dialog.c
    13.2 KB · Views: 179
@morgan terror: Please look at attached file with WinMerge.
I made some further changes to hopefully maintain some of your original intentions from the previous version.
But you should probably check that.... :wp
 

Attachments

  • Random_sailors_sit_tavern_dialog.c
    13.2 KB · Views: 181
@morgan terror: Please look at attached file with WinMerge.
I made some further changes to hopefully maintain some of your original intentions from the previous version.
But you should probably check that.... :wp

You've moved the location type check back out of the case, i see. That should be okay. It makes more sense anyway.
 
You've moved the location type check back out of the case, i see. That should be okay. It makes more sense anyway.
The location nation one, you mean? As far as I could tell, you lost this change of yours, so I put it back in:
Slight correction. I've made it so that soldiers don't spawn in pirate towns. It was already partially in place, but it's now more efficient.
And added some brackets to hopefully make it do what you intended it to.
 
The location nation one, you mean? As far as I could tell, you lost this change of yours, so I put it back in:

And added some brackets to hopefully make it do what you intended it to.

I actually didn't lose it, i just implemented it differently by placing the location distinction into the exit_soldier case itself. What you have there now is better though. The file should be released for testing in the state you've now got it in.
 
Back
Top