PDA

View Full Version : Min level for weapons not the same as equipment?


jeremyosborne
12-24-2010, 02:51 AM
Problem up front: I can give equipment a min level requirement that actually works, and I can mod weapons exactly like I want them EXCEPT that I can't get the min level to work for the weapons. Is there some trick to getting the min level to be recognized?

I used the following scheme for setting up some new equipment. The following are copy paste snippets for a dagger I was trying to make.

In one file I have my magic modifiers. One entry for a dagger is as follows

ModifierArchitemLifetakerChampion
{
// {identifier} Inherit from
Base BaseMagicModifier

// {boolean} Not sure what prefix does, but it appears to be boolean
//Prefix 1

// {string} The name that gets prefixed to a non unique item?
//Name ""

// The following is a way of setting a flat value that is not
// modified by level of the item
// {float} Percentage - aka. 1.0 == 100% change
DynamicStatMultCriticalHitBase 1.0
DynamicStatMultCriticalHitPerLevel 0.0
// {int} Perception bonus
StatChangePerceptionBase 100.0
StatChangePerceptionPerLevel 0.0
// {int} Disarm trap bonus
StatChangeDisarmTrapBase 100.0
StatChangeDisarmTrapPerLevel 0.0


// Critical hit focus, other special damage penalized
// NOTE: Seems negative percentages are not calculated like positive
// percentages. This gives us about an 89% negative.
DynamicStatMultStunningBlowBase -8.0
DynamicStatMultStunningBlowPerLevel 0.0
DynamicStatMultDeepWoundsBase -8.0
DynamicStatMultDeepWoundsPerLevel 0.0
DynamicStatMultCrushingBlowBase -8.0
DynamicStatMultCrushingBlowPerLevel 0.0

// Extra penalties for magic users
// NOTE: Seems negative percentages are not calculated like positive
// percentages. This gives us about an 99% negative.
DynamicStatMultMagicCriticalHitBase -100.0
DynamicStatMultMagicCriticalHitPerLevel 0.0
DynamicStatMultMagicCrushingBlowBase -100.0
DynamicStatMultMagicCrushingBlowPerLevel 0.0
}



In another File I have both a base item that inherits from another standard item, in this case a regular dagger, followed by the item description:

BaseArchitemLifetaker
{
// {identifier} From what base item do we inherit
// NOTE: I seem to need to inherit from an already existing
// item type to get the item type name to show up correctly.
Base Dagger1

// {boolean} Whether (1) or not (0) this item is intended to be
// a base from which other items inherit: base items do not
// spawn in the game.
BaseOnly 1

// {bool} This is an artifact.
Artifact 1

// NOTE: Artifacts have a base 30% damage multiplier in version 1.010.
// this multiplier is applied to all artifacts system wide (see
// systems.gdb).
// Take that into account when changing the damage.
// Modify base damage
MinDamageBase 10.0
MinDamagePerLevel 2
MaxDamageBase 20.0
MaxDamagePerLevel 2

// Slightly lower requirements than usual daggers.
DexterityReqPerLevel 3.5

// Slightly faster than your average dagger.
Speed 0.6

// {texture identifier} Icon used to display this item in the
// inventory view.
// TODO: The dark rock needs a icon. Use the base Necklace
// icon for now.
//TextureName Textures/Icons/Items/architem_necklace_lifetaker.tga

// {float} Not sure what this does....
//ModifierLevelRequirement 0.0

// {float} Base value for an item, where 1.0 means the item is worth
// the standard value for an item of any item containing such
// type and attributes; 0.5 would be worth 50%; 2.0 would be worth
// twice the amount.
ValueMult 1.0
}

ArchitemLifetakerChamption
{
Base BaseArchitemLifetaker

// {string} Display name of this item.
Name $$ArchitemLifetakerChampion$$

// {identifer} Which modifiers will be applied to this item.
MagicModifier ModifierArchitemLifetakerChampion

// {int} Approximate minimum level requirement to equip this.
ItemLevel 40
}


The above code design works great for equivalent pieces of wearable equipment, or at least the ones I've tried. They all get min item levels, but not weapons. Any idea advice about what I might be doing wrong?

Shadow
12-24-2010, 10:43 AM
You might need to add the following line in your item somewhere:
LevelRequirement 1

jeremyosborne
12-24-2010, 01:40 PM
Thanks Shadow.

I just tested and can confirm that:

LevelRequirement 1

will force a minimum level restriction to be applied to the item that I set this property on based on the ItemLevel. This worked when applying to my own base class, or on a specific item defintion.

I can also confirm that for items where I want to be sure that no minimum level restriction gets applied that:

LevelRequirement 0

will turn off any previously inherited or assumed character minimum level restrictions.

Thanks!