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

Sword of triton

I cannot do anything until Tuesday. Please remind me then.
You may want to double check the code though; there must be a mistake somewhere.
There are a fair few spots that need to be edited for this; more than just the two we edited so far.
You can easily find them though, because they use the same identifiers.
 
good evening sir boelen, i'm here little erlier, i will show you my battle interface file. like suggested from you I've tried to manage where was the error, but it was unsuccesfull, please help if you can. I can't have two different icons, one for the speed burst and one for the triton attack, there must be some wrong spot but I can't manage where is the error.
@Pieter Boelen
 

Attachments

  • BattleInterface.c
    107.5 KB · Views: 138
Last edited:
good evening sir boelen, i'm here little erlier, i will show you my battle interface file. like suggested from you I've tried to manage where was the error, but it was unsuccesfull, please help if you can. I can't have two different icons, one for the speed burst and one for the triton attack, there must be some wrong spot but I can't manage where is the error.
@Pieter Boelen
Try attached version of the file. I recommend using WinMerge to compare this to the one you had before.
Stuff I changed:
- Some slight formatting (just to keep it clean)
- Added your initials instead of my own (credit where credit is due! ;) )
- Added two extra lines for 'BattleInterface.Commands'; that is probably the reason why the second option didn't show
- Corrected this bit:
Code:
  case "BI_QARSword":
  KrakenAttack(Characters[targetNum], GetCharacterShipHP(Characters[targetNum])/100 );
  break;
  case "Queen Anne's Revenge":
- Temporarily set it to 'picNum 22' again because, as far as I know, number 24 doesn't exist yet.
But if you already added that to the TGA.TX file, you can put that back to 24.

I hope that helps. :doff
 

Attachments

  • BattleInterface.c
    107.6 KB · Views: 151
Thanks so mucch sir boelen, it's perfect. You are spectacular. Thank you, thank you, thank you !!!! :doff:doff
Then there's two things left to make it mod-worthy:
1. Someone should make a proper interface texture for it (You? @Grey Roger? @Jack Rackham? @Cassadar?)
2. Some code should be added to make it less of a cheat: E.g. implement a time limit for recharging it
 
exactly. the same think I was thinking
The QARSwordEnabled() function is an example of such a "delay" check.

That works together with these function definitions from PROGRAM\NK.c:
Code:
bool QARSwordEnabled()
{
    ref pchar = GetMainCharacter();
    if(!CheckCharacterItem(pchar, "Blade_Triton"))                    return false;    // You need to have the item
    if(CheckAttribute(pchar, "ship.speedburst"))                    return false;    // Sword of Triton needs time to recharge after using
    return true;
}

#event_handler("FinishSpeedBurst", "FinishedSpeedBurst");
void FinishedSpeedBurst()
{
    ref pchar = GetMainCharacter();
    PostEvent("SpeedBurstFinished",120000, "i", pchar);
    pchar.Ship.Impulse.Rotate.z = 0.0;
    if (GetAttribute(pchar, "ship.speedburst") == "PearlSweeps")    DelPerkFromActiveList("PearlSweeps");
}

#event_handler("SpeedBurstFinished", "SpeedBurstAvailable");
void SpeedBurstAvailable()
{
    ref pchar = GetMainCharacter();
    if (GetAttribute(pchar, "ship.speedburst") == "PearlSweeps")    LogIt("Captain, the crew is ready for another go at the oars!");
    if (GetAttribute(pchar, "ship.speedburst") == "QARSword")        LogIt("Captain, the Sword of Triton has recharged itself!");
    DeleteAttribute (pchar, "ship.speedburst");
}
Plus these two lines of code from BattleInterface.c:
Code:
            PChar.ship.speedburst = "QARSword";
            PostEvent("SpeedBurstFinished",120000, "i", pchar);

Possibly the last lines of code to change would be to reuse the existing code.
Then you would be able to use the speed burst (with its time limit) OR the rigging/crew attack (with the same time limit).
But not both at the same time. So using one would prevent you from using the other for a while.
Since they're linked to the same item, that does seem to make sense to me. Would you agree?
 
I think that this would be very balanced...use the rigging attack will prevent to use the speed burst because doing so the sword of triton must recharg itself...and it can be a very interesting point of real challenge and strategy in sea battles. Spiking of wich can I suggest of augnent a little bit the rigging attack ? Just a little to give the player the sense of real power...after all dont forget that the sword of triton is a mytical sword. In this way i think we can have a great balance between power, strategy and fun. Dont you think?
 
I think that this would be very balanced...use the rigging attack will prevent to use the speed burst because doing so the sword of triton must recharg itself...and it can be a very interesting point of real challenge and strategy in sea battles.
Then I think two additional lines might do the trick.
Try attached file; if it works as it should, the two abilities should now be mutually exclusive.
I also changed the number back to '24' in preparation of someone adding an icon.

Spiking of wich can I suggest of augnent a little bit the rigging attack ? Just a little to give the player the sense of real power...after all dont forget that the sword of triton is a mytical sword. In this way i think we can have a great balance between power, strategy and fun. Dont you think?
You can tweak the numbers any way you think right. It's your mod, after all. ;)
The numbers I suggested before were just copy-pasted from elsewhere without any regard for balancing whatsoever.
 

Attachments

  • BattleInterface.c
    107.3 KB · Views: 155
I will test the new file this evening if i can. If you want consider the idea of implementing this in a next versiin of the build, do it without problems. I like the idea of making other fans of the film happy ;)
 
@Grey Roger: Can you inlude the file BattleInterface.c from post #51 above into the ZIP?
According to @Captain92, it seems to be functional and adds an extra use for players who have the Sword of Triton.

Also in RESOURCE\INI\TEXTS\English\commands_name.txt please replace this:
Code:
sea_QARSword {Sword of Triton}
With this:
Code:
sea_QARSword {Speed Burst}
sea_TritonAttack {Rigging Attack}

Then all that's left to be done is for someone to add a new icon for "Rigging Attack" to RESOURCE\Textures\BATTLE_INTERFACE\cicons_command.tga.tx .
Would you be able to do that? Or otherwise @Jack Rackham?
 
I'm no good at inventing new icons. Give me something to put there and I can add it easily enough, but I can't design it myself.
 
Neither can I. What's supposed to happen - damage to the rigging or..?
Damage to crew and rigging. :yes

Everything is apparently working; all that's missing is an icon.
I sent a message to @Cassadar who is usually pretty good with stuff like this, but no guarantees that he'll respond.
If not, we'll still need at least something.... :unsure
 
There's already a picture in cicons_comman that looks like the triton blade.
Do you want another one or that one updated?
 
Back
Top