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

Few minor modifications/additions/`bug-fixes` for PotC

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Are they invulnurable until you talk?<!--QuoteEnd--></div><!--QuoteEEnd-->
Definitely not, at least not in pure B12. I´ve attacked them more than once preventively, that always worked like a charm.
 
The disarming seems to be having more and more of it's bugs ironed out. I managed to add the proper particle effects to the fists and the disarming itself also works quite properly now: if you disarm an enemy, he/she will appear armed again the next time you meet; if you are disarmed yourself, you DO actually lose your sword. I haven't tested it with officers yet, though. Only bugs left that I know of:
- nodisarm attribute not added to the right characters (I'll go and play the game some time soon, just to find out who should be `disarm-safe`)
- after a guard is disarmed, he won't stay at his post anymore if you encounter him again. CCC! Please help!!! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
Otherwise, everything seems to be working quite fine really. With a bit of luck, the bugs will be ironed out soon enough, so Catalina can actually add it to the build update. I sure hope so. Then there'd at least be some coding by me in there too. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

BTW: CCC, I made a minor change to your stunned dialog, so you can't actually choose the "samaritan" option and get the rep increase, unless you actually have a small potion with you. I already added this fix to the most recent available version, but I didn't do it right. I <i>will</i> be right next time; I already got it working.
 
Some more observations on the new mods:

One thing I do not like about the disarm feature is that I often find myself dueling with someone and disarm him with my killing blow. This negatively impacts my reputation, as I disarm them and THEN kill them (even tho it is the same blow) - so I take a hit to my reputation. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />

If we get their weapons and gold, WHY do we not get healing potions from people we kill? I've often wondered that... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

On the firedrill mod, I've found that in the midst of a battle when YOU are your only ship and you're fighting four or five or six, you spend your time putting out fires and not having ANY cannonballs to fire because you discharge your weapons or because you are reloading - the time it takes to reload, the other ships have set you afire again. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> BIG pain in the butt! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />

Seems I've lost the "Evil Nigel Blythe" tailor shop patter, and it's back to "Nigel Blythe's evil twin". <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

And something else I've been wondering... Why is the "pardon, let me straighten my collar while you ask me again" dialog in the roving officer for hire dialog? It's very odd... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

Just some thoughts... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
 
Hey, great that you already solved most problems <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /> Here is what I wrote on disk about your questions, even though some may not be necessary anymore <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->To CCC: Things that still need to be fixed (probably):  
- Particle effect added when enemy is knocked out (haven't had any luck getting it to work only if you actually knock your opponent out; it's either all or nothing )<!--QuoteEnd--></div><!--QuoteEEnd-->

This should make them see stars: don't add an effect attribute to the fist definition but add this to the fistcode in LAi_events

Log_SetStringToLog("WHACK! You knocked out your opponent!");
float xe, ye, ze; // coordinates for effects
GetCharacterPos(enemy, &xe, &ye, &ze); // determines position of initial target
CreateParticleSystem("stars" , xe, ye+1, ze, 0.0, 0.0, 0.0, 20 );
}
else



<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->- If a disarmed person is disarmed and you encounter him/her again, will he/she still panick at the sight of you due to the "LAi_SetCitizenTypeNoGroup(enemy);" line in the code? That's not supposed to happen either.<!--QuoteEnd--></div><!--QuoteEEnd-->

A citizen type NPC will run away if he is hostile to you and has no weapons (with weapons he attacks). If you assault an NPC he is of course hostile, but only for some time. If get out of sight for some time all should be forgiven.
Though somtimes in the past cases were reported where your relations were for some reason not improving anymore. (The PotC relationsystem works strange sometimes ) In those cases you can talk to a houseowner who will fix relations for you.


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->- Does a disarmed person keep his/her weapon? I know the player will actually lose the sword (and be unable to get it back in any way; that should also be fixed). If not, that'll need to be fixed too.<!--QuoteEnd--></div><!--QuoteEEnd-->

