• 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 Modding AI vs AI boarding

abc

Landlubber
Hi,

Does anybody knows where to find the code/scripts responsible for the AI vs AI boarding and decisions after boarding? I wanted to check if it possible to adjust how the AI behaves after winning a boarding battle. Right now it seems that everytime they don't choose to switch ships they both sink. It works fine if AI chooses to take the defeated ship.
 
not sure mayby in this one u find what u looking for AIAbordage.c

tho if u mean bording ur companion vs enemy mayby better to order them not to bord or/and make sure that thay hit the enemy b4 bording with grapeshots
 
not sure mayby in this one u find what u looking for AIAbordage.c

tho if u mean bording ur companion vs enemy mayby better to order them not to bord or/and make sure that thay hit the enemy b4 bording with grapeshots

Looked through that already but nothing there. I'm starting to think that auto calc for AI Vs AI battles is deeper in the engine itself. The thing I wanted to achieve is to board, loot and sink the enemy but if I order to not switch ships they sink together with defeated enemy. Same happens when You look at AI battles that You can join. When they are boarding each other they always both sink and this is probably caused by the same mechanic that blocks them possibility to switch ships. There is some bug that sinks them immediately if they don't switch for defeated ship.

It's annoying that my fleet is useless in case of capturing the cargo from enemy ships. Best what I would dream off is the possibility to leave defeated ships empty without captain and crew drifting until the battle end and You can go back to loot/capture them instead of sinking them right away.
I would be satisfied through if my companions could at least take the cargo and not sink together with enemy.
 
Sry never encounter that issue, i rarly allow my comps to board and if i allow them or even force them to board thay loot and sink enemy always without being sink along with them but im rly protectiv of my comps so i only allow them to board if im sure thay win, the ting mayby aswell that the enemy ship auto destruckts and so both die. by cases that thay swap ship that dosent happens couse thay swap the ship, normaly if enemy captain sets hold on fire the pc cant take the ship but as for npc's is overiten so mayby without swapping ships enemy always explodes taking down ur comp ship with it.

Well it mayby aswell the difficulty of the game thats impacts this aswell, for the 1st time i started to play on imposible so mayby will encounter this aswell however atm im barly able to be a captain of a single r4 ship so will take a long time till i get me a 2nd ship. And my comps are only alwowed to board when thay sail mow's.

It's annoying that my fleet is useless in case of capturing the cargo from enemy ships. Best what I would dream off is the possibility to leave defeated ships empty without captain and crew drifting until the battle end and You can go back to loot/capture them instead of sinking them right away.
Now about this i thought aswell, but in game a ship without a captain sinks, a lil bit stupid imho:( Tho atleast when a ship sinks all the cargo is thrown out and u can collect it on water, goods have diffrent times be4 thay sink, light goods stay on water longer then heavy goods, but the time wchich takes the goods to sink is easy to edit.

So mayby that would be a solution for you untill ur comps get sturdy enogh ships and enogh skill to board enemys loot them and not dying by themselfs.
 
Sry never encounter that issue, i rarly allow my comps to board and if i allow them or even force them to board thay loot and sink enemy always without being sink along with them but im rly protectiv of my comps so i only allow them to board if im sure thay win, the ting mayby aswell that the enemy ship auto destruckts and so both die. by cases that thay swap ship that dosent happens couse thay swap the ship, normaly if enemy captain sets hold on fire the pc cant take the ship but as for npc's is overiten so mayby without swapping ships enemy always explodes taking down ur comp ship with it.

Well it mayby aswell the difficulty of the game thats impacts this aswell, for the 1st time i started to play on imposible so mayby will encounter this aswell however atm im barly able to be a captain of a single r4 ship so will take a long time till i get me a 2nd ship. And my comps are only alwowed to board when thay sail mow's.


Now about this i thought aswell, but in game a ship without a captain sinks, a lil bit stupid imho:( Tho atleast when a ship sinks all the cargo is thrown out and u can collect it on water, goods have diffrent times be4 thay sink, light goods stay on water longer then heavy goods, but the time wchich takes the goods to sink is easy to edit.

So mayby that would be a solution for you untill ur comps get sturdy enogh ships and enogh skill to board enemys loot them and not dying by themselfs.


This sinking problem happens no matter the difficulty. I had it on normal and on impossible.

My comp has around 65 boarding and perks along with musket volley. He can win a boarding for sure cause it's working ok if I allow him to swap ships. The problem occurs only when he is not allowed to swap ships or when he is boarded and looses battle (second is actually to my advantage cause one enemy less but it's unrealistic).

And from some topics I see that I'm not the only one experiencing this. Saw some topics here and on steam but they were old.

That's why I started looking for scripts deciding who wins and what he does after winning but found nothing.

All that's left is to wait for the patch and engine upgrade and see if it solves the problem.
 
I also experience this. When AI ship(not my companions) board other AI ship (pirates vs english ships for example) they both sink immediately.
 
I also experience this. When AI ship(not my companions) board other AI ship (pirates vs english ships for example) they both sink immediately.
I got this bug too. Since it's not game-breaking (yet) so I didn't pay much attention to it. Game version 170 ENG, I'm using TEHOmod, Hook's Mod, TOL and OCM(forgot what version, installed around last October).
 
I think i found problem. In ....\PROGRAM\scripts\companions.c at line 211 and 212

original english version 1.7.3
211 if (sti(RealShips[sti(rCharacter.ship.type)].basetype) == SHIP_POLACRE_QUEST && rCharacter.id == "Ignasio") return false;
212 if (rCharacter.id == "Terrax") return false;
when switched to comment
211 //if (sti(RealShips[sti(rCharacter.ship.type)].basetype) == SHIP_POLACRE_QUEST && rCharacter.id == "Ignasio") return false;
212 //if (rCharacter.id == "Terrax") return false;
i got ai boarding working correctly as far as i can check.
Can anybody confirm?
 
Back
Top