Search the Community
Searched results for '/tags/forums/missions/' or tags 'forums/missions/q=/tags/forums/missions/&'.
-
Websites prove their identity via certificates, which are valid for a set time period. The certificate for forums.thedarkmod.com expired on 10/18/2024. Error code: SEC_ERROR_EXPIRED_CERTIFICATE
-
I edited my video description, I included a link to your bug report post for training missions as well
-
Proposal: Flashbombed AI's become Blackjackable
nbohr1more replied to chumbucket91's topic in I want to Help
I like it! Now we gotta get some mission authors to chime in. I don't know if any missions that rely on guards being BJ immune during flashbomb for proper difficulty but I'm no expert on difficulty tuning. Probably should have a CVAR to enable the behavior change. -
Yeah, let's come back to Thief. I don't really care if I play a male or female character especially when from a first person perspective, in many games you can select your gender anyway! But speaking of this, are there any TDM missions were you don't play the typical male "Garret-typ" character?
-
I never noticed this before, and I hope there isn't a thread on this already. I checked and didn't see one, but I could be missing it as easily as I miss loot. The missions come up sorted by date, and that's the way I like it, and I selected the newest one for downloading. New missions I downloaded recently weren't showing, and I thought they usually showed up even though they were already on my computer. So I thought maybe the list needed to be refreshed. I selected to sort by title and saw that the mission I had selected for download changed. I figured it wouldn't really download the one it changed to, and went ahead and hit the button to download, and I'm not sure what it did. But the mission it changed to was already on my computer, and the new one I wanted did not download. I tried a few other things to try to figure out what was going on, and I'm not organized enough to figure out what appears to be happening, but if this is really an issue, it appears to be that the system is grabbing a specific spot on the database, and a resort keeps the spot(s) chosen, not recognizing that the newly sorted titles have moved into those spot(s). I tried selecting 3 titles for download, resorted, and one selected title stayed the same but the other two changed to something else. It isn't a big problem, you can get anything you want to get by not resorting, just thought I'd point this out and once again, sorry if this is well known, I couldn't find it in a topic.
-
I use the "period" key to holster the weapons, easy to define any other in the key settings (I use mostly the mouse to play and interact, 5 buttons). Desactivating the console IMHO isn't a good idea, sometimes it is needed, eg. in some missions are points where you can get stucked, only possible to get out with "noclip". I'm not a friend from cheats, but in big new missions with a complex content, it's good to have it at hand for some tests. Normally using cheats only in some old missions, which I had played already several times, to experiment something different, eg, spawning a Spider, with often hilarious reactions of the guards, things like this.
-
I think you bring up an interesting point here! It would definitely be interesting to learn some statistics. How many active players of TDM are there? ("Active"=plays at least once a month?) How many yearly downloads of the installers (Windows and Linux)? How many unique downloads of missions? How many unique visitors to the official webpage / wiki page / forum page / bugtracker?
-
Luckily, TDM is one of the few games I bother to play. So I ask here, in 2025, how much VRAM do TDM missions need at highest settings? I guess there could be some large variance since mappers are free to use custom models and textures, and pack more stuff into scenes.
-
There are multiple mappers and active users using Linux. You want less missions? Also: Windows costs money. You ask people to buy Windows for a backup pc, while TDM is in fact multiplatform. I don't know how long tdm is multiplatform, but it must be a while. Listen Valve, Wesp says: Linux gamers are not normal gamers. Why is this relevant?
-
https://i.imgur.com/aZtjILo.png I know it says "translation" but why does this only appear on missions I've done? I'd rather missions in my fms folder to not appear at all in the download list.
-
And what would this be? Some hardcore Linux gamers that don't have a backup Windows machine? How many of those would play the game compared to all the normal gamers who had access to TDM for decades? Does anybody even know how many people regularily play TDM missions?
-
Fan Mission: Seeking Lady Leicester, by Grayman (3/21/2023)
Gerberox replied to Amadeus's topic in Fan Missions
I often have a feeling that this or that mission is 70% and another author could have helped to make it much better. For example, there was a guy with his first mission, the map was excellent but there were few guards, it was too easy. Cooperation seems to be rare and now we can play an okay mission and not an excellent one in that case. Official or not official I cannot care less. Good missions are good missions, and that's what matters. Like this mission. Easily part of my top 10. -
Personal reminder for me to actually get back to TDM and all the missions I missed.
- Show previous comments 4 more
-
-
-
In that case, I'll add you as friend on GOG, its about time I put some acquaintances and friends on there.
-
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.
-
Story: "Sir Barrington, as he likes to be known, enjoys a prestigious reputation of having lavish yet intimate dinner parties. I've heard the tales about what goes on in the noble's dining room, but I believed none of them 'till now. Orbach, a local shop-keep who makes special deliveries to the people of 'high stature' heard Sir Henry Hughbellow raving about Sir Barrington's special 'Elixir', It cures your ails and gives you vigor... By the Hammer, it extends your very life! he exclaimed. Orbach begged Sir Henry for a small sample, and after one sip he was sure that the potion was nothing more than mineral water and spirit. He asked Sir Henry if other folks were as fond of the elixir as he was, and he found out that folks are paying handsomely for these small vials on a weekly basis. Some lords pay for exclusive treatments and bathe in the tonic. Lord Barrington even brings in an occult expert every month, where supposedly the power of the elixir is renewed by the full moon. Never one to pass up the opportunity for a good scam, Orbach has decided to take a cut of this 'elixir' business. He has made an elixir of his own, but needs to convince Sir Henry that it's really the same as the 'magical' tonic that Lord Barrington has been selling. And that's where I come in. Its rumered that Sir Barrington's prized possession is a painting of the revolutionary inventor 'Guillermo de Sohase' the day after he won the Battle of Billinsdune. If I can steal this painting, Orbach can use it to 'prove' that he also got the elixir from Sir Barrington. Once Sir Henry tells all his friends that Orbach's stolen elixir is healing his heart, soothing his pains, and igniting his libido, they'll be lining up at his shop. Its time to go." Build Time: Version 1.0 was speed build of sorts, to build upon Springheels video's with the new modules. Took roughly 20hrs to build but this ended up happening over the space of a few months.http://forums.thedarkmod.com/topic/18808-bikerdudes-speedish-build-using-the-new-modules/?hl=%2Bspeed+%2BbuildThanks: Co-auther: Obstortte for all his custom entities, scripting and showing me a thing or two about perfing.Resource: Springheel - new modulesReadables: nbhor1moreTesters: Bienie, Judith, Abusimplea, Cambridge Spy, Gerberox, MayheM, Amadeus, Goldwell, nbhor1more.Download: - mega Info: Repeat after me, "Read and explore, Read and explore"Known issues: This mission has been heavily tweaked and worked on to provide a playable experience for even low end machines.For very low end PC's please make use of the in-game LOD slider, as not only are details reduced, but the ambient_world fog is removed at the lowest setting.The medium difficulty is partially broken, the mission wont end when the player gets to the exit location. As this is the only issue with that difficulty level, I will fix this when I next update it to include the intro.
- 105 replies
-
- 20
-
-
A famous painting is on display at the local museum. Steal it, of course! ------------------------------------------------------------------------------------ An update, version 3, is now available (19 March 2025). The mission has a new look and feel (well, look and sound), thanks to the talents of @JackFarmer. Changes include: * A new briefing video (courtesy of @JackFarmer) * Several new ambient tracks that cover much of the map (again, credit to @JackFarmer) * Subtitles, provided by @datiswous (better late than never) * Several fixes for other little issues that were found since version 2 was released. The mission downloader has been updated with this version. ------------------------------------------------------------------------------------ An update, version 2, is now available: (use Version 3). This fixes many of the problems found by those who played version 1. Besides general clean up, the primary goal of this version is to Special thanks to Bikerdude, whose did a quick beta test of this version and whose suggestions I mostly (but not completely) implemented. ------------------------------------------------------------------------------------ Title: Now and Then Author: joebarnin Briefing video and ambient tracks: JackFarmer Date of release: 08 September 2020 (Version 2: 25 January 2021) (Version 3: 19 March 2025) Version: 3 EFX: Yes Requires: TDM 2.12 Author: joebarnin Gameplay notes Thorough investigation is encouraged. Scary AIs: No spiders, skeletons, undead, or ghosts. One live rat and one dead one. Makes use of the 'peek' ability, allowing the player to peek through a keyhole by leaning forward. The use of this ability is optional (it is never necessary resolve the mission). Thanks to: Beta Testers: Cambridge Spy, thebigh, JackFarmer, Amadeus, Kerry000, wesp5 Voice actor: Mike Components: Builder Compound models & textures - Peter Spy (dr.judym81@gmail.com) Museum painting lights - Grayman Gramophone with record - Goldwell & Epifire Custom ambients - JackFarmer Main menu screen & music - JackFarmer Ambients - Orbweaver Many many modules - Springheel https://freesound.org/people/LucasDuff/sounds/467697/ https://freesound.org/people/humanoide9000/sounds/422245/ Thanks to Springheel, Sotha, and Fidcal for their tutorials. I keep going back to them and I always learn something new. Notes Slight spoiler: Fun fact: I have released 3 missions, each almost exactly one year apart: Mission of Mercy - September 14, 2018 The Heart of St. Mattis - September 10, 2019 Now and Then - September 8, 2020. Not by design, it just worked out that way. So I guess look for my next mission in early September next year! Hints (contains spoilers)
- 159 replies
-
- 15
-
-
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
- 2 replies
-
- 15
-
-
-
As a community-driven game, optimization of the mission environment for lighter or more outdated computer systems is not expected to be uniform. Not only will missions differ in how much they use basic best practices, but some will push the envelope where most others did not. The topic is: "What missions do you notice a great achievement in optimizing the world?" "What missions are well or fairly well optimized?" With humble admiration, Boiler Dunce
-
Thought it would be a good idea to collate a useful list for new and old mappers alike and this post will update as we go. Abandoned works: Any WIP projects that were abandoned by the original author - http://forums.thedarkmod.com/topic/12713-abandoned-works/ Darkradiant & Darkmod shortcut settings: Some example settings for new mappers - http://forums.thedarkmod.com/topic/15152-darkradiant-and-darkmod-shortcut-folder-settings/ Darkradiant howto, must knows, tips and faqs - http://forums.thedarkmod.com/topic/12558-usefull-important-editing-links/?do=findComment&comment=272581 Info for Beginners: Newbie DarkRadiant Questions - http://forums.thedar...iant-questions/ Dark Radient Must Know Basic Intro - http://wiki.thedarkm...now_Basic_Intro Editing Tips for Beginners - http://wiki.thedarkm...s_for_Beginners Editing FAQ (Troubleshooting & How-To) - http://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To Sotha's excellent Mapping Tutorial series: http://forums.thedarkmod.com/topic/18680-lets-map-tdm-with-sotha-the-bakery-job/ Springheel's New Mapper's Workshop: http://forums.thedarkmod.com/topic/18945-tdm-new-mappers-workshop/ Inspiration: Collection of screenshots and images people have found online - http://forums.thedarkmod.com/topic/11610-darkmod-inspiration-thread/ Mapping Resources: List of Voice actors available for voice recording - http://modetwo.net/d...6-voice-actors/ Lengthy collection of city reference pictures - http://modetwo.net/d...rence-pictures/ Collection of texture resource sites - http://modetwo.net/d...ture-resources/ Free Ambient Tracks - http://skeksisnetlabel.wordpress.com/2009/12/30/10-songs-for-free-download-vol-10-full-moon-over-noricum/ Mapping Tools: 3 useful tools for texture creation - http://forums.thedarkmod.com/topic/18581-must-have-tools-for-the-descerning-mapper/ Modular Building: What is Modular building - http://forums.thedarkmod.com/topic/14832-modular-building-techniques/ Working example tutorial on modular building - http://forums.thedarkmod.com/topic/18680-lets-map-tdm-with-sotha-the-bakery-job/ Springheels new modular models - http://forums.thedarkmod.com/topic/18683-using-springheels-205-modules/ Some related mapper recipies - Easy Vaults - http://forums.thedarkmod.com/topic/14859-easy-vault-recipe/?hl=%2Beasy+%2Brecipe Easy Outdoors - http://forums.thedarkmod.com/topic/16159-easy-outdoors-recipe/?hl=%2Beasy+%2Brecipe Easy Caverns - http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/?hl=recipe Easy Alert Ai - http://forums.thedarkmod.com/topic/17157-easy-alert-ai-recipe/?hl=%2Beasy+%2Brecipe Easy Alert Ai Custom Behavour - http://forums.thedarkmod.com/topic/17160-easy-alert-ai-custom-behavior-recipe/?hl=recipe Tutorials: Collection of video tutorials for DR - http://modetwo.net/d...in-darkradiant/ Using Lighting and detail effectively: - http://forums.thedar...l-and-lighting/ Voice Actors list: List of available voice actors - http://forums.thedarkmod.com/topic/12556-list-of-available-voice-actors/ Usefull Console commands: A list of console commands for testing in-game - http://wiki.thedarkm...Useful_Controls
- 21 replies
-
- 3
-
-
- inspiration
- tools
-
(and 4 more)
Tagged with:
-
TDM Modpack 5.0 Compatible with The Dark Mod 2.13 (only!). The download link can be found in the opening post. Introducing... ~ THE LIGHT STONES ~ The shortcomings of the Light Gem come from the fact that we normally have nothing to compare its luminosity with and it is many times difficult to tell how lit we are. Fully concealed? Slightly lit? Besides, no wonder the original creator(s) of the Light Gem had to come up with the red frame because at some point it is impossible to discern medium from high brightness. The Light Gem has served us well but the time to mod it has come. Inspired by a comment by @Zerg Rush here is my take on the light indicator: This new light indicator does not make use of the red color. As far as usability goes I think it is best that we stick to yellow for light, red for health and blue for air. The Light Stones mod probably isn't the perfect solution but a step in the right direction for sure and the best thing of all is that I didn't touch a single line of code: the effect is achieved by simply altering five images. Light levels are calculated by the game engine the same as always but the outputs are displayed differently now. Love it? Hate it? See the Light Stones in action and let us know what you think! This mod is available in all missions. ~ Visually Visible Player Weapons ~ On the subject of light, according to the Light Gem Stones having the bow or the sword sheathed make you a tad more visible and I thought we could organically let players know by making these weapons "visually visible" in the dark. While I was at it I also made the Blackjack slightly visible for players to be able to discern its texture in very dark conditions instead of seeing a black shape. The change in the blackjack is minimal and I don't expect any complaint. This little tweak is included in Core Essentials and it is available in all missions except in A House of Locked Secrets, Hazard Pay and Noble Affairs. ~ Modpack Settings ~ Up until now we used an external file to configure some controls and now this functionality has been built into the game and the "Auto Commands" mod has been decommissioned. Simply click on the Modpack banner in the Main Menu to access this screen and setup controls to your liking: I haven't figured out yet how to detect if a particular mod is installed and this screen is always the same regardless of whether you have a mod or not. I will look to improve this in the future. ~ Inventory Menu ~ In previous iterations of the Modpack the Inventory Menu has gone through several visual and functional upgrades and this time thanks to @datiswous and @nbohr1more we can change the sorting of the items: ~ Flash Grenade & Shock Mine Mods ~ There's nothing new for players in these mods but I want to stop here for a second to say something. When creating mods I not only do my best to make them compelling and compatible with most missions but I also try to anticipate what mappers might do. The Flashbomb had never been modded by any mapper but due to some limitations during the 2.11 times the Flash Grenade mod was doomed to break a mission and it eventually happened in Kingsal's Moongate Ruckus. Despite it being my problem I wasn't sure how to tackle the situation and Kingsal was very kind and in an update he included a fix in his mission to avoid the incompatibilities. @kingsal, I once asked you include the file "def/tdm_playertools_flashbomb.def" in "Moongate Ruckus". I finally had time to review my mod in detail and make it as resilient as possible so feel free to remove the file in your next update. Thank you very much for your understanding. On a side note, the Shock Mine mod was also created during the 2.11 times and it has now received a similar treatment and the modded mine shouldn't break anything in the long run. ------------------------------------------------------------------------- Fellow @wesp5, For this release I revisited and updated most of the mods and some are of your concern: The bottle fragment in the "Fragile Bottles" mod used to replace the original entity but I changed it to replace only the model (and the skin) thus preserving the entity. This approach is way safer to guarantee compatibility with crazy stuff mappers might do. By default, FPS are uncapped in 2.13 and the "Blinking Items" and the "Loot Animations" mods have received and update to make them feel more or less the same under any FPS. Consider updating these mods in the Unofficial Patch. ------------------------------------------------------------------------- Once again, thanks @Dragofer for making standalone mods possible, thanks @stgatilov for everything you do, thanks @taaaki for hosting the game and maintaining this place and, last but not least, thanks @nbohr1more for all the house keeping. Here is the full change log (the download link can be found in the opening post): • v5.0 New release - Compatible with TDM 2.13 (only). - LIGHT STONES: Initial release. - AUTO COMMANDS: Decommissioned (replaced with an in-game menu). - CORE ESSENTIALS - MISC: Player weapons are visually visible in the dark. - CORE ESSENTIALS - MISC: The inventory grid/menu allows sorting items. - CORE ESSENTIALS - MISC: Inventory count removed for non-stackable items. - CORE ESSENTIALS - SMART OBJECTS: Added names to some actors / ragdolls. - CORE ESSENTIALS - FRAGILE BOTTLES: Bottle fragment now replaces the model instead of the entity. - CORE ESSENTIALS - LOOT ANIMATIONS: Mod revisited to make it work nicely with high FPS. - CORE ESSENTIALS - BLINKING ITEMS: Mod revisited to make it work nicely with high FPS. - FLASH GRENADE & SHOCK MINE: Removed potential incompatibilities with future missions. - SHOCK MINE: Shop price doubled (80 gold now). - SKILL LOOP: Final update to make it more versatile in destination. Happy Taffing!
-
Not that I'd want to discuss about what's the "best", but, there are a lot of insanely good fan missions for Thief and Thief II out there. For some examples: The Scarlet Cascabel, Malazar's Inscrutable Tower, Behind Closed Doors, Windows of Misfortune, Lost Among The Forsaken. That said, Iris is great, and surely up there with the best TDM missions. I must admit I had more fun with Thief and Thief II missions as of late though. Something about the original game's base which has a bit the edge over TDM in terms of atmosphere and character, and, also FM authors which really know about fun gameplay and mission architecture.
-
If you have them installed (using the mission downloader) and they are the most up-to-date version, they won't show up in the mission downloader. It depends on the entry in the fms/missions.tdminfo file. @joebarnin, is that the case for your machine? When I do a test search, Now and Then and The Heart of Saint Mattis show up for me. Tech Info After installation, The Heart of Saint Mattis is excluded from the downloadable list. fms/missions.tdminfo: tdm_missioninfo heartstmattis { "downloaded_version" "2" } If "downloaded_version" is manually changed to "1", The Heart of Saint Mattis is included in the downloadable list with an update available mark (*). fms/missions.tdminfo: tdm_missioninfo heartstmattis { "downloaded_version" "1" } Deleting the missions.tdminfo entry will also make it show up in the downloadable list.
-
Hi folks, and thanks so much to the devs & mappers for such a great game. After playing a bunch over Christmas week after many years gap, I got curious about how it all went together, and decided to learn by picking a challenge - specifically, when I looked at scripting, I wondered how hard it would be to add library calls, for functionality that would never be in core, in a not-completely-hacky-way. Attached is an example of a few rough scripts - one which runs a pluggable webserver, one which logs anything you pick up to a webpage, one which does text-to-speech and has a Phi2 LLM chatbot ("Borland, the angry archery instructor"). The last is gimmicky, and takes 20-90s to generate responses on my i7 CPU while TDM runs, but if you really wanted something like this, you could host it and just do API calls from the process. The Piper text-to-speech is much more potentially useful IMO. Thanks to snatcher whose Forward Lantern and Smart Objects mods helped me pull example scripts together. I had a few other ideas in mind, like custom AI path-finding algorithms that could not be fitted into scripts, math/data algorithms, statistical models, or video generation/processing, etc. but really interested if anyone has ideas for use-cases. TL;DR: the upshot was a proof-of-concept, where PK4s can load new DLLs at runtime, scripts can call them within and across PK4 using "header files", and TDM scripting was patched with some syntax to support discovery and making matching calls, with proper script-compile-time checking. Why? Mostly curiosity, but also because I wanted to see what would happen if scripts could use text-to-speech and dynamically-defined sound shaders. I also could see that simply hard-coding it into a fork would not be very constructive or enlightening, so tried to pick a paradigm that fits (mostly) with what is there. In short, I added a Library idClass (that definitely needs work) that will instantiate a child Library for each PK4-defined external lib, each holding an eventCallbacks function table of callbacks defined in the .so file. This almost follows the idClass::ProcessEventArgsPtr flow normally. As such, the so/DLL extensions mostly behave as sys event calls in scripting. Critically, while I have tried to limit function reference jumps and var copies to almost the same count as the comparable sys event calls, this is not intended for performance critical code - more things like text-to-speech that use third-party libraries and are slow enough to need their own (OS) thread. Why Rust? While I have coded for many years, I am not a gamedev or modder, so I am learning as I go on the subject in general - my assumption was that this is not already a supported approach due to stability and security. It seems clear that you could mod TDM in C++ by loading a DLL alongside and reaching into the vtable, and pulling strings, or do something like https://github.com/dhewm/dhewm3-sdk/ . However, while you can certainly kill a game with a script, it seems harder to compile something that will do bad things with pointers or accidentally shove a gigabyte of data into a string, corrupt disks, run bitcoin miners, etc. and if you want to do this in a modular way to load a bunch of such mods then that doesn't seem so great. So, I thought "what provides a lot of flexibility, but some protection against subtle memory bugs", and decided that a very basic Rust SDK would make it easy to define a library extension as something like: #[therustymod_lib(daemon=true)] mod mod_web_browser { use crate::http::launch; async fn __run() { print!("Launching rocket...\n"); launch().await } fn init_mod_web_browser() -> bool { log::add_to_log("init".to_string(), MODULE_NAME.to_string()).is_ok() } fn register_module(name: *const c_char, author: *const c_char, tags: *const c_char, link: *const c_char, description: *const c_char) -> c_int { ... and then Rust macros can handle mapping return types to ReturnFloat(...) calls, etc. at compile-time rather than having to add layers of function call indirection. Ironically, I did not take it as far as building in the unsafe wrapping/unwrapping of C/C++ types via the macro, so the addon-writer person then has to do write unsafe calls to take *const c_char to string and v.v.. However, once that's done, the events can then call out to methods on a singleton and do actual work in safe Rust. While these functions correspond to dynamically-generated TDM events, I do not let the idClass get explicitly leaked to Rust to avoid overexposing the C++ side, so they are class methods in the vtable only to fool the compiler and not break Callback.cpp. For the examples in Rust, I was moving fast to do a PoC, so they are not idiomatic Rust and there is little error handling, but like a script, when it fails, it fails explicitly, rather than (normally) in subtle user-defined C++ buffer overflow ways. Having an always-running async executor (tokio) lets actual computation get shipped off fast to a real system thread, and the TDM event calls return immediately, with the caller able to poll for results by calling a second Rust TDM event from an idThread. As an example of a (synchronous) Rust call in a script: extern mod_web_browser { void init_mod_web_browser(); boolean do_log_to_web_browser(int module_num, string log_line); int register_module(string name, string author, string tags, string link, string description); void register_page(int module_num, bytes page); void update_status(int module_num, string status_data); } void mod_grab_log_init() { boolean grabbed_check = false; entity grabbed_entity = $null_entity; float web_module_id = mod_web_browser::register_module( "mod_grab_log", "philtweir based on snatcher's work", "Event,Grab", "https://github.com/philtweir/therustymod/", "Logs to web every time the player grabs something." ); On the verifiability point, both as there are transpiled TDM headers and to mandate source code checkability, the SDK is AGPL. What state is it in? The code goes from early-stage but kinda (hopefully) logical - e.g. what's in my TDM fork - through to basic, what's in the SDK - through to rough - what's in the first couple examples - through to hacky - what's in the fun stretch-goal example, with an AI chatbot talking on a dynamically-loaded sound shader. (see below) The important bit is the first, the TDM approach, but I did not see much point in refining it too far without feedback or a proper demonstration of what this could enable. Note that the TDM approach does not assume Rust, I wanted that as a baseline neutral thing - it passes out a short set of allowed callbacks according to a .h file, so language than can produce dynamically-linkable objects should be able to hook in. What functionality would be essential but is missing? support for anything other than Linux x86 (but I use TDM's dlsym wrappers so should not be a huge issue, if the type sizes, etc. match up) ability to conditionally call an external library function (the dependencies can be loaded out of order and used from any script, but now every referenced callback needs to be in place with matching signatures by the time the main load sequence finishes or it will complain) packaging a .so+DLL into the PK4, with verification of source and checksum tidying up the Rust SDK to be less brittle and (optionally) transparently manage pre-Rustified input/output types some way of semantic-versioning the headers and (easily) maintaining backwards compatibility in the external libraries right now, a dedicated .script file has to be written to define the interface for each .so/DLL - this could be dynamic via an autogenerated SDK callback to avoid mistakes maintaining any non-disposable state in the library seems like an inherently bad idea, but perhaps Rust-side Save/Restore hooks any way to pass entities from a script, although I'm skeptical that this is desirable at all One of the most obvious architectural issues is that I added a bytes type (for uncopied char* pointers) in the scripting to be useful - not for the script to interact with directly but so, for instance, a lib can pass back a Decl definition (for example) that can be held in a variable until the script calls a subsequent (sys) event call to parse it straight from memory. That breaks a bunch of assumptions about event arguments, I think, and likely save/restore. Keen for suggestions - making indexed entries in a global event arg pointer lookup table, say, that the script can safely pass about? Adding CreateNewDeclFromMemory to the exposed ABI instead? While I know that there is no network play at the moment, I also saw somebody had experimented and did not want to make that harder, so also conscious that would need thought about. One maybe interesting idea for a two-player stealth mode could be a player-capturable companion to take across the map, like a capture-the-AI-flag, and pluggable libs might help with adding statistical models for logic and behaviour more easily than scripts, so I can see ways dynamic libraries and multiplayer would be complementary if the technical friction could be resolved. Why am I telling anybody? I know this would not remotely be mergeable, and everyone has bigger priorities, but I did wonder if the general direction was sensible. Then I thought, "hey, maybe I can get feedback from the core team if this concept is even desirable and, if so, see how long that journey would be". And here I am. [EDITED: for some reason I said "speech-to-text" instead of "text-to-speech" everywhere the first time, although tbh I thought both would be interesting]
- 25 replies
-
- 3
-
-
Done, and I still have the same problem. But I could narrow it down a bit! Before I moved my fms folder over everything worked fine, but once I did the error occurred when switching e.g. between the two official missions. Copying only my missions.tdminfo didn't cause it. So one of the other missions must have introduced the problem, but I wasn't aware that TDM does even look at other missions besides the one you have selected. Or does it?
-
As I wrote, if I remember correctly somebody complained about this and I fixed it. But indeed I'd rather remove this small detail than split the patch into multiple versions! Maybe somebody with access and knowledge about AI picture creation could make a "real" TDM world map in Middle Earth style where all the locations that are ever mentioned in missions are visible without it looking like somebody just took a free stock picture and slapped Bridgeport on it?