I know this has been asked a million times before, but I can't find the explanation of the code anywhere with the search function. I've downloaded the Swashbu- Swashblu- PIRATES mod, but it all seems Chinese to me. So, how does it work? ---- I need this for TF2 Itempack (adding the milkman set etc), and for my unfinished mod Skyrim Itempack (full light armour etc).
It is all plain text in the itemDB.xml file. If you mean what do the numerical values mean, check this: http://dredmod.com/wiki/Items_Tutorials http://dredmod.com/wiki/Item_System_Reference http://dredmod.com/wiki/Item_Types http://dredmod.com/wiki/Damage http://dredmod.com/wiki/Statistics
Lol. I need to learn to read. Sorry. I have no idea about item set boni. You just have to read the xml.
And now is the time when I impart part of my insanity onto you. Stay awhile and listen, for hastiness will not yield desired results. You begin with creating items. Every one of these will have the same kind of trigger - either one that works when you hit something (targetHitEffectBuff), or when you are hit (playerHitEffectBuff). Then, make every item trigger its own dummy buff. This buff will then check for the other buff, and if the buff is there, it removes itself and said buff and puts another buff on you, one that actually makes something. Now, that is if you have just two items. If you have three or more items, then you can go two routes. Either you create "sub-sets", meaning that if you have items A, B, and C, you will have A reacting with B and B reacting with C (and possibly C reacting with A, though that might not be necessary), which is the simple route, or you go my route and you just change the trigger web into something hellish. Should you choose to go my route, you make it so that every basic dummy buff (in this case A, B, and C) checks for the presence of every other buff that does not contain itself, and if any such buff is there (so A would check for B, C, and B+C; B would check for A, C, and A+C; and C would check for A, B, and A+B), it removes it and itself and places an appropriate buff on you (if A detected B+C on you, it will remove itself and B+C, and place A+B+C on you). The same thing can be used ad infinitum, provided you have enough patience to make the trigger web for that thing.
Language nerd to the rescue! The plural of "bonus" in English is "bonuses." We are not speaking/writing Latin here (and if we were, the proper singular noun form would be "bonum," with "bona" as the plural). (Sorry, I had to do it; "boni" is becoming far too popular these days for something that is wrong on every level.)
Hmmmm. I learned it from a very much learned person who did not originally speak English. He was a damned genius. So I adopted it since he seemed to know everything. But in looking for a reference, it seems you are correct. http://www.thefreedictionary.com/Boni In case you are wondering, I used to play a multiplayer game called TomeNET. The Guide book is plain text and 738KB with zero formatting. It makes extensive use of that word. I never questioned the usage as it seemed to make sense everywhere it was used. Here is a link to the HTML version of the Guide. It has a link to download the text version if you want to examine it, but I would bet you do not. It is not exactly a light read. It is a nice game too. ASCII only though. http://www.tomenet.net/guide.php
It's not zero formatting, it's just that they made the whole guide in notepad. ---- Well, at least it makes more sense to me now..
Well, technically speaking it ought to be finished somehow if it's to be useful as a tutorial (I'm talking about the latter part, which still has my crazy comment and no code). And the current code needs the part about "removing itself and the other buff" added. But other than that, it's rather solid; I reckon you'll manage to finish it so I won't butt in unless you tell me to.
Sure, since you asked: This is the code for the two-piece set, taken from the site and modified: Spoiler: Sets composed of two items, small changes Code: <spellDB> <spell name="Rough Bronze Aspis On" type="self"> <buff useTimer="1" time="1" self="1" allowstacking="0" bad="0" icon="skills/placeholder64.png" smallicon="skills/placeholder32.png"> </buff> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Bronze Dagger On" spell="Bronze Awesomeness"/> </spell> <spell name="Bronze Dagger On" type="self"> <buff useTimer="1" time="1" self="1" allowstacking="0" bad="0" icon="skills/placeholder64_1.png" smallicon="skills/placeholder32_1.png"> </buff> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Rough Bronze Aspis On" spell="Bronze Awesomeness"/> </spell> <spell name="Bronze Awesomeness" type="self"> <buff useTimer="0" self="1" allowstacking="0" brittle="5" removable="1" bad="0" icon="skills/placeholder64_2.png" smallicon="skills/placeholder32_2.png"> <!-- And here are the bonuses that the set is supposed to give you... --> </buff> </spell></spellDB> Explanation: It's the final buff, the one called "Bronze Awesomeness", which has to be brittle or timed for longer time; the dummy buffs can just disappear after one turn. Also, the icons for dummy buffs have to be different, even if they are just the same icon duplicated - otherwise bad things will happen (aka. the set will not function correctly, due to DoD recognising buffs by icons). I'm not sure if 'time="1"' shouldn't be '0' instead (I didn't really have much any time to work on DoD-related stuff this month). And I sort of just happened to notice that this version does not need to use 'removebuffbyname' thingies. The last one does (the last one being what I'm working with), but the last one is rather insane. Now this is a set composed of three items, the "non-hellish version": Spoiler: Set composed of three items, items Code: <itemDB> <item name="Rough Bronze Aspis" iconFile="items/shield_aspis0.png" craftoutput="1"> <price amount="230" /> (..) <targetHitEffectBuff percentage="100" name="Rough Bronze Aspis On"/> </item> <item name="Bronze Dagger" iconFile="items/dagger_bronze_dagger.png" level="4" type="7"> <price amount="700"/> (..) <targetHitEffectBuff percentage="100" name="Bronze Dagger On"/> </item> <item name="Bronze Cuirass" iconFile="items/armour_bronze_cuirass1.png" > <price amount="990"/> (..) <targetHitEffectBuff percentage="100" name="Bronze Cuirass On"/> </item> </itemDB> Spoiler: Set composed of three items, buffs and triggers and stuff Code: <spellDB> <spell name="Rough Bronze Aspis On" type="self"> <buff useTimer="1" time="1" self="1" allowstacking="0" bad="0" icon="skills/placeholder64.png" smallicon="skills/placeholder32.png"> </buff> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Bronze Dagger On" spell="Bronze Awesomeness"/> </spell> <spell name="Bronze Dagger On" type="self"> <buff useTimer="1" time="1" self="1" allowstacking="0" bad="0" icon="skills/placeholder64_1.png" smallicon="skills/placeholder32_1.png"> </buff> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Rough Bronze Aspis On" spell="Bronze Awesomeness"/> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Bronze Cuirass On" spell="Bronze Epicness"/> </spell> <spell name="Bronze Cuirass On" type="self"> <buff useTimer="1" time="1" self="1" allowstacking="0" bad="0" icon="skills/placeholder64_2.png" smallicon="skills/placeholder32_2.png"> </buff> <effect type="trigger" amount="1" affectsCorpses="0" requirebuffontrigger="1" requirebuffontriggername="Bronze Dagger On" spell="Bronze Epicness"/> </spell> <spell name="Bronze Awesomeness" type="self"> <buff useTimer="0" self="1" allowstacking="0" brittle="5" removable="1" bad="0" icon="skills/placeholder64_3.png" smallicon="skills/placeholder32_3.png"> <!-- And here are the bonuses that the first two items of the set are supposed to give you... --> </buff> </spell> <spell name="Bronze Epicness" type="self"> <buff useTimer="0" self="1" allowstacking="0" brittle="5" removable="1" bad="0" icon="skills/placeholder64_4.png" smallicon="skills/placeholder32_4.png"> <!-- And here are the bonuses that the latter two items of the set are supposed to give you... --> </buff> </spell> Explanation: Why would I go that way instead of just showing people the version I'm using? Because for as long as your sets are composed out of two item mini-sets, it's easier to use this one rather than the other version, and it's easier for players to use two item mini-sets rather than collect something that has 6 or 7 different pieces.
And this is the "Kazeto version" for four items. I do warn that damage to sanity might be possible, so please don't blame me if anything happens to your psyche after reading it (well, it's not that bad, though beginners to modding might want to slit their wrists after seeing it): Spoiler: Set composed of four items, items Code: <itemDB> <item name="Rough Bronze Aspis" iconFile="items/shield_aspis0.png" craftoutput="1"> <price amount="230" /> (..) <targetHitEffectBuff percentage="100" name="Rough Bronze Aspis On" after="1"/> </item> <item name="Bronze Dagger" iconFile="items/dagger_bronze_dagger.png" level="4" type="7"> <price amount="700"/> (..) <targetHitEffectBuff percentage="100" name="Bronze Dagger On" after="1"/> </item> <item name="Bronze Cuirass" iconFile="items/armour_bronze_cuirass1.png" > <price amount="990"/> (..) <targetHitEffectBuff percentage="100" name="Bronze Cuirass On" after="1"/> </item> <item name="Bronze Ring" iconFile="items/ring_bronze0.png" > <price amount="420"/> (..) <targetHitEffectBuff percentage="100" name="Bronze Ring On" after="1"/> </itemDB> Spoiler: Set composed of four items, the nefarious part A pastebin link because the code is too long to post it... Explanation: You might not want to add this version to the tutorial. Or at least not to do so without a visible warning that the one who wrote it was clearly insane. The 'after="1"' thing in the items' triggers is also something to pay attention to. Because these set buffs flush all the buffs above them when they trigger (so that you could not have more than one bonus from the set by juggling equips), it is important for the buff hell to trigger after the attack is over, and not in the middle of it (because that way the buffs would stop working mid-attack, really). Also, 'removebuffbyname' is so abused there it's not even funny anymore. Oh, and a fun fact. With this method, you need: If there are 2 items: 2 triggers for items, 1 trigger for the trigger web, and 1 buff If there are 3 items: 3 triggers for items, 4 triggers for the trigger web, and 4 buffs If there are 4 items: 4 triggers for items, 11 triggers for the trigger web, and 11 buffs If there are 5 items: 5 triggers for items, 26 triggers for the trigger web, and 26 buffs If there are 6 items: 6 triggers for items, 57 triggers for the trigger web, and 57 buffs If there are 7 items: 7 triggers for items, 120 triggers for the trigger web, and 120 buffs If there are 8 items: some sleep; a lot of it, in fact (but also 8 triggers for items, 247 triggers for the trigger web, and 247 buffs, and a few thousands of 'removebuffbyname' instances) If there are more than 8 items: a lot of sleep Also, yay for justified double-posting...
Yes. Just use the last one I showed, only for 3 items instead of 4, and with the only buff that gives you any bonuses being the one for all items (so the ones for 2 items would all give you nothing).
HTML: <spell name="item 1 on" type="self"> <buff blahblah/> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="item 2 on" spell="1 and 2 on"/> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="item 3 on" spell="1 and 3 on"/> </spell> (item 2 on, item 3 on..) <spell name="1 and 2 on" type="self"> <buff blahblah/> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="item 2 on" spell="all on"/> </spell> (1 and 3 on, 2 and 3 on..) <spell name="all on" type="self"> <buff blahblah> ALL KINDS OF RESISTANCESSS </buff> </spell> So this would pretty much work. If the buffs weren't blahblah. I think I start to understand why you need so many buffs, indeed. Also, my idea to make a 9 item buff is pretty much gone. Gotta make 1013 buffs for it.
Well, making a set composed of 9 items wouldn't be very feasible, to be honest. You can do it, given enough time, but in a game like DoD where you generally end up switching equipment every moment and where you might not get the drop you wanted so much (because it's not like Diable with set drops being "unique" and you given a stash to share them between characters), even collecting 3 pieces might be a pain for some people unless the whole set was crafted. Heck, the furthest I went was 5 items, with the set being both craftable and findable and also upgradeable so that you were expected to see it can be upgraded and do that instead of throwing it away, and the normal and upgraded equips were interchangeable, as far as the set bonuses go. That being said, good work on the tutorial page, Alistaire. And personally I would keep the clean-up triggers I had in the code, but if the buffs are only kept for the highest tier that isn't really necessary (and not keeping them when not necessary does make it easier for people to read that).
Very belated reply here--end of the year craziness and all that. Yeah, "boni" has spread like a virus on the internet, mainly because it looks correct. It's a bit confusing because "cacti" is a valid plural of "cactus," so one would think the same would apply, but it doesn't. I also think a lot of people use it to look smart, and because they look smart other people assume that they must know what they are talking about. I'm kind of hoping it will go away eventually, but we may see it get adopted into the English language as a commonly-accepted (and thus, descriptively-speaking, valid) plural form, despite its lack of any linguistic foundation. If and when that happens, I will accept it, albeit begrudgingly. Until then, though, I will continue to fight the good (if somewhat pointless) fight.
I am just happy that I remember where exactly I learned the misuse of that non-word. I do not feel as much like a total idiot since I can read the same example today and see how I came to presume it was correct. But that is the problem with languages. They are living. They change with time and with enough misuse it becomes correct for that language just like you said. I too resist changes that are unneeded. For example you may have noticed I avoid using contractions in any case I can spell out what I want to say with simple words. My reasoning is that we are moving into a world and a time where some people may be using text to speech engines to read everything. I do not want to complicate what is already a difficult thing any more than is required to convey the meaning I intend. A lot of times I will look at a sentence and realize it means the same if I cut off the last half of the sentence. See the example in quotes below. "I do not want to complicate what is already difficult." It means exactly the same as the sentence above that starts with most of the same words. But as time goes on I will adopt other habits of language that will certainly show. I use those stupid smiley faces too often for my own taste. It is a habit. I never woke up and decided to put smiles on every sentence. But with time it grew on me.