Search the Community
Searched results for '/tags/forums/perl script' or tags 'forums/perl scriptq=/tags/forums/perl script&'.
-
Question: multple security cameras - one security monitor
STRUNK replied to Bikerdude's topic in TDM Editors Guild
Ik quickly asked Gemini, the free google AI: This looks like a script for the Doom 3 / id Tech 4 engine (or a derivative mod like The Dark Mod), given the use of sys.getEntity, spawnarg terminology, and specific camera state integers. There are two critical logical errors and one undefined variable bug in this script that will cause it to break or fail to compile. Here are the fixes you need to make: ## 1. Define the Global or Local State Variable In cycleCameras(), you use currentCamera to store the active camera number, but it is never declared. If multiple functions need it, it should be defined at the top of the script. ## 2. Fix the Camera Power-On Logic Loop In toggleCameras(), when poweredOff is true, the script turns the camera entity on and checks if ( startsHidden(screen) ) { screen.hide(); }. * The Bug: By default, when a map loads, hidden screens are already hidden. If you turn the system off and then back on, the script hides the screens that should be hidden, but it never calls screen.show() on the one screen that is supposed to be visible. * The Result: Activating power turns the cameras on, but all screens remain black/hidden. ## 3. Fix the "All Screens Showing" Misconception Your areAllScreensShowing() function assumes that when the cameras are powered on, screen.isHidden() will return false for all screens. In id Tech 4, using camera.On() or camera.Off() affects the camera feed entity, but it does not automatically alter the spatial .hide() or .show() status of the screen brush/model itself. ------------------------------ ## Optimized & Corrected Script Here is the corrected version of your script with the bugs fixed: /////////////////////////////////////////////////////////////////////////////////////////////////////// SECURITY CAMERA CODE////////////////////////////////////////////////////////////////////////////////////////////////////// string TARGET_CAMERAS = "target_callscriptfunction_camera_cycle";string TARGET_CAMERA_POWER = "target_callscriptfunction_camera_power"; // FIX 1: Declare the tracking variable globally so the engine registers itfloat currentCamera = 1; boolean startsHidden(entity e) { return ( e.getIntKey("hide") == 1 ); } boolean areCamerasOff() { float i; entity cameraTarget = sys.getEntity(TARGET_CAMERAS); for(i = 0; i numberOfCameras ) { nextCamera = 1; } // Show the next screen in the sequence for(i = 0; i < numberOfCameras; i++) { screen = cameraTarget.getTarget(i); float sequence = screen.getIntKey("sequence"); if (sequence == nextCamera) { screen.show(); currentCamera = nextCamera; // Update tracking state return; } } } ## What changed? * Removed the problematic areAllScreensShowing() function entirely, streamlining cycleCameras(). * Added screen.show() to toggleCameras() so the primary screen actually renders when you turn the power back on. * Added screen.hide() to the power-off sequence to guarantee absolutely zero performance draw while the system is offline. What specific bug or behavior were you encountering when you ran this in your map? It seems Gemini recognises even the scripting language, so I'm hopfull it could work, otherwise you start your own Gemini session if new errors pop up. -
Question: multple security cameras - one security monitor
Bikerdude replied to Bikerdude's topic in TDM Editors Guild
So am trying to make a multi-camera prefab for the core, based off @Frost_Salamander LT3 mission (he is aware). And I'm getting an error in the script - cameras.map cameras.script -
Question: multple security cameras - one security monitor
Bikerdude replied to Bikerdude's topic in TDM Editors Guild
I beleive I did, but with @Baal help, I added "float currentCamera" to the script and now it all works - -
Question: multple security cameras - one security monitor
Frost_Salamander replied to Bikerdude's topic in TDM Editors Guild
In the original script there are a bunch of variables declared at the top that are used in the camera functions. Did you copy those over too? -
Question: multple security cameras - one security monitor
Bikerdude replied to Bikerdude's topic in TDM Editors Guild
Thank you fella, but I'm not a fan of anything LLM/ML related for a number of reasons. LLM's & ML in general hallucinates or just pulls shit out of its digitaly-ass way to much of any use imho. So I'll wait for @Frost_Salamander (the person who created the original script) or another community member. -
Question: multple security cameras - one security monitor
Frost_Salamander replied to Bikerdude's topic in TDM Editors Guild
I did this exact thing in The Lieutenant 3. Have a look at the map script it's all handled there. I think I used camera guis layered on top of each other and switched them on/off. https://github.com/FrostSalamander/lt3/blob/main/maps/lt3.script -
Sounds like at least some of the sound and particle effects are from the store: https://www.ttlg.com/forums/showthread.php?t=153298&p=2537323&viewfull=1#post2537323 I wonder why the guy is so obsessed with Steffi Graf, by the way.
-
https://youtu.be/fwJwNLRY4kg "I am not enjoying my journeys, its so cold at the moment I imagine the chill could freeze a candle flame into a fire-gem and ole scratch's tears solid to his stoney face. Suffice to say, I'll be happy to get out of these whipping winds. A friend has asked me to keep an eye on his place while he is out of town. That part of Bridgeport is quiet enough, but he has been having a few problems he would like sorted out. I will know more when I get there." Download Link: v3.45 - https://mega.nz/file/jFEh3AYC#6EwN8eJ0uaioddse4iBTbTs-YKDsHAr_oHx9M4LI4T4 Thanks:- - As always espect to the Dark Mod team and for all the hard work they put and continue to put into it. - Flanders for his excellent models and textures. - Special thanks to the people that answered my technical questions on the forum. - Beta testers: (v3.45) Mat, DavyJones, Keruah, Oldjim, Amadeus, (v3.0) Lowenz, AluminumHaste, Greyman, nbhormore, McPhisto, Lost_soul, Pranqster and the original testers! Info: An update of the original Christmas Contest mission for TDM 1.08. Now requires version 2.14 List of fixes: For version 3.0 - (19-01-2013) The Tavern has been tweaked for better path finding and the punter's all sit down better, the barmaid now has RITS and there is new tavern music The south city gate barracks has a new room to explore, you have to climb to get to it. The Hotel has been improved for better path finding. The hotel apartment has been redecorated and a couple of new things for the player to interactive with and look at. There is a completely new shop for the player to explore and loot. Applied Grayman's winter breathing script, so when Ai are outside they all breath hot breaths of air The Thief's hideout was raised and tweaked for better game play. All side alley's have been tweaked visually. The north city gate has been visually improved. I have added a few new locations for the player to climb to for loot The objectives, briefing and readable's have all been tweaked. All top facing external surfaces have snow texture applied (this took frikin ages...) Added frost decals to every applicable window (this also took frikin ages) I increased perf again through out the map And finally lot of the bugs and issue and request players had have been fixed and addressed. For version 3.45: have placed a bunch of Volumetric lights in LOD better setting there were over a dozen broken or leaking vizportals and or overlapping vizleafs. found and fixed numerous texture misalignment. tweaked the locations and the monster clip for all the sleepers, to try and resolve the ko-death issue. tweaked/edited all the NPCs in the tavern, and one or more them was alerting all the others. edited the first objective so it only triggers after you read the note. remove the drop start for the player, very old mapping method that is no longer required. added Volumetric light version of a bunch of light sources and placed them on LOD better. added a area wide fog light to the sewer system. made the wine shop basement less aggravating to enter. fixed the pathing issues between the gnd and basement in the wineshop. lowered the brightness of some of the lights that were overly bright. fixed some broken lights that had been poorly placed and never spotted when this mission was release. fixed a shed load of broken, misaligned, misplaced, or just plain wtf is that there bits of brush and objects. will update this list as I go. added a building façade behind the SE city gate lookout and made some roof a single FS to enhance the skyline. added some winterised trees from Scrooge FM. moved the window on the small room to the south west and made it an opener, as it had been blocking access to a piece of loot. fix a couple more random issues spotted by the testers.
-
The Adventures of Thomas: Lucy's Quest Author: gg 2022-06-20 Version: 1.1 Required TDM Version: 2.10 or higher EFX: Yes ============================================================== Cautionary note: This FM needs a strong CPU/GPU combination sufficient to play the more demanding TDM FMs. Just as for many or most of the new FMs being released with the new gfx possibilities opened up it does a world of good to tweak the advanced video settings for the best combination of settings for your PC. For example, on my weaker laptop I set shadows as stencil and soft shadows off. On my desktop I set shadows as maps and soft shadows medium. Bloom off. Ambient occlusion off. Since the FM was built and extensively tested at these settings I believe either should produce a satisfactory experience. ============================================================== Sound Credits: freemusicarchive.org music Aislinn04_-_Aislinn_-_Lovely_Maria freesound.org klankbeeld_horror_1 freesound.org/people/CarlosCarty/sounds/522687/ om_aum_mantra_male_chant_bb freesound.org/people/Still%20Frames/sounds/37720/ still_frames freemusicarchive.org music The_Mind_Orchestra_Bruwynn tecknic.bandcamp.com/album/the-dark-mod-ambience-and-atmospheres Zack Bower Ancient_2, _3, _5. Solemn_1 freesound.org/people/Jagadamba/sounds/256006/ group_chanting_om_aum ============================================================== Thanks to: The TDM/DR developers for producing such a beautiful machine. The keepers of the wiki pages which are looking very good these days. Sotha for his invaluable tutorial "The Bakery Job". This tutorial is a jewel. Springheel for creating an atmosphere. Bikerdude for... ideas how to do things and scale things. Playtesters and advisors Dragofer, wesp5, datiswous, shadow. datiswous pointed out some immersion breaking lighting faults, so I got the idea. wesp5 gave me some good advice on how to tell the story - so it's more understandable. Dragofer gave me some early advice on optimizing the mission, which gave me a couple of months work with results that are well worth it. Dragofer wrote a script which optimizes CPU calculations of AI interactions. Shadow helped by testing the script, as well as testing other attempts at optimization. With the script in action only the minimal of AI interactions in the player's vicinity are called to be calculated. The script provides a general benefit but the results vary from computer to computer. The script targets a CPU task. ============================================================== Gameplay: Notes attached to objectives contain essential information on gameplay, on who the good/bad guys are, on what the player must do, and why. Mandatory objectives are linear, directing the player along a route to the goal. Optional objectives can be completed anytime. ============================================================== CAUTION: spiders, rats, undead, necrophiles, cannibals, psychotic thugs, and some generally unsavory characters. No snakes, though. The spiders ate them. ==============================================================
- 166 replies
-
- 14
-
-
Hello and thanks for checking out this post. I'm delighted to announce that version 1.1 of my fan mission "Cole Hurst 1: Eaton" is now available to download and play. This post is spoiler free, so please don't avoid digging into the details below if you are interested. I'm just using the spoiler tags to organize this post a bit. Let me start by saying "thank you" to anyone who has either previously played - or is considering playing this mission. It really means a lot to me. I have been away for a while, but following a round of beta testing that took place some time last year, I've only just recently managed to finish this update. I'm slightly embarrassed by how long it has taken me to complete, but I wanted to make sure that the valuable feedback I received was all properly addressed. Mission description "Tonight, Eaton's wealthiest citizens will gather at Lord Mayor Zelmer's estate to celebrate the city's founding. Nobles, dignitaries, a famed musician, and even the Queen will pass through its gates. While the guests celebrate Eaton's future, Cole Hurst is looking for a way out." For those new to and/or curious about this mission: I guess I would describe it as a traditional heist-style mission - although with a couple of major plot twist along the way. It's a very large map and I think it should take most players at least a few hours to complete. Screenshots Changes in version 1.1 Countless additions and a large amount of smaller tweaks and changes have all made it into this release. I may have already forgot a few things, but here are what I consider to be the main highlights: * New secrets & optional side quests * Story tweaks and reworked readables * Subtitles * Difficulty tweaks and related changes * Stability fixes * Various cosmetic changes * Audio tweaks * TDM version 2.13 now required Contributions and acknowledgments A special thanks to all of those listed below. I'm sincerely grateful for all your contributions! Mission testers and technical support @nbohr1more, @stgatilov, @duzenko, @Acolytesix, @Dragofer, @JackFarmer, @Shadow, @Cambridge Spy, @wesp5, @madtaffer, @prjames, @suzy8track, @datiswous, @boissiere and @Bergante Story Kelly Hrupa Voice actors twhalen2600 (AKA @Benny_the_guard) and Kelly Hrupa
- 13 replies
-
- 14
-
-
-
Hello! Tracking down information on software and plug-ins that work with D3 / TDM can be a tough. So I have created a thread here where people can post what software/ plug-ins/ tutorials or other references they've had success or failure with in TDM. 3DS MAX 2013 64bit .ase - Default .ASE model exporter works. However you have to open the .ase file in text edit and manual change the *BITMAP line on each material to read something like: "//base/textures/common/collision" which allows the engine to read the correct material path. md5.mesh / animation - Beserker's md5 exporter/importers for 3dsmax. http://www.katsbits.com/tools, Importing and exporting works. The model must be textured, UV'd, with a skin modifier attached to the bones to export. PM me (Kingsal) for help with this. Imported models using the script will not be weighted appropriately, so this is not recommended if you are simply trying to edit existing tdm content. (Use blender instead) MAYA 2011 32bit md5.mesh - So far I've not had any luck with Maya 2011. I am using Greebo's MayaImportx86 for Maya 2011. I've got the importer working however I get a "Unexpected Internal Failure(kFailure)" and the import fails. This could be due to something finicky in Maya that I am not doing correctly. Will keep trying.. Blender 2.7 about - Blender is commonly used and pretty well supported on the forums/ wiki. Various versions may work as well - https://www.blender.org/download/ md5.mesh / animation Blender MD5 importer/exporter (io_scene_md5.zip): https://sourceforge.net/projects/blenderbitsbobs/files/ Sotha's guide Blender Male/ Female rigs by Arcturus - Here Edit by Dragofer: more links found in this post.
-
For the people eager to play with the latest state of development, two things are provided: regular dev builds source code SVN repository Development builds are created once per a few weeks from the current trunk. They can be obtained via tdm_installer. Just run the installer, check "Get Custom Version" on the first page, then select proper version in "dev" folder on the second page. Name of any dev version looks like devXXXXX-YYYY, where XXXXX and YYYY are SVN revision numbers from which the build was created. The topmost version in the list is usually the most recent one. Note: unless otherwise specified, savegames are incompatible between any two versions of TDM! Programmers can obtain source code from SVN repository. Trunk can be checked out from here: https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/ SVN root is: https://svn.thedarkmod.com/publicsvn/darkmod_src Build instructions are provided inside repository. Note that while you can build executable from the SVN repository, TDM installation of compatible version is required to run it. Official TDM releases are compatible with source code archives provided on the website, and also with corresponding release tags in SVN. A dev build is compatible with SVN trunk of revision YYYY, where YYYY is the second number in its version (as described above). If you only want to experiment with the latest trunk, using the latest dev build gives you the maximum chance of success. P.S. Needless to say, all of this comes with no support. Although we would be glad if you catch and report bugs before the next beta phase starts
- 16 replies
-
- 15
-
-
-
Hello and good evening to everyone reading this. After calling up FM Displaced for the first time on an installation of TDM 2.12/64 that had been working for years, I got an error message, which I have attached as a text file. Can someone please tell me what it means and whether I can expect it to happen again after I uninstalled and reinstalled the game because I no longer had access to it? I have played FM about 30 times and never had a problem with performance. Thank you very much. Translated with DeepL.com (free version) fehler tdm.txt
-
Is there a script command to make a screenshot?
I just though it could be interesting to be able to create a screenshot at a certain point in time. Then use that screenshot possibly in a debrief.
I guess the second question is: Can you use a (in-game made) screenshot in a (debrief) gui?
-
NPCs tracking player with their heads and torso - procedural animation
stgatilov replied to Arcturus's topic in The Dark Mod
I booted into Inn Business FM and got these warnings: WARNING:script\tdm_ai_head_tracking_humanoid.script(245): Thread 'ai_darkmod_base::updateHeadTrackLoop': Tried to call function on non-existent entity (#805) WARNING:script\tdm_ai_head_tracking_humanoid.script(246): Thread 'ai_darkmod_base::updateHeadTrackLoop': Tried to call function on non-existent entity (#805) WARNING:script\tdm_ai_head_tracking_humanoid.script(245): Thread 'ai_darkmod_base::updateHeadTrackLoop': Tried to call function on non-existent entity (#805) WARNING:script\tdm_ai_head_tracking_humanoid.script(246): Thread 'ai_darkmod_base::updateHeadTrackLoop': Tried to call function on non-existent entity (#805)- 14 replies
-
- procedural
- animation
-
(and 2 more)
Tagged with:
-
Mandrasola is a small sized map in which aspiring thief Thomas Porter steals some herbal products from a smuggler. The mission was created by me, Sotha and I wish to thank Bikerdude, BrokenArts and Ocn for playtesting and voice acting. Thanks goes naturally to everyone contributing and making TDM possible. This mission occurs chronologically before the Knighton's Manor, making it the first mission in the Thomas Porter series. Events in chronological order are: Mandrasola, The Knighton's Manor, The Beleaguered Fence, The Glenham Tower and The Transaction. The winter came early and suddenly this year. Weeks of strong blizzards and extremely harsh cold weather hit Bridgeport hard. With the seas completely frozen, a rare occurence indeed, most of the City harbor commerce has stopped completely. Vessels are stuck in the ice and no ship can leave or enter the City, resulting in the availability imported goods declining and their prices skyrocketing. One of these imported items is Mandrasola, a rare herbal product, which is imported overseas from the far southern continents. Mandrasola has its uses in alchemical cures and poisons, but mostly this substance is used for its narcotic qualities by commoners and even the nobility. The problem with Mandrasola is that excessive use is extremely addicting and the withdrawal effects are most grievious. Many are utterly incapable of stopping using Mandrasola and are transformed into quivering human ruins if they do no get their daily dose. And now this expensive and rare substance is running out from the whole City. Me and my fence, Lark Butternose, would love to grab this monopoly to ourselves: selling the last few doses in the City would probably be worth a fortune. According to Lark's sources, there remains only one smuggling lord who still has Mandrasola in stock. The problem is that this individual maintains an exclusive clandestine operation and only supplies a few nobles. Despite our best information gathering efforts we couldn't learn who the smuggler is and where he or she operates. Luckily we have an alternate plan. While searching for Mandrasola related information, we learned that a noblewoman called Lady Ludmilla is addicted to the substance and has paid high prices for small amounts of it. We also know that she has visited frequently someone in the Tanner's Ward waterfront, and since she goes to the area personally we believe she is visiting the smuggler. The plan is simple: I must monitor Ludmilla's most likely entryway to the Waterfront and then follow her to the smugglers hideout. I'd better be very careful around Ludmilla. She must not realise I'm following her or she probably won't lead me to her dealer. Hurting her is also out of the question. After she leads me to the smuggler's hideout, I can take my time to break in carefully and steal all the Mandrasola I can find. While I'm there it wouldn't be a bad idea to grab some loose valuables as well. I've now waited in the blistering cold for a few hours already. Looks like there are a few city watch patrols in the area to complicate matters... I think I heard a womans voice beyond the north gate. That must be lady Ludmilla, I haven't seen many ladies in these parts. I'd better get ready.. Links: Use the ingame downloader to get it. WARNING! Someone always fails to use spoiler tags. I do not recommend reading any further until you've played the mission.
-
EDIT: Here's a script that exports smaller md5anim files and doesn't require baking: I tested this addon for importing and exporting md5.mesh and md5.anim in Blender: https://github.com/KozGit/Blender-2.8-MD5-import-export-addon It works with Blender 3.6.15 which is the latest version in the 3.0 series. It doesn't work with Blender 4.2. It seems that the culprit is the change in the 4.0 series from bone layers to bone collections. Here's an updated .blend file with male NPC animations. .blend file with a female model Like before: use armature_control to animate the model when you're done, select the tdm_ai_proguard armature object and Bake Action to Pose; select Visual Keying for the exporter to work you need to select both the tdm_ai_proguard and a mesh object that's being animated, e.g. proguard_armor
-
NPCs tracking player with their heads and torso - procedural animation
Arcturus replied to Arcturus's topic in The Dark Mod
tdm_ai_head_tracking_humanoid.script I swapped idle anim with a t-pose to see what's going on. And it looks ok, head joint doesn't seem to cause too many issues. There is a small stutter when random idle starts, for example at 1:23 monk's head is a bit jerky. Random head turn is disabled when tracking begins. But they also turn around when they talk to each other, that doesn't count as random head turning. Anyone knows how to disable those? Tracking pauses when random idle animations play. Main idle animation has those stupid sways. Here you can see some stutters on the head joint. Perhaps swaying back and forth in the idle anim causes some issues?- 14 replies
-
- procedural
- animation
-
(and 2 more)
Tagged with:
-
Another procedural animation I've been playing with. There is already predefined "look at" event in the game. When I set up NPC to look at the path node it was a little buggy. Anyone tried to set up NPCs looking at player? They do seem to look up when they throw stones. tdm_ai_head_tracking_humanoid.script
- 14 replies
-
- 4
-
-
- procedural
- animation
-
(and 2 more)
Tagged with:
-
Doom3 GPL contained most of the source of the script debugger that used to be part of Quake4. Harrie van Ginneken fixed it for dhewm3 by implementing the missing parts and we further improved it together (I maintain dhewm3). I ported that to TDM. It allows you to set breakpoints in script functions (by clicking to the left of the line number, where that red dot appears then), so when those lines are executed the game is paused and you can inspect variables in the debugger, or continue running the script line-wise (with those little buttons with the arrows at the top, or F11/F10/Shift-F11, see also the "Debug" menu. To continue running the game (until it hits the next breakpoint), click that ▶︎ button at the top. You can download a testbuild and read some more information at https://github.com/stgatilov/darkmod_src/pull/6 - it should work with the latest 2.14 Beta gamedata. Note that this is currently not officially part of The Dark Mod and I don't know when (or if) it will be merged. Might be after 2.14 if the changes are considered too risky or too much to review or whatever.
-
I think they're both very good. And, I say that even though I'm not into shooters too much. But, especially Quake 2 is a fantastic game. I know that some people complained about Quake 2 remaster, for whatever reason. There are the occasional post or two on the Steam forums as well, made by single people. Everyone else seems to thoroughly enjoy the game.
-
How to Teleport AI with Bind/Def_Attached Props
Dragofer replied to Jnon's topic in TDM Editors Guild
I did exactly this in One Step Too Far using def_attached props and a small script that activated teleportation entities: void MenReturn() //thugs return to their house on the beach { sys.wait(10); sys.trigger($danger_ambient); $woodsman_teleport1.activate($Woodsman1); $woodsman_teleport2.activate($Woodsman2); $woodsman_teleport3.activate($Woodsman3); $woodsman_teleport4.activate($Woodsman4); sys.trigger($start_AI); $boat1.setOrigin('-8084 30528 -13452'); $boat2.setOrigin('-8512.1 30535.5 -13453.4'); sys.trigger($gold_bar_hint_speaker); $player1.replaceInvItem($BookFog,$null_entity); //BookFog is removed $player1.addInvItem($BookMen); //player receives BookMen sys.trigger($BookMenAcquireSound); //plays a sound when receiving the book $Window_Porch_Outside.Close(); //bugfix thread BookMenPost(); sys.wait(50); $danger_ambient.fadeSound(SND_CHANNEL_ANY, -30, 20); sys.wait(20); sys.trigger($danger_ambient); } thugs.pfbx def_attach, besides binding the prop at the correct position, angle and bindpoint defined in the prop definition, can also alter animations and various behind the scenes work to make the AI work well with that prop. I think it should also be possible to bind a prop entity after the map has started and achieve the same effect, but haven't tried and you would probably need a supporting script to calculate the correct position. If you bind a normal moveable entity or even a func_static it'll just be a visual model next to the AI, which is fine for keys but not for lamps etc. Normally bound entities should follow the parent entity's position and rotation around exactly, including when it's teleported. If the teleport entity leaves bound entities behind it's a bug that should be reported - may be worth isolating that into a test map and filing an issue on the bugtracker. It's surprising to me since almost all AIs have def_attached props (i.e. weapons) and a lot of mappers have used the teleport entities before. -
Hello again TDM Forums. I'm close to finishing a new FM, "The Maybury Idol, Part 1: A Trip to the Museum", and I'd like to request help with beta testing. Any assistance is appreciated, thanks.
-
Unreal engine now has a tool for single-camera, markerless motion capture. Supposedly based on this tech: https://meshcapade.com/ It’s far from perfect, but definitely usable. It’s free and offline. https://dev.epicgames.com/documentation/metahuman/getting-started-with-metahuman-animator https://forums.unrealengine.com/t/epic-games-metahuman-animator-markerless-motion-capture-plugin/2729293/6 Position of hands and feet can be adjusted manually to some extend using retargeting tools.
- 17 replies
-
- 1
-
-
- motion capture
- blender
-
(and 4 more)
Tagged with: