thebigh Posted October 4, 2023 Report Share Posted October 4, 2023 This seems like a sensible thing to raise on the bug tracker. 1 Quote My missions: Stand-alone Duncan Lynch series Down and Out on Newford Road the Factory Heist A House Call The House of deLisle Link to comment Share on other sites More sharing options...
datiswous Posted October 4, 2023 Report Share Posted October 4, 2023 (edited) You can make an entity and then copy that every time you need it. The dev file is better I think. Edited October 4, 2023 by datiswous 1 Quote Link to comment Share on other sites More sharing options...
joebarnin Posted October 4, 2023 Report Share Posted October 4, 2023 Building on what @HMart said, here's a technique that extends the existing 'text' entity. In the "def" folder of your mission, create a <whatever>.def text file. E.g., mytext.def. It should contain this: entityDef mytext { "inherit" "text" "editor_setKeyValue force" "0" "editor_setKeyValue playerOriented" "0" "editor_setKeyValue text" "Default text" } (you can name it something else besides "mytext"). Since it inherits from the default text entity, it will behave correctly. In DM, create a "mytext" entity - it will have those three properties initialized to the values specified in the .def file. 2 Quote Link to comment Share on other sites More sharing options...
cvlw Posted October 5, 2023 Report Share Posted October 5, 2023 On 10/3/2023 at 9:15 PM, thebigh said: This seems like a sensible thing to raise on the bug tracker. I will do this. Just gotta dig up my tracker login info! I have this feeling that there was another bug or maybe forum conversation about missing entity spawnargs in general. I will try to make sure I am not creating a dupe entry before doing so. Appreciated. Clint Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted October 13, 2023 Report Share Posted October 13, 2023 Is there any way to change the light radius on the 2 candle wall sconce (atdm:sconce_2candles_rigid)? I've tried all these spawn args. Nothing has an effect. flame1 and flame2 are the pos_attach names in the inherited properties. I thought that would have done it for sure, but no. Quote Link to comment Share on other sites More sharing options...
datiswous Posted October 13, 2023 Report Share Posted October 13, 2023 (edited) If you look inside the definition of atdm:sconce_2candles_rigid you can see that no name_attach is specified. Looking at this guide, it should be specified as such. Maybe you can manually set the name_attach1 for example to theflame1 and then do set light_radius on theflame1 . Just a guess. Another idea is to copy the dev file and add a name_attach to it. From testing this does seem to work, although I'm not sure if this is what did it. Edited October 13, 2023 by datiswous 2 Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted October 13, 2023 Report Share Posted October 13, 2023 OMG it worked! 1 Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted October 13, 2023 Report Share Posted October 13, 2023 Quote Link to comment Share on other sites More sharing options...
datiswous Posted October 13, 2023 Report Share Posted October 13, 2023 I find it strange that the name_attach is not in the dev file. Quote Link to comment Share on other sites More sharing options...
grodenglaive Posted October 13, 2023 Report Share Posted October 13, 2023 Yes. Well it sure had me stumped. Quote Link to comment Share on other sites More sharing options...
datiswous Posted October 13, 2023 Report Share Posted October 13, 2023 Maybe I will one day figure out how to make the attached skull of a ragdoll highlight when pointing and when moving it. I did multiple attempts in the past. Quote Link to comment Share on other sites More sharing options...
thebigh Posted October 13, 2023 Report Share Posted October 13, 2023 A really grubby hack for that is to make a live AI with the def_head you want and then use a script to kill it on map start. 1 Quote My missions: Stand-alone Duncan Lynch series Down and Out on Newford Road the Factory Heist A House Call The House of deLisle Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 15, 2023 Report Share Posted October 15, 2023 I have a scripting question I may use for a mod: What is the function to check if an AI is seeing the player, and the extent to which the player is visible in their awareness based on distance from the AI as well as lightgem and any other factors? Till recently I thought this isn't possible, until I played through Iris which found a way: In the FM most AI are friendly unless they see you steal things or pick doors or enter restricted areas, they only become hostile if that AI is looking at the player while being close enough to make out what they're doing. Technically I could dig through its scripts but there's probably a lot bundled together, so if anyone knows I could use a simplified description of that part. Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
thebigh Posted October 15, 2023 Report Share Posted October 15, 2023 I think you're looking for the visScan() function. I've never used it myself, but from the documentation it's supposed to check whether the player is in an AI's field of view, taking into account obstructions and light level. From there you'd just need to trigger some checks for whether the player is doing something forbidden like picking a lock or being in an area he's not supposed to be. 1 Quote My missions: Stand-alone Duncan Lynch series Down and Out on Newford Road the Factory Heist A House Call The House of deLisle Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 15, 2023 Report Share Posted October 15, 2023 14 minutes ago, thebigh said: I think you're looking for the visScan() function. I've never used it myself, but from the documentation it's supposed to check whether the player is in an AI's field of view, taking into account obstructions and light level. From there you'd just need to trigger some checks for whether the player is doing something forbidden like picking a lock or being in an area he's not supposed to be. Thanks. Seems it's either visScan() or findEnemy() I can't quite tell what the difference between them is supposed to be. Will give it a try... doing a little experiment that might have fun results! Does anyone have an inventory icon for the Citywatch helmet, or know a FM I can get one from? Doesn't seem like there's one in "hud/inventory_icons" and I'd need it for my little idea. Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
thebigh Posted October 15, 2023 Report Share Posted October 15, 2023 I'm guessing findEnemy() would require that the AI already thinks of you as hostile. As for inventory icons, when I needed one that didn't already exist, I put one in my map and screenshotted it in TDM, then used GIMP to cut it out. Have a look at how I did it in deLisle for the white mushrooms if you want to see a very grotty and amateurish example. Quote My missions: Stand-alone Duncan Lynch series Down and Out on Newford Road the Factory Heist A House Call The House of deLisle Link to comment Share on other sites More sharing options...
Geep Posted October 16, 2023 Report Share Posted October 16, 2023 (edited) For taking a screenshot of an item to use as an HUD icon, sometimes it's easier to do that in DR (e.g., in the head model view), where you have better shot control than in TDM, even if the lighting is a bit unrealistic. Fakey lighting for an icon is often not a problem. Edited October 16, 2023 by Geep Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 16, 2023 Report Share Posted October 16, 2023 (edited) Doing it in DarkRadiant sounds easiest: What's the best texture to put on a bush to screenshot the item behind, is there a fully white or black one by default? Main issue is cutting out the outline and getting the same consistent style across items, but I do lots of editing in Gimp so this shouldn't be a problem. As for the AI vis check it turns out to be a bit more complicated: visScan() only notices the player if they're an enemy to the AI, while the AI is friendly it stops working. findFriendlyAI() does work instead, but the name makes it sound ambiguous to use it to check for the player although it seems to work, also the documentation says it's costly and not to call it each frame which I'd have to do in my case, lastly it only detects the nearest entity so if another ally is standing closer to the AI than the player this won't report them. Am I out of luck with this one and need to not implement the check? I'm not seeing any other way to trace the AI's FOV cone. Edited October 16, 2023 by MirceaKitsune Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
grodenglaive Posted October 17, 2023 Report Share Posted October 17, 2023 textures/water_source/watersplode_m1 is pretty much full white as far as I can tell. 1 Quote Link to comment Share on other sites More sharing options...
Geep Posted October 17, 2023 Report Share Posted October 17, 2023 To get a pure black background, one way is to use the view pane in the "Choose Model" picker. In the controls under the view pane, select "Lighting Mode" instead of "Texture Mode". You'll want to turn off grid lines there too, and play around with the filter options. I see there are helmets (without heads in them) under models/darkmod/wearables/headgear/ Quote Link to comment Share on other sites More sharing options...
datiswous Posted October 17, 2023 Report Share Posted October 17, 2023 2 hours ago, grodenglaive said: textures/water_source/watersplode_m1 is pretty much full white as far as I can tell. It's the editor image that is white (the one you only see inside DR). Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 17, 2023 Report Share Posted October 17, 2023 (edited) Thanks everyone. If all goes well I might have a nice little mod ready by tonight I hope you'll enjoy https://bugs.thedarkmod.com/view.php?id=6326 This bug is currently the last thing limiting me: Please let me know if anyone ever ran into that and knows a workaround or what I'm doing wrong, till whatever causes that can hopefully be fixed. I'm trying to change the player's head and use a custom one for seeing yourself in a mirror, it works but randomly introduces a crashes due to a negative model index. Edited October 17, 2023 by MirceaKitsune Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
Geep Posted October 17, 2023 Report Share Posted October 17, 2023 Is there some reason that the custom head can't be just given to the player at the outset (in some def file), and not swapped? Might be more stable, I'm guessing. Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 17, 2023 Report Share Posted October 17, 2023 (edited) 7 hours ago, Geep said: Is there some reason that the custom head can't be just given to the player at the outset (in some def file), and not swapped? Might be more stable, I'm guessing. Yes, needs to be switched back and forth in realtime. I just posted my mod so you can check it out here for more info: Edited October 18, 2023 by MirceaKitsune Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
MirceaKitsune Posted October 20, 2023 Report Share Posted October 20, 2023 I had a curiosity: Is it possible to define an item that is picked up and used by nearby AI occasionally, without necessarily having to link a path node to it or target it from the AI? For example a wine bottle on a table: The AI picks it up drinks from it and puts it down, while patrolling next to it then resuming their patrol after using it (playing an animation). Looking at the AI prefabs, an AI need to target things such as food items with the "pickup_bottle_pickup" or "eating_apple" spawnargs. Is there a way that's proximity based and doesn't require that? Quote Mods: Builder Blocks minigame | Keypad | Disguises Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.