Umm, if you use only "RemoveCharacterEquip" that will only unequip a blade, i.e. remove it from hand or belt. It will stay in the inventory unless you remove it there as well with TakeItemFromCharacter.



<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->- Also: The disarm attribute should only be given to the characters that actually need it, but for that, someone would need to make a list of important quest characters that may not be disarmed, because it'll mess up the quest or even cause you to get stuck in the game.<!--QuoteEnd--></div><!--QuoteEEnd-->
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->You can't disarm the rapers or the sequence won't end. Same with the French who chase you out of Oxbay when you're going to steal the ship. Same with the French who catch you at Grey Rock Bay on Oxbay when you're trying to land the troops.<!--QuoteEnd--></div><!--QuoteEEnd-->

Ah, the rapers are a bit tricky cause they are generated characters, so you can't give them them the "nodisarm" attribute in charactersinit .
I'll take care of them.
You could search quest_reactions.c for any questdefinitions that include the section ".win_condition.l1 = "NPC_Death";" . Which means that the quest will only be finished if some NPC is being killed, so you'd better set those to "nodisarm". The ID of the victim will be in the line below.


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Question: Didn't we have it fixed that if we did not want to sell our rum to the smugglers on Douwesen, that we could get out of that part of the transaction without causing harm to the whole deal? Or is that based upon the luck level of the character? I was just forced to sell my rum and I did not want to, but the transaction would not complete otherwise...<!--QuoteEnd--></div><!--QuoteEEnd-->
Well, Akella wrote it that way. It has only become a problem because our crews are now addicted to Rum <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/buds.gif" style="vertical-align:middle" emoid=":drunk" border="0" alt="buds.gif" /> IIRC we were only talking about a fix, and I suggested taking Rum out of the contraband list for Douwesen. How about that?
I added a compensation of sorts to the smugglerdialog: you can get an assortment of victuals(including rum) for your ship after selling the contraband.


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Does the distance one throws a bomb have an effect on the enemy?<!--QuoteEnd--></div><!--QuoteEEnd-->

Yes, not because it makes sense but because the function for distanceweapons, which I used for bombs etc., has a distancefactor. And sometimes they hurt no one for no apparent reason, or someone far away <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/oops3.gif" style="vertical-align:middle" emoid=":eek:ops2" border="0" alt="oops3.gif" /> I'm afraid we have to pretend that those 17th century grenades are very unreliable <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" />
 
<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->
If we get their weapons and gold, WHY do we not get healing potions from people we kill?  I've often wondered that...  :?[/quote]
Nathan found it probably too difficult to check the whole invantory. And FAIK most NPCs possess no items anyway.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->On the firedrill mod, I've found that in the midst of a battle when YOU are your only ship and you're fighting four or five or six, you spend your time putting out fires and not having ANY cannonballs to fire because you discharge your weapons or because you are reloading - the time it takes to reload, the other ships have set you afire again.   <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />  BIG pain in the butt!   <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->
Yes, I can imagine it is. But fighting four or five ships SHOULD be painful. It probably was part of a captain's challenge to solve such dilemmata with the right timing: Do I withdraw my guncrews to put this fire out or can I let it burn till i have delivered the next broadside? It will be less painful if you reduce the firetime, easier to ignore some fires then.

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->And something else I've been wondering...  Why is the "pardon, let me straighten my collar while you ask me again" dialog in the roving officer for hire dialog? It's very odd...   <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />  <!--QuoteEnd--></div><!--QuoteEEnd-->
Nathan(?) made that to mask the switch from the "walker" dialog to the Officerdialog.
 
Sometimes you cannot discharge all your cannon because you are in the middle of all YOUR (or your allied) ships, too. Baaaad, causes a rep hit. So do you SINK by fire, or sink your rep? Perhaps ALL the fires can be put out at once instead of put out the fire, get another and put it out, get another and put it out, get four more and put THEM out, one by one by one? Can that be done? Oh, and can the damage caused by a fire be lowered?

