FORUM ARCHIVED

How do "check for weapon" skills work code-wise?

Discussion in 'Modding' started by lujo86, Nov 9, 2012.

  1. lujo86

    lujo86 Member

    For example, checking for a sword to enable passive buffs-debuffs?

    Maybe I'm just tired, but I can't seem to find the handle.

    Gennerally interested in all sorts of (if any) code-related stuff which checks your equipment out for any category (spell, skill, ability, anything).
     
  2. Essence

    Essence Will Mod for Digglebucks

    <requirements weapon="×"> where x is the weapon # from iyemDB.
     
    Kazeto likes this.
  3. lujo86

    lujo86 Member

    Thank you, do you know what category this applies to, and also, does it apply only to a weapon type, or could you name an exact weapon?

    (Sorry if this is suposed to be obvious, I'm just trying to save myself an hour of fiddling with the validator)

    And while I'm at it, if I wanted to make the impossible-to-make "buff with tome equipped" and wanted to sidestepp the fact that they are labeled as shields by listing all of the core ones by name and handwaveing the "doesn't work with enchanted or modded ones" by saying that "it only works on unedited cannonical works" could it possibly work?
     
  4. Essence

    Essence Will Mod for Digglebucks

    <requirements> tags go in spellDB, after the <spell name> tag -- so you can only check for weapons as part of activating a spell. There's no way to do a specific weapon, and the only other option is <requirements shield="1"> which is met by wielding any shield, tome, or orb.

    Anything else is, TTBOMK, not available (yet).
     
    Kazeto likes this.
  5. lujo86

    lujo86 Member

    Ty, for this.

    I assume then that all the passive bonuses from the weapon skill trees which apply if you are wearing a sword are hardcoded. I'll also have to download the swashbuckler mod and poke around to see how exactly the sets work, might be somethign interesting there.
     
  6. Essence

    Essence Will Mod for Digglebucks

    Yes, they are. There's a standing request to unhardcode them, though. :)
     
    lujo86 likes this.
  7. lujo86

    lujo86 Member

    Ok, so after looking through various mods code courtesy of Kazeto and, well, the makers of the swashbucklers mod, I confirmed to myself that making your own categories for equipment doesn't work unless you make your own equipment. How that works, I have figured out, and it could be applied to the tomes and orbs if I were to go around fiddling with the core files.

    I've also tired something I learned on my own, to try to force the game to override the core element by making an element with the same name (or other spec) - it worked on skills (in many interesting ways), but if you do the same for items the game doesn't force the mod version, but simply spawns the original or the one you made.

    I've also found out that the current difference between tomes and other shields is the use of "overrideClassName" handle, which means it's whole, purely aesthetic. Or is it?

    I got 3 questions for anyone:

    1) Is the "overrideClassName" only cosmetic or is "ClassName" actualy used anywhere but the info tooltip?
    2) Is there a way to add properties to items through a separate itemDB the way it's doable for skills? (in case it is but obscure)
    3) So, if I went around fiddling with the core files to just add an invisible register for tomes which would allow me to trigger stuff off it, what would that mean in regard to uploading to the workshop, "totalconversion" and all that? Would it mess something up too much?

    Thank anyone for their time.

    EDIT: Got another question, is there an actually way to trigger stuff off of consuming specific food?
     
    Kazeto likes this.
  8. Kazeto

    Kazeto Member

    It's only cosmetic. For the one who creates the mod, that is. Because for us it doesn't do anything (everything is handled via weapon type value or lack of it in case of "shields"), but for players it is a rather important source of information.

    As far as I recall, not really. You would have to fiddle with the core files.

    There was one attempt of someone to do something of the sort (change already existing items), but it didn't end up being something you could consider a full success.

    Supposedly, that is what you would use. And it would make that mod incompatible with anything else that changed the files your mod changes (so, at the very least, "itemDB.xml" and "spellDB.xml", meaning it wouldn't really be compatible with Essence's rebalance or anything of the sort).
    And either way, changes of this sort are something I wouldn't think of uploading to the workshop without getting it thoroughly tested on the forum first, but that's just my opinion.

    Make said food give you a dummy buff that lasts for one turn, and make whatever is supposed to trigger stuff of it require the buff. Not the most elegant solution, and the effect might come out being delayed until the end of your turn, but it works.
    Unless you mean that you want the food itself to give you some specific stuff (independently of any skills or other items), in which case you might take a look at Pan-Galactic Gargle Blaster, Diggle Nog, or Vodka.
     
    Essence likes this.