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

WIP New Passenger Transfer Interface

Because for one it annoys me when I accidentally move one over and have to put them back, it also doesn’t make sense to be able to. It’s can also be a problem if transferring between companions because it’s not so easy for the player to remember which of the passengers are its officers, as they would probably remember their own. I guess another option is to mark a passenger who is an officer with some text or on their image (like how ships have their class showing on the icon or a passenger’s name), this would greatly avoid any confusion.
A text mentioning that an officer is in your shore party does indeed sound better than not showing them at all.
After all, if you want to assign a shore party officer as captain, why prevent the players from doing that?
As long as it is deliberate.

I actually have a bit of an idea. I’m wondering about the possibility of forcing officers into a captive state, in a story sense. This could allow for a particular type of pirate captain who wants all the plunder for himself and refuses to share anything with his crew. Obviously this would cause severe morale problems and would drastically increase the chances of mutiny, which would present a challenging game for the player. They would have to raid very often and would be very unlikely to find allies, most other pirates would probably hate their guts. A problem for the player could be that they cannot move officers unless they relieve them of their officer role or possibly that wouldn’t be possible either, so they’d have to fire them (which might be refused), or they could pay them a lot of gold to be freed from the captive state. In order to offset the morale problems, food usage could be reduced and its effect on morale increased, and rum intake increased (but the effects being the same, either way increasing morale). Another option is to allow officer mutiny on land, in that one or even all of the officers could decide to turn on the player and attack him! If this were to be done, it would be imperative that officers either do not show up in the passenger list at all or otherwise they are prevented from being moved (which I doubt would be difficult). It’s going beyond the scope of the topic context so if I do put more thought into this then I’ll make a new thread.
You mean as some sort of "officer strike"?

That fits right in with these planned features we've got:
Planned Feature - Balancing and Repurposing Reputation Gain | PiratesAhoy!
Planned Feature - Officer Loyalty | PiratesAhoy!
Planned Feature - Fame to Affect Gameplay in Multiple Ways | PiratesAhoy!

Those are things I've been wanting to tackle forever now, but persistent Beta 4 related bugs and delays have prevented me from doing anything with them.
And I'm taking a bit of a bit of a break from modding at the moment.

I've got ideas aplenty and part of the work is already done. But I don't have the time nor energy to actually put those ideas into the game.
So if you want to do something in that direction, I strongly suggest working it into the foundations we have already put in place. :doff
 
I will certainly take a look at those pages. I’d really like to actually get some functionality into this new interface I’ve made; it’s all well and good the companions being able to transfer between one another but the only real purpose it serves it to make things easier for the player so they don’t have to transfer somebody to their own ship first and then switch to another companion in order to make the transfer, this allows it all in one quick move. But I’d like to think about other ideas which could make use of this.

What I’m thinking about doing is putting the code in place to stop officers from being shown but leaving it disabled, that way it can easily be toggled if necessary with the simple switch of a bool. Even if it’s not used, the MakeOfficersCaptive function I made could still be put into the character utility file in case somebody finds it useful.
 
I mean, something like this is what I’m thinking about...
Code:
   if (!ShowCaptives) {
     if (!ShowOfficers) {
       MakeOfficersCaptive(refShip1)
     }
     cnp = GetNotCaptivePassenger(refShip1,curScrollNum)
     if (!ShowOfficers) {
       MakeOfficersCaptive(refShip1)
     }
   }
   else {
     cnp = GetPassenger(refShip1,curScrollNum)
   }
It’s not exactly working as intended at the moment but hopefully I can sort it.

I think it would be one or the other - if captives are shown, so are officers.
 
Last edited:
My first inclination would be:

Passengers Interface
Always show all characters, officers first, then passengers, then captives.
Officers can be recognized because they're first in the list AND they're showing in the four images below too.

Transfer Interface
Never show captives, but always show all officers and passengers.
Possibly add an extra "label" to indicate which of the passengers are officers (no need to hide them altogether; you can just scroll past).
 
Agreed. The player’s main passenger interface isn’t in question here, I haven’t touched that one and as such this won’t impact upon it in any way whatsoever. I have the bool toggle in place in the transfer interface and will leave officers enabled and prisoners disabled by default. It is pretty much working perfectly except for one problem... the prisoner status is not being reset on officers after leaving the screen and I don’t know why at the moment; the flip-side to this is that if it is reset properly then the list goes wonky also for reasons I can’t establish. Therefore, if the officer toggle is applied then they will remain as captive. I will look into applying a label of sorts, I do think that would be immensely useful.

At some point today I’ll probably post all my changes on this thread so you can take a look at them should you wish to. I’ve made some other changes as well, such as tweaking the save/load INI file to properly use the escape button and also to speed scroll. I personally find it rather annoying how the escape works sometimes, too often I have to press it three times to actually exit a screen!
 
