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

Modded just your own ship.

Humble

Landlubber
Using the ships_init, I've figured out how to mod ships, well not completely. Just the speed and turning, so I can spin around fast in a circle, LOL. So now I'd like to find a way to mod just my character's ship.

That would require modding a save game I would think? What program would that require and would it be a lot more complex than modding the init files? If so.. nevermind then, my knowledge of programing is one BASIC class back in highschool. Unless there could be an easier way?
 
<!--quoteo(post=163475:date=Sep 24 2006, 04:43 PM:name=Humble)--><div class='quotetop'>QUOTE(Humble @ Sep 24 2006, 04:43 PM) [snapback]163475[/snapback]</div><div class='quotemain'><!--quotec-->
Using the ships_init, I've figured out how to mod ships, well not completely. Just the speed and turning, so I can spin around fast in a circle, LOL. So now I'd like to find a way to mod just my character's ship.

That would require modding a save game I would think? What program would that require and would it be a lot more complex than modding the init files? If so.. nevermind then, my knowledge of programing is one BASIC class back in highschool. Unless there could be an easier way?
<!--QuoteEnd--></div><!--QuoteEEnd-->


I dont know of any easy way (I mean, without coding experience).

You could try to edit your save file with a hexeditor, but thats dangerous, tricky, might not work in any way, and even if it does, when you begin a new game your ship will be the same as before.

An easier way is to edit the code, making an unique ship just for you. Here's what to do:
- open the ships\ships.h and add a new define, like this
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
#define SHIP_MANOWAR                  17
#define SHIP_MY_UNIQUE_SHIP          18  // <-- the new define
<!--c2--></div><!--ec2-->

- open the ships\Ships_init.c. Select one of the existing ships and copy its entire code. Paste the code after the MANOWAR.
Remenber to change the begginning of the code properly, like this
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
        // (before this point should come the MoW init code)
        /// My Unique Ship
        ///////////////////////////////////////////////////////////////////////////
        makeref(refShip,ShipsTypes[SHIP_MY_UNIQUE_SHIP]);

        //  (then comes the rest of your ship init code)
<!--c2--></div><!--ec2-->

- now open the characters\characters_init.c. There are two lines like
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->       ch.Ship.Type = GenerateShip(SHIP_LUGGER, 1); <!--c2--></div><!--ec2-->
change them to
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->       ch.Ship.Type = GenerateShip(SHIP_MY_UNIQUE_SHIP, 1); <!--c2--></div><!--ec2-->

- begin a new game to see the effects.


One note: backup your files before doing any change.
 
People, people people ....

If you install the sf crack you can edit the programfiles folder... If you don't install it you can't .... then you get a .DAT file instead ....

Download the crack here

<a href="http://www.piratesahoy.com/forum/index.php?showtopic=8200" target="_blank">http://www.piratesahoy.com/forum/index.php?showtopic=8200</a>
 
Thanks FPlatoon. =)

england -> Yeah, I cracked mine. But that doesn't give you an easy way to edit saved games, I thought? Just lets you mod the game.
 
your right there m8, but I was refering to TTT's post not yours <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
I also got the ship to work when the game starts by adding a new one but when I go to sea, no ship! I just float at sea and get stuck no options nothing. Any Ideas? I edit the ship.h to define a new ship ship_logan,
Copied the manowar code in the ship_init.c, and changed the generated ship in character_init.c. What I am I missing? Anyone else have this problem?
 
Hm, with that much details nobody can help yer. <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
Take a look into yer logfiles, i think their is written what's wrong.
 
Thanks for the advice on the system log. It first told me that it couldn't find a ship model file so I created one for it by copying the manowar. Then I realized I mess up the Ship_init.c by name the second line of my ship logan also:

makeref(refShip,ShipsTypes[SHIP_LOGAN]);
refShip.Name = "Manowar";
refship.Soundtype = "manowar";

So I changed it back to manowar but I still have the same issue: the log says this now:

