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

Fist Fighting & Darwinism

Capt. H.M. Murdock

Sailor Apprentice
<b><u>Knocked out 'friendly' seen as new 'foe'</u></b>


Came accross a phenomenon that occurs during boardings when the enemy's sword breaks, and the dreaded sound of them hand-smacking your officers is heard. This has happened in the past (apologies, can't recall when it was that I first saw it happen), but with so many other issues to worry about, I never really gave it a second thought. (and I guess it's somewhat uncommon)

What happens is that if one of your crewmembers - or worse - Officers is punched and knocked down by a fist-wielding opponent, the remainder of your crew seems to find the knocked-out friend as a new foe - and they attack the helpless victim. As if they were saying "he's not potion-worthy, off with his head".

<img src="style_emoticons/<#EMO_DIR#>/slap.gif" style="vertical-align:middle" emoid=":slap" border="0" alt="slap.gif" />

Not too big a deal if it's just a boarding party crew guy that goes down and sees stars, but if it's one of your Officer NPC's than it sucks to see poor Lucas De-Salad-head get all ganged up on and killed before you can talk to him and revive him with a potion. I mean - I invested TIME building that boy's skillset!!!

<img src="style_emoticons/<#EMO_DIR#>/duel_pa.gif" style="vertical-align:middle" emoid=":ixi" border="0" alt="duel_pa.gif" />

I've flipped thru the bugtracker and can't find a mention of this - has anyone else ever come accross this issue?


Cheers,
H.M.M.
 
thats a new one!! not a very nice new one either!

I had seen stuff relating to 'fists' being too lethal(cant remember the term "fists of death" or something like it?). So i dont know if that is related to the problem?

Had you seen this a few times or just the once?
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I've flipped thru the bugtracker and can't find a mention of this - has anyone else ever come accross this issue?<!--QuoteEnd--></div><!--QuoteEEnd-->


Yes, I have seen it several times.


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I had seen stuff relating to 'fists' being too lethal(cant remember the term "fists of death" or something like it?). So i dont know if that is related to the problem?<!--QuoteEnd--></div><!--QuoteEEnd-->

I don't think these two problems are related.
 
@ Black Bart - yes, I have seen this problem a few times, and it is 100% reproduceable (repeatable?). Give it a try yourself and let us know.


@ Jason - thanks for the reply - I was beginning to think I was just crazy!!!


Ok, so here it is folks, I have tested this one out and I'm certain it's an issue. Under the following circumstances, your teammates will be attacked by your other teammates, as well as by enemy:

a) You are actively engaged in combat (swords out, fight music playing...)
b) A team-mate gets punched out (knocked down & seeing stars)
c) That team-mate now gets attacked by friends and foes alike.

I have just reproduced this 3 times in a row to be certain, under these conditions (the first time it was a fluke, which prompted me to continue testing this!)

1) Accidentally, during a boarding attempt, an enemy's blade broke and started punching my Officer (Beatrice Devlin model NPC) and knocked her out (seated, seeing stars). My crew then started slashing her, and were joined by enemy in their efforts to kill her. After killing her, they returned to fighting each other.

2) Deliberately, during boarding, I equipped my fists, ran to the closest friendly crewmember I could find and started punching him in the back while he was valiantly fighting an enemy. I knocked out my own crewmember, who continued to be attacked by the enemy, but was also attacked by surrounding teammates.

3) Poor Lucas. Again, during boarding, I targeted crewmember Lucas DaSalad-head and punched him out with my fists. I captured the following screen shots of my own crew hacking away at the seated Lucas.



Image 1 is just after I knocked out Lucas, there is a friendly crewmember at the top of the bridge hacking away at him. Image 2 is a few moments later as other crew join in the effort to kill him.


<img src="http://i77.photobucket.com/albums/j75/airmaric/seadogs2_0011.jpg" border="0" alt="IPB Image" />



<img src="http://i77.photobucket.com/albums/j75/airmaric/seadogs2_0014.jpg" border="0" alt="IPB Image" />
 
The code does this for a stunned character:

LAi_Group_MoveCharacter(chr, LAI_GROUP_STUNNED);
LAI_group_SetRelationWithAllStock(LAI_GROUP_STUNNED, LAI_GROUP_NEITRAL);

Meaning, it moves the character to the 'stunned group', and then sets the relation to 'stunned group' for EVERYONE as "neitral" (yeah, wrong spelling, but thats the russian code for you).

Now, either one of two things is happening:

1) Your crew is at war with the nuetral group (and so is the enemy).
2) Any 'crew' (friend and enemy) on boardings are not setup and following the same rules as the rest of the game is in regards to relations, groups, and FOF checking.

Two ways to fix this problem:

1) Turn off the blade damage mod.
2) Turn off ALL stunning during boardings, period.

