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

Trig's general git shop

Agentad's code does require a new game though I could give you some console code to make it work on an existing game too.

1. Please extract attached file to RESOURCE\MODELS\Heads and see if that fixes it.

2. All Nathaniel Hawks? That happens when there's a model error somewhere. The "boarding crew uniforms" code doesn't work quite right, especially on non-default settings.
Did you change any of the settings for that mod yourself?

3. Unfortunately that is intentional to prevent worse bugs. Before that was done, the game's flags would get severely messed up as the game doesn't understand things when flags are missing.

4. Also probably related to the flags mod, though all our efforts to track down the root cause have failed so far. :modding

5. I recall someone making some improvements to that code which should be already in Beta 2. Still not making sense? DRAT! :(

Only big ships allow for emblems on sails because any non-square-rigged ship looks weird with them.
I'd still want to rewrite that code to limit it to only those ships for which it REALLY looks weird, but that'd require checking all ships with emblems and adding an attribute to all of them.
Possible, but a lot of work. It's possible to force your sails onto your ship through the console. If you want, I'll give you some code for that. :doff

6. Probably game engine limitations; the game never was intended to have DirectSail. Maybe we could add some code to make you lose your ship if it is too far from you on a location reload.
However, that would probably be really annoying to players.

7. Not sure, there might be some code governing the chance somewhere. I'd have to search, for which I don't have the time at the moment. :?
 

Attachments

  • h_Gener_fra_16.zip
    16 KB · Views: 83
Agentad's code does require a new game though I could give you some console code to make it work on an existing game too.

Well, I can help test the code if I receive both, his mod and the console code. And install instructions :p

1. Please extract attached file to RESOURCE\MODELS\Heads and see if that fixes it.

It does. Thank you.

2. All Nathaniel Hawks? That happens when there's a model error somewhere. The "boarding crew uniforms" code doesn't work quite right, especially on non-default settings.
Did you change any of the settings for that mod yourself?

Not that I'd know. I only changed in-game advanced settings a bit, but didn't see any boarding crew uniform options there...

Only big ships allow for emblems on sails because any non-square-rigged ship looks weird with them.
I'd still want to rewrite that code to limit it to only those ships for which it REALLY looks weird, but that'd require checking all ships with emblems and adding an attribute to all of them.
Possible, but a lot of work. It's possible to force your sails onto your ship through the console. If you want, I'll give you some code for that. :doff

No need, thanks. I got it working as I wanted first by replacing the White sails, then with Hylie's suggestion by replacing the Che ones I wasn't going to use anyway. :)
 
2. Crew in battle and their outfits. I started out with random piratey looking fellows, then as I gained some rank from Holland, England or France they automatically switched to their army uniform, but now, when I've progressed even a bit further up the ranks, they all must have gooten hold of Ahoy! magazine with all them pirate celebrities in it and all of a sudden all trimmed their beards and ordered the same clothes on-(ship of the)line to all look like exact clones of Nathaniel Hawk. I'm sure they also shave their armpits and the ship reeks of perfume, bloody pansies. I'm confined to my cabin, depressed, with a casket of rum under my pillow. Any way to implement selecting a dress-set for your crew?

in "InternalSettings.h"

go to:

// Models for Nathaniel's boarders.
// These are filenames from resource\models\characters but with extra character at the end describing whether they are
// men ("M"), ladies ("W") or skeletons ("S"). Empty string ("") gets stock default.

Code:
#define BOARDERMODEL "boarder" // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
// "marine", "corsair", "masked", "skeleton", "girl", "soldier" (soldiers of current flag),
// "boarder" (Nathaniel's soldiers); default: "standard"
 
