• 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 Fightmode when random people in store

Johanno

Sailor Apprentice
Storm Modder
Sometimes people apeare by random in stores, loansharks-offices ...
If you know open a chest fightmode starts(i think because the houses are listed as private or something like that, because it happend for me only in that house).
savegame:https://www.dropbox.com/s/45h1w7ikr999ouz/-=Player=- Barbados. Loanshark's Office. August 23rd, 1751?dl=0
open the chest and close it. now the loan shark is frightened and if you leave and comeback later he still is in fear of you and won't talk to you.
My workaround:
comment out those two lines in PROGRAMM\dialog.c:
Code:
  Line 49:  //Если персонаж не готов говорить выходим
  Line 50:  if(!LAi_Character_CanDialog(mainChr, Character)) return false;
  Line 51:  //Если персонаж не готов говорить выходим
  Line 52:  if(!LAi_Character_CanDialog(Character, mainChr)) return false;
 
Last edited:
I just found out, that the loan shark won't be afraid if you leave and come back, but the gunsmith on La Grenada in Sao Jorge does.
 
Last edited:
Which location is that?
Probably just needs a vcskip attribute.
 
what do you mean with which location?
I mean, which town are you in?

Anyway, we should be able to tell from your savegame.
Hopefully @Grey Roger can help you to add a "vcskip" attribute through console.
I won't be able to until Monday and today I won't be around enough to give a detailed explanation.
 
Adding "vcskip" through console probably won't help. You could have something to set "vcskip" on where you're standing, but since you'll already have entered the loanshark office, the other people will already be there.

Picking a random town ("Oxbay", a.k.a. Speightstown), the loanshark office has 'Locations[n].vcskip = true;'. What I don't understand is why stores, shipyards and blacksmiths, which don't have that, don't have random people wandering around. Maybe the code which handles them knows not to generate random people somehow. Either the loanshark code needs to be altered to do the same, or someone needs to go through all the files in "PROGRAM\Locations\init", find the loansharks' offices, and add 'Locations[n].vcskip = true;' to all of them.

Meanwhile, my advice to @Johanno is, don't open other people's chests when there are witnesses around. Basic rule of burglary, only rob a place when it's deserted and nobody can see you doing it. :ninja
 
Adding "vcskip" through console probably won't help. You could have something to set "vcskip" on where you're standing, but since you'll already have entered the loanshark office, the other people will already be there.
You can leave the bank, add "vcskip" through console, then return. That will get rid of those random characters.

What I don't understand is why stores, shipyards and blacksmiths, which don't have that, don't have random people wandering around. Maybe the code which handles them knows not to generate random people somehow. Either the loanshark code needs to be altered to do the same, or someone needs to go through all the files in "PROGRAM\Locations\init", find the loansharks' offices, and add 'Locations[n].vcskip = true;' to all of them.
The location "type" attribute plays a role here. "store" never gets random characters, but "house" can.
Many of the loansharks are "house" and therefore (unintentionally) can get random characters.
Alternate solution: Set those locations to "store".
 
I won't have time to do anything with this for at least another week.
Hopefully @Grey Roger can make some sense of it in the meantime.
 
Either the loanshark code needs to be altered to do the same, or someone needs to go through all the files in "PROGRAM\Locations\init", find the loansharks' offices, and add 'Locations[n].vcskip = true;' to all of them.
The location "type" attribute plays a role here. "store" never gets random characters, but "house" can.
Many of the loansharks are "house" and therefore (unintentionally) can get random characters.
Alternate solution: Set those locations to "store".
So someone has to go through all the files in "PROGRAM\Locations\init", find the loansharks' offices, and replace 'locations[n].type = "house";' with 'locations[n].type = "shop";'.

Or just don't try to rob a bank while other customers are around. xD
 
So someone has to go through all the files in "PROGRAM\Locations\init", find the loansharks' offices, and replace 'locations[n].type = "house";' with 'locations[n].type = "shop";'.
Probably. That or "vcskip" attributes should do the trick. :yes

Or just don't try to rob a bank while other customers are around. xD
I think there is a chance that the "random characters" being generated are hostile to begin with.
So you might get into that situation even without deliberate robbing on the player's part....
 
Probably. That or "vcskip" attributes should do the trick. :yes
That was my point. Whether by adding "vcskip" or by replacing "house" with "shop", someone has a lot of file-searching to do...

I think there is a chance that the "random characters" being generated are hostile to begin with.
So you might get into that situation even without deliberate robbing on the player's part....
The original post did say:
If you know open a chest fightmode starts(i think because the houses are listed as private or something like that, because it happend for me only in that house).
...
open the chest and close it. now the loan shark is frightened
I've never provoked anyone who was in the loanshark office at the same time as me, so have never been attacked or had people turn frightened, whereas @Johanno did provoke them by opening a chest.

Of course, as these are random encounters, it's presumably possible that there may be the same sort of random thug who attacks you outside. Pretend he's the one trying to rob the bank and do the decent thing. :D But as he's attacking you, then you fighting back doesn't count as upsetting otherwise peaceful people, so the other customers shouldn't turn hostile and the loanshark shouldn't turn frightened. (Unless you accidentally hit one of the other customers, that is.)
 
That was my point. Whether by adding "vcskip" or by replacing "house" with "shop", someone has a lot of file-searching to do...
Thankfully there aren't that many banks in the game. 15 at most?
When it comes to file-searching, that isn't anywhere close to a lot. Not in comparison to the things I've had to do in the past! :shock
 
@Grey Roger: Do you reckon you would be able to look into this one?
The Notepad++ "search in all open files" should make this quite doable.

Or perhaps @ANSEL might be willing to? This is not a complicated thing to change.
 
Thanks for reminding me that you already did this, @ANSEL! I've got to admit, I completely forgot. :facepalm
(In my defence, it is being really very busy here these days.... :shock )

Anyway, I have now merged these files with the ones I had in my game, so now it includes also your added shop.

I did change some "store" lines to "shop", but other than that it looks good.
So this bug should now also be properly fixed! :cheers
 
Im sorry to confuse you. I forgot all about my reinstall (reason for that Microsoft terror etc) so I have to correct myself.
So here is the corrected places. Sorry and sorry again. :modding
I think your previous upload was better? This one sets one of them back to "house" for Oxbay. :confused:

Anyway, I think I already have it merged and installed correctly.
 
Back
Top