Jump to content
The Dark Mod Forums

Dragofer

Development Role
  • Posts

    2631
  • Joined

  • Last visited

  • Days Won

    157

Everything posted by Dragofer

  1. Damn, looks like that's a problem with the concept of using the console to call a script. I've made a new script that does nothing but print "test" to the console, even included it the proper way via tdm_main.script, called it both with and without the hotkey, and tried quicksaves & hard saves - the outcome was always the same: you can't load a save that was made after calling a script via console. At least there's the partial success in that there's now a way to check stealth statistics ingame, but with the caveat that you need to make a save before you press the hotkey and then go back to that save right away. Looks like a gui-based solution is the way to go from here.
  2. Most spawnargs only get read at the start, but some entities read some spawnargs at later points too, i.e. message entities check their text spawnarg each time they get triggered. I didn't know that - sounds quite similar to the void main() function actually. It gets run automatically at the start of every map and can be used by mappers to call scripts from the very beginning. Looks like there's some redundancy there - a 3rd method to call at map start is the aforementioned init of a scriptobject. In terms of scripting it looks to me like we're already sorted. Could maybe refine the script by offering a choice between stealth statistics and other statistics (i.e. loot remaining, knockouts, pickpockets) - but I think the best place to invest further effort into would be to figure out how to show the statistics gui during a running game.
  3. @wesp5that looks very good as an addon and maybe even as something that can be optionally enabled in the official client with enough polish. The wildest thing I've done with the gui scripting system so far was turning a single-mission briefing into a multi-mission one, so I hardly know yet what I'm doing, but I've identified 5 possibly relevant .gui files (mainmenu_success, mainmenu_objectives, tdm_objectives, tdm_objectives_core, tdm_objectives_defs) and did some early experimentation. I'll describe what I've done in a reproducible manner: In tdm_objectives_core.gui I duplicated the objectives title & placed it below the original objectives title (windowDef ObjectivesTitle2 and rect 0, 138, 580, 20*SIZE_MULTIPLIER). Now I have 2 titles onscreen. Lifted a statistics item from mainmenu_success.gui (windowDef StatisticsText1) and put it in a temporary .txt file Swapped the "text" entry from the statistics item to the duplicated objectives title (#str_07312 replaced by gui::listStatistics_item_0). This is the first item in a list called "listStatistics", defined in main_menu_success.gui. Unfortunately the text no longer shows up. As a test I inserted: #include "guis/mainmenu_success.gui" before the objectives title. Still no visible text though Then I inserted: set "cmd" "loadStatistics;"; before the objectives title. Now TDM crashes at startup. Looks like the problem is with accessing items from listStatistics. Maybe it's because the list is in a different .gui file from the objective .gui files, or the list hasn't been created/loaded/populated yet? Calling @grayman or @greebo as I can see by all the comments that you've both done extensive work with TDM's guis. On another note, actually a scriptobject would be good for my posted script after all - the init function of a scriptobject gets called at mapstart, so that can be used to spawn the message entity. Then the main function can be simplified to do nothing but update spawnargs and trigger the message. Well, what's done is done. @kcghost thanks, and yes, a way to differentiate between FM-specific scripts and addon scripts would be great and, it looks like, take nothing more than adding an extra line to tdm_main.script and a blank .script file as you suggest. When this thread has come to a close a feature request should be opened in bugs.thedarkmod.com
  4. @wesp5Sure, feel free to include it with your patch. When you say mission log, do you mean the objectives screen, so basically making this show up like an extra objective, the text of which gets updated every x (5?) seconds or when the screen gets brought up? Adding an extra objective might not be ideal - it's not typical, but also not excluded that FM authors use the same script command to add objectives to their mission, and that could potentially disrupt the objective id's. It'd be something to do at one's own risk. Ideally I'd like the hotkey to work out of the box (so skip step 2), but all keybinds are stored together in DarkmodKeybinds.cfg and I don't want to overwrite them. Maybe it'd be better to let the script perform the keybind, if that's possible?
  5. [Obsolete, as the use of a console to call scripts breaks savegames. See this post for a better implementation] Nice find @kcghost! Usually TDM throws an error message and stops loading if it wants you to use player1 instead of sys or vice versa, so I didn't think to look down that route. Getting rid of that snag has let me make that script, 2-step setup is below: Create a folder "script" in your /darkmod installation and place this script inside it Paste the following into TDM's command console: bind "p" "script statistic_message();" From now on, pressing p while ingame will open a scroll in the corner displaying various stealth statistics: score, suspicions, searches, sightings and bodies found. For bodies, a single body can be found by multiple AIs, adding to the count each time. You can also specify a different hotkey than p in step 2. From a technical side: Normally the optimal way to include a custom script is to use tdm_custom_scripts. However, if an FM provides its own tdm_custom_scripts it'll overwrite the one we changed in the base installation. Therefore I've decided to add this script to an existing .script file (tdm_movers.script), as this won't get overwritten by FM authors and I've deemed this one to have a relatively low chance of being changed in future TDM versions as it just defines 3 entities related to elevators. @HMartDon't think this needs to be a scriptobject as it's meant to be used by players in all missions, not something prefab-like that mappers include with their FMs. Sometimes it looks like it takes a little while before the statistics update (i.e. it looks like points only get added after a search gets called off) The ideal official solution imo would be if the full mission statistics screen could be brought up during a game. Here's the script in text format, as an alternative to downloading the .script:
  6. Unfortunately it looks like the command getMissionStatistic("stealthScore") doesn't update in real time. I've had the below test script running while a Builder guard was busy looking for or attacking me - it should display my stealth score in the console every 2s, but the console had me believe it was always 0. Same goes for sightingScore, bodies found etc. If the command had worked I could've just made a short script that spawns a message entity and told it to display the current stealth score and other interesting values on a scroll in the corner of the screen, at the push of a button. What could work is to make a script that adds an objective to avoid all level 1+ alerts, but that's a bit of a hack and it can only tell you that your stealth score is no longer 0. Maybe someone else has other ideas?
  7. There is a script command that returns current mission statistics, and it is possible to run scripts from the console. IIRC you need to make an actual script that contains the command and add it to your TDM installation (so it'd be a wesp5-style patch). It can be bound to a hotkey. If there's no more elegant way it can be done like that. For example: getMissionStatistic("stealthScore"); Entry from the TDM script reference:
  8. @Geep practically speaking, you can implement the general idea of what's already been said before by copy pasting the stone's material (=texture definition) to make a new one with the single difference that it's stated to be moss and not stone, then making a skin with the new material. Check which material is used by the moss skin of the rock: it's textures/darkmod/stone/natural/rock_grey_mossy Look this up in the texture browser -> right-click it in the list -> show shader definition -> copy the whole block of text (this is the material) In your materials folder, find or make an .mtr text file to paste this block of text into Rename the material to i.e. textures/darkmod/stone/natural/rock_grey_mossy_moss Change stone to moss, near the top of the material Make a new skin for the rock that replaces the rock's default texture (textures/darkmod/stone/natural/rock_grey) with your new modified one (textures/darkmod/stone/natural/rock_grey_mossy_moss) The engine should now treat this model as if it were made of moss instead of stone.
  9. @JackFarmermight be you need to set the objective as ongoing?
  10. @OrbWeaverI'd also like to think these forums are more civilised, which makes the highly undignified original post in this thread stand out all the more like a sore thumb. If members of the community still want to discuss Islam and atheism they could do that in a new thread that starts with a level-headed and well-reasoned opening that doesn't contain crude slurs.
  11. That worked! Thanks for sorting this out, now I can try things out again (including my original one, that I found again).
  12. I've never used that particular entity, but you can get any model to rotate by changing its classname to func_rotating (func_rotate?) and setting a speed. IIRC you don't even need start_on
  13. This was a great mission, shooting way past what I considered reasonable for a "speedbuild"! If I had to choose, I'd say my favourite aspect is how it captures the same feeling as the great Thief 2 FMs: always another area or secret to find; being able to sympathise with inhabitants in their little sidestories; and how it doesn't take itself too seriously. What I also liked was how cold it felt. When you said it'd be a wholesome seasonal mission I was expecting something fuzzy warm like Thief's Holiday, but the street lanterns with their chill lights and the frozen breaths conveyed the exact opposite. Needless to say I enjoyed getting indoors to a well-stoked fireplace wherever I found one. Lastly, that "bag" was fantastic: both the idea and the execution, and I quite enjoyed climbing all over those good-looking custom assets (maybe here'd be a good place to ask if you'd offer your custom assets to other mappers?). Well then, many thanks to you both for this Christmas surprise, and I'd sure welcome more such cooperative projects!
  14. I've been using basicfog in recent times, I'll try out Delta fog later again. And shaderParm3 is currently set to 12000, but it's a bit of an unhappy compromise between skybox visiblity and mapspace fog opacity. I'd have liked somewhere between 5000-8000 for my map.
  15. Thanks greebo! It was great watching you make short work of my bug reports as they came in, and I can really appreciate those QoL fixes (i.e. clicks in the layers window always hitting their mark, 'Choose ...' buttons always affecting the intended entity)
  16. My theory was not so much an actual correlation between date & likelihood for the icon to be missing, but that it'd be only accounts created before June 2019 that'd be affected, so basically just an issue with account migration. No users that registered more recently have reported this issue so far, but we only had 1 such member post in here until now. And yeah stgatilov, I haven't even received a confirmation from Invision support that they received my message, so this looks like it would be something for the likes of taaaki to take up with them, if he needs to do so.
  17. Any ideas for how to make skyboxes mesh better with fog? I'd like things in my mapspace to be slightly obscured, but as soon as I add any noticeable foglight the skybox turns into featureless soup. Ideally I'd like to let the skybox be unaffected by mapspace fog and instead place a second small foglight in the skybox so I can control the opacity of both areas separately. (I did already move my skybox out of the foglight's range.)
  18. @peter_spy I'd think so too. I've sent a message to Invision support briefly describing what I and others are (not) seeing and put it in relation to the 2019 forum upgrade and our account creation dates.
  19. Thanks for yet more good suggestions, but the result stays the same... /photo/# brings me to the same page as /photo, and dragging a picture onto that page simply turns my browser into a picture viewer.
  20. That's a great idea STRUNK: simply go to my profile and type photo at the end of the website URL. But it doesn't work unfortunately. On Reverend's URL I'm presented multiple options to specify an image, but on Dragofer it's just an empty box with 'Continue' at the bottom. When I click on 'Continue' it lets me re-crop my existing profile picture.
  21. Thanks for sharing boissiere. Should've clarified that the button's missing on both mobile and desktop versions of the forums. My equivalent of your screenshot is: Tried clicking on the spot where the button *should* be but it just brings up a closeup of my current image.
  22. Not so long ago I found what could make a pretty good profile picture and decided to try it out on these new forums. But I couldn't find a button anywhere that would let me change it. I asked on Discord and it seems Spooks also couldn't find anything anywhere. So I logged into an old alternative account and, lo and behold, that account has a button. This is on the first screen I get when I: 1) click on my account name in the top-right of the browser -> 2) click on 'profile'. Compared to my actual account: Are you also missing this button on your account? It'd be very much appreciated if that functionality could be restored to any of the affected accounts.
  23. That'd be a type mismatch because m_target_name is declared at the start as a string but should actually be an entity.
  24. Also, you can make a repeating script to find and apply to all targets. In this case I just triggered the targets. float i; //integer entity target; //placeholder name for any targets found for( i = 0; i < numTargets( ); i++ ) { target = getTarget(i); sys.trigger(target); } If anyone could show me how to do this for other spawnargs than "target" I'd very much appreciate that.
×
×
  • Create New...