Jump to content
The Dark Mod Forums

Dragofer

Development Role
  • Posts

    2631
  • Joined

  • Last visited

  • Days Won

    157

Everything posted by Dragofer

  1. @MirceaKitsuneAnswered in your Art Assets thread (wiki: Campaigns > Scripting)
  2. That's pretty damn interesting, good to see such effects implemented and a cool first use of the new addon system. Definitely a case for some balancing i.e.: - stealth: this would really work better as a subtle effect even at level 4, not "nearly undetectable even in light" - I think "crosshair" and "info" would work better if merged, so each upgrade has more meat on it, especially since "info" requires a crosshair. Maybe the freed spot could be taken up by "silent steps". - knockout might be better as non-guaranteed KO with max one chance per AI. Extinguish could also be chance-based for big light sources like torches. - sonar with a max search distance of 400 units is probably going to be active a lot of the time, might want to go somewhat shorter. - maybe add an inventory item to the player that can be used to toggle at least some of these effects, in case they interfere with what the player wants to do. For your question: check the Campaigns wiki article's Scripting subsection for persistent variables. Also, what's your method for find_closest()? I think the single main issue with this mod so far is the theme. It'd probably be easier for a player to immersive himself if he were unlocking "supernatural powers" like "extrasensory perception" by finding "runes/orbs/glyphs" rather than "augmenting" abilities such as "sonar" with "implants/microchips". Then it could be considered as a Dishonored/Thief 4 inspired mod rather than Deus Ex inspired. For your cyberpunk mod that's a different matter of course.
  3. I've tried to upgrade to beta209_02 but aborted midway by clicking on x in the top right corner. Now whenever I try to download any version I get an error message and the download never begins: Failed to open zip file ".zipsync/mani/10.iniz" Here's a log of my faulty tdm_installer. I've also looked in my .zipsync folder and found that 10.iniz is empty. tdm_installer_faulty.log Deleting 10.iniz has fixed the problem.
  4. Can just do the trace every 0.1 or even 0.2s, rather than every single frame.
  5. Grats on the latest release! Thanks for working all of this out.
  6. Kingsal reuploaded the mission on 23/12, might be you got it before he did that.
  7. Nice work! I've gone ahead and setup the files in the structure TDM needs for game assets, dubbing the model "statue_eve". I've attached the file as a .pk4, which is a renamed .zip. You can simply place the .pk4 into your TDM install, then to look at it ingame start TDM, open the console with ctrl + alt + tilde (button left of 1) and enter: map test It looks like there are still some issues: ideally, each .ase model would contain both the visual mesh and a lower poly shadowmesh. The visual mesh should have a material called tdm_statue_eve while the shadowmesh should have a material called textures/common/shadow. it'd be good if the shadowmesh became less detailed with distance, too. No need for a 2k shadowmesh at a long distance, imo. an extra very low detail mesh would be great, wouldnt need to cast shadows anymore, or just a very crude shadowmesh. the main model is in models/darkmod/decorative/statues, the LOD stages are in models/darkmod/misc/lod/... for the texture files: the texture doesn't show up properly yet, so it'd be good if you could check that you've exported the files as described below: statue_eve_d.dds: the diffusemap (corresponds to your colourmaps, I believe), exported as DDS with DXT1 compression. Found in the dds/... folder. statue_eve_n.tga: the normalmap, exported as TGA without RLE compression. Found in the models/darkmod/props/textures folder statue_eve_s.dds: the specularmap, I believe with DXT1 compression. Found in the dds/... folder. statue_eve_ed.jpg: the editor image, should be a low-res version of the diffusemap i.e. 512x512. Found in the models/darkmod/props/textures folder. This wiki page may be interesting for further reference if needed.
  8. The next beta build will have my furniture pack (originally posted here and here)(rev 16045), and a fix for the new blue flame elementals.
  9. Je doute que les expertes parlent français içi. Tu pourrais utiliser Google Translate pour faire traduire ton texte en anglais et l'inclure dans tes messages, à côté du texte original français. Je peux essaier à assister si les autres ne comprennent toujours pas, bien que ça fait longtemps depuis la dernière fois que je devais utiliser mon français. Pour commencer, je suggèrais que tu essaies à fournir encore plus des détails du problème et de ton ordinateur. T'as peut-être un rapport de crash?
  10. @grayman Indeed, I had the idea for this guide while I was writing an answer to one of those "How do I..." questions. Those sure add up over time and sometimes it feels like I'm writing the same things. I was actually thinking of dissecting i.e. your "frosty breath" script, so that's good to know. Well, as demagogue knows it's a long project, for now I'm happy with the demonstrations I have. @peter_spy Being familiar with a programming language definitely helps a lot, but there's still plenty of TDM-specific aspects, i.e. the bulk of A to Z Scripting: Practical exercise: subtle teleportation concerns itself with how the map should be setup, which entities with which spawnargs, while the script itself is just a handful lines. TDM also has lots of subsystems like stim/response and objectives that can become part of a scripted setup. Also, learning from a generic programming tutorial in order to script in TDM felt... dissatisfying. All that about memory management, classes and those fancy operators, but only a small fraction is actually relevant in TDM's scripting. Most mappers just want to make x happen as a result of y.
  11. Another "riverside" mission (no relation) beginning with a somewhat sturdier ship... ... and a riverside encampment. Though as with the spiritual ancestor, the main action is further inland (you can just about spot the gatehouse in the background). A tranquil scene from the more maritime sequel:
  12. MirceaKitsune was looking for the "Use" key, which is how keys can be used on doors. And yes, that'd be _impulse51. Frobbing is something else - there are many ways to call a script when a specific entity is frobbed, but not to my knowledge whether the player is frobbing any entity, as you're busy working out.
  13. Wiki series: A to Z Scripting For a long time, scripting has been something of an elusive topic in TDM. Those who were already familiar with programming would analyse existing scripted setups in TDM, gradually deducing how things are done around here. Those with no prior knowledge had a handful of basic tutorials to look at, but they only went so far. As a result, a lot of basic scripting questions have been asked and answered on these forums over the years. Here is my offering: the A to Z Scripting series, aiming to cover all things scripting in TDM. It should cater to anyone, from absolute beginners to more knowledgeable users looking to familiarise themselves with TDM's methods for employing scripts. Special thanks go to Obsttorte for providing feedback on the entire guide, as well as Kingsal for providing some material to work with. (Don't mind the timestamps, this thread has been stitched together on Dec 27 2020 from another discussion.)
  14. 1) I'd guess youre calling conv 2 too soon after conv 1. Does it still happen if you wait i.e. 5s or call conv 2 first and from a separate script? 2) Putting the soundshader in a "snd_" spawnarg automatically precaches it on that entity.
  15. IIRC I've called a lot of scripts in the conversations of The Painter's Wife. Anyway if worst comes to pass you can probably just make one of the actors activate a callscriptfunction entity.
  16. @HMartExcellent, thanks for sharing that - getButtons() is very well alive in TDM (I always assumed it had to with button entities ingame). And looking at darkmod_keybinds.cfg, we have (probably)all the names of the buttons/impulses that TDM uses: unbindall bind "ENTER" "_impulse51" bind "ESCAPE" "togglemenu" bind "SPACE" "_moveup" bind "-" "_impulse50" bind "0" "_impulse10" bind "1" "_impulse1" bind "2" "_impulse2" bind "3" "_impulse3" bind "4" "_impulse4" bind "5" "_impulse5" bind "6" "_impulse6" bind "7" "_impulse7" bind "8" "_impulse8" bind "9" "_impulse9" bind "=" "_impulse49" bind "P" "map test" bind "[" "_impulse48" bind "\" "_mlook" bind "]" "_impulse47" bind "^" "_impulse0" bind "a" "_moveleft" bind "c" "_impulse24" bind "d" "_moveright" bind "e" "_impulse46" bind "f" "_impulse44" bind "g" "inventory_use '#str_02396'" bind "i" "inventory_cycle_group '#str_02391'" bind "k" "inventory_cycle_group '#str_02392'" bind "l" "inventory_use '#str_02395'" bind "m" "inventory_cycle_maps" bind "o" "_impulse19" bind "p" "map test" bind "q" "_impulse45" bind "r" "_impulse52" bind "s" "_back" bind "u" "_impulse51" bind "v" "inventory_hotkey '#str_02397'" bind "w" "_forward" bind "x" "_impulse23" bind "y" "clientMessageMode 1" bind "z" "_zoom" bind "BACKSPACE" "inventory_hotkey" bind "PAUSE" "pause" bind "UPARROW" "_forward" bind "DOWNARROW" "_back" bind "LEFTARROW" "_left" bind "RIGHTARROW" "_right" bind "ALT" "_strafe" bind "CTRL" "_button5" bind "SHIFT" "_speed" bind "DEL" "_lookdown" bind "PGDN" "_lookup" bind "END" "_impulse18" bind "F3" "_impulse17" bind "F4" "savegame quick" bind "F5" "loadgame" bind "F6" "_impulse20" bind "F7" "_impulse22" bind "F9" "loadgame quick" bind "F12" "screenshot" bind "MOUSE1" "_attack" bind "MOUSE2" "_impulse41" bind "MOUSE3" "_zoom" bind "MWHEELDOWN" "_impulse14" bind "MWHEELUP" "_impulse15" Impulses don't seem to be in the TDM Script Reference, but "buttons" should do nicely well enough.
  17. You'd want to create a GUI message entity, either in DR or by spawning in a script. Set the "text" spawnarg in the same frame you trigger it. There are 2 versions, one with and one without the scroll texture. I'm not aware of any way to check what key the player is pressing - the only thing I know of is the mouse gesture checking event, which is used to determine which way to swing the sword. The game calls a key press an "impulse", so you might want to use that as a starting point for research.
  18. @MirceaKitsune It's possible that healing works in a similar way to damage, in the sense that defs are used (damage defs). The fact that a string called "air" is involved makes that a little more likely. Could look if you find defs for healing and damage. And as I said earlier, Seed of Lodestar beta contains custom breath scripting. As for crouching the player, there seems to be no obvious way. Still seems like it should be possible to push a button for the player... maybe research impulses some more?
  19. @kin you need to dmap, then map. Dmap compiles the map and is needed whenever you create or modify a brush or patch. If a leak is found during dmap, a lin file is created. Testmap combines both commands for convenience, but won't tell you if dmap found a leak and load anyway.
  20. @kin testmap isn't ideal when you're starting out because it ignores errors in dmap and loads anyway. It's likely a leak prevented your map from compiling properly. Regarding Mircea's speaker, it's meant to be part of an addon available to all maps and players, so he has to create the speaker via script rather than use DR. Would seem like something that startSound or demagogue's ambient override should be able to handle, though.
  21. There's a script herethat identifies all entities on the map that meet a certain criterion. You may also ask @kingsal what method he ended up using to check which entities are within a certain volume, he had asked that same question here a few months ago. Modifying the player's breath: that'd be a case for the breath potion. Alternatively look at the beta thread for ERH's Seed of Lodestar, he's made a diving suit script which automatically regenerates breath. I recall a discussion of using the breath system outside of water, i.e. room with gas, but it didn't seem to be natively supported. Sounds started with startSound should be looping if the soundshader contains a looping flag. stopSound should stop it, just need to call on the same channel as the one it was started on. Alternatively, if the spawned speaker doesn't start playing you might need to do some more, i.e. trigger it (possibly one frame later), set s_looping & s_maxradius/s_minradius, precache the shader on the speaker. As HMart points out, and as we saw with AIs, AI_ flags only work if the entity has been defined as the correct type of entity, i.e. ai or player. The player script was probably done as a scriptobject, so the definition wouldn't be visible to an external script.
  22. 1. Variables you define yourself aren't specific to entities if you're using map scripts. They're only specific to an entity if you're writing a scriptobject, in the sense that variables defined in that entity's scriptobject won't be visible to map scripts or other entities' scriptobjects. So just do float mycounter = 10; 2. I'm not aware of a method to call a script whenever the player's health is lowered. I know there is a system for checking which bone was hit when damage is applied to an AI, but I'm not aware of how it can be applied to the player, or whether the player even has bones (the optional player model probably has bones, but is it in any way used for hit detection?). The best I could offer would be a permanently looping script that checks the player's health every 0.x seconds. Maybe you can find out how the red blood effect on the screen gets triggered, i.e. via a GUI script or player scriptobject. There is the signal system which contains an onDamage signal, but I think that system applies only to func_movers. 3. VanishedOne has made a speed potion, worth looking into how that was scripted. Kingsal has increased bow draw speed, at least in Volta 3, but I think that was an entity tweak. Maybe check the player's entity defs and see if you can change some of the parameters in there, possibly the same way VanishedOne modified running speed. There is a force multiplier cvar for dragging moveable bodies, maybe you can find a way to change that from a script. 4. kcghost has scripted a GUI element (inventory item) which uses a script to update its text dynamically (stealth score): https://forums.thedarkmod.com/index.php?/topic/20245-view-stealth-score-during-gameplay/&do=findComment&comment=443437 5. See the GUI message scriptobjects to see how to fade a GUI overlay's transparency. 6. I have no idea. Maybe look at one of the existing HUD elements that does adhere to opacity settings, and dissect how it was made. It helps to unpack your TDM installation to more easily get at the files, without having GUI defs spread out over multiple .pk4s.
  23. My main concern is shortening or eliminating the repetitive frob stages from every material, so both approaches would work. A macro would probably make it easier for mappers to modify default behaviour by just changing the numbers or the texture path, but I'd prefer to just have a wiki entry describing how to get custom behaviour. The default frob highlight is basic & generic, so I can imagine mappers wanting to get different effects the same way they would want a custom menu cursor or background. Really they should be able to add any kind of material-based effect they want - i.e. animated textures, pulsating intensity - using the same rules as the rest of the material system. Perhaps the main issue why frob highlights have rarely been changed so far is that it could only be done on a per-material basis. This makes a global change to frob highlighting completely impractical. Perhaps the most mapper-friendly approach could be to implement default frob behaviour as an own material definition, which applies to to all materials by default and can easily be changed by a mapper. If a mapper wants multiple types of frob effects, it'd be good to allow him to make new frob materials and apply them either to materials or to entities (as spawnargs).
  24. I think a frob macro would be a good intermediary and seemingly time-efficient solution for making our material system more user-friendly. I'd still note that it should probably also include a reference to the diffusemap and maybe _white, in addition to alpha and beta values. A more definitive, material-free solution that also addresses the visual problems with our existing system would be best, of course, but it's clear it's not straightforward. As for mappers using custom frob highlights in existing missions, I'm not really aware of that having happened to date. IIRC peter_spy's custom Builder assets have some specialised frob highlights and they were used in a couple missions, i.e. Skulduggery 3.
  25. Yes, you can specify subcategories of entities such as ai, light or tdm_elevator, instead of the more generic "entity". That opens up some additional options, such as in this case the AI_ booleans for an entity defined as an "ai".
×
×
  • Create New...