#define NATHANIEL_BOARDER_0 "daniell3W"
#define NATHANIEL_BOARDER_1 "Offic_perM"
#define NATHANIEL_BOARDER_2 "Soldier_Per1M"
#define NATHANIEL_BOARDER_3 "Soldier_Per2M"
#define NATHANIEL_BOARDER_4 "Soldier_Per3M"
#define NATHANIEL_BOARDER_5 "Soldier_Per4M"
#define NATHANIEL_BOARDER_6                    "Soldier_Per5M"
#define NATHANIEL_BOARDER_7                    "Soldier_Per6M"
#define NATHANIEL_BOARDER_8                    "beatriceAW"
#define NATHANIEL_BOARDER_9                    "9td_0W"
#define NATHANIEL_BOARDER_10            "downgirl2W"
#define NATHANIEL_BOARDER_11            "towngirl2_1W"
 
#define BOARDER_INDEX 0 // INT - range= -1,100 , Select model for Nathaniel boarders.
// -1: random (generates different sets for every deck; works also for remaining groups),
// 0: sequential (NATHANIEL_BOARDER_1 to NATHANIEL_BOARDER_5; works also for remaining groups),
// 1-99: one selected model for all boarders (works also for remaining groups in range from 1 to 99),
// 100: sequential (NATHANIEL_BOARDER_6 to NATHANIEL_BOARDER_10; for remaining groups identical to 0).


here are my changes for my crew that you can see:

#define BOARDERMODEL "boarder" //so your personnal crew choosen below will be used
#define BOARDER_INDEX 0 // here just put 0 it choose from: define NATHANIEL_BOARDER_1 to define NATHANIEL_BOARDER_11 and then define NATHANIEL_BOARDER_0

so BOARDER INDEX not fully works as intended in code but anyway it works as im saying i tested that during a long time :)

inside "" you must put the id model from modelinit.c + M or W + S like i did (m for men, w for women, s for skeleton)

in my code you can see my crew it starts with "Offic_perM", "Soldier_Per1M", "Soldier_Per2M".... to "towngirl2_1W" then "daniell3W" then it restart to "Offic_perM" (it will always launch in that order so if ther eis only 1 spawning crew ou will get only the "Offic_perM" on the deck, perhaps more at next deck etc.. of course your "avtive" officers will come too in priority)


i fixed some little mistake about model period too, especially about so crew mistake of some faction, like the portuguese officer never appearing in golden age of piracy during boarding cause of a wrong spelling in the nation_init.c so if you get sometime enemy boarding mistake, you should not getting it in next version

look this page and the next pages too http://forum.piratesahoy.net/index....a-modpack-build-14-beta-21-full/page__st__300 i gave some fixed files, some are outdated because i worked more on period mod after that but you should get little less mistakes
 
// Models for Nathaniel's boarders.
// These are filenames from resource\models\characters but with extra character at the end describing whether they are
// men ("M"), ladies ("W") or skeletons ("S"). Empty string ("") gets stock default.

Code:
#define BOARDERMODEL 				"boarder"	// Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !): 
// "marine", "corsair", "masked", "skeleton", "girl", "soldier" (soldiers of current flag),
// "boarder" (Nathaniel's soldiers); default: "standard"

#define NATHANIEL_BOARDER_0			"daniell3W"
#define NATHANIEL_BOARDER_1			"Offic_perM"
#define NATHANIEL_BOARDER_2			"Soldier_Per1M"
#define NATHANIEL_BOARDER_3			"Soldier_Per2M"
#define NATHANIEL_BOARDER_4			"Soldier_Per3M"
#define NATHANIEL_BOARDER_5			"Soldier_Per4M"
#define NATHANIEL_BOARDER_6                     "Soldier_Per5M" 
#define NATHANIEL_BOARDER_7                     "Soldier_Per6M" 
#define NATHANIEL_BOARDER_8                     "beatriceAW" 
#define NATHANIEL_BOARDER_9                     "9td_0W" 
#define NATHANIEL_BOARDER_10            "downgirl2W" 
#define NATHANIEL_BOARDER_11            "towngirl2_1W" 

