Racial Items Possible?

Discussion in 'General Modification' started by Rudy, Mar 30, 2015.

Remove all ads!
  1. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Am I correct in thinking there is currently no known way to limit items to use by a specific race? I know you can limit the crafting of them by race.

    My thought is to create some gnome specific gear with the flavor of gadgetry to make more appealing what is probably the least used of the races. I know I can make it only craftable by gnomes, but was hoping to make it only usable by them as well.

    The second thing was that I was hoping to make some dwarf-only armor, which allows them to tumble in heavier armor. By PnP, dwarves can tumble in medium and heavy armor, since it does not reduce their movement speed, but in ToEE, no one can tumble in either. I'm planning on creating some things like "Dwarven Breastplate", "Dwarven Scale Mail", etc. I probably won't bother with the heavy armor, since in practice, heavy armor's armor check penalties don't make Tumbling attractive anyway. Anyway, creating the armors is easy enough, I just make the "Dwarven Breastplate" into light armor. However, it would be a cheat for anyone but a dwarf to use it. Worst case scenario, I will create it but not place it in game, then people who want to console it for their Dwarf's legitimate use can do so.
     
  2. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    The dwarf thing should be fixable in TemplePlus - the relevant AoO checks are made at 0x1008AA90 (specifically the armor at 0x1008AB45). I'll put it on the list ;)

    The gnome thing probably is too, but since it seems very specific it's probably better left to scripting - I'm thinking something similar to what Ted did with the eyeglasses, except without destroying the item. E.g. spawn a dummy creature to item_get the item and then item_get it back to the original character.
     
  3. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    I think this can be done the same way that ranged weapons are improved for characters with Far Shot, via the san_insert_item function (see py00282Ranged_Ammo.py). So when the item is inserted into a pc, you check if they are a dwarf (with pc.stat_base_get (stat_race), dwarf would be 1), and then change the the armor to ARMOR_LIGHT which would allow them to tumble, and upon inserting into a non-dwarf it would change back to ARMOR_HEAVY. The change would be done with a call to obj_set_int() with the appropriate flag, which I am trying to find. ;)

    So far I can change these:

    obj_f_armor_armor_check_penalty
    obj_f_armor_arcane_spell_failure
    obj_f_armor_max_dex_bonus
    obj_f_armor_ac_adj ​

    I'll let you know if the type itself can be changed.


    Edit: The appropriate flag, as noted by Sitra below, is:

    obj_f_armor_flags

    Set to 0 for Light Armor, 1 for Medium Armor, 2 for Heavy Armor, and 3 for Shields. Note that some other flags may be set in there at times also (though they usually aren't), so be careful hen just checking the straight value.
     
    Last edited: Mar 30, 2015
  4. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Is moving Kukri out of the Exotic Weapon category into Martial an easy one?
     
  5. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    Heh, that could work too, but I think it's better left for TemplePlus since it's possible to fix all armors that way without giving them all special scripts. Also for the record the armor type is stored in obj_f_armor_flags, in the first 2 bits (0 = ARMOR_TYPE_LIGHT, 1 = MEDIUM, 2 = HEAVY, 3 = SHIELD).

    Re. Kukri - not sure,

    the feat properties table is at 0x102BFD78 (or 0x2BFD78 in the DLL). There seems to be a commonality between exotic weapon prof. feats (they're all marked 31xh), and the martial weapons similarly have 9xxh in common, so maybe changing the Kukri entry (index 30, starting from 0) from 310h to 900h will make it included in the martials.
    Should it be martial, btw? Or is this in the context of racial weapons? If so there's a separate table for that (should be easy to add).
     
    Last edited: Mar 30, 2015
  6. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    578
    Likes Received:
    60
    Oh no, it has nothing to do with racial, it's just one of those 3.0/3.5 transition bugs. The Kukri is martial in 3.5, but was exotic in 3.0, and they never fixed it when they updated to 3.5.
     
  7. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,170
    Likes Received:
    32
  8. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    So, I get that templeplus is cool; I like it. The thing that is holding me back from jumping into it right now is that I don't really understand if there is a plan to incorporate it into the Co8 modpack at some point. I don't want to spend time working on something that will not been seen by the main userbase of the Co8 modpack.

    So, what is the plan for that, exactly?
     
  9. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    We've held several secret meetings late at night in smoke-filled rooms, but we haven't decided yet. ;)

    In other words, there usually is no 'plan,' at least not a comprehensive one where we look way down range. Stuff just happens.
     
  10. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    The best stuff happens that way ;)

    I can generally say that we want to first work out the kinks (including the sins of our fathers the early DLL modders), deploy a public beta, and integrate with TFE-X. After that and assuming all goes well I see no reason why not to include it in the official mod.
     
  11. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    While we're tossing around items like this: Sitra - I'd love to make proper cursed items that can't be un-equipped (but can be eradicated via Remove Curse or Break Enchantment or whatever). I had a swap-in / swap-out cursed sword working - it looked like a nice magic sword to all appearances but became a nonsense sword when equipped, by manually changing the damage - but rapid fire clicking to equip / unequip it broke it. I forget why I did it that way, something to force NPCs to equip it or something. It was a while back ;)

    Anyway, if you see or think of something for cursed items, let me know :)
     
  12. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
  13. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,613
    Likes Received:
    537
    What sorcery is this...

    [​IMG]
     
  14. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Isn't Hennet a sorcerer? Maybe it's because he isn't proficient with the armour....
     
  15. Salk

    Salk Established Member

    Joined:
    Jan 2, 2006
    Messages:
    258
    Likes Received:
    0
    I think Sitra was talking about the absurd Dex bonus (+15) which requires a Dex of 40-41!
     
Our Host!