Oh wait a second. Its not possible to have it as anything other than a boolean? Im trying to store values in it - bummer. Looks like ill have to devise a different way
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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
Oh wait a second. Its not possible to have it as anything other than a boolean? Im trying to store values in it - bummer. Looks like ill have to devise a different way
ship.MyAttrib = 0.01;
float x = stf(ship.MyAttrib);
if (stf(tempMainChar.LastSailState) != 0.0) SendMessage(&AISea, "laf", AI_MESSAGE_SHIP_SET_SAIL_STATE, tempMainChar, 0.0);
Arrr! happy to come aboard captainThis sounds absolutely great and by the sounds of it, you sure came further than I would've thought possible.
I LOVE being proven wrong! I think that warrants an inclusion in the Modders group. Welcome to the club, mate!
(BTW: This will increase your forum attachment space to 10 MB)
I once messed around with the SailState code in PROGRAM\SEA_AI\sea.c for the furling of the sails when anchoring:I never got crashes from that but then I don't think anyone would ever run it within five seconds of loading the scene.Code:if (stf(tempMainChar.LastSailState) != 0.0) SendMessage(&AISea, "laf", AI_MESSAGE_SHIP_SET_SAIL_STATE, tempMainChar, 0.0);
Am I correct in assuming you already managed ships to "remember" their attributes yet?
Let me know if there's any other issues you have and I'll see if I can figure out anything to help you.
Funny thing:
My train of thought was as follows - If Y is a vertical axis(as shown by the tacking code), then rotating either around X, or Z axis should allow me to implement ship heeling in the wind. So I checked it. Turns out:
- Z-axis doesn't exist, or rotating around it doesn't change a thing
- rotating around X-axis by 0.5 makes the ship sail sideways.... Let me reiterate - it does not rotate the ship. It rotates the speed vector of the ship.
And thus, it turns out that it's possible to implement leeway
I don't know what the real world practice is. My tacking strategy is that the wind changes every hour at the hour or 4 minutes after, and it usually changes to head on. That means that just before the hour I change course to 90 degrees to the course I want in the hope of "fooling" the wind into helping me instead of hindering me. So, I tack every hour unless there is something in the way forcing an early tack.
Superstitious? Whatever..... It usually takes me 3-9 hours to get in or out of port because of the constant headwinds combined with no room to tack.
Testing the latest file, it seems I must have a very slow turning ship. The ai ships could do a 360 before I could do a 90. It was especially noticeable after I captured a surrendered class 2 Spanish War Galleon. We both had to do a 180 to go to our next target, and that monster made its turn and was sailing away long before I finished my turn.
It seems to me the ai tack too much when sailing into the wind. I tack less than they do and can pull away from them even though I'm sailing the slowest ship. Also, in combat they like to position themselves directly downwind from their opponent, making them combat ineffective. It would be nice if they slid off to one side a bit.
float BS = arCharShip.bla;
float BS2 = BS + 2;
float BS3 = BS2 + 3;
archarship.bla = BS3;
Log_SetStringToLog("bla " + arCharShip.bla + " BS " + BS + " BS2 " + BS2 + " BS3 " + BS3);
CheckAttribute(arCharShip,"bla")
closest point + (RS_CP_OFFSET * 8)
Tacking ability determined by the Captain's skills? Ship performance based on the Captain's skills is already modeled in general. Does that also apply to tacking? I would not want that to be applied twice. Testing required.
Collisions? The AI have always been crashing into cliffs. The current model has them getting out of ports well. I'm wondering about short runs in tight spots vs long runs between tacks on the open sea. More testing!
Would it be possible for the ships to "know" which side the land is on and then decide not to tack in the direction of land if it's there?
You should be able to get some land/shore locator coordinates somehow and calculate a distance, though I'm not at all sure how.