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

Need Help Action Alignment

MacVega

Landlubber
Greetings everyone! I've been a lurker for some time on these forums but have recently surfaced having taken a a personal curiosity in some of the mechanics of this set of games, which is still in my opinion some of the best representation of naval warfare games despite their substandard vanilla builds. Whenever I have had a question I have come and scoured these forums for answers and you guys are awesome.

With salutations out of the way I will get down to my problem I need aid on. I have recently taken an interest in loyalty and reputation and have exhausted every avenue on the forums to find a solution for my particular need. What I wish to know is where the values and code is stored for determining the alignment of the action that the officers react to.

For example if one wanted to make smuggling considered a good action by good aligned officers, though that is not the specific thing I wish to change I thought it was the easiest example to use in order to get what I am looking for across. I personally feel boarding and taking prisoner of an enemy vessel should not be a 'bad' action. As a diehard hornblower fan this type of approach is ridiculous in warfare.

I know its not in officers.c because that tweaks how they react to the actions not if the actions themselves are considered bad or good. If any of you could point me in the right direction I would be most grateful!

Edit: To avoid double posting I've done some digging and so far the only thing I have found is in dialog of all things. This particular snippet is from Ransack_captain_dialog.c From what I can surmise from the script so far.

Code:
case "free_in_sea_3":
           [COLOR=#ff0000] OfficersReaction("bad");[/COLOR]
            if (rand(5) == 1)
            {
                dialog.text = DLG_TEXT_BASE[32];
                link.l1 = DLG_TEXT_BASE[33];
                link.l1.go = "free_in_sea_4";

Highlighted in red is the only mention I have found so far of determining an officers reaction to a chosen action. While I am not sure which case is which yet, possibly because I have never found out how to interact with my prisoners outside of the UI Interface, let alone finding away for slave cargo to go free through dialogue.

No hint of where officer reactions to boarding, or reactions from the choices chosen from the interface whether to keep the sailors as slaves, throw the sailors overboard, or to throw the captain overboard/prisoner. Stands to reason it would be in interface, but I could easily be wrong. Still open for directions, :treasure:
 
Well here's an update on a completely unrelated note, which I will try and share with everyone should it...

a) survive the testing phase I will put it through.
b) be approved by buho for community sharing seeing as the hack itself is his work, and I've merely written it into GoF 2.0's code while fixing the chronic run-time error present in the base code.

I should probably explain what I am rambling about at three in the morning for. After much time, I finally got tired of crashing to desktop every time I spectacularly blew a mast into naught but splintered timber off an upper tier vessel. So, I stumbled across buho's hack made for GoF 1.1 in August of 2011 and decided to try and make it work for me. In the meantime I will test it and send him a message in the morning. Hopefully, he is still active.

If anyone has anything about what I am still searching for, I am still welcoming ideas. Though the odds and my luck will be Akella concatenated it willy nilly in a plethora of files. So, it's probably not in any one concentrated place.
 
If you add your PROGRAM folder to the Windows Search Index, you can search it for OfficersReaction and find all instances where that function is called, including hopefully where that function is defined.
 
I completely forgot that was possible. :facepalm I remember searching for files was possible but forgot that you could index them to search for what was in the files...Thanks Pieter! :cheers That was a great help. The function is defined in officers.c which I knew about but could not find where they were being called as good or bad. So far my search, after I spent a very short amount of time learning where Microsoft stores its indexing options on Windows 8 has revealed the function is called in the following locations. It's a long list.
  • AIShip
  • Ransack_captain_dialog
  • transfer_main
  • CharacterUtilities
  • LAI_boarding
  • Quests_Reaction
  • Common_Mayor
  • Common_rumors
  • Usurer_dialog
  • Smuggler_OnShore_dialog
  • convoy_passenger
  • LAI_Utilites
  • Common_poorman
Turns out I was right about the function being called in many different files. Anyway I'll update this in a while with what each function call has to do with right next to the unordered bulletined files, if not for just my own reference but as a helpful tool for others who may wish to know the same information.
An update on the compiled hack though. It has caused more crashes at sea than before! I'm not entirely sure why that is, but I have placed it to the side for now until I can understand it a little bit more. The concept should be sound but the execution seems to be flawed. :shrug
 
Back
Top