Lindor 572 Posted November 24, 2020 (edited) Hey again Lately I got into thinking about modding items and I have an idea which I maybe want to try, but that requires me to have a better understanding of various things that are not quite clear to me yet. For modding combat arts, this pinned thread has been a great source of information to me, it would be cool if we had somthing similar to blueprint.txt. Maybe there even is and I'm just blind again lol. Anyway, these are my questions: Things I think I figured out myself, pls correct me if I'm wrong: Blueprint.txt doesn't actually set up boni, it just gives already hardcoded boni some properties to make them readable by lua scripts Boni are the same for items and spells, except items take them from bonusgroup tables which can have multiple boni grouped up while spells take them from token tables which can only have one bonus per table, but the entries inthose two kinds of tables are the same so there is no difference between spell boni and item boni Items take a random bonus from the table on the bonusgroupx entry, which is why the same bonus can appear in multiple bonusgroups. The same holds true for itemtypes. This also explains why there are bonusgroups with only one bonus the bonusgroup0 = {543,1200,1,9,0} entries for items in blueprint.txt work similarly to the token entries in spells.txt, namely {bonusgroup ID, amount, increase per level, flags, unclear} lvljump = x refers to the level of the item, it can only drop at a level defined in minconstraints and then jumps in x levels upwards dropped items automatically get a randomly generated name depending on the items rarity and its kind unless the item has something in the entry uniquename specialuseonly means it's a questitem that appears as a questitemicon on the minimap (the brown bag with the questionmark) if the entry is 1 Now the things that are unclear to me: Items: What does the fifth entry in the table of a bonusgroup entry of a blueprint of an item mean? My guess is it has to do with that an item at higher difficulties has better stats compared to a lower difficulty one, even if it's the same level. are the bonusgroup flags the same as the token flags? What does allotment_pmfpi = {952,24,0,0,24} mean? How does minconstraints = {15,13,0} work? I believe the first entry is the minimum level the item can spawn, but what are the other entries? What usage does the usablilty entry have if WEARGROUPs are a thing? I mean I haven't found a single item that has another value but 0 under that entry. Where are the inventory grid dimensions of an item saved? Is there a list somewhere that makes it more clear what falls under which WEARGROUP? I mean most of the groups are pretty guessable, but I have no idea LEPRECHAUN means, or even what is and what isn't DEFAULT What does the entry dmgvariation mean? Boni: I believe boni to be hardcoded somewhere, but are they hardcoded under their id or their name? So does blueprint.txt give the bonus a name or an id? Where can I find the hardcoded boni that are possibly unused and "revive" them in blueprint.txt? If there even are any unused boni? What do the different prefixes of boni mean? like bb_, cr_, xcr, sb_ etc. what does the rating entry mean? (Solution: defines bonus color, values from 0-50 afaik) same question as with items: what do entries two and three of the tables that are the minconstraints entries mean? blueprintsets: what do the entries singleSet, groupSet, mixedSet and artefact mean? Why is there not a single blueprintset that has other values than 1, 0, 0 and 0 for these entries? I mean, why are they even in there? I believe bonusgroups are pretty much clear to me (the blueprints, not the respective entries on item blueprints) Thanks for everybody answering and take your time, I won't be able to read and understand everything at a glance anyways Color coding: This statement is correct / This question has been answered to a satisfying degree This statement includes both correct and false ideas / This question has been answered, but further testing is required to confirm it This statement is false / This is an open question This statement has not been tested extensively enough yet to mark it correct or false Edited August 1, 2022 by Lindor
Flix 5,216 Popular Post Posted November 24, 2020 47 minutes ago, Lindor said: Blueprint.txt doesn't actually set up boni, it just gives already hardcoded boni some properties to make them readable by lua scripts I believe boni to be hardcoded somewhere, but are they hardcoded under their id or their name? So does blueprint.txt give the bonus a name ar an id? Yes, this is the most basic level at which bonuses appear in the scripts. Every bonus is hardcoded under the names defined in the "type" line of a bonus entry. For example type = "BONUS_EVADE", Blueprint takes the existing hardcoded name and gives it a numerical ID. 47 minutes ago, Lindor said: entries inthose two kinds of tables are the same so there is no difference between spell boni and item boni What do the different prefixes of boni mean? like bb_, cr_, xcr, sb_ etc. Yes. Item blueprints (and also entries in typification.txt) use bonusgroups. Spells and creatures draw directly on bonuses. Note that there are often multiple versions of bonuses scripted. You will often see one (or more) for item use, another for creatures, and yet another for spells. Typically bb is for spells, sb is for items, and cr is for creatures. xcr (and "X" in general) means inactive. 47 minutes ago, Lindor said: Items take a random bonus from the table on the bonusgroupx entry... This also explains why there are bonusgroups with only one bonus Yep. Multiple bonuses in bonusgroup are randomly selected, and multiple itemtypes are randomly selected. Uniques will use a single itemtype and bonusgroups with a single bonus, in order to make them static. 47 minutes ago, Lindor said: the bonusgroup0 = {543,1200,1,9,0} entries for items in blueprint.txt work similarly to the token entries in spells.txt, namely {amount, increase per level, unclear, flags, unclear} What does the third entry in the table of a bonusgroup entry of a blueprint of an item mean? My guess is it has to do with that an item at higher difficulties has better stats compared to a lower difficulty one, even if it's the same level. What does the fifth entry the same table mean? are the bonusgroup flags the same as the token flags? How does minconstraints = {15,13,0} work? I believe the first entry is the minimum level the item can spawn, but what are the other entries? Boni: same question as with items: what do entries two and three of the tables that are the minconstraints entries mean? The bonusgroup parameters are: bonus ID, bonus value, minimum item level, minimum item tier, minimum difficulty level. The minconstraints version of this string applies to the item as a whole and contains the final three parameters. Same answer for bonus minconstraints as for blueprints. Item level, item tier, difficulty level. 47 minutes ago, Lindor said: dropped items automatically get a randomly generated name depending on the items rarity and its kind unless the item has something in the entry uniquename Not quite. Uniquename ended up being unused and meaningless. An item will use a static name if there is a hash encoded in global.res corresponding to the blueprint ID. If there is no entry in global.res, a random name is generated as you described based on the CSV files in the locale folder. 47 minutes ago, Lindor said: specialuseonly means it's a questitem that appears as a questitemicon on the minimap (the brown bag with the questionmark) if the entry is 1 I think "specialuseonly" is also meaningless. A blueprint becomes a quest item (brown bag icon, gets added to log instead of inventory when picked up) if has a "taskitem" entry in quest.txt 47 minutes ago, Lindor said: What does allotment_pmfpi = {952,24,0,0,24} mean? It stands for allotment of physical/magic/fire/poison/ice base damage on the weapon. It will not add damage, instead it's sort of a conversion of the pre-existing damage types on the weapon (defined by the material assigned to the itemtype), into whatever percentages you set here. In the above example, assuming originally the item had 100% base physical damage, it would now have: 95.2% physical, 2.4% magic, 2.4% ice damage. 47 minutes ago, Lindor said: What usage does the usablilty entry have None that I know of. 47 minutes ago, Lindor said: Where are the inventory grid dimensions of an item saved? They are in iteminfo.txt, and apply directly to the itemtype. 47 minutes ago, Lindor said: Is there a list somewhere that makes it more clear what falls under which WEARGROUP? It's hardcoded. But, by in large, there are only 7 weargroups for the 7 heroes, one called NPC ONLY, and another called DEFAULT. DEFAULT itself is deceptive because you might think it means universal use, but there is a hardcoded list of what is default. For example, a High Elf cannot use not use Energy Weapons marked with DEFAULT. LEPRECHAUN means kobolds. I don't know how that one slipped in. Maybe at some point the devs imagined way more variety in weargroups. 47 minutes ago, Lindor said: What does the entry dmgvariation mean? I think is a way of increasing the possible distance between min and max damage. This is also done at the material level (and again the typification level) so I'm not sure. 47 minutes ago, Lindor said: Where can I find the hardcoded boni that are possibly unused and "revive" them in blueprint.txt? If there even are any unused boni? I guess fire up ollydbg and crack open the dll's. I found a couple by reverse engineering Loka-IDs. There was one for All Attributes +X and All Attributes +X%, another for Item Drop Frequency. I could only enable the latter though. The first two had to have code work done by Dmitriy before they would work. The only other inactive bonuses are inactive for a good reason, like dismounting opponents. They just weren't feasible to use. 47 minutes ago, Lindor said: what does the rating entry mean? No idea. 47 minutes ago, Lindor said: what do the entries singleSet, groupSet, mixedSet and artefact mean? Why is there not a single blueprintset that has other values than 1, 0, 0 and 0 for these entries? I mean, why are they even in there? They don't do anything that I can tell. The best explanation I can give as to why they are there (and this will apply to many scripts) is that the developer tools had more functionality than they actually needed or were able to take advantage of. And for some reason (probably time) they never bothered to trim unused parameters out of the scripts before exporting. 1 2
Lindor 572 Author Posted November 24, 2020 Thanks you, it's just amazing what you guys are capable of. The fact that it didn't even take you half an hour to answer most of my questions is mindblowing to me. It'll probably take some time for me to fully assimilate everything. After a very quick glance however another question popped into my mind regarding this: 29 minutes ago, Flix said: The bonusgroup parameters are: bonus ID, bonus value, minimum item level, minimum item tier, minimum difficulty level. The minconstraints version of this string applies to the item as a whole and contains the final three parameters. Same answer for bonus minconstraints as for blueprints. Item level, item tier, difficulty level. So if the last three of these parameters are both defined under the minconstraints string for a bonus and under the bonusgroup string for an item that uses that bonus in that bonusgroup, do the minconstrain parameters overwrite the bonusgroup parameters or vice versa or is it based on the value of the parameters, like always take the lower/higher one?
dimitrius154 629 Posted November 24, 2020 39 minutes ago, Flix said: what does the rating entry mean? I think it affects bonus appearance frequency within a bonusgroup selection. 1
Flix 5,216 Posted November 25, 2020 1 hour ago, Lindor said: So if the last three of these parameters are both defined under the minconstraints string for a bonus and under the bonusgroup string for an item that uses that bonus in that bonusgroup, do the minconstrain parameters overwrite the bonusgroup parameters or vice versa or is it based on the value of the parameters, like always take the lower/higher one? The hierarchy is this: Blueprint -- minconstraints are not met = item will not drop Bonusgroup -- minconstraints are not met = the entire bonusgroup will not appear, no matter what bonuses it contains Bonus -- minconstraints are not met = that particular bonus will not appear, but (if applicable) a different bonus meeting the requirements will spawn instead. If there is no other bonus within that group, nothing at all will appear. 1
Lindor 572 Author Posted November 25, 2020 Okay, I've created an openoffice calc file today with all Boni specified in S2EE CORE's blueprint.txt by using various methods, so now I have access to a huge table of all boni that is sortable by any entries, e.g. IDs and so on to make everything more overlookable. It was not an easy process, but I think I was successfull. Once I've checked for errors, I'll upload it somewhere. I want to repeat the process for many other things like items in blueprint.txt, boni and items in Vanilla blueprint.txt, spells in spells.txt etc. I believe that this will be a huge help for my next project. One thing I noticed is that certain boni seem to not have any type specified. But boni are hardcoded under the type string, so uhmm, yeah. One example: Quote newBonus = { -- name = "bbv_regaspect_single", rating = 0, basedonskill = "SKILL_INVALID", type = "", spez = "", spez2 = "", usagebits = 65535, minconstraints = {0,0,0}, difficultyvaluerange0 = {0,100,200}, difficultyvaluerange1 = {1,110,220}, difficultyvaluerange2 = {2,120,240}, difficultyvaluerange3 = {3,135,270}, difficultyvaluerange4 = {4,150,300}, } mgr.createBonus(672, newBonus); There are four more. Are these unused boni that float around somewhere in a dll waiting for someone to find and revive it?
Lindor 572 Author Posted November 25, 2020 2 hours ago, Lindor said: Once I've checked for errors, I'll upload it somewhere. As a table: https://drive.google.com/file/d/1Uw4zOp12Pyi31FGvZv-HnpN_LL3kJ6o1/view As a file: https://docs.google.com/spreadsheets/d/1UAYeKQILVERpy1ralHdojXDIpx5c58rtfGj9oJsZOPs/edit?usp=sharing
Flix 5,216 Posted November 26, 2020 Cool! I could have saved you that work since we already had a spreadsheet with all bonuses and single bonusgroups that I inherited from the early CM Patch days. If you built from EE though yours is probably more comprehensive.
Lindor 572 Author Posted November 26, 2020 5 hours ago, Flix said: Cool! I could have saved you that work since we already had a spreadsheet with all bonuses and single bonusgroups that I inherited from the early CM Patch days. If you built from EE though yours is probably more comprehensive. That is super friendly, but I build all my mods around S2EE and I needed to develop a method that is applicable to multiple files anyway I do it in three stages, first some lua code added to the txt file that converts it into something more modular, then using the openoffice converter for txt files and third making everything look more pretty and readable. The code is the same for every file, I just need to expand it depending on the entries of the blueprint which is not really complicated but can take some time, especially if you're like me having tons of typos If you're interested I can share my code;) Btw the script for the S2EE item blueprints is finished and successfully tested, you can probably expect me to upload the table later xD
Lindor 572 Author Posted November 27, 2020 turns out it wasn't so easy afterall. I wanted Wearergroups to have an individual Column each. Unfortunately in openoffice you can't drag selected cells if they have unselected cells inbetween. This requires me to sort the file by the wearergroups. Turns out Wearergroups are not sorted at all, they probably once were alphabetically sorted but at some point the developers probably gave up, especially the dragonmage is just slapped all over the place. Unfortunately I didn't notice so I wasted a whole lot of time, once I noticed I had to write a lua function which sorts all the different weargroup strings in a wearergroup entry alphabetically Unfortunately the weargroups are not defined as strings, so I had to first find out all the different weargroups and define them as strings before I could sort them. Hopefully it won't take much longer because I'm gradually losing my mind
Lindor 572 Author Posted November 27, 2020 (edited) Finally! https://drive.google.com/file/d/1NsBemZ92eOJ3TirrdYpIHcR-ypKveM1I/view Somehow Google drive tables always mess with the formatting of .ods, so I'll only upload as file. EDIT: On 11/24/2020 at 11:25 PM, Flix said: DEFAULT itself is deceptive because you might think it means universal use, but there is a hardcoded list of what is default. Do you have that list? I only need to know which player characters are and aren't DEFAULT other than the high elf. That would be most helpful. Edited November 27, 2020 by Lindor
Flix 5,216 Posted November 27, 2020 You will have to reverse engineer the list using this data: http://www.sacredwiki.org/index.php/Sacred_2:Weapons DEFAULT is used whenever more than one character needs to be included as the wearer for an itemtype (typically a weapon). For example, they don't bother to list out Seraphim, Inquisitor, Shadow Warrior in each blueprint as the 3 wearers of 2h Energy Weapons. Instead they just put DEFAULT because only those three are hard-coded to be able to use 2h Energy Weapons. Same for shields. DEFAULT excludes the hard-coded exceptions (Inquisitor, Temple Guardian) from using shields. Remember that weargroups are also defined in itemtype.txt and will override anything in blueprint.txt. Frankly itemtype.txt is more useful to understand weargroups than blueprint is. This is because in this file you can see not only what weargroups are assigned to each item, but also what weargroup is assigned to each character or NPC.
Lindor 572 Author Posted November 28, 2020 I see. And I was afraid you would say that. Let me eplain: The thing is, I want to eventually mod everything. Not just one or two items, I want a complete overhaul. My goals are pretty clear and inspired by other games, mostly skyrim: make every item highly costumizable. Most items should not have any stats on them besides armor and four sockets. Socketables and set items are the exception. higher tiers have more elemental armor/damage higher tiers have higher armor/damage rating and higher tier sockets maybe introduce more socket types haven't decided about set items yet eliminate the need of finding the same item twice as you level up by doing the following: Every item can only drop at one exact level defined by its item tier instead of increasing the level of items of the same tier, as you level up, higher item tiers become available all items have the same stats in every difficulty eliminate the hefty impact and need of armor lore. right now armor lore is mandatory not only for its main purpose, but also to be able to wear higher level items which have better statted boni. instead: since higher tiers are unlocked by character level, the level of a tiers items is the maximum level a character can wear without armor lore when reaching the unlock level, therefore eliminating the armor lore item level penalty bonus armor lore only increases the armor you get from items and toughness higher tier armor and weapons have higher tier sockets and more base armor/damage Every bonus gets a corresponding skill which modifies it. Previously only Armor Lore was kind of a modifier for all boni by unlocking higher level armor with better boni. Instead, to make the character more costumizable, every bonus should have its own corresponding skill. all socketables of the same kind and tier draw their boni from the same bonusgroup, so if you find two items with the same kind, tier and boni, they will have the same value give every bonus a tier and put it the corresponding bonusgroup. the number of boni a socketable can have is also defined by kind and item tier item level has no influence on bonus amount since for every bonus there is only one tier and therefore only one level every itemtype gets also sorted by character and tier, so the community items models and fx are not lost, they're just not unique anymore this is important because the itemtype is the only thing other than allotment_pmfpi that differentiates two non-socketable items of the same tier from each other instead of worrying about boni, you can just wear what looks coolest Since I don't have access to 3dsmax and finding an exporte for blender turns out to be impossible, I'm stuck with whatever models and fx the game and the community offers, so I would not want any model out there to not be droppable any more because of this mod I hope it's clear what the point of all this is. Item progression should be in sync with natural character progression to not, under any circumstances, make leveling up feel like a penalty. Additionally items should fit your build. It doesn't make sense that a squishy mage gets access to items with high boni for a tanky melee character just by skilling armor lore. Additionally you need to choose your skills more wisely since the impact your skill choices have on your item boni becomes bigger. If you're a squishy mage and don't skill toughness, then damage mitigation on items won't be so OP and save you anymore because it's modified by the toughness skill. All in all this should get you more freedom for your playstyle but you can't just do anything you want anymore once you've taken a choice. But I haven't decided yet how exactly I want to reach these goals. Since many items are NPC only and many items are both NPC and PC, I can either leave the NPC items in and create hundreds of new items, which would blow up the file size, or I can delete everything and start from scratch which would probably make things way clearer and overlookable but would also be an insane task. Normally I complain about stuff being hardcoded, but ironically if NPC armor and weapons were hardcoded, it would make my everything so much easier Right now I'm more tended to do the first thing, which is why I need a detailed understanding of how weargroups work. By finishing the itemblueprints spreadsheet, I was able to sort out all of the npc only items. What still is a problem are the items that are weared by both npcs and heroes. Now if, as you said, DEFAULT works like you described, only eliminating a character to be able to use the item via hardcoded stuff, then there is probably no way of telling wether an item with DEFAULT weargroup is used by an NPC or not? Currently I'm trying to make a plan, to find the shortest pathway that is able to reach above goals because I know that if I don't make a plan, I'm not gonna be able to finish this project because I'm just a single person working on that in his free time while this is a task for a whole team. I somehow always do these things, getting into projects no sane human being would ever consider. Maybe I'm not sane but sometimes some cool stuff evolves from that. Occasionally. Now you two have an insane amount of modding experience, can you probably give me some tips on where to start? 1
Flix 5,216 Posted November 28, 2020 21 hours ago, Lindor said: eliminate the need of finding the same item twice as you level up by doing the following: Every item can only drop at one exact level defined by its item tier instead of increasing the level of items of the same tier, as you level up, higher item tiers become available all items have the same stats in every difficulty I can't see how this could be possible. You can set minimum requirements, but not maximum ones. EDIT: Hmm, well wait a minute. I guess if you removed the level jump, by setting it to 0, an item would stop dropping after the player outleveled it. If that worked, it could be game-changing. You could set every unique to a precise level. On 11/24/2020 at 3:41 PM, Lindor said: lvljump = x refers to the level of the item, it can only drop at a level defined in minconstraints and then jumps in x levels upwards I just noticed you color-coded your original post for open questions. I can confirm that this statement is correct. 1
dimitrius154 629 Posted November 29, 2020 2 hours ago, Flix said: I guess if you removed the level jump, by setting it to 0, an item would stop dropping after the player outleveled it Doubt that, but losing the property-per-level-jump progression is guaranteed) 1
Lindor 572 Author Posted November 29, 2020 (edited) Would be cool if it stopped dropping, but it's not so bad if it still drops. The important parts are that in each item tier everything has the same minimum level requirement to unlock it with character progression and what dimitrius says. I've read somewhere that the game is more likely to drop items that you actually need because of a smart loot system. I guess the answer to the question of whether outleveled items would stop dropping could be found there. It's probably somewhere in the dlls, which I have not much experience with yet. Edited November 29, 2020 by Lindor
dimitrius154 629 Posted November 29, 2020 10 minutes ago, Lindor said: I've read somewhere that the game is more likely to drop items that you actually need because of a smart loot system. There's a certain function, that prioritizes your hero class drops and it kind off works. Kind off)
dimitrius154 629 Posted November 29, 2020 8 minutes ago, Flix said: IsUsableByHero = 700, Right. 70% seems about right, all things considered.
Lindor 572 Author Posted November 29, 2020 The day I've had another thought which is if I knew the lua api for sacred 2, specifically how to get the heroes charlvl, then I could easily define the zrareexpectations in blueprint.txt by a function that returns zero if the character outleveled it. But as I said, it's not so bad if doesn't stop dropping. Honestly I don't even think that I want that.
Lindor 572 Author Posted December 2, 2020 (edited) S2EE Spells.txt spreadsheet: https://drive.google.com/file/d/1OxEOdg-ubLc1Zb5OJJrIJSB8vyqf-3A7/view?usp=sharing EDIT: Only the spells, not the tokens Edited December 2, 2020 by Lindor 1
Lindor 572 Author Posted December 2, 2020 S2EE 2.4 Worldobjects.rxr spreadsheet: https://drive.google.com/file/d/1pKsHcr2o1lKd3YAF5zG8BqnJfYVmyVqc/view?usp=sharing
Lindor 572 Author Posted December 21, 2020 (edited) This is what happens when I can not sleep at night: S2EE 2.4 typification.txt spreadsheet:S2EE 2.4 typification.txt S2EE 2.4 itemtype.txt spreadsheet:S2EE 2.4 itemtype.txt EDIT: somehow the link mechanic of the forum got broken for me. When I copy-paste a link, it doesn't get automatically embedded and when I try to manually embed it via the insert link as text tool, it doesn't convert the text (but at least embeds the link) EDIT2: Uhmm no it doesn't embed the link correctly, clicking on it leads to this post. What is happening lol Well if you want the spreadsheet you need to copy-paste the URL in your browser address bar. EDIT3: fixed it. For manual link embedding URL and text were swapped. no idea why. Edited December 24, 2020 by Lindor 1
Lindor 572 Author Posted December 21, 2020 Test1 https://drive.google.com/file/d/1sdtVTBKdCvDDf5PExzuNvU0zADSiXtIW/view https://drive.google.com/file/d/1sdtVTBKdCvDDf5PExzuNvU0zADSiXtIW/view Test3 https://drive.google.com/file/d/1cRsBTHBrefBGcwrfN1u0lI5X0lTRrk9O/view https://drive.google.com/file/d/1cRsBTHBrefBGcwrfN1u0lI5X0lTRrk9O/view Test5 https://www.youtube.com/watch?v=F2e2csDIPMw 1
Lindor 572 Author Posted December 21, 2020 (edited) Ok auto-embed of links and videos works in a new post. Auto embed doesn't work if editing old posts. Manual link insertion does not work at all. Even Cookie and Cache clearing does not help. Can you guys test whether it works for you? Because maybe it's just a problem exclusive to me. If so, can a moderator edit my post and fix the broken links please? Edited December 21, 2020 by Lindor