Jump to content
The Dark Mod Forums

Search the Community

Searched results for '/tags/forums/perl script' or tags 'forums/perl scriptq=/tags/forums/perl 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 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)
  2. 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
  3. 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
  4. What about the plot twists? Artificial/ridiculous/cliche/exploiting, etc? Well, it's likely nobody's genre too, since they are only usually read for work by industry stuff anyway Is it something you'd be interested to read as a long short story though? You're the first (maybe the only ever) person to read the whole thing, which is worth a lot. I'll DM you with 'what it was supposed to mean' but the immediate and important takeaway for me is that the script fails in explaining itself clear enough (if it's even possible anyway).
  5. Ok I got it working. See attachments. Ignore the ugly look. When you walk into the small room on the right the sky changes to the one with the moon. When you go back it changes back to the thunder sky. void skymoon(entity room2) { sys.println("script skymoon running.."); sys.trigger( $moon ); } void skythunder(entity main) { sys.println("script skythunder running.."); sys.trigger( $thunder ); } void main() { } See also: https://wiki.thedarkmod.com/index.php?title=Location_Settings#Example_script_to_turn_entities_on/off_when_player_enters_a_location testp.map testp.script
  6. So I edited the map/script to match the entity names in my WIP, and now the starting map isnt correct. But if I leave the zone and re-enter is than become correct. skybox.map skybox.script
  7. As my custom assets work has increasingly shifted from models towards scripting, I'll open a new thread here to contain any scripts that I write which can be reused in other missions, starting with the A ) Presence Lamp This is a Lost City-style lamp that brightens and dims depending on the presence of the player or an AI. It fades between 2 colours and can trigger its targets whenever it switches fully on or off, so it should also be viable in various other situations. The standard setup consists of the following: - a trigger_multiple brush. The spawnarg "anyTouch" controls whether AIs, too, are able to activate it - a presence lamp, highly recommended with a colorme skin - one presence light, or any other light with appropriate spawnargs The targeting chain is trigger brush -> lamp -> light When the player or an AI stands in the trigger_multiple brush, the lamp switches on and starts a short timer. Subsequent triggers reset the timer. If the timer runs out because no one's standing in the trigger brush anymore, the lamp switches itself off. Notes - Multiple trigger brushes can target the same lamp, and one trigger brush can target multiple lamps. However, each presence lamp can only target one light, so if you want i.e. a bouncelight you'll need to hide an additional silent presence lamp somewhere and target it from the same trigger brush. - The lamp and the light use their own colour spawnargs respectively, since setting 0 0 0 on a lamp would make it appear pitch black. - Technically the trigger brush can be exchanged for anything else that triggers the lamp every 0.5s (this number can be changed via "update_interval" on the lamp), i.e. a trigger_timer. - This was originally named the proximity lamp and was one of many scripting jobs for The Painter's Wife. I've renamed it to "presence lamp" because the mapper may place the trigger brush(es) wherever he wishes: proximity to the lamp is not a factor. Credits go to Bikerdude for putting together the crystal lamp models. Download Presence Lamps - Google Drive Place or extract the .pk4 into your FM archive, then look up the presence lamp prefabs. If you already are using other custom scripts, remember to add the presence lamp's .script to your tdm_custom_scripts file. B ) Teledoor This is a Skyrim-style door which opens just a bit into a black_matt "void" before teleporting the player to a different area of the map, which may represent the other side of the door. This is used for connecting physically separated map areas with each other, such as when there's an exterior/interior split of a building or ship to allow for more mapping freedom. [Full Thread] C ) Mass Teleport This is a teleportation setup designed to seamlessly teleport the player and any moveables between two identical-looking areas. This allows the mapper to link 2 physically distant areas with each other while maintaining the illusion that they're connected. The teleportation zones should be free of AIs as they can't be teleported like this without their patrols breaking. [Post] D ) Automaton Station A station for Sotha's automatons (includes the automatons) which can be switched on and off by patrolling automatons. (Part of core assets as of 2.10) [Post] E ) Camgoyle A sentient turret originally made for the FM Written in Stone. It's based on the new security camera entity and augmented with scripting to allow it to fire magical projectiles at the enemies it detects. People are more than welcome to use it and to convert it into something else, such as a mechanical turret. [Post] [Download] F ) Audiograph The audiograph is an Inventor's Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. [Post] G ) Turret A new companion to security cameras familiar to Thief players. It will become active as soon as an enemy is detected by a targeted security camera, firing projectiles to fend off the intruders. Similar to the security camera and the camgoyle sentry, turrets are highly customisable in their behaviour and appearance. [Thread] G ) Fog Fade Dynamically change fog density depending on what location the player is in. [Thread]
  8. Actually this should be inside a zone wrapper so you can do other things when changing zones (set fog, trigger sounds, ect) This will also activate any targets the you have on the location entities. The debounce part is important since it will prevent zones from getting triggered too fast and causing errors. If you do get weirdness like the wrong skybox appears or the location entity triggers its targets twice, let me know. Might need to bring the grace period down from 0.4 - 0.1 or 0.2. string curr_skybox = "portalsky_night"; // <<define starting skybox void change_skybox(entity zone) { entity skybox = zone.getEntityKey("skybox"); if (curr_skybox != skybox.getName()) { sys.trigger(skybox); curr_skybox = skybox.getName(); } sys.println(" [SKY] Sky set to " + curr_skybox); } entity __last_zone = $null_entity; float __last_zone_time = -9999; void setZone(entity zone) { float now = sys.getTime(); // Debounce if (__last_zone == zone && (now - __last_zone_time) < 0.4) { return; } __last_zone = zone; __last_zone_time = now; // do stuff if (zone.getEntityKey("skybox") != $null_entity) { change_skybox(zone); } // Drive one-shot triggers zone.activateTargets($player1); } skybox_edit.map skybox_edit.script
  9. So I cleaned it up and and made it simpler for new mappers - skybox.map skybox.script
  10. What is weird is that I found I made a small error, but it still works.. void skythunder(entity main) Should actually be: void skythunder(entity room2) I think, because I'm doing a "call_on_exit" for zone room2 Edit: I think the script example is for triggering a single entity on and of while in this case you trigger different scripts for entry and exit.
  11. It's very simple. Just make a trigger and target the specific info_portalsky. See added testmap. It has a default portalsky and when you touch the box it will change it to a different portalsky. Edit: Ok maybe I didn't read the topic text correctly, sorry. I guess you already know this, but want to do it via script. testp.map
  12. 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?

    1. freyk

      freyk

      How about console command "screenshot". And a script that overwrite a placeholder image, with that screenshot where the gui linked to?

  13. Ironically, my ambient light stopped functioning properly today! I had added a script to flicker a lamp that is triggered (via call_on_entry) from the same info_location that also has the ambient_light spawnarg. This somehow broke it. When I disable the flicker script, the ambient lighting again works as it should. Not sure if this is any help to you, but it was definitely unexpected.
  14. 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
  15. Now tracking stops when NPCs play random idle animations. There is no tracking on head joint, just the neck, which doesn't look as good. Unfortunately head joint is already used by existing random head turns and mixing it with a new script creates a conflict resulting in sudden jumps. I uploaded it to repository. I added "canHeadTrackPlayer" "1" into tdm_ai_humanoid.def tdm_ai_head_tracking_humanoid.script
  16. 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.
  17. Here's a version of the "banking" script in a separate file. These go into the tdm_ai_base.script: In the tdm_main.script: In the tdm_ai_humanoid.def This way it will only apply to humanoids, and mappers will be able to disable it or change strength for individual NPCs by overwriting those values in Darkradiant. The rest goes to tdm_ai_banking_humanoid.script tdm_main.script tdm_ai_humanoid.def tdm_ai_base.script tdm_ai_banking_humanoid.script
  18. Unfortunately because of how characters are set up in Darkmod using neck joint for animation is problematic. In noblewoman's head model, the chest is assigned to neck joint and so it clips when tracking is on. So tracking script will have to be off by default, or at least turned off for some NPCs.
  19. Darkmod underutilizes, in my opinion, capabilities for procedural animation. We already do some, like the random head and torso turns that are added on top of existing animations. There's also possibility for separate animation for top and bottom of the character as well as head. There's a missing opportunity for varied facial expressions. I talked about animation blending in this thread. Here's something that for example Thief: Deadly Shadows did. It's swaying side to side while turning. I used Gemini to add code to the tdm_ai_base.script. I don't know if this is the most efficient way of doing it, probably not. Here are the parts added: Gemini came up with the term "banking" which is used in car racing. I don't know if that's what it's called in animation or games. There's a lot of variables that can be tweaked. You can rotate this way any bone you wish. I use 'Origin', 'Spine_Dummy' and 'Neck' bones: You can tweak amount of rotation for each bone. setJointAngle(m_bankingJointHandle, 1, jointRotation * 1); setJointAngle(m_bankingJointHandle1, 1, jointRotation * 0.6); setJointAngle(m_bankingJointHandle2, 1, jointRotation * -1.5); There's also global intensity: (targetBanking = deltaYaw * 1.4;) and attenuation: m_bankingCurrentValue = (m_bankingCurrentValue * 0.95) + (targetBanking * 0.05); modifiers. Gemini also proposed to add an LOD system, which I thought was a great idea. So currently at a distance of 1500 from player the swaying will be disabled. Here are examples, each with slightly different values: And here's comically exaggerated one:
  20. Finally done with my vertical contest entry... Swing You'll get your sea legs ... or die trying ... Thanks to my beta testers: SiyahParsomen Diego Baddcog ---------------------- README: SWING a Dark Mod mission, by Komag for the Vertical Contest held summer 2010 find me on TheDarkMod.com forums, or via ShadowDarkKeep.com This mission is a "platformer" with slight puzzle elements (figuring out where to go next and how to get there). Be prepared to do a lot of falling, dying, and quickloading! Quicksave anytime you are sure-footed, about take a risk Getting off the swing for any reason is not recommended! And try not to get sick ;-) Have FUN!!! Komag - Ben Ramsey -------------------------- BRIEFING: The King's steward has seen you in action aboard His Majesty's Ship Vertigo, and he is pleased with your potential. You are hereby granted an opportunity to prove your quality by successfully navigating the King's Royal Navy training swing. You need only retrieve the high crown (a replica of course) from the top of the swing, and return it to the docking area. As a bonus, see how many of the ten hidden bottles you can find - the more you come back with the more impressed your superiors will be, and that can only be a good thing as you know." ------------------------ Known Issues: - It's possible to stop the motion of some of the moving things, and even the entire swing itself, if you mess with things enough ENJOY!!! http://www.shadowdarkkeep.com/missions/Swing_v1.2.pk4
  21. got an old phillips 52 " tv that works pretty well with linux as well (60 hz 1080p only) allmost 2 decades old now . has all the connections a tv enthusiast could drool over like s-video composite scart hdmi and vga . i dont use it anymore though as my LG 58 " 4k tv works fine with solus (may be because it can only handle 4k in 60hz ?). as for aholes on forums, i had my fair share just like trolls they seem to pop up from time to time and i found the most effective way of handling them is just to ignore them (dont feed trolls!). otherwise ping the site admin if they are doing they're job a warning about decorum can usually put them right but otherwise a ban might be needed. permanent if nessesary.
  22. My issue was that when starting the computer, the first log in screen would be a 60hz, and on OLED that causes horrendous flicker due to PWM voltage control. Input latency also gets high on lower refresh rates (>60 ms on some monitors), so moving the mouse around on the log in screen felt awful. Even my non gamer wife immediately noticed how not nice the log in screen was compared to the Windows 11 log in. Once I logged in, and the monitor switched modes to 240 or 360 or 540 hz, I could log out and it would be at the high refresh. So I did some research first and all the guides for kubuntu/ubuntu basically said the same thing, modify SDDM and apply plasma settings to the SDDM. This did NOT work for refresh rate on first boot. So I did more research and edited some files, still didn't work. So I asked the question on the forums. 90% was Apply Plasma Settings... in the SDDM section, and the other 10% were, you don't need that, that's not important, you're dumb for asking this question.
  23. Welcome! I hope you'll like it, or at least find it better than Windows. I have never received that answer myself, but I have seen it in various forums, not necessary associated with Linux. It is such a dumb and unproductive respone. Either it can be done or it can't. The purpose is not a factor. One silver lining though: it teaches us what kind of answers we don't want to provide ourselves when someone asks us a question.
  24. I'm on Linux now (Kubuntu 26.04 / kernel 7+) Still haven't changed my opinion on the help forums, there is STILL a lot of assholes gatekeeping / new user bashing. My favourite is "Linux is super power user friendly and you can do pretty much anything that you want!" Cool, how can I do this? "Why do you need that? You don't need that! Just leave it the way it is!"
  25. With this Lutris script I am able to install the game from cdrom. It also succesfully installs the two patches: Best to make a copy of the disc and mount the iso I think. You have to download the YAML file and in Lutris choose for "Install from local install script". Then you have to point to that file. After install you might have to reconfigure the paths to the game locations. The install script assumes certain locations, but I found to be often wrong, so I had to alter the paths in configure window (tab "Game options"). If you run the game after it will ask for the renderer, then if you choose for Direct3D it will use Dgvoodo. This will work, but I found it would not support my screen resolution. I think it actually had only support for 16:10 aspect ratio, not 16:9. For this reason I would recommend installing the Direct X 11 patch and disabling Dgvoodo in Lutris configure game. Dgvoodoo does not work with the Dirext 11 mode. Then when you start up it will ask for the 3d Renderer and you choose for Other, which will give you option OpenGL and Directx 11. You choose Directx 11. If it doesn't ask for the renderer on start, you can set it via the in-game Options menu. Then in Options menu of game you can set resolution. You can also go into the console via ~ key and then typ "preferences". Then you can set advanced settings. For example in Renderer options, you can set Anisotropic filtering to 16 and Anti Aliasing to (in my case) 8.
×
×
  • Create New...