Scanning modules\
Loading modules...
Loaded 0
Reset...
Initializing CORE...
Creating atoms space: 128
done
initializing complete
Initializing DirectX 8
Techniques: 20 shaders compiled.
Techniques: 211 techniques compiled.
Techniques: compiled by 75934363 ticks.
Can't load texture resource\textures\BATTLE_INTERFACE\PROGRESSBAR.TGA.tx
Using FMOD 00040406
Sound inited ok !!!
FMOD: Speaker mode STEREO
Set master volume
Intel CPU: No, SSE: Off, HyperThreading: Off
Can't load texture resource\textures\MAINMENU\ENGLISH\AOPENGLOGOBOARD.TGA.tx
Can't load texture resource\textures\BATTLE_INTERFACE\PROGRESSBAR.TGA.tx
Get master volume
Can't load texture resource\textures\BATTLE_INTERFACE\PROGRESSBAR.TGA.tx
Set master volume
Intel CPU: No, SSE: Off, HyperThreading: Off
Can't load texture resource\textures\BLUECORONA.TGA.tx
Can't load texture resource\textures\REDCORONA.TGA.tx
Can't load texture resource\textures\GREENCORONA.TGA.tx
Can't load texture resource\textures\MAGCORONA.TGA.tx
Ship Boat doesn't have fire places
Set master volume
Set master volume
Fader::Init() -> Fader already created, fade out phase
Intel CPU: No, SSE: Off, HyperThreading: Off
Can't load texture resource\textures\SPLASH.TGA.tx
Can't load texture resource\textures\BATTLE_INTERFACE\SEA_ABILITYS.TGA.tx
Sound release !
Island Set
Release d3d8
Undefined error
Release d3d
Undefined error
Unloading
System exit and cleanup:
Mem state: User memory: 66 MSSystem: 96 Blocks: 6
Leak: '.\xiutil.cpp' line 72, size 11
Leak: '.\xiutil.cpp' line 72, size 11
Leak: '.\xiutil.cpp' line 72, size 11
Leak: '.\xiutil.cpp' line 72, size 11
Leak: '.\xiutil.cpp' line 72, size 11
Leak: '.\xiutil.cpp' line 72, size 11

I wonder if those missing textures have anything to do with it but they were when before when i first open the log. I can't find those texture files, were they part of the supermod that did not get installed? The new info is the mem state.

Any Ideas?
 
<!--quoteo(post=165140:date=Oct 3 2006, 08:11 AM:name=Thomas the Terror)--><div class='quotetop'>QUOTE(Thomas the Terror @ Oct 3 2006, 08:11 AM) [snapback]165140[/snapback]</div><div class='quotemain'><!--quotec-->
same problem with me as with windwolf
<!--QuoteEnd--></div><!--QuoteEEnd-->

Do you have supermod installed as well. If not what does your sytem log say?
If so maybe something got changed with the mode.

Fplatoon, did your idea work on yours and did you mod anything yet?
 
Okay I think I figured it out. You have to change the number at the top of ship.h

#define SHIP_TYPES_QUANTITY 19 // It was originally 18, so add 1 for you new ship and it works!

Let me know, as I made my own ship references am using those but it should work with a straight copy of the manowar code.

Update: Were too many variables to keep track with my own ship, missing textures and all. but it worked. I went back using the an edited manowar code and it works out fine.

Does anyone know what the varible sea enchanment does?
 
i dont know what it is either i just based off the one i thought would work best heh. but i know now i have a mean fleut an pretty quick too <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
 
Hello,

