<!--`QuoteBegin-CouchcaptainCharles`+--><div class='quotetop'>QUOTE(CouchcaptainCharles)</div><div class='quotemain'><!--QuoteEBegin-->Alan has found the sore point: Adding SWAK attributes to already existing weapons is a bit tricky due to Scheffnow's weaponsmod. The original weaponinitialization in itemsinitItems :
// scheffnow - weaponsmod -->
if (ENABLE_WEAPONSMOD != 1 )
{
//WEAPONS -- NK: rare is changed for all below.
//Saber
makeref(itm,Items[n]);
itm.id = "blade1";
// NK -->
itm.skiptrade = false;
.....
itm.param.colorend = argb(0, 32, 32, 32);
n++;
runs only if the weaponsmod is toggled. So if you add the "disarm" attribute there it takes only effect if Scheff's is off.
If the weaponsmod is on the weapondefinition takes place further below :
else
{
//----------------------------------------------------------------------------------------------------
// BLADES: ItemIndex picIndex Price Piercing
// | bladeID modelID | rare | minDamage | Blocking
// | | | picTexture | | MinLevel | | ma
amage | |
//----------------|---|----------|---------|---|--|------|-----|---|-----|------|---|-----------------
n = InitBlade(n, "blade5", "blade5", 6, 9, 0.90, 0, 250, 4.0, 10.0, 25, 0); // Dagger
n = InitBlade(n, "blade2", "blade2", 6, 10, 0.90, 1, 500, 8.0, 12.0, 20, 10); // Rapier
n = InitBlade(n, "blade1", "blade1", 6, 11, 0.90, 2, 500, 8.0, 13.0, 10, 10); // Saber
Each line is a functioncall that calls this function :
// scheffnow - weaponsmod -->
int InitBlade( ref ItemIndex,
string id,
string ModelID,
string picTexture,
........
if(QualityMinLevel < 0)
{
QualityMinLevel = 0;
}
makeref(blade,Items[BladeIndex]);
// quality invariant properties
blade.id = BladeID;
blade.BladeQuality = i;
blade.groupID = BLADE_ITEM_TYPE;
blade.name = "itmname_" + id;
......
blade.param.colorend = argb(0, 32, 32, 32);
BladeIndex++;
}
return BladeIndex++;
}
which creates for every blade six subtypes (badly worn - excellent). If you want e.g. each Saber subtype to have the "disarm" attribute you must add something like
blade.param.colorend = argb(0, 32, 32, 32);
if( id == "blade1" ) blade.disarm = 5 ;
BladeIndex++;
And that for each type and each attribute again. That would be rather messy programming.[/quote]
So, if I want to add new weapons and use the weaponsmod I have to write them into this tableau instead of using the makeref function? Now, that would explain why I had the problems I had.
Now, this has really enlightened me <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/icon_wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="icon_wink.gif" />