I also hate hearing the screaming "We're done for, Captain!" over and over and over again during a fight. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" /> Can I decapitate and throw the Nervous Nellies overboard? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/william.gif" style="vertical-align:middle" emoid=":will" border="0" alt="william.gif" /> I'd REALLY like that... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/dev.gif" style="vertical-align:middle" emoid=":d:" border="0" alt="dev.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/diomed.gif" style="vertical-align:middle" emoid=":dio" border="0" alt="diomed.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

I rarely travel with anything but balls, so I'm not sure of this, but are the AI ships (including the enemy) also subjected to this mod, so that at any time I might have some reckless captain of mine blowing off all his guns `willy-nilly` and especially at me? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_eek.gif" style="vertical-align:middle" emoid=":shock:" border="0" alt="icon_eek.gif" />

That aside, back to the wandering officer for hire... Perhaps I will endeavor to come up with a more suitable bit of conversation when I have half a moment... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
Umm, there seems to be a misunderstanding: the guns are not being discharged, the charges are being doused without being fired.

AI ships do not perform firedrill. Which you can turn into your advantage if you USE bombs <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/boom.gif" style="vertical-align:middle" emoid=":boom" border="0" alt="boom.gif" />

But I don't want to force my masochistic idea of shiphandling on anyone, so it's the usual "make it tweakble, dude!" again <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /> Thanks a lot for posting your thoughts, Cat <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" /> I'll implement what is possible.
 
They fire but they don't cause damage? Ah... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/oops3.gif" style="vertical-align:middle" emoid=":eek:ops2" border="0" alt="oops3.gif" /> I honestly thought they were making hits on the rocks & such at QC when I was trying to avoid being set on fire again. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />

Yes, tweakable should be the RULE - always... Even with something as innocuous as my compass color change is tweakable... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />

I purposely don't use bombs because I don't want to damage the ship I'm attacking too badly. After all, it's going to be a prize ship after I capture it, so why severely damage something you are going to bring into the shipyard and sell? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" /> I even hate to use knippels, but I do if I have a slower ship. My typical ship is my Xebec CT or the Lugger CT, which is the ship I start with when starting a new game... Someone did a mighty fine job on those skins! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="icon_wink.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />

And as far as implementing "what is possible", that's great, whatever you can do will be fine, I'm sure. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />

Those darned Nervous Nellies <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid=":whipa" border="0" alt="whippa.gif" /> will just have to learn to conquer their fears - after all, we have YET to sink from some `ship-to`-ship fight! You'd think they'd have a bit more confidence in their captain! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/diomed.gif" style="vertical-align:middle" emoid=":dio" border="0" alt="diomed.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />
 
Changed the firedrill, see CC thread <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

<!--`QuoteBegin-Pieter` Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin-->
- after a guard is disarmed, he won't stay at his post anymore if you encounter him again.[/quote]
You mean they are walking around, right? Well, that's the AI behaviour according to LAi_citizenType. Don't think that it is a problem, why shouldn't they patrol the streets instead of standing at the gates like dumbstruck (which would be LAi_guardianType)? IMHO it makes the streets more lively and forces you to watch out for patroling guards before you clobber someone.

Good idea with the potioncheck <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/onya.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="onya.gif" />
 
<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->One thing I do not like about the disarm feature is that I often find myself dueling with someone and disarm him with my killing blow.  This negatively impacts my reputation, as I disarm them and THEN kill them (even tho it is the same blow) - so I take a hit to my reputation.   <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />[/quote]Did you know I never ever had a reputation hit for killing an unarmed person? Any idea why that might be?
Otherwise: Good point. Wished I could think of something to do about it... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/ohmy.gif" style="vertical-align:middle" emoid=":eek:" border="0" alt="ohmy.gif" />

<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->If we get their weapons and gold, WHY do we not get healing potions from people we kill?  I've often wondered that...  :?
[/quote]Apparently, you only get their gold and equiped items, not anything else they might carry. This also causes your sword to be lost forever if you are disarmed, even if you kill your disarmer later...