I changed some things to have my unique ship.
First I had the same problem as all of you post here.
But now my game crashes when I load it. ( I don't even get to the man menu )

Ship H

#define SAILS_COLOR_QUANTITY 8
#define SHIP_TYPES_QUANTITY 20
#define SHIP_TYPES_QUANTITY_WITH_FORT 50 // must be (SHIP_TYPES_QUANTITY + 1)

#define SHIP_TARTANE 0

#define SHIP_WAR_TARTANE 1

//6
#define SHIP_LUGGER 2
#define SHIP_SLOOP 3

//5
#define SHIP_SCHOONER 4
#define SHIP_BARQUE 5
#define SHIP_CARAVEL 6

//4
#define SHIP_FLEUT 7
#define SHIP_BRIG 8
#define SHIP_GALEON_L 9

//3
#define SHIP_CORVETTE 10
#define SHIP_GALEON_H 11
#define SHIP_PINNACE 12

//2
#define SHIP_FRIGATE 13

//1
#define SHIP_LINESHIP 14
#define SHIP_WARSHIP 15
#define SHIP_BATTLESHIP 16

#define SHIP_MANOWAR 17
#define SHIP_BRIG_RN 18
#define SHIP_DMANOWAR 19

//
#define SHIP_BOAT 48
#define SHIP_FORT 49

#define SHIP_NOTUSED 1000
#define SHIP_NOTUSED_TYPE_NAME "Not Used"
#define SHIP_NAME_NOTUSED "Noname"

object ShipsTypes[SHIP_TYPES_QUANTITY_WITH_FORT];
object SailsColors[SAILS_COLOR_QUANTITY];


ref GetShipByType(int iType) { return &ShipsTypes[iType]; }

My modded ship:

///////////////////////////////////////////////////////////////////////////
/// DManowar
///////////////////////////////////////////////////////////////////////////
makeref(refShip,ShipsTypes[SHIP_DMANOWAR]);
refShip.Name = "Manowar";
refship.Soundtype = "manowar";
refShip.Class = 1;
refShip.Cannon = CANNON_TYPE_CANNON_LBS24;
refShip.MaxCaliber = 24;
refShip.Weight = Tonnes2CWT(4000);
refShip.Capacity = 80000;
refShip.CannonsQuantity = 102;
refShip.rcannon = 45;
refShip.lcannon = 45;
refShip.fcannon = 4;
refShip.bcannon = 8;
refShip.MaxCrew = 800;
refShip.MinCrew = 160;
refShip.BoardingCrew = 400;
refShip.GunnerCrew = 80;
refShip.CannonerCrew = 204;
refShip.SailorCrew = 800;
refShip.SpeedRate = 20.2;
refShip.TurnRate = 50.0;
refShip.Price = 750000;
refShip.HP = 9600;
refShip.SP = 100;
refShip.AbordageLocation = "Boarding Deck_01";
refship.Type.Merchant = false;
refship.Type.War = true;
refShip.fWindAgainstSpeed = 1.0;
refShip.sea_enchantment = 1.0;
refShip.lowpolycrew = 28;
refShip.buildtime = 140;

refship.Rocking.y = 0.3;
refship.Rocking.az = 0.02 ;

refship.WaterLine = 0.5;
refship.SpeedDependWeight = 0.6;
refship.SubSeaDependWeight = 1.8;
refship.TurnDependWeight = 0.6;

refShip.Height.Bombs.Y = 6.7; refShip.Height.Bombs.DY = 3.0;
refShip.Height.Grapes.Y = 11.0; refShip.Height.Grapes.DY = 3.0;
refShip.Height.Knippels.Y = 46.0; refShip.Height.Knippels.DY = 40.0;
refShip.Height.Balls.Y = 6.7; refShip.Height.Balls.DY = 3.0;

refship.InertiaAccelerationX = 1.0; refship.InertiaBrakingX = 1.0;
refship.InertiaAccelerationY = 1; refship.InertiaBrakingY = 1;
refship.InertiaAccelerationZ = 1.0; refship.InertiaBrakingZ = 1.0;

refShip.GeraldSails.rey_b2 = 1;
refShip.GeraldSails.rey_b3 = 1;
refShip.GeraldSails.rey_c1 = 1;
refShip.GeraldSails.rey_c1.vscale = 0.98;
refShip.GeraldSails.rey_b2.vscale = 0.98;
refShip.GeraldSails.rey_b3.vscale = 0.98;

refship.Track.Enable = true;
refship.Track1.ZStart = 0.30;
refship.Track1.LifeTime = 18.5;
refship.Track1.Width = "6.5, 7.5";
refship.Track1.Speed = "8.0, 9.0";

refship.Track2.ZStart = -0.15;
refship.Track2.LifeTime = 10.5;
refship.Track2.Width = "16.0, 18.0";
refship.Track2.Speed = "0.15, 0.25";

What is wrong? I should work.
 
No it must be 20 -> #define SHIP_TYPES_QUANTITY_WITH_FORT 50 // must be (SHIP_TYPES_QUANTITY + 1)
Ships + 1

Wheb I had 19 I get stuck when I enter the ship.
 
just try, i have put several ships ingame, and i don`t count 1 up with the #define SHIP_TYPES_QUANTITY 20.
that plus 1 only matters with #define SHIP_TYPES_QUANTITY_WITH_FORT 50
 
Back
Top