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

Init documents....

Admiral TeaRex

Feared English Admiral
Well, i've got a feeling im not the only one looking for info on documents like this and how to mod them, so i decided i'd open a topic for other members to come to in the future for info, rather than repeatedly asking the same questions over and over again. Firstly, if this is in the wrong forum, please move it to the correct one. i couldn't find any forum or Sub-forum with the name "Modding Q&A" so i decided this was the closest i could get to one.

Now, in my first post, i have a question, and a note for modding them. the explanation first, then question


Explanation: i have found an encreasingly large demand for ship modifications, from realistic, to fun, to outright bizarre. As such, i've decided to give people a bit of help so that they can learn to modify them themselves, and hopefully encourage them to delve deeper into the world of Init modding, and become active members on this site by doing so. So, without further adieu, i give you: Ships_init document modification:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    //-------------------------------------------------------------------------
    // The Black Pearl by Kazeite
    //-------------------------------------------------------------------------
    makeref(refShip,ShipsTypes[n]);
    n++;
    refShip.Name                = "theBlackPearl";
    refShip.BigPicTex            = 1;
    refShip.BigPicTexName        = "SHIPS1";
    refShip.all                    = "BlackPearl";
    refShip.SName                = "theBlackPearl";
    refShip.id                    = refShip.Name;
    refShip.Nation                = PIRATE;
    refShip.unique                = true;
    refShip.Class                = 3;
    refShip.Walk                = "theBlackPearl";
    refShip.Cannon                = CANNON_TYPE_LONG_LBS42;
    refShip.MaxCaliber            = 42;
    refShip.Weight                = Tonnes2CWT(1100);
    refShip.Capacity            = 2200;
    refShip.CannonsQuantity        = 36;
    refShip.Cannons.Borts.cannonf.qty    = 2;
    refShip.Cannons.Borts.cannonb.qty    = 2;
    refShip.MaxCrew                = 300;
    refShip.MinCrew                = 60;
    refShip.SpeedRate            = 20.5;
    refShip.TurnRate            = 45.0;
    refShip.Price                = 18000000;
    refShip.HP                    = 70000;
    refShip.SP                    = 100;
    refShip.EmblemedSails.normalTex = "ships\sail_whole_black_patch1.tga";
    refShip.EmblemedSails.nationFileName = "ships\sail_whole_black_patch2.tga";
    refShip.AbordageLocation = "BOARDING_BATTLESHIP";

    refShip.CannonsDeck = 2; // KK
    refShip.CargoHold = 1; // KK

    refShip.Type.Trade            = false;
    refShip.Type.War            = true;

    refShip.CanBuy                = true;
    refShip.CanEncounter        = false;

    refShip.WaterLine            = 0.3;
    refShip.SpeedDependWeight    = 0.3;
    refShip.SubSeaDependWeight    = 1.0;

    refShip.InertiaAccelerationX = 0.4;    refShip.InertiaBrakingX = 2.0;
    refShip.InertiaAccelerationY = 10;    refShip.InertiaBrakingY = 4;
    refShip.InertiaAccelerationZ = 4.0;    refShip.InertiaBrakingZ = 2.0;

    refShip.Height.Bombs.Y        = 1.0;    refShip.Height.Bombs.DY = 0.5;
    refShip.Height.Grapes.Y        = 2.0;    refShip.Height.Grapes.DY = 1.0;
    refShip.Height.Knippels.Y    = 10.0;    refShip.Height.Knippels.DY = 8.0;
    refShip.Height.Balls.Y        = 1.0;    refShip.Height.Balls.DY = 0.5;

    refShip.GeraldSails.rey_b2    = 1;
    refShip.GeraldSails.rey_b3    = 1;<!--c2--></div><!--ec2-->

<b>refShip.Class</b>= the Ship's class. 1st Class like the MOW? or 7th class like the Tartane? your choice
refShip.Walk= The ship's walk file. still not too sure what the walk file does. IIRC it effects where the crew CAN and CANNOT go.

