Jump to content

khzmusik

Members
  • Posts

    713
  • Joined

  • Last visited

Everything posted by khzmusik

  1. I know, right? I found this out a while ago (some custom NPC sounds were too loud and I wanted to change them). As someone who used to work with audio semi-professionally, that's basically getting an F in the Audio 101 course. They must have good reasons, but for the life of me, I can't figure out what they are.
  2. It was an easy fix. All you have to do is add the "HoldingItemHasTags" requirement to the effect_group that triggers the buff, so that it only fires if you're actually holding gasoline (or technically, an item with the "gasoline" tag). I already pushed the changes to the repo. The modlet version is now 1.0.1. It should eventually show up in the Mod Launcher. If you want to make it so the user is "huffing gas" (just a low-grade visual effect) that actually sounds kind of cool too. I'm sure you could also trigger some kind of player sound that sounds a bit like "huffing," but I don't know offhand which sound that would be. (Maybe the stamina sound?)
  3. One other thing you might find useful. If you want an icon that's not available in vanilla, you can create your own. You just have to name it with the correct prefix. I didn't know this myself. It was figured out here: EDIT: if you do this, of course both clients and servers will need to install the modlet to pick up the icons.
  4. Oh, that's interesting, I actually didn't know about that requirement or that tag. If it's just a matter of adding that requirement then I should be able to push it soon (basically as soon as I have time). Thank you very much for the help!
  5. Just an FYI, that is also true of anything with custom assets, like new item icons. Servers only push the contents of the Configs directory (since that's all plain text and doesn't consume a lot of bandwidth). But it's a lot easier to install modlets that don't have custom C# code - you just put the modlet into the Mods directory, no compiling or messing around with the game files.
  6. DMT mods will work on dedicated servers, but you will need to compile the mod on both the server and any clients that connect to it. I'm not a MP guy so I don't really have the details about how to mod a server. It also depends upon how you are able to access the server, e.g. if it's your personal machine, a hosted machine that you can RDP into, or a hosted machine where you can only upload files via FTP or similar. Anyone who has done a server install of a mod with extra code (like Darkness Falls) should be able to help you out a bit more.
  7. Thanks! I'm glad you like it. I don't even know how much that would be noticed (I mean, who puts themselves out with gasoline?) but I thought it would be funny. Regarding power tools - no, that was definitely not intended. I didn't even consider that possibility when testing. I'll have to take another look at that, if there is no way to avoid "using" the gasoline when you refuel something, then I might have to take it out, unfortunately. (Hopefully not.) ...It might be a bit for me to do though, I just got a new gaming laptop and I want to play with it. :)
  8. I assume you mean a list of values that you can use in the "ItemTypeIcon" property of an item or block? If so - there is a list of .tga icons, which can be used with buffs, in XML.txt (starting on line 1793). However, not all of them can be used for the value of "ItemTypeIcon". You need the ones that start with "ui_game_symbol". That prefix is added in controls.xml and windows.xml, so don't include the prefix in the "ItemTypeIcon" value. But, long as that list is, it isn't complete. So, you could also search the code for other "ItemTypeIcon" values that TFP use, and include them. Short of decompiling the Unity bundles, I think that's as much information as you're going to get.
  9. Nice catch. I actually did not change the Snowberry blocks. I looked at the "plantedSnowberry3HarvestPlayer" XML and it is correct, it downgrades to the plant. What I did not check was to make sure "plantedSnowberry2" grew into this block. It didn't, it grew into the one that is used in POIs. It was an easy fix, and so I already fixed it. (EDIT: I also tested it to make sure it worked.) It's pushed to the master branch for that modlet. You can download the new version directly (it's now v1.0.1). If you're using the Mod Launcher, it will show up there, but it takes time for the Mod Launcher to catch up with the updated repo. (I think it might speed things up if you clear all the caches, but I'm not sure.) It's such an easy fix that you shouldn't need to start a new map. Theoretically at least. Hope you're enjoying the modlet. It's sometimes hard for me to know if anyone is even paying attention. If you find any other issues, please let me know.
  10. You're very welcome, always glad when I actually have enough knowledge to help. Everyone seems to use dnSpy: https://github.com/dnSpy/dnSpy I also use that. It does make navigating the code easier, and has a bunch of features that people like. But there are a few things I don't like about it - the lack of code folding is killing me. I've been trying to find something better but haven't found it yet. But also, you can look in the code produced by other modders. I don't know if that would have helped in this case, but since this deals with entity attack code, you could look in one of the mods that adds new zombies or NPCs. Xyth's creature packs or Snufkin's zombies, for example.
  11. I'm pretty sure the "RangedAttackTarget" AITask accepts "minRange" and "maxRange" values. Try putting them at the end of the "data" attribute value, e.g. "itemType=1;cooldown=4;duration=5;minRange=10;maxRange=100" EDIT: here's the cop code with those values added: <property name="AITask-2" value="RangedAttackTarget" data="itemType=1;cooldown=4;duration=5;minRange=10;maxRange=100"/>
  12. Thanks, but the journal tip was just an example. Really what I'd like to do is trigger one of SphereII's custom MinEvent actions. The actions that you can put in the quest's <action> tag are not the same kind of actions. The only (vanilla) quest actions available are "ShowTip", "SpawnEnemy", "TrackQuest", and "TreasureChest". You could not use, say, the vanilla "AddBuff", "ModifyCVar", "ModifyScreenEffect", or "PlaySound" actions like you can for a triggered_effect. Though, I did look at your quest mod, and it actually helped with another quest idea I had (a "tower defense" of a POI). So, thanks!
  13. ...I've been thinking about this some more, and I think I can do what I want without needing to remove the item upon quest completion. But I'm going to leave this question open because others might find it useful. So if anyone out there does have a solution, let's hear it. (EDIT: I realized that I'd have to do something different when I thought about the player not turning the quest in. What if they died? What if they failed the quest? etc.)
  14. You don't actually need the first quest in order to reward the player with items. If you specify that the items are given in the "start" phase, the player will have them in their inventory as soon as they accept the quest. Here's an example. The player gets a plant fiber shirt when the quest starts. They are required to put it on and kill two zombies while wearing it. <quest id="quest_KillZombiesInAPlantFiberShirt"> <!-- ...the usual quest stuff omitted... --> <!-- This objective will automatically complete since we gave the player the shirt as a starting "reward" --> <objective type="FetchKeep" id="apparelPlantFiberShirt" value="1" phase="1" /> <!-- Now continue with additional objectives in different phases --> <objective type="Wear" id="apparelPlantFiberShirt" phase="2" /> <objective type="ZombieKill" value="2" phase="3" /> <requirement type="Wearing" id="apparelPlantFiberShirt" phase="3" /> <!-- This will automatically give the player the shirt when the quest starts --> <reward type="Item" id="apparelPlantFiberShirt" value="1" stage="start" /> <!-- These are given when the quest completes --> <reward type="Exp" value="500" /> <reward type="Item" id="casinoCoin" value="350" /> </quest> Now, the question is - after the quest is over, can I take the shirt back? (As a hypothetical background - let's say plant fiber shirts can't be crafted or looted. I want to make sure that no player could ever have them unless they were doing this quest.)
  15. Well, it sounds like I'll need to write some C# code to do what I want. Oh, well. I was hoping to avoid that, but c'est la vie. But - the talk of Quest A/B did remind me of another riddle I've been trying to solve, and you might have alluded to a solution (if I understand right). When you said "it gets put into the players inventory... and then removed" what was the "it" you were talking about? The item itself, or the buff? I ask because I would like to create a quest that has a requirement that the player be wearing a specific item of clothing, and that clothing is given by the trader when the quest starts (it's a reward that is given in the "start" phase). But I'd also like that item of clothing to be removed from the player's inventory when the quest is done - "done" meaning either turning in the quest or failing it. I don't want the clothing to be available to the player unless they're actively doing the quest. I didn't quite understand all of what you were talking about with the two quests. Do you think something similar could be used to solve my quandary?
  16. Well I was hoping to keep it a secret. Oh well. I'm planning to do some quests that target different NPC factions. One thing I'd like to do is a "fetch" quest that targets the different faction POIs. For example, if the trader is sympathetic to Whiteriver, he'd say something like "the Duke stole something and we want it back" and send you on a fetch quest to a Duke POI. Other than the lore around it, the quest would still be a basic fetch quest. The catch is that maybe the Duke's clan don't mind the player so much. So the player can just go in, search around the POI until they find the quest satchel, gather it, and return to the trader - all without fighting the Duke's clan members. All of the above is actually by design, I know how to do all of it (with some SphereII Core help), and there are no issues. But, I'd like it to have consequences. So, when that "fetch" quest is turned in to the trader, I'd like the player's relationship with the Duke faction to get worse. The code to change the player's faction relationship is in SphereII Core already, but it's a triggered action. The change in faction relationship is not done with a buff or with cvars, it literally sets a C# variable in the code. So, I'd like this action to trigger as a "reward" for completing the quest. Does that help at all? Or does it just confuse matters?
  17. Either one will work. The second one will only target guns that have an "effect_group" with "gun" in the effect group's name, but as it so happens, that's true of all guns. If you want to make sure you target that passive effect, no matter where it is in the XML, you can start with two slashes ("//"). That means "any node in the XML file." (Technically it means "any descendant of the current node" but 7D2D always starts at the root of the current XML document.) You also don't need the "contains" function, because "SpreadMultiplierAiming" is the full name. But - there are different operations on the spread multiplier. Some passive effects use "base_set", some use "perc_add", and so forth. You're setting all of those values to zero too. This is what I'd do: <set xpath="//passive_effect[@name='SpreadMultiplierAiming' and @operation='base_set']/@value">0</set> To see if it worked, you can load up the game, go to the console (usually F1), and enter the command "exportcurrentconfigs". That will output the transformed XML files (the console will say where) and you can look at them by hand.
  18. Hey, all. I'm wondering if this is possible with XPath/XML, or if custom C# code would be necessary. I would like to trigger an action when the player completes a particular quest. The action already exists in the game as a triggered event. Here's an example. Suppose I want to add a journal entry the first time the player completes a specific kind of quest. If I could just use a triggered_event tag, it might look something like this: <triggered_effect trigger="onQuestFinished" action="AddJournalEntry" journal="myCustomJournalEntryTip"> (That's not what I actually want to do, that's just an example.) Is there a reward type that does something similar? ...and, I know I could reward the user with a book that triggers that event when read. But I intentionally want the event to not involve player choice - they complete the quest, the action triggers, whether they like it or not.
  19. You can't just include an xpath string in the attribute of an XML tag and expect it to work. 7D2D only supports xpath strings in the "xpath" attribute of a node that represents an append/replace/insert command. And those commands are only supported in the specific XML files in the Mods folder. It's confusing because TFP implemented XPath using the XML language (and not, say, JavaScript or C#). They had good reason, but it can be hard to separate the two.
  20. Ah, targeting probabilities. I ran into this issue myself when trying to add custom zombies, and having their probabilities match those of existing zombies. I could not find a way to do it other than, basically, what you're doing now. It gets even more hairy when there are a ton of different possible probability values (like for zombieBoe). In my case, I just looked for the most common probabilities, for each of the zombie types I was replacing, and matched those. For the rest I didn't worry about it and added a "midrange" probability value. In your particular example, "animalDoe" only appears once in the entire file (in the "WildGameForest" group), so I wouldn't even worry about the probabilities for that one. Personally, I also wouldn't try to be forward-compatible with future 7D2D alphas. You'll probably have to tweak it when a new alpha comes out, no matter what. As an example, look at the probabilities in the "EnemyAnimals" groups. Those have probabilities that are values like 10, 20, 30, 48... Before this alpha, TFP used probabilities between 0 and 1, so a previous mod would need to be updated anyway. Also - about XPath - when I say "store" I don't mean "write to the XML." I mean "store in memory." You can't "pull the value from the object" because there's no place to pull it to. EDIT: Before this edit, I previously said something here about how XPath has no notion of numbers. It turns out I was wrong. XPath actually does include functions that operate on numbers. However - I have no idea if XPath, as implemented in 7D2D, supports those functions. Here's an example. Say you want to target probabilities between 0.2 and 0.3: <insertAfter xpath="/entitygroups/entitygroup/entity[@name='animalDoe' and @prob >= 0.2 and @prob <= 0.3)]"> <entity name="animalIceburgBabyDeer" prob="2.5" /> </insertAfter> As I said, I have no Earthly idea if those operators are supported in 7D2D. You could try it and find out. EDIT 2: ...Thinking about it - 7D2D probably does not support these particular operators, because an XML parser will see ">" and think it's the end of the XML tag. But they do exist in XPath, so maybe TFP have some other function that is equivalent? (I learned about these operators by examining documentation about XPath in general - but XPath is usually used in JavaScript, which is totally different.)
  21. I don't think this is currently possible. The reason why, depends upon what you're asking. If you're asking whether you can do this with XPath, then I'm pretty sure the answer is "no," because you can't get values with XPath. It doesn't have variables, so it doesn't have any way to store a value. You can target the "Mass" value of the current zombie (using e.g. "/path/to/zombie/property[@name='Mass']/@value"), in order to set it, but you can't read its value. If you're asking whether you can do this using XML - meaning, using all the functionality of 7D2D that can be specified with XML tags - then I'm pretty sure the answer is still "no." Simply put, TFP haven't coded a feature where you can directly access the value of property tags. You can access - and modify - cvars, but that's not the same thing. So, unless TFP created two cvars that map to the "Mass" property and the "SizeScale" property, there's no way to read these values. That's not even considering the notion of converting a float to a decimal, though I'm not sure this is even needed in the case of the "Mass" value. Having said all that - if you're creating new zombies or animals anyway, why not just do all of this yourself? The math isn't difficult - certainly not as difficult as learning XPath.
  22. I discovered that there is a way to do this, in vanilla, no special code needed! It's not done in the game, but each npc_info node in npc.xml, can accept an attribute called "quest_list". By default it is "trader_quests" which you can see in quests.xml. But it can be any quest_list ID. So, you can make a quest list that is specific to (say) Trader Jen, called "jen_quests", and set the "quest_list" attribute to that value in her npc_info node. That's going to do me a world of good. Hopefully it helps other folks too.
  23. And now, here's something I hope you'll really like. Bad Medicine You can only craft dirty bandages using cloth alone. Dirty bandages can be sterilized (to "vanilla" bandages) using alcohol in your backpack, or by boiling with clean water in a cooking pot. Dirty bandages have a chance to cause infection. Treating lacerations (as opposed to just bleeding) will always cause infection. To make up for the increased chance of infection, first aid items now have a very small antiseptic effect (less than honey). You can now drink grain alcohol. It has the same effects as beer, but lasts slightly longer, and has a good chance of making you sick. You can also drink gasoline. Don't drink gasoline. If you are on fire, don't douse yourself with flammable liquids. You're not Rambo. Stitch up a wound using a sewing kit, and you'll make pain sounds for everyone to hear. Unless you're drunk. As always, details are in the README.md file in the repo. https://gitlab.com/karlgiesing/7d2d-a19-modlets/-/tree/master/khzmusik_Bad_Medicine EDIT: Forgot to mention - this modlet is compatible with EAC. However, it does include a custom icon for the dirty bandages, so it must be installed on both client and server.
  24. You know, I hate to be a downer, but I'm pretty sure nearly all of those movie posters are still under copyright, and owned by the film studios. By using them in your mod, you're doing the same thing (legally speaking) as if you had included someone else's model without permission. You're in danger of getting your GitHub repo DMCA'd. http://vintageposters.co.za/about/copyright/movie-poster-copyright/ The paintings are almost certainly in the public domain though, since they were created before 1923, so those are safe. I'm not making any demands or anything, just saying you're putting yourself at risk. And, obviously, if the copyright holders have actually granted you permission to do this, then never mind.
  25. Personally, this is the only reason I want the game to go gold. Until then, modding is a moving target. But other than that, I actually would like it if more games were "in alpha" for this long. It means the game's getting worked on and improved.
×
×
  • Create New...