• 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 [HELP] Enemy never surrenders

MarKr

Comodor jackass
why do enemy ships never surrender? I have 500 men and enemy has like 12 men left, my leadership skill is around 50 but enemy just never surrenders?? In vanila game I used this to gain negative reputation - killing surrendered crew, or turning in captured pirate captains.....The only way I figured out to gain negative reputation is to let bandits in jungle rape women... I also read, that surrender should have been back in GoF 1.2 so what's up with that? :)
 
GOF 1.1/1.1.x have not surrendering. It is coming back in GOF 1.2, but GOF 1.2 is not released yet.

(Your are playing 1.1.2, not 1.2.)

Cheers.
buho (A).
 
You can simply re-enable it in GoF v1.1.2 I just don't know the filename out of my head. When I'm home at my PC I'll post the file name and "how to" in this thread.

Guess tomorrow then ;)
 
How to enable the surrendering in GoFv 1.1.x?

Go to Age of Pirates 2\Program\loc_ai

open the file LAi_boarding

Find the code line below set false to true and you have the surrendering active again.

Code:
    if (mcrew > ecrew)
{
return false; // Yay! Surrender!
Be advised that enemies might surrender pretty quickly that was the reason in the first place why it was disabled.

Also changing that code might require to start a new game to fully work... if you change that in the actual game you are playing it might not work at all or it's also possible it breaks your game so be carefull.
 
Another problem with enemy fight like mad dog is that it's break the quest where the enemy is supposed to surrender themselves. So far I've only had 1 such quest, and it didn't break the quest completely so it's fine.
 
How to enable the surrendering in GoFv 1.1.x?

Go to Age of Pirates 2\Program\loc_ai

open the file LAi_boarding

Find the code line below set false to true and you have the surrendering active again.

Code:
    if (mcrew > ecrew)
{
return false; // Yay! Surrender!
Be advised that enemies might surrender pretty quickly that was the reason in the first place why it was disabled.

Also changing that code might require to start a new game to fully work... if you change that in the actual game you are playing it might not work at all or it's also possible it breaks your game so be carefull.

sweet thx :)
ill try this out when i get time to play again
though if crew# is the only condition, i can see it could become to easy to force a surrender
there should be other checks, like maybe moral, captain lvl, friendly ships close, etc
oh and a question, if doing this breaks my savegames, will me changing it back fix them? or are they gone for good?
 
Don't worry, such a change is NOT going to affect save game compatibility. It doesn't need a new game start either.

BTW, you can try something like

Code:
if (mcrew > 3 * ecrew)

to make the surrendering condition less dumb.

Due to surrendering coming back in 1.2, revamping it in 1.1.x to take in account fleet power, morale and the like is not really worth.

Cheers.
buho (A).
 
This actually works quite well using the multiplication factor adjusting the loc_ai file.
Even when you have say 3X crew, the current coding still seems to take into consideration the morale and training of the opposing crew.
For example, if you have 350 sailors and the enemy ship has 50 sailors, it does not "automatically" surrender.
If you crew is greenhorns, and the enemy crew has both musket volley and sea dog soldiers, expect a fight.
I tested this under a variety of conditions last night, and opted for a 2.5X factor.
However, the coding does NOT consider fleet status, which seems like a great addition to sea battles.
 
This actually works quite well using the multiplication factor adjusting the loc_ai file.
Even when you have say 3X crew, the current coding still seems to take into consideration the morale and training of the opposing crew.
For example, if you have 350 sailors and the enemy ship has 50 sailors, it does not "automatically" surrender.
If you crew is greenhorns, and the enemy crew has both musket volley and sea dog soldiers, expect a fight.
I tested this under a variety of conditions last night, and opted for a 2.5X factor.
However, the coding does NOT consider fleet status, which seems like a great addition to sea battles.

After a quick glance to the code (note: a very quick glance, it is not necessarily exact, only an idea):

- For the player the code is checking the morale, the crew weapons, leadership, grappling, the crew experience, the player reputation, the ship class and the companions quantity.

- For the AI the code is checking the morale, leadership, defence, the crew experience, the ship class and the companions quantity.

(So, the size -ships quantity- of the fleets are taken in account, but not the exact state or power of the fleet.)

At the start there is a check making surrendering imposible if the player char is lesser in rank than the enemy; the relation depends on the difficulty settings.

I believe this code is used only whit the main char; for companions boarding the code is in another file.

Cheers.
buho (A).

NOTE: the involved function is CheckForSurrender in Program\loc_ai\LAi_boarding.c
 
Very interesting discussion. I would really like to do more with this. No surrendering really takes away from the gameplay. I remember making a lot of money from turning in captured officers to governors in vanilla. You rarely have the opportunity to do that now in GOF.

I am going to start a new game with "true" back on. I will specifically observe when I see all the surrendering start to happen all the time.

What I'm wondering is..... could we add another switch that would auto change the true status to false when the player hit that level where everyone starts to surrender all the time. This way we still get surrenders earlier on in the game at least, but then the benefit of good fights with no surrender when we hit that specific level where we become dread pirate of the carribean.

Just a thought. This should be fairly easy.

MK
 
How i see it, there is some code some where that has ship = 19 and rand = ???. If we can find that code and change the ship = 19 which is using the vanilla code for the MOW in ships.H to say ship = 141 then that means the AI shouldn't surrender that easily and should then fix this problem we are having.
 
Luke, Where should I be looking? I want to test this out. What code specifically? Was this something Jonathan changed?

MK
 
This is the problem, i don't know if Jonathon rewrote the code for surrender or if he modified it because it was no longer working. I think in order to really get the to the bottom of the code it would require looking at the last mod where surrender was working fine. Maybe CMV3.2 (could be a earlier mod, been so long now). As for filels to look in, well i can't be 100% sure but i would suggest the following.

Program\loc_ai == LAi_boarding.C
Program\SEA_AI == AIShip.C
Program\SEA_AI == AISea.C
Program\SEA_AI == sea.C
Program\scripts == seaspeak.C

This is what i mean by modified or new code. The following code is not in the vanilla file. Program == globals.C
Code:
#define NEUTRAL_NATION	9

I'm starting to get tired again now (stupid flu) but one or more of the above files might have something of interest and i'm sure Buho will know of other files that are worth looking into. :onya
 
Back
Top