My suggestions is #2. And to do so, open up "PROGRAM/Loc_ai/types/LAi_stunned.c", find the function called "LAi_Stunned_StunCharacter" (top of the file), then add "if (LAi_IsBoardingProcess()) return;" at the top of the function so it looks like this:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->void LAi_Stunned_StunCharacter(aref chr, float duration, bool playSFX, bool playGFX, bool resumeoldtype)
{
    // TIH no stunning settings Aug31'06
    if (LAi_IsBoardingProcess()) return;
    if (CheckAttribute(chr, "nodisarm" )) return;

...etc<!--c2--></div><!--ec2-->

That will solve that problem.
 
<img src="style_emoticons/<#EMO_DIR#>/bow.gif" style="vertical-align:middle" emoid=":bow" border="0" alt="bow.gif" />


Damn, Hat - you ARE Incredible. Wow!

I will give this a good test session and report back.


Thanks a ton! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />


H.M.M.
 
Well Hat, here's my post-punching report:


Your code works for the boarding - no one gets knocked out in a fistfight. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Awesome, says I.

However....

Upon further investigation - this is NOT just a boarding thing. Happens anywhere. Dry land, anywhere. And you don't need to already be in combat, as it turns out. Try the following in a peaceful setting, say standing with your Officers at the dock of the port (or anywhere, doesn't matter):

1) Equip fists.
2) Unsheathe your meaty fists
3) Smack fellow Officer 2-3 times till they see stars and go down.

What happens next is combat starts (fight music) and your OTHER officers who were standing peacefully now draw blades and hack away at the fallen punched-out victim. Townspeople don't interfere, nor do guards.

HOWEVER - there's some exceptions to this that might help with bug-solving:

The following 2 crewmembers seem to be UNABLE to be stunned, I have tried for an hour to knock them out after hundreds of punches, removing their armor, taking away their potions, everything:

Nigel Blythe (Artois Voisey's nasty Captain)
Claire Larousse.

The following Officers DO get knocked out:

Lucas DaSaldana (Spanish Golden boy)
Jaoquin (the Maltese Knight)
Fred Bob (sorry Fred Bob!!!!!! No harm intended!!! <img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> )
Midriff exposed Beatrice (hired as NPC Officer)


Now all the above officers were approximately at the same level (say 20) with about 120hp's each (exception was the Beatrice Devlin looking NPC who had 232hp). ALL of them have melee skill 10, all of them have all combat abilities trained up (including toughness). I could find no difference in skills/equipment from the 2 that could not be knocked out to the ones that could get KO'd.

Soooo - I'm guessing there's something about the character models????


Let me know your thoughts.

Here's some screenshots:

1) Jaoquin (after I punched him down in 2 punches) getting the blade from my 2, uh, lady-friends.
2) Jaoquin (after I talked to him and revived him with potion) walking away, but still being attacked. Note that once you travel to another location, if you've revived your Officer, combat stops and things go back to normal.

3) Clair Larousse, who after being punched 100's of times, refused to be knocked out, but I did eventually KILL her by punching. After she DIED, I accidentally hit her again, and saw stars above her, finally. Guess what happens then when you try to talk to her....? Yup, she talks back. Then she dies and disappears once you finish talking.


<img src="http://i77.photobucket.com/albums/j75/airmaric/seadogs2_0006.jpg" border="0" alt="IPB Image" />


<img src="http://i77.photobucket.com/albums/j75/airmaric/seadogs2_0010.jpg" border="0" alt="IPB Image" />


<img src="http://i77.photobucket.com/albums/j75/airmaric/seadogs2_0020.jpg" border="0" alt="IPB Image" />
 
ARGH! What kind of nonsense is THIS??? Knocked out characters should be NEUTRAL to everybody! I made this bladedamage mod and I KNOW it used to work entirely properly. Knocked out characters were never attacked by anyone, just like it's supposed to work. Why for crying out loud are the knocked out characters now suddenly being attacked by everyone??? <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />

Can anybody please try this one out on a completely new game? Start a new game, don't do anything as far as fighting is concerned, get two officers and knock out one of them?
 
I need to check this as well. I know it used to work. I can see this causing some other non-fist related issues, because to me it sounds as if the problem is with the neutral group being set hostile, rather than with the actual knocking out code, which I KNOW was working right, also on boardings. <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
But, thing is, I tried tracing backe the "NEITRAL" setting, and basically came up short on finding anything that actually deals with that setting, or where. It's almost like its a hard coded engine setting and controlled by the engine somehow somewhere. And if its going 'enemy', then what the heck is going on?!

To make things worse, I have noticed that when a ship surrenders, they are ALSO put into a NEUTRAL group for ships... yet anyone on the sea will fire on them if in range.

Related? Relations? I don't know...

Out of curiosity... what is the RELATION of your officers and crew when you are flying the NATHANIEL_NATION ?

