Special Damage

Can anyone think of a way to make the special damage to a weapon (damage added to every attack for those who don't know) based on a global variable or attribute? (IE: 2 handed sword does 1-5 + gb_swordmod)

------------------
The word politics is derived from the words poly, meaning many, and tics, referring to blood sucking parasytes.

There is no way to do this. You can add a Strength modifier to a linked event for your item, but at the moment that is all you can do.

------------------
The greatest of harm can result from the best of intentions Ā— Wizard's Second Rule, Stone of Tears.
Ā— Cafall

There doesn't seem to be a truly straightforward way of doing this; one way I could suggest would be to create a whole set of weapons which differ only in their special damage. When an event changes "gb_SwordMod", have it remove the current version of the weapon from inventory and replace it with the new one. (Or, alternatively, have this check take place when the weapon is equipped - replace it then with the new version.)

This would be tons of trouble if you have lots and lots of different weapon types, but if you only have a few, it might work.

Alternatively, Cafall's method is quite good - since Strength only affects damage, just have the weapon, when equipped, stash the player's "real" strength into a global variable (so that it can easily be restored later) and set the player's strength temporarily to (15+gb_SwordMod). Have the opposite happen when the weapon is unequipped.

------------------
I have only made but one prayer in my life: "O Lord, make my enemies ridiculous." And it was granted. - Voltaire
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Openly atychiphobic since 2000.

Quote

Originally posted by Glenn:
**snip!
**

Agreed on the last part, but I would cut the storing of strength and making it a straigh-forward add-subtract deal, so that the player's original strength would still have some effect on the damage done.

------------------
"... For in that sleep of death, what dreams may come when we have shuffled off this mortal coil must give us pause..." - Willaim Shakespeare, Hamlet

Quote

Originally posted by Celchu:
**Agreed on the last part, but I would cut the storing of strength and making it a straigh-forward add-subtract deal, so that the player's original strength would still have some effect on the damage done.

**

Actually, Glenn meant that you should add and subtract, but put the player's original Strength into a variable so that you can reset the player's Strength when the player unequips the item.

------------------
The greatest of harm can result from the best of intentions Ā— Wizard's Second Rule, Stone of Tears.
Ā— Cafall

Quote

Originally posted by Celchu:
**Agreed on the last part, but I would cut the storing of strength and making it a straigh-forward add-subtract deal, so that the player's original strength would still have some effect on the damage done.

**

Depends on the effect you want. If you do it my way, the player's strength has no effect, but the swordMod damage is always added, whereas if you do it your way, the player's strength has an effect, but if it's less than 15 to start with, you won't get the full swordMod damage. (If strength = 10, swordMod less than 5 will have no effect on damage, for example.)

Probably the best way would be to have a conditional - if strength <15, use my way, and if strength >=15, use your way. šŸ™‚

------------------
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Only member of the webboard to gain 2 karma points by writing a flame, and openly atychiphobic since 2000.

How EXACTLY does strength affect damage? whats the calculations involved?

------------------
The word politics is derived from the words poly, meaning many, and tics, referring to blood sucking parasytes.

Quote

Originally posted by Demiscus:
**How EXACTLY does strength affect damage? whats the calculations involved?

**

It's in the manual, as are most of the other stats' effects. Basically, if strength is less than 15, it has no effect at all; if it is greater than 15, you get (strength - 15) points of bonus damage added to each attack with a non-ranged weapon. Ranged weapons are never affected by strength.

------------------
I love deadlines. I like the whooshing sound they make as they fly by. - Douglas Adams
Only member of the webboard to gain 2 karma points by writing a flame, and openly atychiphobic since 2000.

Quote

Originally posted by Glenn:
**Probably the best way would be to have a conditional - if strength <15, use my way, and if strength >=15, use your way. šŸ™‚

**

Well, looking back on my way it would be better to store the strength and then add the global. But instead of subtracting the global, it would then reset to the stored strength. That would get rid of the problem of the global changing while the weapon is equipped.

But then you have the problem of strength changing while it is equipped... Oh well. šŸ™‚

Just in case anyone cares, I'll be out of town and thus on sabbatical until the 14th, at least. Kepp the board in good shape, and if anyone wants to give me karma when I'm gone, well... šŸ˜‰ (or post in my bloody cron thread for that matter!) šŸ™‚

------------------
"... For in that sleep of death, what dreams may come when we have shuffled off this mortal coil must give us pause..." - Willaim Shakespeare, Hamlet

(This message has been edited by Celchu (edited 07-05-2002).)

Well what about ranged weapons if strength only affects melee ones. Let me explain the type of thing I'd like to do:

-There would be no real level ups
-There would only be 1 weapon for each type (IE 1 longsword, 1 axe etc.)
-Each time a character used a weapon (or hit with it, haven't really decided), there would be a percentage (probably close to 1) chance that their skill with the weapon would go up.
-Their damage, and chance to hit would be affected by this number. Also, they would gain new skills according to what they have been using (IE sword level: 25, you gain a new skill/spell rather than at level 6 or something).

All of this would be doable from the strength mod to damage, and dex mod to attacks, but how would i get something that would make a bow do more damage?

Also, Spells could be equiped instead of weapons (showing that you can't cast spells while using them). You'd use them like weapons (IE a fireball might be an extremely fast bolt from the caster) and they'd also get modifiers.

One last thing: is there a way to hold to weapons and use them both seperately? if there is, what button would you use to attack with the second weapon?

------------------
The word politics is derived from the words poly, meaning many, and tics, referring to blood sucking parasytes.

Quote

Originally posted by Demiscus:
All of this would be doable from the strength mod to damage, and dex mod to attacks, but how would i get something that would make a bow do more damage?

With bows, Perception should be used in place of Dexterity, and if you want to fudge the effect of Strength you'll have to make one bow for each Bow level with consecutive Special Damage values.

Quote

One last thing: is there a way to hold to weapons and use them both seperately? if there is, what button would you use to attack with the second weapon?

Unfortunately, this isn't possible without a lot of elaborate fakery and fancy animations.

------------------
The greatest of harm can result from the best of intentions Ā— Wizard's Second Rule, Stone of Tears.
Ā— Cafall