<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->Seems I've lost the "Evil Nigel Blythe" tailor shop patter, and it's back to "Nigel Blythe's evil twin". <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />[/quote]I changed it back again, because that option sounded better than my attempt at making it more sense. Maybe you could think of an actually GOOD option that also makes sense. Mine was really crappy; I could just have said "Nigel Blythe/Artois Voysey skin please!", which is really dull.

<!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->And something else I've been wondering...  Why is the "pardon, let me straighten my collar while you ask me again" dialog in the roving officer for hire dialog? It's very odd...  :?[/quote]It indeed is odd, but I haven't got a clue why that might be. I didn't have anything to do with it; it's always been that way.
 
<!--`QuoteBegin-Pieter` Boelen+--><div class='quotetop'>QUOTE(Pieter Boelen)</div><div class='quotemain'><!--QuoteEBegin--><!--`QuoteBegin-CatalinaThePirate`+--><div class='quotetop'>QUOTE(CatalinaThePirate)</div><div class='quotemain'><!--QuoteEBegin-->One thing I do not like about the disarm feature is that I often find myself dueling with someone and disarm him with my killing blow.  This negatively impacts my reputation, as I disarm them and THEN kill them (even tho it is the same blow) - so I take a hit to my reputation.   <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />[/quote]Did you know I never ever had a reputation hit for killing an unarmed person? Any idea why that might be?[/quote]

You will not notice the hit as it is not recorded by the running log - but I have had it happen time and again - I save a lass from the rapists, and bump my rep up to "Dashing" (which is noted), then fight some thieves and disarm one of them with my killing blow, and - tho it is not noted, if you check your character profile - my rep is down to Matey again. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" />
 
I once kept killing every single citizen of Falaise de Fleurs, just to test what would happen. I don't recall receiving a single rep change. I was a hero before and after slaughtering the city, I still was. At leas"t: for as far as I can remember. Hope there might be some way of making a bugfix for this unwanted `side-effect`... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/ohmy.gif" style="vertical-align:middle" emoid=":eek:" border="0" alt="ohmy.gif" />
 