#define BOARDER_INDEX				0			// INT - range= -1,100 , Select model for Nathaniel boarders.
// -1: random (generates different sets for every deck; works also for remaining groups),
// 0: sequential (NATHANIEL_BOARDER_1 to NATHANIEL_BOARDER_5; works also for remaining groups),
// 1-99: one selected model for all boarders (works also for remaining groups in range from 1 to 99),
// 100: sequential (NATHANIEL_BOARDER_6 to NATHANIEL_BOARDER_10; for remaining groups identical to 0).

I copied this into my Settings, F11'd, but still get Nathaniels for boarders. :?
In Croix campaign.
Maybe I need to start new game?

Edit:
Thinking of just starting a new one. Where do I get your weapons mod?

Edit2:
Attached error.log of the last couple of days. Maybe something revealing there?
 

Attachments

  • error.log
    3.2 KB · Views: 94
Hello. Downloaded Community build 13 a week ago and I feel compelled to come here and say thanks.
It is literally the best mod for any game I have ever seen, really fantastic work.
It really makes this somewhat average game into a properly immersive, complex masterpiece, a worthy successor to the original Sea Dogs.
Many thanks to everyone involved.
 
The reason why the boardermodel settings are NOT in the Advanced Options menu is because I'd recommend not changing them; the code doesn't work quite right.
Remind me again in two weeks when I'm at home and maybe we can do some tests. In the meantime, hold onto your savegame with everything wrong.
We should be able to figure it out.

To make Agentad's mod work without starting a new game, open PROGRAM\console.c and find:
Code:
void ExecuteConsole()
{
ref pchar = GetMainCharacter();
if (!bSeaActive) ref lcn = &Locations[FindLocation(pchar.location)];
ref ch;
int i;
int limit;
Below this add:
Code:
	for(int i=0; i<CHARACTERS_QUANTITY; i++)
{
ref curChar = GetCharacter(i);

if (isSoldier(curchar) > -1)
{
TakeItemFromCharacter(curchar, GetCharacterEquipByGroup(curchar, BLADE_ITEM_TYPE));
TakeItemFromCharacter(curchar, GetCharacterEquipByGroup(curchar, GUN_ITEM_TYPE));

//ARF change: sword equip depends on nation char (later periods) i always put the less rare swords
if(GetCurrentPeriod() >= PERIOD_GOLDEN_AGE_OF_PIRACY)
{
switch(sti(curchar.nation))
{
case ENGLAND:
GiveItem2Character(curchar, "blade39");//ARF: Gold Handled Naval Dirk, awesome looking (available from golden age of piracy)
break;
case FRANCE:
GiveItem2Character(curchar, "blade3");//ARF: Badelaire (available in all periods but guards get later)
break;
case SPAIN:
GiveItem2Character(curchar, "blade47");//ARF: Light Tizona (available in all periods but guards get later)
break;
case PORTUGAL:
GiveItem2Character(curchar, "blade29");//ARF: Portuguese Officer's Sword (available in all periods but guards get later)
break;
case HOLLAND:
GiveItem2Character(curchar, "blade26");//ARF: Solingen Rapier (available from spannish main but guards get later)
break;
case AMERICA:
GiveItem2Character(curchar, "blade27");//ARF: Bosun's Choice {no faction} (available from golden age of piracy)
break;
case PIRATE:
GiveItem2Character(curchar, "blade50");//ARF: Venetian Navy Cutlass {pirate sword} (available from golden age of piracy)
break;
// default:
GiveItem2Character(curchar, "blade36");//ARF: hunting sword (all periods available) only for "non regular" nation
}
GiveItem2Character(curchar, "pistolmket"); //musket for periods from golden age of piracy
curchar.equip.gun   = "pistolmket";
if (ENABLE_AMMOMOD) {
TakenItems(curchar, "gunpowder", 1 + rand(2));
TakenItems(curchar, "musketbullets", 1 + rand(1));
}
}
//ARF: sword equip depends on nation char (for earlier period) i always put the less rare swords
else
{
switch(sti(curchar.nation))
{
case ENGLAND:
GiveItem2Character(curchar, "blade22");//ARF: Corsair's Pride (available all periods but guards get earlier)
break;
case FRANCE:
GiveItem2Character(curchar, "blade9");//ARF: French Admiralty Rapier (not available after golden age of piracy)
break;
case SPAIN:
GiveItem2Character(curchar, "blade16");//ARF: Tizona (not available after golden age of piracy)
break;
case PORTUGAL:
GiveItem2Character(curchar, "blade15");//ARF: Iberian Longsword (not available after golden age of piracy)
break;
case HOLLAND:
GiveItem2Character(curchar, "blade23");//ARF: Dutch Admiralty Sword (available all periods but guards get earlier)
break;
case AMERICA:
GiveItem2Character(curchar, "blade10");//ARF: piranha {no faction} (not available after golden age of piracy anyway AMERICA doesnt exist early)
break;
case PIRATE:
GiveItem2Character(curchar, "blade6");//ARF: Schiavona {pirate sword} (not available after colonial power)
break;
// default:
GiveItem2Character(curchar, "blade36");//ARF: hunting sword (all periods available) only for "non regular" nation
}
GiveItem2Character(curchar, "pistol7"); //ARF: gave brace of small pistol for earlier periods
curchar.equip.gun   = "pistol7";
if (ENABLE_AMMOMOD) {
TakenItems(curchar, "gunpowder", 1 + rand(2));
TakenItems(curchar, "pistolbullets", 1 + rand(1));
}
}
curchar.equip.blade = FindCharacterItemByGroup(curchar, BLADE_ITEM_TYPE);
}
}
Load your savegame and press F12 for the change to take effect. Let me know if it doesn't work.

Agentad, it just occurs to me that for performance's sake, we should move this code out of the ChangeCitizenNation function.
This function could be executed multiple times or never on a new game, so the code would be executed more times than necessary or never.
Better to have it always executed, but only once. Suggest putting the exact code as posted above it in InitTownNationalities() instead and restoring ChangeCitizenNation to the Beta 2 state.

Also, I think this does NOT yet work for randomly generated soldiers, such as story-generated ones, soldiers on boardings and on regular town soldiers after they've been killed and "resurrected".
This would require testing. If that is the case, we could make this into its own function and have it called wherever necessary to make it work right.
 
to triglav :)

