<!--quoteo(post=336994:date=Jul 13 2009, 06:57 PM:name=Craiggo)--><div class='quotetop'>QUOTE (Craiggo @ Jul 13 2009, 06:57 PM) <a href="index.php?act=findpost&pid=336994"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Thank you so much my good sir! you are the man Thengill!
So I don't have to do anything with thes files:
BattleInterface
common.ini
pictures.ini
RPGUtilite.c
ItemsDescribe.txt
HeroDescribe.txt
ShipsDescribe.txt
ships.h
And what about the ".tga.tx" and other textures under "textuures/ships"? All I have is the "gm" files for the MODELS/Ships folder.<!--QuoteEnd--></div><!--QuoteEEnd-->
Well you do have to add entries for each ship else their description and type name will be blank, and without refrences in pictures.ini they wont have a picture in the shipyard or on the ship screen, and because of alot of other reasons.
Before we start <b>do not delete any entries (unless you know what the hell you are doing) and always make a backup before editing anything.</b>
I wont do any of the work for you unless its something you really need a tutorial for.
in pictures.ini you should copy the brig and frigate entries and then rename them to interceptor and surprise respectively, since you dont have a picture of those 2 ships the brig and frigate will do just fine for the moment.
in Common.ini you need to add entries for both ships. just look at the other ship entries and copy them then rename them properly, like below.
string = Surprise,"Surprise"
string = SurpriseGen,"Surprise"
string = SurpriseAcc,"Surprise"
string = SurpriseDat,"Surprise"
That tells the game that the surprise ship entry's class is named Surprise and you will be able to see that when you look at Surprise through a spyglass, though you could name the class what ever you want, we will go with calling it Surprise for simplicitys sake.
Same thing with shipdescribe.txt just create an entry and describe the ship anyway you want.
This is pretty straight forward just look at the other ship descriptions then copy one rename it and type which ever description you want.
Ships.h is the most important if you dont tell it exactly how many ships you have in game and number them properly the game wont add them ingame, the game will crash or any other number of unexpected results will ensue.
#define SHIP_TYPES_QUANTITY 40 (Where 40 is the total number of ships you have, starting from 0 to the last ship which is the one right before the fort)
#define SHIP_TYPES_QUANTITY_WITH_FORT 41 // must be (SHIP_TYPES_QUANTITY + 1) (Now that means the fort has to be numbered one number above the last ship entry)
To clarify the ship numbered 0 counts as 1 so if your last ship entry is numbered at 39 that means you have 40 ships, and that means that the fort is number 40 make sure to check each ship entry in ships.h to make sure that they are all numbered properly from 0 to the last entry which is the fort, that means 0 1 2 3 4 5 6 7 etc. etc.
To clarify further some people dont seem to get this right away if you have 40 ships in total ergo the last ship entry is 39 then the fort is number 40 now since the fort is number 40 the line at the top "#define SHIP_TYPES_QUANTITY_WITH_FORT" should read 41.
Now why is that? Well look to the right of the fort line at the top it says ship_types_quantity + 1 that means you add 1 to 40 and since you cant possibly ever have failed math in first grade that means that line should read 41.
(sorry if I'm over explaining this but you have no idea how often I come across people who I have to explain things to more than once, and if I have to explain things more than once I get irritated, if they still dont get it I get mad.) Sorry but thats just the way I am I cannot stand incompetence, character flaw.
In BattleInterface.txt you need to create entries aswell for Surprise just copy the frigate entry and rename it surprise, same with interceptor except you might want to copy the brig entry.
Hmm I may have forgotten something, ahh yes the ShipsUtilities.c in scripts, if you want to be able to buy these ships at the shipyard you have to add entries there.
scroll down untill you see lines like this one " if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_LUGGER), "ship3");"
Those lines tell the shipyard what is available.
now as a header to these lines theres lines like this " if (sti(PChar.rank) > 1)"
This is what determines at what level the ships below will be available, as in rank, it is still randomized.
so what you need to do is create entries for each ship you've added where and at what rank you want them to become available.
like for example heres mine at ranks 12 and up
if (sti(PChar.rank) > 12)
{
iTest_ship = rand(50);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship141");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship141");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship141");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUSSOLE), "ship141");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CONSTITUTION), "ship141");
iTest_ship = rand(70);
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_FRIGATE), "ship151");
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PINNACE), "ship151");
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_GALEON_H), "ship151");
if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship151");
if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BOUSSOLE), "ship151");
if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CONSTITUTION), "ship151");
}
So all you have to do is pick a rank where you want say Surprise to become buyable, for example at rank 8 and up
so you copy an existing entry and the paste it below the copied entry, lets say the corvette which is
if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_CORVETTE), "ship14");
then you rename it to Surprise and then change the iTest_ship paramater to 3 like I've done below
if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_SURPRISE), "ship14");
I dont think I forgot anything, thats all you need to add in order to get the ship working properly.
Ohh forgot one thing, you say you dont have the texture files for the ships?
Ohh dear, ehm well unless the ftp suddenly comes to life you are shit out of luck.
Unless someone can upload them elsewhere, which textures are you missing and for which ship?