[concept] Leather

Discussion in 'Modding' started by Clawdius_Talonious, Jun 22, 2012.

  1. I have recently been pondering creating a mod. While the easiest path for what I want to do would be to look at Clockwork Knights and see if I can't do something similar for what I want (since the idea is similar in some respects), what I'd really like to do is make the mod accessible without a unique skill path. I'd like to lay out my idea, and perhaps get some input from people who know more than I do on the subject of modding DoD.

    What I want is to add the ability to harvest leather from diggles, and fiber from plant based monsters, and then dry the leather or weave the fibers respectively. This would allow me to create recipes for items that, personally, I can never seem to find when I require them for other recipes. I have had several instances where I couldn't find a leather cap to make jewelers goggles, couldn't find leather gloves etc. A number of times, actually, I ended up finding the completed item I wanted to craft without ever running across the component I was seeking.

    To alleviate this, I would like to add in the aforementioned leather and recipes for the basic items, and I figured if I were to get that far the next logical step would be fibers/cloth and recipes for some basic robes and such. If I were able to get all that working, I would probably add some more advanced crafting options utilizing the new materials. However, before I dive in I would like to check on a few things. Primarily, since I would ideally place some basic cloth items at 0 smithing, I would like to know if it would be at all possible to create a similar effect to tech salvaging in Clockwork Knights without requiring a specific skill line be taken. I had given thought to attributing the buff with the Smithing skill, but then I would be excluding anyone without crafting skills, or even people who took Clockwork Knights and will have 2 smithing, from harvesting any leather. I suppose that new games started with the skill would have a randomized distribution of leather and cloth, as well as the skins and fibers to create more. However, I am not entirely sure that it would be useful without the ability to harvest skins and fibers, not to mention any potential difficulties in tinkering with core skills (I am new to this, but I imagine that overwriting game files could lead to issues).

    So my questions are effectively, how does the game deal with mods in relation to their ability to alter core skills without overwriting any game files? Can a mod create a buff spell on the player, without having any skill line requirement affiliated with it? And finally, I would like to know if anyone has any project with similarities to this idea that they are working on, I would hate to start tinkering to find out that the idea is already being worked on by someone. I did a basic search for "leather" but it is late and I am going to go get some sleep so I figured it would be best to inquire of the forum rather than spending a lot of time trying to think up a way to accomplish what I would like to do (perhaps add the buff for leather harvesting to smithing, and the fiber harvesting buff to alchemy).
    OmniNegro and Essence like this.
  2. OmniaNigrum

    OmniaNigrum Member

    The best advice I can offer is to say that you should not fear modifying core game files. It can and will lead to problems, but only when others have modifications to the same files. In such cases, you may have to collaborate with the other modders to work out how things can work for all mods.

    I made "Elvish Reality" and it replaces base game files. But it is to the best of my knowledge, the only mod currently mesing with tweakDB.xml. If anyone ever makes another modification, it would either entirely replace the areas of that file that I messed with, or it would be simple and easy to merge them.

    Really. Dig in to the games xml. You will learn faster than you think.

    As for mods adding a buff to the player without depending on a skill, that is possible in a way. Add an item that can be used like a wand or potion. It is just that simple. There may be a way to do what you want, but I am uncertain.

    Be sure to backup any file you edit. :)
  3. That's actually a pretty good idea, I can make a "skinning knife" wand with a recipe calling for one iron, and have the wand convert corpses to leather or fiber. Before I get too carried away, the game does differentiate between the various types of corpses, right? I mean, I know that when you get consume corpse you could eat any corpse, so I am unsure if that was intentional or if the game no longer sees them as "diggle" or "vegetable", if it only sees them as a corpse that might pose a problem.
  4. Konork

    Konork Member

    I'm not completely sure. There's a skill mod that I'm working on that has a spell where you consume corpses for different buffs based on taxa, but I can't get anything other than the animal buff to trigger. I might not have coded it correctly, though
    OmniNegro likes this.
  5. OmniaNigrum

    OmniaNigrum Member

    I am really unsure about this. Hopefully someone who knows will stop by and tell us. If I had to guess, I would guess that a corpse is a corpse is a corpse. The game does not know the difference. But I could be wrong. I hope to be. The game clearly has different creatures called "taxa". I just have no idea if that taxa is applied to the corpse or not.

    *Edit* Konork beat me to saying it. Ninja'ed again! :)
  6. Hmmm, I may have to rethink the skinning knife wand idea slightly. Perhaps I will just make the skinning knife apply a "harvesting" buff similar to tech salvage. Alright, I suppose I'll have to start digging around some XML and see what I can accomplish.
  7. OmniaNigrum

    OmniaNigrum Member

    Remember you can always add more items for Alchemical Goo to convert into. If you cannot find what you want and cannot implement the change exactly as you desire you can always fake it with Goo. This does not require any changes to the base game files. (But some of the things you want may require that. I just think it would be better to fake it with stuff already in the game than deal with the trouble of messing with base game stuff.)

    Currently, if my memory serves me, only the "Other" taxa gives Alchemical Goo. And only if you have the Rogue Scientist skill. This can be duplicated with a skinning knife that applies the same code but only on the animal taxa for instance.

    If you have not read that part of the xml, I suggest focusing on it first. It is in the /DoD/expansion2/game/skillDB.xml and the /DoD/expansion2/game/spellDB.xml files. Just look for Rogue Scientist.

    Let us know if you have any troubles, or if you have any ideas but need a bit of help. And I would be glad to help test this for you. :)
  8. Daynab

    Daynab Community Moderator Staff Member

    Clockwork Knights salvages stuff from golems only so it is possible. It wouldn't be an activated ability on a corpse, but a "drop" from a certain taxa.

    Look how that skill does it.
    OmniNegro likes this.
  9. I'm somewhat unsure how to code a buff spell that will apply various effects to different taxa, I'd like for my Skinning Knife to apply a buff that casts one spell for vegetables and another on diggles. Would something like
    "<spell name="Harvesting" type="target" icon="skills/tech_scavenger32.png" wand="0">
    <effect type="trigger" spell="Harvest Leather" percent="25" taxa="Animal" />
    <effect type="trigger" spell="Harvest Fiber" percent="25" taxa="Vegetable"/>
    work or am I attempting to apply a taxa tag to something that won't look for it?

    I think I am getting close to something I can zip up and test, but right now I'm still just tinkering around. I've never messed with XML before, unless Civilization II was in XML, I do recall creating a few units and such in that. Anyway I appreciate all the input I've received, I had initially planned to wait on Aquaman's mod creator but digging into the XML it was not as intimidating as I had feared so I am hoping I can get all of this working.
  10. OmniaNigrum

    OmniaNigrum Member

    We are glad to help. But I must point out that I think taxa is ignored for corpses. The spell you are proposing would target only living creatures. (Unless undead or construct was the taxa, obviously.)

    If you know that, then that is cool. I understand. I just wanted to make sure you know how taxa works. (I am somewhat uncertain on that myself though. Others will comment on it.)
  11. Yeah, since we're unsure about corpses being defined, I figure I should theoretically be able to get the skinning knife to cast a buff that would harvest in much the same way Clockwork Knights Salvage works. I'll have everything set up for a trial run soon, and hopefully everything goes how I want it to.
  12. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    Taxa on effect type="trigger" doesn't work currently. It's a known bug.
  13. Ahhh! That may save me some tearing my hair out wondering why it isn't working properly. I am unsure exactly what other effect types I could use though, I guess I'll be digging around for some time to come.
  14. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    You can put the taxa limiter in the <targetKillBuff />, that works. If you're getting it from a single skill level, though, you may have to do one of the Sneaky Modding Tricks to get it to do multiple taxa.
  15. LionsDen

    LionsDen Member

    That's why an item wasn't working properly if I did it that way and worked fine another way. It meant that I couldn't have my animation going. Well, hopefully it will be fixed in the new patch.
  16. Well I'm conflicted, on the one had I want to get a working mod, on the other I'd like to be able to get cloth working too... I guess the best way to do that is excise the bits pertaining to cloth, and hold on to them until I can get the buff to apply different effects depending on the taxa. At least I should be able to get the knife working on animals, and eventually go back and do the work on cloth if anyone thinks it is remotely useful. TBH I was just adding in cloth because I felt like if I did one I should probably do the other, but I guess having half of my idea working and available for testing is considerably better than waiting on the bug to be addressed so I can get this little project working.

    Although, considering this was just an idea floating around in my head a few days ago the fact that I may have anything at all working soon is kind of cool. I mean, once I'm done I'll be back to waiting on CotW and wondering how long "pretty darned quick" is, exactly. Ahhh well, at least I won't have to search and search endlessly for some leather items to make equipment from... And once I get it going I suppose I can always occupy myself by adding additional pieces of leather gear, after all with CotW I think a sneaky dual daggers assassin may well be in my future.

    One question though, I don't see any spells containing <targetKillBuff, is that a strictly skills only modifier or will I be able to work with it off a buff cast by a wand (in this case, the skinning knife). I'd like to have this mod be available to everyone without them having to alter their builds to use it. I'll dig into it and see what I can accomplish...
  17. Alright, I put my mod up here: http://community.gaslampgames.com/threads/craft-leather.3749/

    So that thread could be moved into the Mod Releases section of the forum. However, running the validator returns

    1 error(s) found.
    Line 35, Position: 5 -- 'input' is not a valid child for 'craft'

    To me line 35 looks like all the other <input="blahblah"/>, I'm not understanding why that line is being singled out, especially when I mostly cut and pasted the recipes in one from another, I would have thought if one was wrong there would be a lot more than one with issues...
  18. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    Do you have more than four inputs? Four is the max.
  19. Nope, I've given it a once-over and I can't see any difference in any of the input lines
  20. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    You have no tool tag.