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

Need Help about adding items.

Jonesie85

Boarding Master
Storm Modder
Hello all, im experimenting with adding items into the game. I am cuurently using GOF v1.2 full patch 1.

I simple do not have access to new content that hasnet already been added to coas. So i duplicated the 'katana' (lovely weapon by the way).

The first thing i did was to duplicate the katana (blade32) entry in 'Program/ITEMS/initItems.c' file and paste it at the bottom of the items list. I put it there so i do not corrupt the organization of the items (like i did with my first add ship atempt). I changed itm.id, itm.name, itm.describe and itm.model to represent the new item. i also made some changes to the stats (random for the moment). It looks like this.

Code:
makeref(itm,Items[n]);
    itm.id = "legendarykatana";
    itm.groupID = BLADE_ITEM_TYPE;
    itm.name = "itmname_legendarykatana";
    itm.describe = "itmdescr_legendarykatana";
    itm.folder = "items";
    itm.model = "legendarykatana";
    itm.picIndex = 4;
    itm.picTexture = "ITEMS_10";
    // boal 19.01.2004 -->
    itm.price = 12000;
    itm.Weight = 4.4;
    // boal 19.01.2004 <--
    itm.dmg_min = 50.0;
    itm.dmg_max = 125.0;
    itm.piercing = 50.0;
    itm.minlevel = 1;
    itm.rare = 1.0; //0.001
    itm.block = 50.0;
    itm.param.time = 0.1;
    itm.param.colorstart = argb(64, 64, 64, 64);
    itm.param.colorend = argb(0, 32, 32, 32);
    itm.FencingType = "Fencing";
    itm.ItemType = "WEAPON";
    n++;

I then edited the 'Program/ITEMS/initItems_REALISTIC.c' file to have the same duplicated/modified code to the end of the item list in this file. It looks like this:-

Code:
makeref(itm,Items[n]);
    itm.id = "legendarykatana"; //Êèëèäæ
    itm.groupID = BLADE_ITEM_TYPE;
    itm.name = "itmname_legendarykatana";
    itm.describe = "itmdescr_legendarykatana";
    itm.folder = "items";
    itm.model = "legendarykatana";
    itm.picIndex = 4;
    itm.picTexture = "ITEMS_10";
    // boal 19.01.2004 -->
    itm.price = 12000;
    itm.Weight = 4.4;
    // boal 19.01.2004 <--
    itm.dmg_min = 50.0;
    itm.dmg_max = 125.0;
    itm.piercing = 10.0;
    itm.minlevel = 1;
    itm.rare = 1.0; //0.001
    itm.block = 50.0;
    itm.param.time = 0.1;
    itm.param.colorstart = argb(64, 64, 64, 64);
    itm.param.colorend = argb(0, 32, 32, 32);
    itm.FencingType = "Fencing";
    itm.ItemType = "WEAPON";
    n++;

The next thing i edited was 'RESOURCE/INI/russian/ItemsDescribe.txt and added this text to the end of the item list but just before the cloths descriptions:-

Code:
itmname_legendarykatana {Legendary Katana}
itmdescr_legendarykatana {
A sword forged in blood.
}

I duplicated the 'RESOURCE/MODELS/Ammo/Blade32.gm' file and renamed it to 'legendarykatana.gm'. In order to test it i added the weapon to a debugr.c function and spawned it in game. it adds to my inventory correctly, i can equip it correctly and when the model (and texture) are displayed the game does not crash (like it did when i tried to get my first ship experiement did. It can be unshealthed for combat and can be swung around so i am asuming that it should work when strking an oponent.

My questions:-

1, will the item be randomly dropped and sold at itemtraders? if not, how can i make it so?

2. This code contains a line called 'itm.rare = 1.0' it originally was 0.0001. does it mean the smaller the number the less likely t is to spawn? what are the highest and lowest values it can have? If it is not what i assumed it is, what is it?

3, If i was to make a largely god-like weapon that i did not want to spawn or appear at itemtraders what should i do?

4, Obvious as i have put the information at the end of all item lists with the 3 edited files. The Legendary Katana appears at the bottom of any item traders and player inventory. If i was to arrange the item into the correct space then reinit the my current game. Will it cause all the items to be corrupted in game? :cool

Thank you for your time and patience
 
Back
Top