the boarding model changes for me works only after a new game if i remember good

about weapons mod, random crew and other AI encounter should already equip the right weapons (the only things i fixed were about guns)

about the town guards, we are working on it as you can see

to pieter :)

story generated soldier are a different and not considered as random AI (of "LAi_equip") or regular soldier (the code we are working on), they are considered as quest character (which can equip with "LAi_equip" but without considering if they are soldier or not

soldiers in boarding arent affected with town guard code but the weapons mod inside "LAi_equip" already equip soldiers with the "no faction" weapons or "soldier's faction" weapons so boarding shouldnt be a problem (and we need to let it as it is for boarding weapons balance)

calling one time the code is a good idea but the problem will become the resurected soldier

WARNING: replace
Code:
for(int i=0; i<CHARACTERS_QUANTITY; i++)  
{  
ref curChar = GetCharacter(i);
by (cause the "i" var. already exists)
Code:
for(int j=0; j<CHARACTERS_QUANTITY; j++) 
{ 
ref curChar = GetCharacter(j);

EDIT: even after the change (i dont get new error) the soldiers only equip the default "blade4" blade, code is not working there (tested in 2 storyline + 2 "f11" saved game)
 
Agh! Will need to look at getting this sorted properly in two weeks. Please remind me then. :doff
 
Hmmm...

Now, for whatever reason I don't seem to have any boarders apart from my own officers. Hard to win battles this way. :modding

Also noticed:
- Fort cannon fire range is incredible, past 4000 yards. What cannon could shoot that far back then?
- Bermuda sloop needs resizing. For a tiny boat it's about twice too large.
- Some axes could also do with a resizing, to about half their current size.
 
You lost your boarders? That is unusual. Try looking in the nearest tavern. :j2

This site isn't the most detailed, but it does mention one fort in 1702 that had culverins that had a range of 3,000 yards. Rob Ossian's Pirate's Cove

We hope to get a new Bermuda Sloop later this year. The current one has too many problems to repair.
 
Hmmm...

Now, for whatever reason I don't seem to have any boarders apart from my own officers. Hard to win battles this way. :modding

dont forget to put the exact model id in "" and add W or M or S at end (depends what model you added, if its not skeleton , man [M] or woman [W], dont make that model as boarder) of the id model like my example, i first forgot to add that letter to each model so they didnt appear in boarding but when i added it it worked perfectly for me

Also noticed:
- Fort cannon fire range is incredible, past 4000 yards. What cannon could shoot that far back then?

32pdr canons have the best range of the game (instead of carronade which are more powerful with less range) 32pdr are only for biggest ship but the 24pdr are really good already in range thats for ships

about fort thats true they have really hard range, they fire a lot on lands between the fort and the target when the target is at opposite side of the fort


 
dont forget to put the exact model id in "" and add W or M or S at end (depends what model you added, if its not skeleton , man [M] or woman [W], dont make that model as boarder) of the id model like my example, i first forgot to add that letter to each model so they didnt appear in boarding but when i added it it worked perfectly for me



Should basically work if I just copy your code directly, no? Without changing anythng?

Code:
#define BOARDERMODEL							"boarder"	   // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
// "marine", "corsair", "masked", "skeleton", "girl", "soldier" (soldiers of current flag),
// "boarder" (Nathaniel's soldiers); default: "standard"

#define NATHANIEL_BOARDER_0					 "daniell3W"
#define NATHANIEL_BOARDER_1					 "Offic_perM"
#define NATHANIEL_BOARDER_2					 "Soldier_Per1M"
#define NATHANIEL_BOARDER_3					 "Soldier_Per2M"
#define NATHANIEL_BOARDER_4					 "Soldier_Per3M"
#define NATHANIEL_BOARDER_5					 "Soldier_Per4M"
#define NATHANIEL_BOARDER_6					 "Soldier_Per5M"
#define NATHANIEL_BOARDER_7					 "Soldier_Per6M"
#define NATHANIEL_BOARDER_8					 "beatriceAW"
#define NATHANIEL_BOARDER_9					 "9td_0W"
#define NATHANIEL_BOARDER_10			"downgirl2W"
#define NATHANIEL_BOARDER_11			"towngirl2_1W"

#define BOARDER_INDEX						   0					   // INT - range= -1,100 , Select model for Nathaniel boarders.
// -1: random (generates different sets for every deck; works also for remaining groups),
// 0: sequential (NATHANIEL_BOARDER_1 to NATHANIEL_BOARDER_5; works also for remaining groups),
// 1-99: one selected model for all boarders (works also for remaining groups in range from 1 to 99),
// 100: sequential (NATHANIEL_BOARDER_6 to NATHANIEL_BOARDER_10; for remaining groups identical to 0).

Then whatever uniforms I give to the crew guys that accompany me to land, will be worn by boarders too?

Edit:
Ah, nevermind. Started new campaign, they work fine now. :)
Thank you.
 
Here's a bit of fiddling from me, maybe it can be of some use.

I saw several historic flags available to be used for personal banner, but their availability seemed rather random.

For a more comprehensive potential addition of major political powers in Europe at the time, that would have their own navies which could theoretically also be encountered elsewhere on the open seas, I tidied up some existing ones and added a few more, trying to stick to historic sources.

(see attached pic for details)

Would be good to make them all available in all in-game periods, with clear descriptions for easy picking, for those that want to play as some "other" navy.

Don't know how does the game handle this, but is it or would it be possible to then also randomly encounter neutral ships from some of these lands in your campaigns? Like a neutral faction, with some generic ship names and flying a random one of these flags?

So, any use? Want me to send the 4 .tx files to someone?
 

Attachments

  • ImperialFlags.jpg
    ImperialFlags.jpg
    167.3 KB · Views: 120
More flags? Cool. There are other threads on this subject around here, but this one will be of some help. http://forum.piratesahoy.net/topic/18385-how-to-change-flags-settings/
 
I like it! much more thorough than what I did with the personal flags.

You did the last batch? Well, above I only recycled yours and added a few then. :)

I'd suggest an approach like this, as indicated above, using some existing and adding some new flags, but with the idea so the same menu & descriptions can be used for every period:
  • Above 2 sets of 8 flags for main political entities, Early period (say periods up to 1720) and Late Period, just different time versions of their flags
  • a second set (for all periods) of 8 flags of smaller independent seafaring political entities (Scotland, Genova, Naples, Savoia, Tuscany, Sicily, Malta, Ragusa/Dubrovnik)
  • a third set of 7 flags of known but not quite independent seafaring cities/regions (Brandenburg, Hannover, Hansa, Ireland, Wales, Sardinia, Spanish Netherlands, Lithuania) +1 empty one for a custom flag, with simple instructions how anyone can edit and add their own.
Should someone be willing to code them in as such, I'd be more than happy to provide all the additional sets, by canibalising existing custom flags and adding new ones.
 
sounds good to me! though I am no coder. I mainly worked with making the National flags (england, france, Portugal, spain, holland, america) correct for each period, and didnt touch on these much. but I like your Idea! it would make the game environment richer, I think, especially if ships you encountered ocassionally flew these flags.
 
I really like the new sets of flags you've come up with! I can certainly see them being put to use to add another layer of historical accuracy to the game.
As it happens, I'm currently modelling a Russian frigate to replace the stock model, so it would be nice to showcase the final product with accurate flags. :)
 
Ok, cool, thanks for the support. I like to be useful like that. ;)

