coding in new item

Aug 30, 2009, 5:26 am
#1
Joined: Aug 30, 2009
Posts: 7
im newbie coder and i need help with making item, this is my code:


Config SPIKED_SWORD;
{
DefaultSize = 70;
Possibility = 25;
WeaponCategory = SMALL_SWORDS;
DefaultMainVolume = 100;
DefaultSecondaryVolume = 50;
BitmapPos = 111, 46;
FormModifier = 50;
StrengthModifier = 100;
NameSingular = "spiked sword";
MainMaterialConfig = { 10, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
SecondaryMaterialConfig = { 10, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
MaterialConfigChances = { 10, 100, 75, 50, 25, 10, 5; }
Roundness = 5;
AttachedGod = CRUENTUS;
WieldedBitmapPos = 177, 378;
EnchantmentPlusChance = 5;
DamageFlags = SLASH|PIERCE;
}


when i try to run game it says odd numeric value "}". it seems there is no problems in this code. thanks for help

draconic steel is my customize material
Aug 30, 2009, 6:29 am
#2
Joined: Sep 22, 2008
Posts: 634
martys1103 wrote
MainMaterialConfig = { 10, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
SecondaryMaterialConfig = { 10, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
MaterialConfigChances = { 10, 100, 75, 50, 25, 10, 5; }

There's the mistake. The first number tells the game how many material possibilites the item has. Since you have 10 there, it thinks the } is also a material and produces the error. Try this:

MainMaterialConfig = { 6, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
SecondaryMaterialConfig = { 6, BRONZE, IRON, STEEL, METEORIC_STEEL, ADAMANT, DRACONIC_STEEL; }
MaterialConfigChances = { 6, 100, 75, 50, 25, 10, 5; }

I'm bad with handling the script, but that's what I think the problem is.
Aug 30, 2009, 7:03 am
#3
Joined: Aug 30, 2009
Posts: 7
well now there is another problem: Fatal error: Unknown exception thrown. i dont know it is because of that code
Aug 30, 2009, 10:30 am
#4
Joined: Sep 22, 2008
Posts: 634
Have you defined draconic steel and the sword in define.dat? If not, find the line #define ADAMANT (IRON_ALLEY_ID + 4) and add #define DRACONIC_STEEL (IRON_ALLEY_ID + 5) below it and #define SPIKED_SWORD 17 below #define HAMMER 16.
Aug 30, 2009, 1:12 pm
#5
Joined: Aug 30, 2009
Posts: 7
yup, i did it before, draconic steel worked perfectly
Aug 30, 2009, 2:30 pm
#6
Joined: Sep 22, 2008
Posts: 634
Hmm. I tried adding that by myself, it worked just fine. Couldn't use draconic steel for it, but since it worked for you it shouldn't matter.

You've probably messed something up by accident. If you haven't added anything else to the game yet, grab a fresh copy of the script and plug the sword in it.
Aug 31, 2009, 12:21 am
#7
Joined: Dec 11, 2008
Posts: 1,770
Materials work fine with straight script editing... Weapons on the other hand, don't. Not for me anyway.
System would indicate in graphic if person is mounted on horse or not.
Same system also show if person mounted on boar, elephant, polar bear etc.
Or if person mounted on ass.
Ivan find mounting on ass funny.
Aug 31, 2009, 5:48 am
#8
Joined: Aug 30, 2009
Posts: 7
ok, deleted element and item and it works like before
Jump to