[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Specific modifiers for specific classes?  XML
Forum Index -> UnrealScript, Coding, Mapping, and 3rd party Mods
Author Message
Tawn



Joined: 12/06/2007 19:27:18
Messages: 14
Offline

Hello all. Recently Ive been at work on a set of magic weapons. Ive come to realize that, when using this on the server this was intended for, would just make the game a little more unbalanced. So I came up with the idea of restricting these kind of magic modifiers to weapon masters only. The problem is, how? What I thought to do was extend an ability off of DruidArtifactLoaded and for each level, give them a magic modifier artifact which would make the selected weapon it's magic(example, Knockback Modifier Artifact). I could probably get the ability going, it's just the artifact that I am having a little frustration with. Ive looked at the DruidArtifactMakeMagicWeapon code and see if I could pull anything out from there, but no luck. So if anyone could perhaps help me, or just give me a hand, I would be very thankful.

Tawn
Szlat

Wicked Sick!

Joined: 05/18/2005 18:32:41
Messages: 2124
Location: UK
Offline

You could try looking at the ArtifactMakeSuperHealer class. This extends the DruidArtifactMakeMagicWeapon to produce a specific type of weapon. Get rid of the stuff about EXPMultipliers and MaxHealth as it is only relevant for the medic weapon, and put your own code in constructionFinished and GetRandomWeaponModifier.

For balance purposes you will need to make the new weapon non-shareable.

However, a word of warning. The idea of having individual artifacts for generating specific weapon types has been discussed a number of times, and always rejected on this server. The randomness of weapon types is a crucial part of the game.

So an alternative might be to modify the AllowedFor function of your new weapon types, and in there check what class the player is. And on your new magic types return false if the player is not a WM. That way you still keep the randomness, but only WMs can get your new weapons. And if you wanted it level based, you could probably check for what level of an ability they have in the AllowedFor function.
Tawn



Joined: 12/06/2007 19:27:18
Messages: 14
Offline

Thanks Szlat. I tried the alternative method, but I kept getting an error that I couldn't get past through(something about not recognizing a code after a parenthesis). So I tried extending off of the ArtifactMakeSuperHealer and it worked.
 
Forum Index -> UnrealScript, Coding, Mapping, and 3rd party Mods
Go to: