Jump to content
The Dark Mod Forums

Search the Community

Searched results for '/tags/forums/a script/' or tags 'forums/a script/q=/tags/forums/a script/&'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • News & Announcements
    • The Dark Mod
    • Fan Missions
    • Off-Topic
  • Feedback and Support
    • TDM Tech Support
    • DarkRadiant Feedback and Development
    • I want to Help
  • Editing and Design
    • TDM Editors Guild
    • Art Assets
    • Music & SFX

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. I uploaded the wrong script in the previous post. It has just been updated.
  2. This long-standing issue should ideally be fixed in the SDK. In example: register the item onKeyPress and make sure onKeyRelease relates to the same item, otherwise abort. The alternative is to add these checks in the individual items, in example: object playertools_flashbomb : player_tools { void inventoryUse(entity userEntity, entity frobbedEntity, float buttonState); void inventoryUseKeyRelease(entity userEntity, entity eFrobbed, float holdTime); boolean playerTriggered; void inventory_item_select(entity userEntity, float overlay); void inventory_item_unselect(entity userEntity, float overlay); }; void playertools_flashbomb::inventory_item_select(entity userEntity, float overlay) { playerTriggered = false; } void playertools_flashbomb::inventory_item_unselect(entity userEntity, float overlay) { playerTriggered = false; } void playertools_flashbomb::inventoryUse(entity userEntity, entity frobbedEntity, float buttonState) { playerTriggered = true; } void playertools_flashbomb::inventoryUseKeyRelease(entity userEntity, entity eFrobbed, float holdTime) { if (playerTriggered) { playerTriggered = false; // continue normally } } The downside of using the script system is that some missions come with their own custom items and these should to be revisited as well.
  3. This is a custom script based on shaderParms, whereas all old material definitions contain some code that's based on globalParms. The script has nothing to do with what you find in the material defs and still works the same way today.
  4. And for some pointers, read the following topic: https://forums.thedarkmod.com/index.php?/topic/22533-tdm-for-diii4a-support-topic/
  5. Both of them are far from fitting AI category: monocycle is an animation with extra steps, and spider is using invisible nonsolid ai spider + separate model for every part of leg. every part is operated by script reading ai spider's joint position and angle - and modify it. In this case upper front appendiges are spider's front legs moved far up, pincers use spider's mandibles animation. You can make humanoid ai have backward bending knees, or even reverse its movement so invisible ai is walking on the ground but visible parts are walking on ceiling. Ofcourse it require that ceiling geometry mirrors floor shape, and ai sees and reacts as it is actually on the ground.
  6. Robot spider / scorpion, can be lockpicked. Monocycle robot opening / closing doors. First one uses modyfied tdm spider, just noticed that they dont have rotation animation, just slide around axis without proper leg movement. Razor rider is a simple script without any tdm ai thinking, with customised navigation points.
  7. Similar: My suggestion is getting rid of needing tdm_custom_scripts.script as a requirement. The problem is that unlike every other asset, be it a def or a skin or model or texture, scripts need to be referenced from a core script file for execution: FM's each need to contain a file with that exact name including their custom scripts. The problem with this is that no mods containing scripts can work out-of-the-box as a drag-and-drop pk4, the same way that say a custom character (just AI model or skin) can: Each individual FM needs to integrate it manually, universal mods aren't possible since the last pk4 loaded will override tdm_custom_scripts.script or tdm_user_addons.script breaking all previous mods referencing their own scripts from those files. The ideal solution would be just auto-loading scripts like everything else. But I imagine this may no longer be possible as it could break a lot of existing things like older FM's. One compromise I believe I suggested was allowing a dynamically named script to be auto-loaded by the engine, which would make it so different pk4's don't override the exact same file and conflict with each other: If your mod is named "whatever.pk4" for instance, the engine should auto-execute the script named "scripts/whatever.script" located in that archive... this would provide an elegant and equally sandboxed solution to this long standing issue.
  8. What operating system are you using? Edit: I just loaded up and started this mission, and, as I had assumed, no problems with it here. The console also doesn't spit out the error message you posted. Yes, I am also on Dark Mod version 2.12. With my very limited knowledge (I know nothing about scripting), taking a look into the script, it looks like it has something to do with a variable used for the mission stats screen after the mission end.
  9. Maybe my gaming sensibilities are too modern, but nothing kills my desire to play this game quite like missing a ledge by a floating point rounding error, falling three hundred feet onto the cobblestones of a lovingly fm-author crafted alley somewhere in Bridgeport, shattering Definitely-Not-Garrett's knees into a fine paste, and realizing that I haven't saved in half an hour. With the release of 2.12's support for "tdm_user_addon_" scripts, and after faceplanting in Lady Leicester's back alley for the fifth goddamn time this year, I decided to crack open the scripting tutorials and try to solve this problem. An hour later, and I've hacked together this player addon mod/script to call $player1.saveGame() every five minutes during gameplay. It will create up to five autosaves, named "__autosave_X", while you're playing an fm. It simply starts at number 1 and counts up whenever you boot up an fm, wrapping around after reaching 5, so I don't think its guaranteed to always pick the oldest save to overwrite. It seems to run well enough after a quick test in "A New Job", though, so I thought I'd upload it here just in case anyone else has similar frustrations. Note that these autosaves do cause the game to stutter while the save is happening, so this little QOL feature does notably impact the game. If you're already in the habit of constantly mashing F5 you probably won't need this little mod. Also, it seems like the autosaves can't screenshot the game correctly so they are blank. To install, simply drop tdm_autosave.pk4 into your root Dark Mod install folder. To uninstall, delete the same .pk4. If there are any small, straightforward improvements I can make let me know, but I imagine there are lots of dark corner case bugs here (which may well be why this isn't officially supported in tdm itself?) and my programmer powers are limited. Feel free to copy/modify/share anywhere you like. tdm_autosave.pk4
  10. I experimented with using AI voices as a placeholder before I asked human actors to do the lines. There are still morality and copyright questions regarding AI voice usage, but that aside, I just find the technology isn't there yet. Here is a comparison from a Builder sermon scene I have in Shadows of Northdale Act 3. This is an AI voice I used for the scene originally as a placeholder AI voice.mp3 And this was the final human voice acted version human voice.mp3 In my opinion the human version is infinitely better than the AI generated one. The human voice sounds much more natural, plus there are nuances and inflections the voice actor can bring to the script which can change it in ways that an AI voice can't. Additionally, some voice actors i've worked with will go off script or offer alternative versions, some of which end up being used (a couple of improv lines that AndrosTheOxen used for the shopkeeper in Noble Affairs we're featured in the final game).
  11. Thanks for the feedback. ... on some systems. I thought I read somewhere that the interpreter comment wasn't needed anymore in python 3. Maybe I'm remembering wrong. I don't use python often enough to remember things... If this is actually required, then I'll add it in, ASAP. Thanks. I didn't know that module existed. Thanks again. This was force of habit from coding in GDScript in Godot. Tasks aren't really being useful in this script (at least not yet), as there's only ever one task, so maybe that's why I didn't notice any issues. (I think tasks should've been a queue, as well.) Tbh, I don't really care about using built-in functions as member variables, or in small ephemeral scopes. Under those circumstances it should never cause any conflicts (unless python has some pitfall that I'm not aware of that makes it so). But it was the way I needed it, in order to support more complicated args. This is code I brought in from another script where the index is advanced manually depending on the parameters of each argument. But yea, I might as well simplify it in this script, though. I'm intending to keep this tool simple to use. I've been aware of argparse, but since I never do anything too complicated, I figured it would take me longer to learn it than it would to parse args with some simple code. I confess I'm not too patient to learn python, since I don't use it much. I've been intending to dive into argparse at some point... I didn't remember that about len. Although the string part is intentionally explicit. I personally don't like having empty string comparisons hidden. I prefer explicit code overall. If there's a more explicity alternative to `not tasks`, would prefer it.
  12. A few initial observations of the code: The README says you can just run the script as a command ("dmpak .") however this won't work on Mac or Linux. In order for it to work the script needs to start with an interpreter specification line like #!/usr/bin/env python3 and the script needs to be made executable by the user with chmod +x dmpak.py. After this the user can run it as ./dmpak.py but it needs both the "./" and the file extension. Instead of using functions like os.path.join you should use the new PathLib module. class Task: type = "" arg = "" def __init__(self, type, arg=""): self.type = type if arg: self.arg = arg You have defined class variables type and arg which serve no obvious purpose, and are shared with all instances of the class (equivalent to static member variables in C++). Python does not require instance variables to be declared in the class body (and there is no way to do so), so if these are just intended to be instance variables, you should remove the class variable assignments and just assign the instance variables in the __init__ method directly. Also note that type is a built-in function in Python and generally should not be used as a variable name. i = 0 while i < argc: string = argv[i] ... i += 1 This is how a loop would be written in FORTRAN or C, but is not idiomatic Python. It would be more usual (and much shorter) to write it like this: for string in argv: ... process string However, you shouldn't write your own CLI argument parsing function at all, instead you should use the argparse module which will parse the arguments, detect errors and generate the help text for you automatically. if len(tasks) == 0 and fm_path != "": add_task(PACK_FILES) Do not use len just to test if a list is empty, it is inefficient (as it must iterate over the whole list just to count the items). Instead, use the fact that an empty sequence is false, with: if fm_path and not tasks: ... As the above code shows, you can do the same with strings, since a string is a type of sequence.
  13. The Imperial Sword By: Bikerdude "When passing through the small town of Brouften, the locals mentioned that the Town Council have been having issues with one of the local nobels. One Lord Drafferi, who has been interrupting Town Council meetings and claiming that nobody on the council has any authority on town matters..." Notes: - TDM 2.12 or later is REQUIRED to play this mission. - This FM is based on an abandoned old version of The Elixir that doesn't resemble the current mission at all as a base for town of Brouften. - This FM should play on the vast majority of systems. I have perf tweaked this thing to within an inch of its life. And have moved almost all of the VL ligh effects to the ‘ better’ LOD level. - min recommended spec (as per beta testing) Intel Core i7(3rd gen), nvidia 1030 4gb (GDDR5), will get you 60fps inside and 45fps outside. - Various areas will look better with shadow maps enabled (SoftShadows set to high and Shadows Softness set to zero) at the possible expense of performance. - When you play there are 2 LOD settings of note, normal and better. On better all of the VL lights and alpha shadows are turned on. - I also suggest using MAPS shadows with softness set to low and quality so to medium or high. - And lastly this mission has subtitles for all the custom audio and briefing. Tip: - When searching for needed items, use the "F" \ "Lean Forward" Key Brunting Steel: The sword in this mission is made of Brunting Steel which is a semi-mythical metal in the TDM universe. It is similar to Damascus Steel which was famed for it's strength in comparison to other steel swords. In TDM mythology, it was originally forged on an island utopia, similar to the fabled metal "Orichalcum" crafted in Atlantis. The first mission to mention Brunting Steel is "Crucible of Omens: Behind Closed Doors" Download Link: - (v1.3.6) - https://drive.google.com/file/d/1mu-FdGH1FivMgt4Fy1OgwiDjvIpA1Uck/view Changes: The briefing has been tweaked to remove some of the confusing aspects, aswell as the audio, so the narration is easier to understand. There is now more than one exit point to complete then mission. A number of annoyances that some players reported have been tweaked or outright changed. In game map ( The mission is also available in the Mission Database ) https://www.thedarkmod.com/missiondetails/?internalName=imperial_sword Credits: A big thanks goes to - - nbhor1more for his fantastic story and readables. - WellingtonCrab for the fantastic signs, plaques, decals & other textures. - Mortem desino, Narrator for their awesome and subtle custom dialog. - Goldwell for the "Grumpy old man voice" - Datiswous for the subtitles - Kingsal for the awesome new grass and flowers. - Flanders and Melan for their excellent models and textures. - Nobiax for his excellent small plants - nobiax.deviantart.com. - kyyrma and GigaGooga for thier ever-handy sounds packs. - Obstortte for the custom frob script. - Jackfarmer for the brilliant custom briefing. - freesound.org for ambient tracks, further details in sndshd file. - Beta testers: Mat99 (star tester), Nbhor1more, Amadeus, Xak, Jackfarmer, MikeA1 and S1lverwolf. Teaser: Before and After screens: 15yr Anniversary Contest Thread:
  14. Thanks a lot, i could make it out in python. player following script video Video example
  15. I can confirm that and it was already mentioned before. My suggestion is to rename endTime in the Holy Water arrow script to holyarrow_endTime or similar, because otherwise this might happen again or already is happening elsewhere.
  16. Announcing the Release of 'Requiem' for The Dark Mod! Download Download the latest version of the Dark Mod here: http://www.thedarkmo...wnload-the-mod/ Download the mission here: Mediafire: http://www.mediafire...u89/requiem.pk4 Southquarter: http://www.southquar...ons/requiem.pk4 Fidcal.com: http://www.fidcal.co...ons/requiem.pk4 Create a folder in your Dark Mod install with the path "darkmod/fms/requiem" and place the downloaded .pk4 file inside. When you load up The Dark Mod, the mission will appear on the "New Mission" page. Requiem can also be found directly using the in-game loader. Gameplay Notes While this mission is playable in TDM 1.8, for an optimal experience please download and play in TDM 2.0 (or higher). Most inventory items in the game can be dropped, so no need to carry them around after they are no longer of any use. Note that If you use noclip or other console commands while playing, there is a good chance that you will break the intended flow of gameplay. Credits Mapping and Readables: Gelo R. Fleisher Voice Acting: Goldwell Additional scripting: Obsttorte Additional textures and assets: Flanders, Sotha, Grayman, Springheel, Bikerdude, Obsttorte Additional map optimizations: Bikerdude Testers: Bikerdude, Obsttorte, Gnartsch, AluminumHaste, Baal, nbohr1more, PPoe Custom Soundtrack: Leonardo Badinella - http://leonardobadinella.com/ Additional Music: Lee Rosevere - http://freemusicarch...c/Lee_Rosevere/ Marianne Lihannah - http://www.funeralsinger.net/ Vox Vulgaris - http://www.last.fm/music/Vox+Vulgaris/ A note from the author Hi all. While I've been involved in indie game development for a while now, I'm first and foremost a writer. My most recent project has been a novella that tries to capture the visual feel and tone of the Thief series (you can find the link below). As I was writing, I found myself playing a lot of Thief and Dark Mod fan missions, and got to thinking that maybe I wanted to make one myself, as a companion piece to the book. When I finished up writing, I had a bit of down time and decided to take the plunge. Having never done any serious mapping before, my plan was to make a small mission that I could bang out in a month or two and call it a day. Well, as sometimes happens, the project got a little bit bigger than I had planned. Ten months, and lots of elbow grease later, Requiem is finally ready for you to play. I'd like to thank everyone who helped pitch in to help make Requiem come alive, from those who took the time to answer my many questions on the forums to those who actively contributed to the FM. I especially want to thank Bikerdude who served as my mapping mentor, and Obsttorte whose clever scripts really turned what was in my head into the game that you are playing. Above all, I want to thank you for downloading and playing Requiem; I hope you enjoy it. Links of Interest Author's Blog: http://gfleisher.blogspot.com/ Companion Novella (Amazon): http://www.amazon.co...k/dp/B00BYEW02M Companion Novella (Smashwords): http://www.smashword...oks/view/298956
  17. Confirmed Also: dev17251-10920 on Windows By Any Other Name: file maps\byanyothername.script, line 2075: endTime redeclared The Heart of Saint Mattis: Press escape during the initial cutscene and the game freezes Can anybody else confirm? I fixed "By Any Other Name". Once the mission database fully processes the commit v5 will have the fix.
  18. I want to present a screen at the end of the mission briefing that lets the player choose one of several starting points. I don't know of any missions that do this. Before I begin investigating how to make that happen, I wonder if anyone already has this working. I'm particularly interested in how to pass the result of a custom button press to the mission script. I couldn't find any clues in the Wiki. (I'm not interested in changing the starting point using the Difficulty settings.) Thanks.
  19. So, already a few weeks ago, I started writing a Pagan vocal script concept. I took the master template for new VS-s, wrote down ideas already brainstormed on the side, then read closely through the VS to see where some would fit, and what other lines I could insert and expand upon. I try to keep the lines short and snappy, but interesting enough. Before I even started, I read all the past discussions on this topic, made notes of other peoples' existing suggestions. Just to have a point of comparison, both for what I might try for my script, and for what I wouldn't (because it would not fit tonally). Much has been discussed on how to avoid making the Pagan characters sound like caricatures, either in speech style, or in overdone references to nature/deities/etc. They're not meant to be "New Age tree-hugger hippies", they're meant to be realistic-sounding individuals. As The Dark Mod's lore includes nuances such as Pagans being not only some yet-untamed "barbarian" tribesmen outside of the Empire, but also some hidden Pagans among the commoners in cities/towns and villages/rural hamlets, I had to account for that while putting together the script. You'll see more of my rationale once I expand this post in the near future, when I have the concept script fully ready. For the time being, let's just say I tried to avoid too many overt references to nature and pre-Builder folk religion. Ergo, as it wouldn't make sense for an urban Pagan from the City's narrow alleys and slums to talk about, e.g. mighty stags on a forest meadow (or something like that), I try to make any and all nature references more down-to-earth and subtle. Example, AI alerted and searching for a hiding tresspasser: "Where have you scurried to, little mouse ? Where, oh where, have you scurried to ?" No diminutives, no plant and magic references in every second word, but you still have this vague indication the guy in question might be more of a nature-worshipper in private than a Builder monotheist. (Not that Builder-faithful wouldn't have an appreciation for nature, it's just that the views of it would differ somewhat, on a psychological/cultural level.) There are some lines about spirits or natural forces and so on too, but most of the other lines are such that they could work for any commoner in a rural or urban setting. ---- This entire vocal script concept is readable below. For the sake of quicker readability, I have divided the entire overview with the use of spoilers, based on the sections of the vocal script. ---- BASIC INFORMATION ON THE VOCAL SCRIPT ("Pagan male / Tribesman") AI STATES: Relaxed AI STATES: Alert These barks are meant to tell the player that the AI has seen or heard something. AI STATES: Searching COMBAT AND PURSUIT FINDING EVIDENCE You have found or observed something that looks out of place. You aren't seeing or hearing the intruder directly, but something that might be a sign that one was here earlier. Greetings Since greetings can be made to friends or strangers, delivery should be fairly neutral. Also, there's no way to know whether the AI have seen each other once or twenty times before greeting each other, so typical "hello" greetings should be limited in favour of casual comments or questions that can be answered 'yes'. Greetings are not exchanged between sitting characters, so assume that the greeting is a quick one as AI pass each other. Not every greeting is needed for every vocal character. The thug, for example, has special greetings for female characters because he's a sexist pig, but not every character needs those. ---- Feedback ? I'd like to ask you to provide your own constructive criticism now. Feel free to provide feedback on the lines, try to give me constructive criticism on what could be improved, added, dropped, changed. I'm all ears. Sink your nitpicky teeth into this vocal script proposal. Final note Besides this particular VS, I also have one/two more in development, and I plan to start work on them soon.
  20. @Marbrien please use spoiler tags As to your questions:
  21. There was an idea to add two features to GUI scripts (6164). The first one is runScript command, which allows GUI script to call a function from game script. Interestingly, this feature is already supported in the GUI engine, but the game code only processes this command when the player clicks left mouse button on the GUI (i.e. usually it works in onAction handler, but not in namedEvent or onTime handlers). Obviously, ID initially did not envision runScript as a global feature which works the same way everywhere, their idea was that it is context-sensitive, and whoever calls the GUI code can then pull the commands generated by the call and do whatever he wants with them. I'm not sure I really want to change this architecture... Anyway: what are the possible use cases for runScript command? The second feature is namedEvent command, which simply generates/calls a named event with specified name on the whole UI, which can be then handled by matching onNamedEvent handlers. However, this command can be implemented in several ways: Whenever namedEvent command is executed, the named event is processed immediately. The rest of the script (after namedEvent command) is continued only after generated named event is fully processed. Whenever namedEvent command is executed, named event is put into some kind of queue, then the current script continues to execute. The generated named event is executed at some moment later, but surely on the current frame. The point 2 can be further differentiated on the exact order when generated named events are processed. So the first approach is how functions normally behave in normal imperative languages, with a real call stack. The second approach is delayed execution, like what we currently do with "resetTime X; -> X::onTime 0 {...}" combo (at least everywhere in the main menu GUI). My worry with the first approach is that it is an major change for GUI engine with no past experience, and it will probably not match well with the long-established GUI wierdness (I mean e.g. the wierdness that all expressions in GUI script are executed before the script commands start executing). And it would work different both from the "resetTime + onTime 0" combo. On the other hand, the callGui in game scripts do execute named event immediately. And I must admit nested GUI calls could be used to reduce the issues from the GUI weirdness mentioned above. Also, this command exists in Quake 4, but I'm not sure how exactly it works. And it's probably good idea to make TDM work the same way.
  22. First off thanks to Dragofer and other users who helped with the scripting basics needed to get this done. As a detail for some FM's I plan to make in the future, I wanted to have it possible for friendly AI to be frobbed for idle chatter, causing them to say something random to the player. I first tried with conversation entities but the setup was too ugly and complex, so I decided to do this using one script function. I succeeded with pretty nice results, thus I figured I'd share this for other FM creators to use as well. The thing I like most is that it only requires one universal function to be added to your map scripts. Every AI can use it with a simple spawnarg and it doesn't require manually setting any sound shaders: It will automatically work on any character! This means you can use it on a pro guard, a builder priest, a noble woman... each will say the appropriate thing when frobbed. This is done with the power of the ai.bark() call which lets you make the AI speak any action defined in their vocal set (universal across all vocal sets). To get it working you only need to add two spawnargs to your AI, with a third optional one for customization (explained below): frobable 1 frob_action_script ai_frob frob_bark ... frob_bark is optional: If not set the AI will normally greet the player... if alert or having seen evidence of intruders, it will use other lines to inform the player depending on severity. This parameter can be set to the following values to get a custom result: "suspicious": The AI always acts as if it has seen indirect evidence of trouble and warns the player. "alert": The AI always acts as if it has seen an intruder warns the player. "angry": The AI is upset and curses at the player. "rambling": The AI rambles random things when talking to the player (idle lines). Finally here's the script itself. It's pretty tiny, most of the code is for choosing the voice to use. Put it on an AI and let me know if you like the result void ai_frob(ai self) { if(!self.AI_DEAD && !self.AI_KNOCKEDOUT && self.AI_AlertLevel < 3) if(self.isFriend($player1) || self.isNeutral($player1)) { string frob_type = self.getKey("frob_bark"); string frob_bark; // Pick what the AI will say when frobbed if(frob_type == "alert") { frob_bark = "snd_warnSawEnemy"; } else if(frob_type == "suspicious") { frob_bark = "snd_warnSawEvidence"; } else if(frob_type == "angry") { frob_bark = "snd_admonish_friend"; } else if(frob_type == "rambling") { frob_bark = "snd_relaxed"; } else { if(self.AI_AlertLevel > 2) frob_bark = "snd_warnSawEnemy"; else if(self.AI_AlertLevel > 1) frob_bark = "snd_somethingSuspicious"; else if(self.hasSeenEvidence()) frob_bark = "snd_warnSawEvidence"; else frob_bark = "snd_greeting_generic"; } float look_time = 1 + sys.random(1); self.bark(frob_bark); self.lookAt($player1, look_time); sys.wait(look_time); } } ai_frob.script
  23. Because it's super useful not having to browse through the whole thread, and probably not even finding what you're looking for, because people put it in spoiler tags, which are excluded from the search. You don't have to click on the spoiler tag in the original post.
  24. Basically someone always asks. We're all grownups here and it's in spoiler tags so...
  25. This is the error I get when going back to play an older mission (pre 2.08/64) Script object "number wheel" not found on entity "idMover_atdm:numberwheel_small_725" I know that save games don't work when you upgrade to a newer version, but in this case the entire mission is not accessible. Any Advice ?
×
×
  • Create New...