Skip to content

Award item based on Proficiency

How to award weapons based on PC's proficiencies. A little nudge in the right direction would be great.

Comments

  • ForSeriousForSerious Member Posts: 466
    I have a broken script that has been sitting there for like 10+ years because I find this task daunting. (And I seem to be doing fine without it.) Its main idea was to randomly pull items from a pool then check against 2da files and feats to see if it fits. Pull again if not.

    Maybe I'm thinking about it in the wrong way.
    The OC has scripts that will give you items that are useful to your class, and they seem to take into account feats like weapon focus. If I remember right, all those items are listed out in the scripts, or they rely on the blue print ResRef numbers. (Example dagger001 is a dagger. dagger002 is a dagger +1 and so on.)

    Awhile back I made a loot system where you populate a database by putting items in a chest. That way a DM can easily modify what loot options are. That idea could be expanded into categories. Once you figure out how many categories you'll need. Not sure how well that would work for overlapping feats, but that shouldn't be too hard to figure out.
  • ZephiriusZephirius Member Posts: 419
    Thanks for the tip ForSerious
  • ReachPWReachPW Member Posts: 27

    How complex do you want it? An easy way would be to check for feats:

    if ( GetHasFeat(FEAT_ARMOR_PROFICIENCY_HEAVY)) {
    	// can equip heavy arrmor
    }
    

    With that you could build a list of what the player can equip and then also take into account Weapon Focus/Spec, etc and then generate your treasure based on that. Potentially also taking race and class into account?

    GetBaseItemType will require what type of item it is.


  • ForSeriousForSerious Member Posts: 466
    I would love to create such a system, but how do you solve the problem of creating a list of all the possible items? Maybe I'm thinking too big. I suppose it wouldn't be too hard if you were only going to give one or a few items per feat. I want to be able to give randomly one of any matching item in the game.
  • ReachPWReachPW Member Posts: 27

    The other problem is just because they have the feat, doesn't mean they want the item.

    For example, say you have a 39 sorc with 1 level of Paladin for saves and disc skill. They will have Heavy Armor, but chances are, since they are 39 sorc, they are probably wearing robes. Does a monk/dd prefer robes or heavy armor ?

    Any feat they player manually picks (ie, Weapon Spec/Focus) is probably safe, but any "auto assigned" feats might need some type of weight and maybe even take into account what they are currently wearing.





  • ForSeriousForSerious Member Posts: 466
    Oh hay, the script nw_o2_feat kind of does what you're hoping for. So, it checks for weapon focus, then creates a weapon based off of that. What I would do, is copy this script and rename it. Then start making changes to it as desired.
  • ZephiriusZephirius Member Posts: 419
    Hey thanks to all who answered.
Sign In or Register to comment.