RevenantWit Posted May 28, 2023 Share Posted May 28, 2023 It's been quite awhile since I last poked around in the xmls for this game and was wondering if anyone knew the following. 1.) Can you set a specific item to not drop on death no matter what server settings are using xml only edits? 2.) Can you set how full durability is on weapons and armor in the loot xml file using xml only edits? 3.) Is it possible to have GoTo in the quest xml point to a specific x,y,z location using xml only edits? Link to comment Share on other sites More sharing options...
khzmusik Posted June 2, 2023 Share Posted June 2, 2023 (edited) Sorry you didn't get a reply earlier, I'll try my best to answer. On 5/28/2023 at 4:19 PM, stedman420 said: It's been quite awhile since I last poked around in the xmls for this game and was wondering if anyone knew the following. 1.) Can you set a specific item to not drop on death no matter what server settings are using xml only edits? 2.) Can you set how full durability is on weapons and armor in the loot xml file using xml only edits? 3.) Is it possible to have GoTo in the quest xml point to a specific x,y,z location using xml only edits? 1.) No, you would have to use C#/Harmony. The item would need some kind of bespoke property tag that tells it to override the "drop on death" setting, and then create Harmony patches on whichever methods drop item stacks on death. 2.) I'm not sure I understand this question. It is possible to set the "durability" of items using XML (they are the "DegradationMax" and "DegradationPerUse" passive effects on the items). But your question mentions the loot.xml file, which seems to suggest that you're asking whether you can set the actual degradation value on items that are spawned into loot. The answer to that is no. But, you can set the weapon tier of items in loot. For tiered items (like weapons, armor, or tools), the loot quality determines the tier. See the loot quality templates under the "A20_Loot_Quality_Distribution" comment ("QLTemplateT0 .. 3") in loot.xml. 3.) No, and though you could make a custom class in C# - the question is why? The quests are the same regardless of the size of the map, so there's no way to guarantee that a specific (x,z) location actually exists in this world. If it does, there's no way to know whether the "y" position is above ground or not. Or, to know if you're teleporting the player to the middle of a solid block, or into the loot room of a Tier 5 POI, or whatever. So, it's probably better to ask yourself why you want the player to go there. For example, if you want the player to go to a specific kind of POI... well that's still impossible without C#, but there are existing C# mods that add the code to do that. (I wrote the code for one.) Edited June 2, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
RevenantWit Posted June 3, 2023 Author Share Posted June 3, 2023 Ah I figured the answer would be no, I just wasn't sure how much had changed since I've been messin with stuff last. I should have just asked in the discord when chattin about SimpleUI Lol To be more clear on the second one though, I was meaning the health of the item I guess would be the way to say it. I wanted items that didn't need repaired without having to stick them in a bundle but the bundle thing works for now. And on the third thing I was wanting x,y,z for custom maps and not always necessarily a poi location. The idea would be more to have a list of xyz cords that I could then have one set as a cvar to then use as the goto location. But this was just hopeful. I can spawn an entity through a combo of buffs and gameevents and then have a buff to let the players know the location. It's for a pvp mod side project for a content creator friend of mine that I work on from time to time. But it had been a long time since I tinkered with 7 days so just wanted to check. I think this and Nexusmods is the last places I still even use this old username Lol Link to comment Share on other sites More sharing options...
khzmusik Posted June 3, 2023 Share Posted June 3, 2023 (edited) 1 hour ago, stedman420 said: Ah I figured the answer would be no, I just wasn't sure how much had changed since I've been messin with stuff last. I should have just asked in the discord when chattin about SimpleUI Lol To be more clear on the second one though, I was meaning the health of the item I guess would be the way to say it. I wanted items that didn't need repaired without having to stick them in a bundle but the bundle thing works for now. And on the third thing I was wanting x,y,z for custom maps and not always necessarily a poi location. The idea would be more to have a list of xyz cords that I could then have one set as a cvar to then use as the goto location. But this was just hopeful. I can spawn an entity through a combo of buffs and gameevents and then have a buff to let the players know the location. It's for a pvp mod side project for a content creator friend of mine that I work on from time to time. But it had been a long time since I tinkered with 7 days so just wanted to check. I think this and Nexusmods is the last places I still even use this old username Lol If you're curious, an item's "degradation" is represented in the C# code as ItemValue.UseTimes (meaning "the number of times it is used"). When spawning, it is set to a random number between 20% and 80% of the maximum. That is done in LootContainer.SpawnItem. Just in case you want to do it through Harmony patches. Regarding the (x,y,z) coordinates, maybe rethink how the quest works. If you want to have the players go to a location in order to fight an entity (like a "boss" or whatever), then you can do that pretty easily - if you're OK with a random location. The key is to choose the random location first, then have the players travel to it, and when they activate the quest marker, spawn in the entity (or entities). You can look at any of the "buried treasure" quests for examples - just don't include any of the treasure-related objectives. No buffs or game events necessary. EDIT: If that is what you want to do, you can spawn entities from a specific entity group, so you would probably want to create a new entity group that only spawns in the boss. (If the boss has minions, you could spawn them using a different entity group, possibly during different stages of the quest if that's what you want.) It may not be ideal but it works close enough. You could experiment with it to see if you can get it working how you want. Like, maybe you don't actually need the "RallyPoint" objective if nobody needs to stay within the area. (It probably wouldn't work, but I haven't tested it, and it never hurts to try.) Edited June 3, 2023 by khzmusik (see edit history) Link to comment Share on other sites More sharing options...
RevenantWit Posted June 3, 2023 Author Share Posted June 3, 2023 (edited) Nah that's ok I was actually meaning "entity" rather loosely. Wasn't really spawning an enemy. It was for a pvp event thing. Thank you though for taking the time to answer. Just noticing the quest system is super limited. It's ok though the buff and gameevent systems seem fairly robust now and it seems easy enough to call a gameevent from a buff so between the two it should all work. Edited June 3, 2023 by stedman420 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now