Jump to content
The Dark Mod Forums

jivo

Member
  • Posts

    38
  • Joined

  • Days Won

    8

Everything posted by jivo

  1. I think I've fixed it
  2. Can a script function be too big? My "holding item" state is getting pretty massive as I add new items and variables to support the logic that is needed to handle each use case and, since adding the flashbomb, I'm getting this error: "EnterFuncton: locals stack overflow"
  3. Of course. The depth hack works as intended and basically stops weapons and weapon attachments from clipping through the map geometry. I confirmed this by setting it to false in the engine code and noticed that the weapons/items clipped without the hack enabled. I think the issue happens when an object is fully outside of the map. You can see this if you "noclip" to an out of bounds zone, the weapon will stop being rendered. So, when the player leans against a wall, the items in the hand, which are fairly small, will be completely outside of the map and thus stop showing on screen. To fix this, I simply added a square plane to the object model to make it bigger than it actually is, and added the "nodraw" texture to this plane so it wouldn't be visible. This way, the object is big enough that some part of it is always inside the map, forcing it to be rendered. The easiest way to add this invisible plane is by exporting the object model we want as an ASE file in Dark Radiant - so we can open and change it - and then manually adding the geometry and material of the plane to the file. I edited the first item in blender to add the invisible plane and then saved its geometry and material in a template file that I can now use to just copy and paste to any new models I want to add to the mod. It seems to work well. The only important part is exporting the model in Dark Radiant with origin at "0 0 0", since the first plane was created for an item with that origin.
  4. Thank you It's just another attachment added to the "unarmed" def file that only shows when the holy water is used. It seems there's no limit to how many attachments you can add to a weapon entity, which is very useful for this mod. If a weapon is selected, it gets lowered the same way as when the player is mantling or using the inventory. In the particular case of the bow, it's the same animation but with the bottle on the right hand and the arrow on the left, since the holy water would be in the right hand in that case. Unfortunately I don't think so, at least with the way I'm doing it. I added a new cvar to the source code to detect when an item is used and which one, which involves prior knowledge of the name of the item entity, so it's a rather static method and only works with the default TDM items. If I can figure out some other way to detect what item was used through the script, I don't see why this wouldn't be possible. However, I tried a lot of scripting methods but they were very unreliable and also lacked in generalization. Are there a lot of FMs that use custom potions on specific arrows? I seem to spend more time working on the mod than actually playing the game, so my experience and knowledge of the custom content is limited. Animating is the part I like the least, the one I'm worst at, and the one that takes the longest. Also, working with md5 meshes is extremely boring and difficult, at least for me. This is the best I can do with my experience, sorry
  5. New potion animations coming soon! I think this is a nice way to represent the application of holy water. Let me know what you think about these.
  6. You can use the holy water even if you don't have water arrows equipped or even if they are not in your inventory, which contradicts the information in the wiki page: "the player needs to have these arrows selected while applying HW". If this were true, it would be no problem to just add an animation that leans the bottle into the water arrows bow.
  7. The item shows regardless of the weapon. If the bow is selected, the item hand switches from left to right. The problem is if no weapon is selected or the blackjack/sword is selected, I can't tip the bottle towards the bow, since it is not in view.
  8. What animation should be used when the holy water is applied? I think drinking it like the other potions feels a bit weird, since it's meant to be used for dousing the water arrows. But that's not something that can easily be represented through an animation, or at least I can't think of a way to do it, because the other hand may be occupied with the blackjack or the sword. Any ideas? Keep in mind that it's meant to be a short animation.
  9. Finally managed to fix the clipping issues with the items. Here's a video showing a comparison between a model with the fix applied (unlit lantern) and another without (lit lantern).
  10. Unfortunately, I don’t think this is possible—at least not with the way the mod is currently implemented. All the models and animations are tied to the “unarmed” weapon entity, not the player entity. In order to have the legs and the rest of the body, we would need to add the models and animations to the player entity and modify the source code to allow the body to be visible, kind of like how it's done here. I did initially try this method but realized that the existing model/animations are a bit of a mess and it would be a LOT of work to make it look good. Also, I chose to do it this way to allow the mod to be compatible with everything, since the script and def files for the "unarmed" entity aren’t modified by any FMs (as far as I know—I haven’t tested them all). I assumed that someone may have tweaked the player files for their FM, as those are far more relevant than the "unarmed" files (which are essentially blank in the vanilla game). If I had overwritten them, I’d risk breaking their mission. There has been some discussion in the forums about having full body awareness and there didn't seem to be a lot of interest in it. Plus, it could end up being immersion-breaking. Imagine standing on a small rope and then looking down, only to see your feet just kind of floating in midair.
  11. I haven't researched the issue much, but I did see that the weapon code sets the weapon depth hack to true for the attachments (which is how I'm implementing the items), so it's weird that they clip through objects. It's on my to-do list. Just trying to add more items and fix the current issues first before I look into that. Currently working on the potions!
  12. I ask because some people were requesting a linux version and I just wanted to make sure everything was working correctly. Though, a while back I uploaded the linux binary of a previous version of the mod to the discord and someone on there confirmed that this method worked to compile it, so I'm just going to assume that everything is fine. I saw that, but I didn't really understand it. Perhaps when I have more time I could take a better look.
  13. I've created a GitHub repository and added the link to the original post if you wish to see the modifications I made to the source code. Just check the latest commit. Note: The code on GitHub is NOT compatible with the current version of the mod that's uploaded on ModDB (v2.0), since I've been fixing some bugs to make the animation timings more consistent and less prone to overlapping/breaking, and that involved updating the source code a bit. If you compile it and then use the executable with the current pk4 file, something will probably break. I'll update the mod soon to version 2.1, with all the changes and fixes I'm working on, but I thought I might as well share the updated code now.
  14. No worries, feel free to discuss anything you like
  15. The executable is compiled with the 2.12 version of TDM. I believe "getcvarf" is a new script function introduced in 2.13 so it's going to cause problems with earlier versions of the game. I will update the mod when 2.13 is released but for now it only works with 2.12.
  16. Can someone confirm that the linux version is working correctly? I'm using a VBox machine to compile it but when I run it the mouse doesn't work for whatever reason, so I can't actually test it. Thank you
  17. In case you missed it, I updated the Visible Player Hands mod to version 2.0. It now works while a weapon is selected and has a Linux version too.

    Check it out if you're interested: Visible Player Hands 2.0

  18. I just uploaded a version with the linux binary to the ModDB page. Can someone test it out to see if it's working?
  19. So is it better to use waitFrame() or wait(0.01667)?
  20. Version 2.0 released! Hello everyone! I've been busy with my thesis and haven't had much time to update this mod but I finally managed to find sometime to work on it and release version 2.0. It includes the new lantern and compass animations and now works while holding a weapon. Check out the original post in this thread to find the link to the ModDB page where the mod is uploaded. I'm sure there are a ton of weird behaviors and overlapping animations due to having to synchronize many components but with normal use cases it seems to be fine. I'll be adding new item animations next and working to eliminate any bugs that may occur, so feel free to share if you find issues with the mod. I'll also finally create the public github repository so you can check out the changes I made to the TDM source code if you wish, and upload a version with the linux executable. Probably tomorrow, as I'm very tired of looking at this right now Enjoy! Edit: This is the kind of issue that can happen with the mod. If you see something like this, please try to find the sequence of inputs that led to it happening so I know what is causing it. Another problem that may occur is the weapon logic getting stuck somewhere and not allowing the player to select a different weapon. I've tried to eliminate as many problems as I could but, again, it's a lot of components interacting with each other so it's likely that I've missed something. Thank you
  21. This is possible now! @snatcher
  22. That shouldn't be an issue, just a matter of adapting the script code a little bit to adapt to the new possible situations. For example, when holding the bow, the animations for the items can go to the right hand, since the bow only uses the left hand when held, and then I can lower the items when the player is firing an arrow.
  23. Hands and weapons at the same time are possible! Link to video It's not finished yet and it obviously implies that I had to change the source code a lot more than just adding some simple cvars, but I'm very happy that it's doable. And the best part is that it still uses the exact same unarmed script file that I was using in the previous versions of the mod, so it should still be compatible with everything I also changed the rotating GUI compass for a static one, since we can now use a real compass. Personally, I think that's awesome.
  24. Can't find the entity for some reason . The code below compares the current icon to see if it's equal to the one that is used when the lantern is on, and it works. However, it's dependent on the spawnarg key being "inv_icon_on", which is what is used in the default tdm_playertools_lantern.def file, so not an ideal solution. Is this something that FMs usually modify? if ($player1.getCurInvIcon() == $player1.getCurInvItemEntity().getKey("inv_icon_on")) { sys.println("ON"); } else { sys.println("OFF"); } EDIT: Nevermind, I figured out how to access the "lanternLight" entity. Works great.
  25. Can someone help me out with an issue I'm having? I added a cvar to tell when the lantern is toggled on or off but I'm trying to get rid of it because I think there's a way to tell purely through scripting. The tdm_playertools.script has an object called tdm_playertools_lantern which has a member entity called lanternLight. In that script, lanternLight is set to null if the lantern is off and not null otherwise. I want to access lanternLight from my unarmed script but I can't seem to figure out how. I've included the playetools script and tried to access the member entity by using "playertools_lantern.lanternLight" but it's always null, so I guess this is the wrong way to do it.
×
×
  • Create New...