Last edited:
I’ve given up with hiding the officers. I think I’m having trouble with understanding when and where to place the code to make them captive and then to release them because they either get released too soon and show up on the list or they don’t get released at all. This, too...
A text mentioning that an officer is in your shore party does indeed sound better than not showing them at all.
After all, if you want to assign a shore party officer as captain, why prevent the players from doing that?
However, I do have another idea and that is to add a toggle which would allow the player to explicitly dis/allow their own officers being from being listed on the transfer screen. The only way I can think of this working is by completely removing them as passengers and it’s not something I feel should be enforced, so at least this way it would be entirely up to the player.

I’ve tagged their images, it looks nice and works well. Because the original IsOfficer() function references the self-player, I have made a new function which allows the ship to be referenced as well, meaning that if it’s a companion-to-companion transfer then it’ll work.

By the way, why is it that officers are not showing first on the list? This applies to the player passenger screen as well, even though I haven’t edited that file. Did something change or did I mess up? :unsure
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    168.5 KB · Views: 104
Last edited:
I broke everything. I don’t know what happened, it just did. :shrug
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    170.4 KB · Views: 103
I like that label! :onya

But if you have Dynamic Interfaces ON, I think that is where the character names show.
So that would be a bit incompatible....

I thought you were the one reported that officers do not show first in the passengers list.
Haven't the foggiest why though.

In what way are things broken now?
I don't think I can tell from that screenshot.
 
I was joking, it’s far from broken. I went on a mad one and reinvented the entire thing. ;)

The character names never did show up on that screen, nobody set it that way. Nothing in this file ever cared about dynamic interfaces.

Original...
Code:
   while(GetNotCaptivePassenger(refMyCharacter,charQuantity)!=-1)
   {
     charRef = GetCharacter(GetNotCaptivePassenger(refMyCharacter,charQuantity));
     attributeName = "pic" + (charQuantity+1);
     GameInterface.passengers_list.(attributeName).img1 = GetFacePicName(charRef);
     GameInterface.passengers_list.(attributeName).tex1 = FindFaceGroupNum("passengers_list.ImagesGroup","FACE128_"+charRef.FaceId);
     charQuantity++;
   }
My edit...
Code:
   while (GetPassenger(refShip1,charQuantity) >= 1) {
     charRef = GetCharacter(GetPassenger(refShip1,charQuantity))
     string attrName = "pic"+(charQuantity+1)
     GameInterface.passengers_list.(attrName).img1 = GetFacePicName(charRef)
     GameInterface.passengers_list.(attrName).tex1 = FindFaceGroupNum("passengers_list.ImagesGroup","FACE128_"+charRef.FaceId)
     if (IsAnOfficer(refShip1,charRef)) {
       GameInterface.passengers_list.(attrName).str1 = "#Officer"
     }
     if (IsPrisoner(charRef)) {
       GameInterface.passengers_list.(attrName).str1 = "#Captive"
     }
     charQuantity++
   }
I know prisoners don’t show up, but at least that’s there. I actually want to change this, I think it would be an idea to have random people appear in a captured ship’s roster and set to captive mode.

I’ve been trying to put text on the officer icons but it won’t let me. I want to add an unobtrusive piece for their officer role so that I can remove it from their character name when they’re selected, but since I now have the officer icons I probably don’t need to. Speaking of which, I have actually applied the dynamic setting to those icons so they won’t show if the setting is off

As for officers showing up first, I’m pretty sure it used to be like that so I don’t know if any recent changes have done anything, either by means of a patch or some of the stuff you’ve posted which I’ve manually applied. I thought this controlled how they appear...
Code:
 FillFaceList("FourImage.ImagesGroup",refShip1,0)
That’s listed first but it doesn’t make any difference. I doubt it’s the FillFaceList() function since that also defines the officers first.
 
Last edited:
The character names never did show up on that screen, nobody set it that way. Nothing in this file ever cared about dynamic interfaces.
Really? Well, in that case, no problem! :cheers

As for officers showing up first, I’m pretty sure it used to be like that so I don’t know if any recent changes have done anything, either by means of a patch or some of the stuff you’ve posted which I’ve manually applied.
I can't think of any changes made in Beta 4 that should affect it one way or another.
As for the changes I made to your changes, you are a better judge of that than I am;
I didn't actually try any of it, just made some corrections that I thought may be needed.
 
Okay, here’s the deal...

Companions are transferring between one another perfectly fine.
Skill summarising is active, although I don’t know if it means anything.
Officer role can now be changed here too, including for companions.

The only real problem I have is with captains being swapped or removed. This is a proper headache, I don’t know why it’s being so retarded. It’s broken but with some improvisation it does work to an extent, although it clearly requires fixing. Companions cannot transfer captains at all.

The files on the first post have been updated.
 
Last edited:
You mean you cannot swap out the captains of your companion ships?
I know that can be quite tricky and seems to work best when you're out of sight of the sea.
 