I've been making some more changes to the disarming event:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    // CCC and PB: New attribute to weapons to allow for disarming opponents

    if( CheckAttribute(weapon, "disarm" ) &&  LAi_IsFightMode(enemy) && !CheckAttribute(enemy, "nodisarm" ) && enemy.equip.blade!="bladeX4")

    {

 int disarmbonus

 int disarmpenalty



 if(CheckAttribute(attack, "skill.Fencing")) {disarmbonus = 20} else {disarmbonus = 0}

 // if attacker has professional fencing skill, increase disarm chance with 20%

 if(CheckAttribute(enemy, "skill.Fencing")) {disarmpenalty = 10} else {disarmpenalty = 0}

 // if attacked victim has professional fencing skill, decrease disarm chance with 10%



 if(rand(100)< sti(weapon.disarm) +sti(attack.skill.Fencing)/2 + disarmbonus - disarmpenalty)

 {

     PlaySound("OBJECTSduelsword_fallen.wav");

     string enemy_blade = GetCharacterEquipByGroup(enemy,BLADE_ITEM_TYPE);

     RemoveCharacterEquip(enemy,  BLADE_ITEM_TYPE );

     GiveItem2Character(attack, enemy_blade);



     if ( enemy.chr_ai.group !=  LAI_GROUP_PLAYER && !bAbordageStarted )

     // no disarming opponents during boarding

     {

   LAi_SetCitizenTypeNoGroup(enemy);

   Log_SetStringToLog("Opponent disarmed !");

     }

     else

     {

   TakeItemFromCharacter(enemy, enemy_blade);

   if ( enemy.id != "blaze" && !bAbordageStarted ) // if NOT player

   // officers safe from being disarmed boarding; player NOT safe from being disarmed during boarding

   {

       Log_SetStringToLog("One of your officers was disarmed!");

       LAi_tmpl_afraid_SetAfraidCharacter(enemy, attack, true); // makes officer flee

       LAi_SetAfraidDead(enemy);

   }

   else

   {

       RemoveCharacterEquip(attack,  BLADE_ITEM_TYPE );    // makes enemy use your blade against you

       EquipCharacterByItem(attack, enemy_blade);  // and enables you to get it back by killing him/her

       EquipCharacterByItem(enemy, "bladeX4");

       Log_SetStringToLog("You were disarmed!");

   }

     }

 }

    }<!--c2--></div><!--ec2-->Supposedly, this code will add a 20% disarm bonus if attacker has the fencing skill, but decrease the disarmchance by 10% if the victim has the fencing skill (this at Catalina's request, who wanted the professional fencing ability to influence disarming; not certain about the bonus and penalty values though). It should also cause your opponent to use your sword against you if you are disarmed. By killing your opponent, you should get your old sword back again. However: Any sword the opponent had will be lost, so you better hope you were using a better sword than your opponent. The code should also allow for only the player to get disarmed during boarding; other characters ending up disarmed would cause trouble, but the player should work.

This code does not cause an error message when running the game, but I am not sure if it actually does what it's supposed to. I was hoping someone with a tad more coding knowledge could try and fix my own attempt.
 
Question for Alan Smithee: I suppose there wouldn't be any way to make the jar of leeches be a potion you can use four times, right? Considering that there are four leeches in the jar... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
Or maybe have the jar of leeches not be removed from your inventory at all when you use it. That would make it a really useful item, even though it does take some health out of it. Otherwise it would just be a antidote which leaves you feel weaker than a normal antidote. Or is it significantly cheaper than the default antidote? Just a few ideas... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
I was just thinking: Might there be a way to have a disarmed person be considered dead enough by the game for the quest to continue, even though he/she is only disarmed? So that if a character needs to be killed for a quest to continue/be completed, you can do with disarming too? Might be complicated, but would be really cool. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
And might anybody know how I could add new keyboard commands to the controls menu in the game itself. I'd like to have the new `quick-equip` button be included there, but I wouldn't know where to find the appropriate code... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Hey Pieter <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Here is the code to set the rapers to "nodisarm". It goes into questsboth_reaction.c like this:


//------------------------------------------RAPERS----------------------------------------------------

// Viper - Rapers MOD Start
case "LandEnc_RapersLogin":
Characters[GetCharacterIndex("Enc_Char2")].nodisarm = 1; // PB: Disable disarming
Characters[GetCharacterIndex("Enc_Char3")].nodisarm = 1; // PB: Disable disarming
Characters[GetCharacterIndex("Enc_Char4")].nodisarm = 1; // PB: Disable disarming

LAi_group_SetRelation("ENC_RAIDERS_GROUP", LAI_GROUP_PLAYER, LAI_GROUP_NEITRAL);


Have to go, will read your posts tomorrow <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
Sorry for the delay reading through this (since yesterday night)--mass of good stuff! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
Excellent work, Pieter!

So--what's stable enough to commit to the CVS?

Didn't somebody ask about putting a time/date stamp on quest records in this thread? (If not, it'd be in another thread and I'll move this there...)
It _looks_ possible; sadly, the quest text is not tracked directly as text but as links to records in the questtext file...but there should be a way to add a time/date key to the questinfo attribute for each questrecord added.
 
I'm going through and committing things that I'm 99% sure are stable; we can always delete 'em later.

(Like, say, added text, or CCC's REAL_REPAIR)
 
A suggestion in regards to the cheatmode addition: have it so that while the controls are always defined, they only _do_ something if cheatmode is on; otherwise whenever you change that toggle you will have to redo controls because init_pc.c changes.

Although--somewhere here I read that someone (CCC?) had fixed that problem? So maybe this isn't needed.
 
Back
Top