<b>refShip.MaxCaliber</b>= the maximum caliber your ship can carry. a combination of this and some cannon tweaking [still not too sure how i did it. it's miraculous i didn't break anything! <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" /> ] allows you to arm the ship of your choice [in this case, Kazeite's Black Pearl] with guns usually not available to it, as you can see in the codes above. my BP has 42 pound cannons available to it.

<b>refShip.CannonsQuantity</b>= number of cannons on the ship. i never even dared to mess with this, fearing for my precious Pearl to end up missing a cannon... <img src="style_emoticons/<#EMO_DIR#>/jackhat.gif" style="vertical-align:middle" emoid=":j2" border="0" alt="jackhat.gif" />

<b>refShip.Capacity</b>= amount of cargo space your ship has. how it would effect the ship's speed if i boosted it's cargo space, is unknown.

<b>refShip.Cannons.Borts.cannonf.qty</b>= number of cannons on the front [cannon<!--coloro:#3333FF--><span style="color:#3333FF"><!--/coloro-->f<!--colorc--></span><!--/colorc-->]

<b>refShip.Cannons.Borts.cannonb.qty</b>= number of cannons on the back [cannon<!--coloro:#3333FF--><span style="color:#3333FF"><!--/coloro-->b<!--colorc--></span><!--/colorc-->]

<b>refShip.MaxCrew</b>= the Maximum Crew for your ship. i suggest you dont mess with this, since it effects the amount of damage the enemies can do per shot.

<b>refShip.MinCrew</b>= the Minimum Crew for your ship to run efficiently. like the above, i suggest you leave this alone.

<b>refShip.SpeedRate</b>= the ship's speed in the Shipyard interface. as you can see, i've upgraded this so that the BP really IS the Fastest Ship in the Caribbean. even faster than the Schooners, Ketches, Corvettes, or any other ship in the game.

<b>refShip.TurnRate</b>= the ship's manouverability. as you can see, i've upped the manouverability by nearly the exact same amount in percentage to the speed. both multiplyied from the original by 1.22105.
refShip.Price= as mentioned, this determines the price. to help balance this hip out, i've made her nearly impossible to buy, with a price of 18 million gold <img src="style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" /> .

<b>refShip.HP</b>= the Hull Points [actually Hit Points, but since this is a ship, i say Hull Points]. this determines how much punishment your ship can take before finally going to Davy Jones' Locker [maybe i should edit the Dutchman to be 10 times more than an MOW, since it actually sinks and resurfaces at will, and is a part of the sea....]

<b>refShip.SP</b>= Sail Points. it has seemingly no effect on how much damage your sails can take [I bumped it to 1,000,000 and still it got shredded in a couple of volleys from a French Corvette <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> ]

<b>refShip.Type.Trade</b>= is this ship a Tradeship? if this is True, it's a trade ship. if it's False, then it's not. NOTE: everything between the "refShip.SP" and this, are things i am slightly lost with.

<b>refShip.Type.War</b>= is this ship a Warship? if True, it is a Warship, and if False, it isn't.

<b>refShip.CanBuy</b>= can you buy it? if set to True, you WILL be able to buy it in some shipyards.

<b>refShip.CanEncounter</b>= can you encounter it? if set to True, you WILL encounter it. if set to False, you wont.

NOTE: im not sure that the last 2 options noted are in the usual Ships_init file's BP list, since i copied them from another ship and pasted in the BP's list of options.
the rest, im rather lost with. i'll give more info when i learn, by editing this post, of course. same goes for ALL mods i learn how to make.

Question: i have been planning to modify the initItems.C file, with Swords being the target. i have found what seem to be the swords, but the problem is, i see numbers, and no specific mark as to which one gives me what. an example:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->n = InitBlade(n, "blade9",  "blade9",  3,  2, 0.10, 19, 32000, 15.0, 25.0, 45, 45,  FRANCE,  5); // Silver Leaf<!--c2--></div><!--ec2-->

i know this is the Silver Leaf, but i dont know what to change to change the Min. Damage, Max. Damage, the price...etc. could anyone give me an example? highlighting the number that corresponds to each of the effects linked to them would be enough, though a detailed explanation is also helpful, though not as nessecary
 
Thanks a lot. This is a great idea. Perhaps it could be moved to the Modding and Alpha forum, but I think keeping it here will be just fine as well. Whatever you prefer. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
<img src="style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> I've changed values in all sorts of ini files since the Stock game.
You can change your character and make him invinceable or change your
ships, items etc, but remember if you change ship values, all the ships in that
category will change. So, your enemy has the same!! Kazeite's Black Pearl is an
exception! Remember to back up! Some changes will give you that dreaded
Engine.exe Error! <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
 
would it be possible to give the flying dutchman 6 bow cannons while it has 2 bow cannon locators? then you would have the tripple guns! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
 
<!--quoteo(post=181558:date=Feb 2 2007, 04:03 AM:name=morgan terror)--><div class='quotetop'>QUOTE(morgan terror @ Feb 2 2007, 04:03 AM) [snapback]181558[/snapback]</div><div class='quotemain'><!--quotec-->
would it be possible to give the flying dutchman 6 bow cannons while it has 2 bow cannon locators? then you would have the tripple guns! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />
<!--QuoteEnd--></div><!--QuoteEEnd-->
<img src="style_emoticons/<#EMO_DIR#>/no.gif" style="vertical-align:middle" emoid=":no" border="0" alt="no.gif" />
The model itself has to have the 6 locators.
 
bummer. but you COULD put 6 locators on two groups of three really close together, right? (the three, not the groups)
 
<img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
Actually, you could even make the three have the exact same location.
Problem there is that in the viewer, the labels get merged and it's hard to tell what locator is what.

I think that may be the cause of some of the bad rope data.
Modders, including Akella's, lost track of what rope points belong with what ropes.
Mislabeling leads to some ropes with 3 points and some with only one.
 
<!--quoteo(post=181492:date=Feb 1 2007, 10:17 PM:name=Lord Nelson)--><div class='quotetop'>QUOTE(Lord Nelson @ Feb 1 2007, 10:17 PM) [snapback]181492[/snapback]</div><div class='quotemain'><!--quotec-->
Question: i have been planning to modify the initItems.C file, with Swords being the target. i have found what seem to be the swords, but the problem is, i see numbers, and no specific mark as to which one gives me what. an example:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->n = InitBlade(n, "blade9",  "blade9",  3,  2, 0.10, 19, 32000, 15.0, 25.0, 45, 45,  FRANCE,  5); // Silver Leaf<!--c2--></div><!--ec2-->

i know this is the Silver Leaf, but i dont know what to change to change the Min. Damage, Max. Damage, the price...etc. could anyone give me an example? highlighting the number that corresponds to each of the effects linked to them would be enough, though a detailed explanation is also helpful, though not as nessecary
<!--QuoteEnd--></div><!--QuoteEEnd-->
Above the block with the weapon data you will find the explanations of the data columns:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Weapons-mod weapons definitions (uses quality generation functions)
//---------------------------------------------------------------------------------------------------------------------------
// BLADES:  ItemIndex                          picIndex         Price            Piercing     Nation (-1 for general)
//                 |bladeID   modelID              | rare              |  minDamage        |Blocking  |
//                  |  |               | picTexture   |  |   MinLevel |   | maxDamage  |   |      |     Disarm // PB:<!--c2--></div><!--ec2-->
The "|" lines are supposed to point from the explanation to the data columns, but as different editors use different spacings and tabstops your display of this may be rather distorted.

Hint: look at an older initItems file (before B13). There the data for the stock weapons are still in the old format:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
        //Silver Leaf
        makeref(itm,Items[n]);
        itm.id = "blade9";
        // NK -->
        itm.skiptrade = false;
        itm.skiprand = false;
        itm.skipequip = false;
        // NK <--
        itm.groupID = BLADE_ITEM_TYPE;
        itm.name = "itmname_blade9";
        itm.describe = "itmdescr_blade9";
        itm.folder = "ammo";
        itm.model = "blade9";
        itm.picIndex = 2;
        itm.picTexture = "ITEMS_3";
        itm.price = 7500;
        //NK -->
        itm.dmg_min = 24.0;
        itm.dmg_max = 32.0;
        itm.piercing = 45;
        itm.minlevel = 9;
        itm.rare = 0.1;
        itm.block = 45;
        itm.disarm = 5; // PB: Extra high disarming chance added
        // NK <--
        itm.param.time = 0.1;
        itm.param.colorstart = argb(64, 64, 64, 64);
        itm.param.colorend = argb(0, 32, 32, 32);
        n++;
<!--c2--></div><!--ec2-->
which at least gives you some of the data with there meanings in front.

BTW, how about moving this thread into the Brainstorming section? Basic stuff, tutorials and the links to the WIKI are also there.
 
If you use Notepad++ from my site, the spacing of the file will be correct so that the explanations line up properly. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
ok, thanks. i'll take a look at it soon. oh and where this topic goes is entirely up to you. i dont really care where you put it. i'll follow it. after all, owning my own site AND being a moderator on another, i know how annoying it is when a topic comes up in the wrong catagory.
anyway, im hoping we can use this as a general text modding Q&A. maybe put it as a sticky?

EDIT: i downloaded it online. thing is, it doesn't save the file in the same format, so i end up with a useless document afterwards...
 
Back
Top