Jump to content

kaosuryoko

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kaosuryoko

  • Rank
    Refugee
  1. Hey there. Saw this tool, it's definitely a solid idea. Do you have a git repo for it?
  2. What I've seen in cases like this is compatibility patches. So you release the stack sizes mod for the base game, and then also a patch for it that basically just a standalone mod that only modifies the stack sizes of any new items from whatever mod you're making a patch for. I'm not sure of a better way in your instance off the top of my head.
  3. https://7daystodie.gamepedia.com/Debug_Mode I believe this is what you're looking for. Although I think that's a custom UI in the screenshot so if you don't have the same mods yours night look different.
  4. I didn't look too closely to wat you were doing at first. There is definitely a difference between the two in your case. Technically both are validXML syntax, but that's not the same as being in a format 7D2D can understand. For background, XML is not unique to 7D2D, it's simply a way to store any arbitrary data in a consistent format. For instance: <item name="meleeHandAnimalBear"> <property name="Extends" value="meleeHandMaster"/> <property name="CreativeMode" value="None"/> <property name="HoldType" value="46"/> <property class="Action0"> <property name="Delay" value="1.5"/> <!-- obsolete if rounds per minute exists --> <property name="Range" value="3.6"/> <property name="Sphere" value=".3"/> <property name="DamageEntity" value="30"/> <property name="DamageBlock" value="40"/> <property name="Buff" value="buffInjuryBleedingZombie,buffInjuryStunned0 1"/> </property> <effect_group name="meleeHandAnimalBear" tiered="false"> <passive_effect name="ModSlots" operation="base_set" value="0"/> <!--<passive_effect name="AttacksPerMinute" operation="base_set" value="40"/> A16 1.5 --> <passive_effect name="BuffProcChance" operation="base_set" value=".75" tags="buffInjuryBleedingZombie"/> <passive_effect name="BuffProcChance" operation="base_set" value=".4" tags="buffInjuryStunned01"/> </effect_group> </item> This is valid XML. The rules for valid XML can be seen here: https://www.w3resource.com/xml/well-formed.php Notice there's no rules for what each tag can even be called. That's because whatever application is going to read the data, decides what format needs to be in for it to understand it. In this case, since it's directly from the base Items.xml file, this is also in the format that 7D2D needs it in. Now lets take a look and compare that to your Baby Bear: [left][color=#9A9999][font=inherit]<!-- Baby Bear Damage -->[/font][/color] [color=#9A9999][font=inherit]<item name="meleeHandanimalIceburgBabyBear">[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="Extends" value="meleeHandMaster">[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="CreativeMode" value="None"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="HoldType" value="46"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property class="Action0">[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="Delay" value="1.5"/> <!-- obsolete if rounds per minute exists -->[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="Range" value="1"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="Sphere" value=".3"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="DamageEntity" value="22"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="DamageBlock" value="30"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<property name="Buff" value="buffInjuryBleedingZombie,buffInjuryStunned0 1"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]</property>[/font][/color][/left] [left] [color=#9A9999][font=inherit]</property>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<effect_group name="meleeHandAnimalBear" tiered="false">[/font][/color][/left] [left] [color=#9A9999][font=inherit]<passive_effect name="ModSlots" operation="base_set" value="0"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<!--<passive_effect name="AttacksPerMinute" operation="base_set" value="40"/> A16 1.5 -->[/font][/color][/left] [left] [color=#9A9999][font=inherit]<passive_effect name="BuffProcChance" operation="base_set" value=".75" tags="buffInjuryBleedingZombie"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]<passive_effect name="BuffProcChance" operation="base_set" value=".4" tags="buffInjuryStunned01"/>[/font][/color][/left] [left] [color=#9A9999][font=inherit]</effect_group>[/font][/color][/left] [left][color=#9A9999][font=inherit]</item> So lets talk about what's going to happen here. 7D[/font][/color] is going to come in, and load the data for your meleeHandanimalIceburgBabyBear from this file. It's going to pull up that "Extends" property for your meleeHandanimalIceburgBabyBear, see that it extends meleeHandMaster, and move on. Next (I actually have no idea the exact order it does these in, but that doesn't matter for our purposes) it will look for a property called "CreativeMode" belonging to your meleeHandanimalIceburgBabyBear. Here is where it will run into a problem, in your code, there is no "CreativeMode" property belonging to your meleeHandanimalIceburgBabyBear. Instead, the "CreativeMode" property in your code, is a property of the "Extends" property. The same problem will occur with each of the properties following in your code. Now, the reason it appears to work, is because of that "Extends" property. That's telling it to use this other item as a base item, so any properties it can't find in your new item, it will instead go get from the base item. [/left] <item name="meleeHandMaster"> <property name="Tags" value="blunt,melee,light,perkFlurryOfBlows"/> <property name="CreativeMode" value="None"/> <property name="HoldType" value="9"/> <property name="Material" value="Morganic"/> <property name="Canhold" value="false"/> <property name="Stacknumber" value="1"/> <property name="Candrop" value="false"/> <property class="Action0"><!-- AttackAction --> <property name="Class" value="Melee"/> <property name="Delay" value=".8"/> <!-- obsolete if rounds per minute exists --> <property name="Range" value="1.65"/> <!-- This not what "clientside melee combat" means. =) This is the adjustment afterwards due to code changes. --> <property name="Sphere" value=".1"/> <property name="Block_range" value="2.5"/> <property name="DamageEntity" value="10"/> <property name="DamageBlock" value="16"/> <property name="Sound_start" value="swoosh"/> </property> <effect_group name="meleeHandMaster" tiered="false"> <passive_effect name="DamageFalloffRange" operation="base_set" value="1.65"/> </effect_group> </item> [/Code] So it probably [i][b]appeared[/b][/i] to be working, because the values in meleeHandMaster are lower than the values in meleeHandAnimalBear. But it definitely isn't using those values you tried to set as is. So now let's fix it! Delete the second </property> closing tag, and change the "Extends" Line to either: [code] [color=#9A9999][font=inherit]<property name="Extends" value="meleeHandMaster"></property> Or <property name="Extends" value="meleeHandMaster"/> Those two examples are what I was talking about in my previous comment. Those two formats are 100% identical, but only because there is absolutely nothing else between the open and close tags of the first example. Anything in between the open and close tags is a child of the element it's inside of. But, because it's so incredibly common to have no children for an element, the second syntax was created as a shorthand. I would say it's the prefferred method anywhere possible, it's clean, and it helps prevent accidentally adding elements inside of another element. Of course, you can't make every line self close like that, for instance: [/font][/color] <item name="meleeHandMaster"/> [color=#9A9999][font=inherit][/font][/color] If we did that, the item wouldn't have any of the child properties it needs to describe it's behavior. Likewise with the "Action0" property, if that line self closed, it wouldn't have the "Delay" and other properties it needs to function. Final note, I'm not sure what you're using to edit these xml files, but I highly recommend downloading Notepad++. Then inside Notepad++ hit Plugins->Plugin Admin..., and install XML Tools from there. Once Notepad++ reloads, open any XML file and hit Plugins->XML Tools->Pretty Print. That will format the code nicely for you, and automatically line up closing tags with indents like in Mr.Devolvers screenshot. After you make some changes, hit pretty print again, and it should help make it obvious if you're missing closing tags, or have put one in the wrong place.
  5. To expand: <property></property> This syntax allows nested properties. In Mr.Devolvers example, the Action0 for each animal shows it well. If you don't have any reason to use a nested property, the <property /> syntax is just a convenient shorthand, but in every respect the same as a <property></property> syntax that has no nested properties. I prefer using <property /> syntax whenever possible because it's shorter and imo easier to read. But either way is fine, it's just important that every tag is closed one way or the other.
  6. I would also be interested in a GitHub link, I was just thinking about making a similar tool myself.
  7. Steam name: KaosuRyoko Hours played: 60 Started on Alpha: 18.4 Discord name: KaosuRyoko#4316 Native language: English
×
×
  • Create New...