It’s not that I can’t swap them, it’s the way it’s being done. I think it’s the myCh and enemyCh interface parameters throwing a wobbler because I’ve forced their values to match the companion numbers, which admittedly is not a normal thing to do but is necessary it would appear. It just seems really temperamental and difficult to understand. God’s Hand keeps sinking them, probably because I robbed them off the French. :(

Oh, and when I said companions can’t swap them... they can, I just disabled it. It’s not working properly if using the player ship either, so it’s either what I said above or I’ve done something wrong.
 
Last edited:
Okay, I can officially say that this interface completely breaks capturing ships due to the problem with transferring captains. As a result, I have reinstated the original file and instead effectively duplicated it.

My interface should only be accessible via the main transfer screen, with the ransack menu leading to the original. Hopefully I’ll be able to sort this out so that the same interface can be used whether at sea or on land.

Because of this I will no longer be uploading the file as transfer_characters.c, but rather transfer_officers.c. The only other relevant file should be transfer_main.c with this function altered as so...
Code:
void CharactersProcess()
{
   if (bAbordageStarted || bSeaActive) {
     interfaceResultCommand = RC_INTERFACE_TRANSFER_START_CHARACTERS
     Exit()
   }
   if (!bAbordageStarted && !bSeaActive) {
     interfaceResultCommand = RC_INTERFACE_TRANSFER_START_OFFICERS
     Exit()
   }
}
 
Last edited:
Aye, but it’s only this bit I have a problem with, everything else is working really, really well. Actually, after looking at the duplication issue I might have noticed the problem I have with swapping captains... I think I removed the bit which actually does it. I reckon it’s bugged either way so long as I force myCh and enemyCh, as in the interface parameters, to match the companion’s slot number. But... what I’m thinking is that I could instead not do that if the first ship in the transfer is the player; if it is a companion then the worst I have to do is disallow the captain from being moved, as long as it works if doing so from the player of course.
 
Okay, this interface is a good as done. I haven’t been able to properly fix the captain situation, I really don’t know what the problem is with it. No bother, the player must use the remove button to swap the captain with a passenger and confirm the action - upon doing so, the interface will bail to the ship screen, forcibly reloading the data. The problem I actually have is that the icon for the captain is not updating when changed which means the interface still sees the old captain, which would mean that making any further changes would seriously mess things up. Booting the interface out circumvents this problem. If it can be fixed then it would be trivial to revert the action back to clicking the passenger to move him across, or indeed the button could be left in place.

Instead of using the original, I have renamed the file to transfer_officers.c and left the original intact. In order to load this new interface, I have placed the following code into the first function of transfer_main.c...
Code:
   Interfaces[INTERFACE_TRANSFER_CHARACTER].SectionName = "interface\transfer_officers.c"
   Interfaces[INTERFACE_TRANSFER_CHARACTER].IniFile = "RESOURCE\INI\"+GetCurrentInterfacePath()+"\transfer_officers.ini"
In order to prevent the interface from being used during boarding, this has also been set in ransack_main.c...
Code:
   Interfaces[INTERFACE_TRANSFER_CHARACTER].SectionName = "interface\transfer_characters.c"
   Interfaces[INTERFACE_TRANSFER_CHARACTER].IniFile = "RESOURCE\INI\"+GetCurrentInterfacePath()+"\transfer_characters.ini"
I won’t include the files, I’ll leave these changes to discretion.

I should note that captains cannot be moved during a transfer at sea (this is due to the problem, but it also probably makes sense anyway to not allow it). The new interface will be used but the remove button is always disabled. Also, companions are now able to use the button as it is working just fine for them.
 
Last edited:
I have actually fixed the problem. :shock The button is staying, though... I really like it.

I still don’t quite understand it but I fixed it, so no more having to bail the interface. I think I know what to actually look at now because the fix I applied is a bit wayward, although it works. Now all I need to do is make this compatible with boarding and it’s ready to go. Actually, the interface can quite easily be switched to the original one during boarding, but I want to look at how the new one might be useful if capturing people.

By the way, I don’t know if I’ve just been making random edits here and there, probably for ease of debugging if anything else, but are captains supposed to be able to be transferred at sea? I just did this and the captain left my command, and because he was originally a pirate (he actually was a pirate from a piratey place, I hired him after he murdered another pirate in pirate town) he immediately engaged the port! He was still green on my radar but that didn’t prevent me from landing him a full broadside, and then he decided to board me! I had to shoot his bosuns umpteen times each with my musket because they had stupid health. And then I couldn’t do him any damage in the cabin - he was just standing there staring at me and I got bad rep for trying to make him keelhaul because he didn’t have his blade drawn. Then I removed my officers from their slots and that’s when they decided to attack him. Then he died, like a pirate. Is this supposed to happen, or what?
 
Last edited:
You are supposed to be able to do all sorts of transfers at sea.
Not sure if swapping out the captain is one of them though.

Leaving your command is definitely NOT meant to happen.
Make sure that after the captain swap, there is somehow a call to RefreshBattleInterface (true);
 
Back
Top