Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

Prize Crews and the Press Gang
Post new topic   Reply to topic     Forum Index -> Customization & Modding
View previous topic :: View next topic  
Author Message
Mandiuscreel
Seaman
Posts: 171



3189 Gold -

PostPosted: Tue Feb 02, 2016 2:22 am    Post subject: Prize Crews and the Press Gang Reply with quote

I was once again cruising through the yellow-flags, picking and choosing fat, juicy merchant galleons, when it occurred to me that the once-in-awhile offering of men from a captured ship to join the crew is only part of the workings of traditional Caribbean piracy.

According to trial transcripts and court records of the 17th and 18th centuries, captured sailors were often pressed into service as pirate crew, forbidden to leave ship in port, and generally treated as slaves (although they got shares of booty, just like any other pirate). This kind of thing happened often enough that courts in Europe asked pirate crewmen if this was their condition as a matter of course during the trial.

In the game, the chance that crewmen will offer to become crew seems to have a lot to do with the way the ship-to-ship combat went, and, of course, whether or not the crew roster of the attacking ship is full. and it is remarkably small. Not to mention the size of the group of sailors willing to join.

I was wondering if this might be moddable, if anyone knew the address/offset of this particular routine and/or the math involved in determining the chance and group size?
Back to top
View user's profile Send private message Send e-mail
Pirate
Helmsman
Posts: 5579



109543 Gold -

PostPosted: Tue Feb 02, 2016 8:53 am    Post subject: Reply with quote

Since the game was written to have crews from captured ships offer to join you then you can bet there must be a way that can be edited or even or eliminated from the game. As far as the address/offset or math involved I can refer you to my secretary. She don't know either but she sure is pretty. Smile
Back to top
View user's profile Send private message
Captain Teague
Rigger
Posts: 1185



12207 Gold -

PostPosted: Tue Feb 02, 2016 11:17 am    Post subject: Re: Prize Crews and the Press Gang Reply with quote

Mandiuscreel wrote:
I was once again cruising through the yellow-flags, picking and choosing fat, juicy merchant galleons, when it occurred to me that the once-in-awhile offering of men from a captured ship to join the crew is only part of the workings of traditional Caribbean piracy.

According to trial transcripts and court records of the 17th and 18th centuries, captured sailors were often pressed into service as pirate crew, forbidden to leave ship in port, and generally treated as slaves (although they got shares of booty, just like any other pirate). This kind of thing happened often enough that courts in Europe asked pirate crewmen if this was their condition as a matter of course during the trial.

In the game, the chance that crewmen will offer to become crew seems to have a lot to do with the way the ship-to-ship combat went, and, of course, whether or not the crew roster of the attacking ship is full. and it is remarkably small. Not to mention the size of the group of sailors willing to join.

I was wondering if this might be moddable, if anyone knew the address/offset of this particular routine and/or the math involved in determining the chance and group size?

Know how common such a thing was, and never seeing it on Swash, I would love a mod that makes it more common.
_________________
The Code is the Law.
Back to top
View user's profile Send private message
Mandiuscreel
Seaman
Posts: 171



3189 Gold -

PostPosted: Tue Feb 02, 2016 1:51 pm    Post subject: Re: Prize Crews and the Press Gang Reply with quote

Captain Teague wrote:
Know how common such a thing was, and never seeing it on Swash, I would love a mod that makes it more common.


My point precisely.
Back to top
View user's profile Send private message Send e-mail
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Thu Feb 04, 2016 5:37 am    Post subject: Reply with quote

Anything with a text message involved is generally easy to find, so if there's a text message like "Do you want these dudes to join your crew?" then you can find that string in the executable, find all the references to the string, and thereby find the code for that feature.

I haven't played in a long time, so I don't even remember this crew joining feature, but if you give me the text that they use I can take a look.
Back to top
View user's profile Send private message Visit poster's website
Mandiuscreel
Seaman
Posts: 171



3189 Gold -

PostPosted: Thu Feb 04, 2016 6:19 am    Post subject: Reply with quote

It's something like "Your courage impressed the enemy; a group of sailors volunteer to join your crew". The responses are something like "Welcome aboard." or "We've got enough men."

It usually only happens when your crew is small, and/or you defeat the enemy without much difficulty.
Back to top
View user's profile Send private message Send e-mail
AdamMil
Cutthroat
Posts: 279



4747 Gold -

PostPosted: Thu Feb 04, 2016 11:20 pm    Post subject: Reply with quote

Well whaddya know, I already deciphered the code for this a couple years ago. Here's what my notes say:
Code:
if ( g_ships[enemyIndex].nation == NAT_Indian )
{
  crewWillingToJoin = 0;
}
else
{
  remainingEnemyCrew = max(0, min(50, g_ships[enemyIndex].crewCount));
  happiness = GetCrewHappiness();
  crewWillingToJoin = rand1(remainingEnemyCrew * (4 - g_difficulty) * happiness / 16);
}
crewWillingToJoin = min(crewWillingToJoin, GetCrewSpaceAvailable());
if ( crewWillingToJoin != 0 && crewWillingToJoin >= g_player.crew / 10 )
{
  ... ask if they can join ...
}

So basically: Indians never join. At most 50 crew can join. The actual number depends on the difficulty level and how happy your crew seems, plus some random chance. And they won't join if you have 10x as many crew as them. I think both happiness and difficulty range from 0 (mutinous, apprentice) to 4 (very happy, swashbuckler). At best you get 4*4 = 16, and it's dividing by 16 at the end. So the remaining enemy crew (max 50) is scaled down by that factor. Then that's used to generate a random number, so on average you get half the scaled amount. That code's at memory address 45EA9C.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group