NATHANIEL_NATION isn't included in any of the nation relation to nation type stuff.

I so hate looking at the relations code, its over complicated and over worked, and so much margin for error everywhere.

I'm not sure if this means anything, but the line "Nations_SetAllFriends();" was REMOVED from the "begining" quest action. KK removed it last month with his big changes.
 
Ok, I confirmed it. Easy to start new game (with 10,000gp), go to the tavern a few times to hire two officers.

Walk to the outskirts.

Punch an officer until he goes stunned, then the "battle" icon starts flashing red and your other officer opens fire and starts slashing the stunned one.

Even if you have just one officer, and you punch him out (stunned), the battle icon starts flashing UNTIL he wakes up (either by a potion, or on his own).

Interesting huh? Definately the game is hosed into thinking the NEITRAL group is a hostile group to the player group. I can't figure it out though... I reverted my nations.c file way back, didn't help. Even that line about "Nations_SetAllFriends" didn't help.

*shrug* ?
 
I have confirmed this as well. Definitly dodgy. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

Now that I confirmed this issue, I have tried to find the fix. And I think I actually did manage to find the fix:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        // PB: New weapons attribute, exclusively for your fists
        {
            int rank = makeint(attack.rank);
            int punch = rand(rank) + rank;
            // Calculates the strength of your punch; character's rank increases damage

            LAi_ApplyCharacterDamage(enemy, punch);
            // Applies damage to enemy

            switch(rand(2))
            {
                case 0: PlaySound("OBJECTS\duel\punch1.wav"); break;
                case 1: PlaySound("OBJECTS\duel\punch2.wav"); break;
                case 2: PlaySound("OBJECTS\duel\punch3.wav"); break;
            }
            // Play a random punch impact sound

            LAi_CheckKillCharacter(enemy); // Checks if this has killed the character

            if(!LAi_IsDead(enemy)) //checks if char now dead or not
            {
                if(rand(100) < punch + sti(attack.skill.Sneak) && sti(enemy.index) != GetMainCharacterIndex())
                // Checks if punch knocks enemy out; character's rank increases chance
                {
                    LAi_Stunned_StunCharacter(enemy, 100, true, STUN_STARS, false);
                    //SetHostile = false;
                }
            }
        }<!--c2--></div><!--ec2-->
Notice how "SetHostile = false;" is commented out. I don't know why, but I re-enabled the line, then tested it again and it seems to work fine again. So I think this issue is caused simply because this line is commented out.
 
<!--quoteo(post=172285:date=Nov 18 2006, 04:06 PM:name=IncredibleHat)--><div class='quotetop'>QUOTE(IncredibleHat @ Nov 18 2006, 04:06 PM) [snapback]172285[/snapback]</div><div class='quotemain'><!--quotec-->
.........

Punch an officer until he goes stunned, then the "battle" icon starts flashing red and your other officer opens fire and starts slashing the stunned one.

.........
<!--QuoteEnd--></div><!--QuoteEEnd-->

Well one way to look at this is to put your Pirate hat on. If YOU the Captain attack one of your Officers he must have done something wrong? maybe he was just getting too big for his boots(something to consider when getting around to the possible mutiny action by your officers in a later build?)

So the rest of your loyal officers pitch in and have a go at this fallen officer. Like the pack turning on the 'outcast' in the group?
As long as this behaviour doesnt hose something else - well its kind of authentic?....frightingly so even...! is PotC starting to understand what its for? <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
Thing is, CORPSE group is also being set to NEITRAL, and they are fine. With the exception that the 'fist attack causes stun' does NOT stop check on dead people... corpses are never attacked, or treated as targets by anyone.
 
Please see my post above this one. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
Seems like this line was commented out in the Oct 9 version I have. Previously the line was in place and working.

Hook
 
Yeah, my posts wern't showing the new posts in between. But you need to see the extra fix I added to the bug tracker that fixes what happens when you (or friend, or anyone) attacks an already stunned character.
 
<!--quoteo(post=172285:date=Nov 18 2006, 04:06 PM:name=IncredibleHat)--><div class='quotetop'>QUOTE(IncredibleHat @ Nov 18 2006, 04:06 PM) [snapback]172285[/snapback]</div><div class='quotemain'><!--quotec-->
Interesting huh? Definately the game is hosed into thinking the NEITRAL group is a hostile group to the player group. I can't figure it out though... I reverted my nations.c file way back, didn't help. Even that line about "Nations_SetAllFriends" didn't help.
<!--QuoteEnd--></div><!--QuoteEEnd-->
Just one thing: FAIK the nation relation affects only ship behaviour. Whether a land NPC fights you depends entirely on the relation of his LAI_group to LAI_PLAYER_GROUP, set completely seperate of the nation relation.
 
InciredibleHat's fix is not added to Beta 9, but will be added to the final Build 13. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
Back
Top