So, this is what we're at right now.
Updated the major powers sheet a bit, by replacing late game Poland flag with the mighty Polish-Lithuanian Commonwealth one.

Player_Flags01.jpg


And here are the minor independent and non-independent entities, with the very last one being my personal one, as an example for players to add their own there.
Player_Flags02.jpg

They are all more or less historic, as long as we don't go splitting hairs and they all would be in a position to have some ships and fly their flags. :p

P.S.
I'd also recommend replacing the little flag icon for the "player flag" from the current piratey variation, which oft gets confused with the pirate flag, to something neutral, like an all red or blue flag icon, to signify the "custom flag".
 
If you think these above are usable, please tell me who to send them to.

Now for a couple more in-game oddities:

- had a fort fire at me at 7500 yards. I still find it nearly incredible that a 17th century cannon could shoot nearly 7 kilometers away. Though some info here http://www.cr.nps.go...ce/is3/is3c.htm does seem to suggest ranges past 6000 yards. Still crazy though. :) I'd feel it more reasonable to have it around 2500-3000 max (still five times longer than your ship guns), so you're well within visible and sensible aiming range. The ranges of 6000 seem to be for static siege artillery firing at fortifications, not a fort trying to aim at a moving ship.

- I've noticed several buildings from the player building set appear in rather odd locations throughout the game towns. Like in Santiago on Cuba one collisionless tower is covering one of the entrances from the jungle. Walk right through it and you're in, but it still looks very odd. Also saw one in the center of some city, dun remember which, that covered some original buildings underneath.

- Ship bumping does provide some odd physics effects sometimes with my or enemy ship floating faster sideways than it did forward after a much slower bump to its side than is it's consequential speed.

- Why do pirates sometimes keep firing at surrendered ships?

- Direct-sail ... very hard to sail round the southern tip of Hispaniola. If wind isn't right and you have to go a wee bit further around the southern cliff you already get the Land ho! and are bumped to the next island to the south. Maybe switching between islands should have a minimum distance of losing visual contact with previous island?

- Officers don't equip items and armour I give them, only weapons? So no compass for my navigator and no cuirass for the assault team?

- Gunner only stocks me with ammo, but not the officers? I seem to have to keep manually giving them ammo. A bit tedious.
 
Back
Top