TTLG|Jukebox|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 2 of 2 FirstFirst 12
Results 26 to 36 of 36

Thread: [Release] X-Raydar (T1/G/2) (OM and universal FM mod)

  1. #26
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    Yay, nice that it's working now.

    I've got a question, Saracoth, if it's something you can share..

    But can you give us an idea of how this mod works? I mean, nothing majorly detailed, unless you just want to share, but general gist of the process would be very interesting.

    I could see a potion or artifact or something used in a "regular" FM that uses this feature's specific parameters... Say, an artifact that lets you pick on life signals of living creatures, so that maybe it could be incorporated into FMs in limited ways...? I dunno, just a thought. I'd want to use it sparingly of course, but it might be kinda fun to have 1 or maybe several options on a lower difficulty, leave it off for Expert, etc.

  2. #27
    Member
    Registered: Nov 1999
    I'd be happy to. I tried to make all the mods I've made reasonably well commented and stuff to help others learn or use them (and being MIT licensed, do basically whatever they want with it). But the X-Raydar stuff covers so many weird corner cases that it's kinda massive :/

    tl;dr
    1. A marker with the J4FRadarUi class/script coordinates stuff. It sets up the custom HUD, and radar-detectable objects communicate their status to it.
    2. Items with some variation of the J4FRadarAbstractTarget class decide whether to tell the J4FRadarUi coordinator that they exist or not (through J4FRadarDetected and similar messages). These scripts are assigned to creatures and items through MetaProperties. Different classes have different logic in their BlessItem function, like books and switches hiding themselves after the player uses them once.
    3. The J4FRadarOverlayHandlerBase class draws things on screen like a custom HUD.
    4. The radar toggle item tells the J4FRadarUi coordinator to toggle on and off with J4FRadarToggle messages. The radar's basically always "active", just not always drawing indicators.


    The normal use of custom HUD/UI stuff is more like creating a UI element for a message log, another UI element for a mana bar, and so on. They'd always be at the same spot on the screen and mean the same thing, like the vanilla light gem and healthbar.

    I abuse that to create 32 UI elements (my MAX_POI_RENDERED), which are shown, hidden, or moved around on every frame. If there are more than 32 detected items in view, the others just don't get shown. I sort by the closest items first, since they matter more.

    I change the UI element to different sizes and colors of rings, depending on the distance and indicator type. It's similar to how a custom UI could represent a mana pool as a fuzzy blue orb that shrinks down to nothing, or a status indicator switching from green to red. Just a bunch of static png files.

    The game has GetObjectScreenBounds() to get four corners of something on screen (or fails if it's off screen). This could be used to make Deus-Ex-style indicators on the four corners of an object. I just average them out to get the center point.

    Deciding what objects to check GetObjectScreenBounds() for can be complicated, but it doesn't have to be near as complicated as this mod. An FM author could slap a MetaProperty directly on what they want to be detected. I have to scan every single object in a level, because people do sneaky things like use a junk object as a key. Basically all that scanning process does is assign MetaProperties I couldn't do with DML alone.

    One thing I wish worked differently is when something's near the edge of the screen. You may notice those indicator circles get squished. That's NewDark deciding to resize the image instead of cut off parts of it.

    Why do I wish there was no squishing? Because it'd make for a great keyhole-peeping mod! It's possible to do a basic one right now, but it won't move as your angle of view moves. Like the scouting-orb lens overlay, basically. To give a sense of peering through the two sides of a keyhole, it'd be better if there were two keyhole images that overlap. If one of those were a UI element sliding around your screen as you turn your head, it could squeeze the field of view to a sliver if you turned your head too far. Alas, it just gets smooshed and looks weird instead. And the scaling of UI elements to different monitor sizes also complicates things a bit. Maybe someday.... I think it'd be possible to trigger keyhole behavior by being crouched near a door for long enough, and to leave keyhole view if turning your head too far or someone opens it! But given the visual experience wasn't what I wanted, I never went far enough to confirm anything beyond the ability to attach my point-of-view camera to a door :/

    Anyway, I'm rambling now. The idea of a quantity-limited, time-limited potion for these radar effects is totally doable. If that's the only change that was desired, it'd be a matter of having some object send a J4FRadarToggle message when it's used, start a timer, and send another J4FRadarToggle message when it expires. At that point, it'd probably be better to implement new J4FRadarToggleOn and J4FRadarToggleOff messages specifically, so that if someone happens to drink two Detect Gold potions at the same time they wouldn't cancel each other out.

    Lots of things are doable with enough effort, though. A blood radar that detects living (but not undead) creatures when you've equipped a vampiric sword, and only up to a certain range, and only when on low heath. Tweak the J4FRadarCreatureTarget's BlessItem function enough, and that might be good enough.

  3. #28
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    Wow. Amazing work and just for thinking up the concept and implementing it of course.. Bravo!

    I wonder if it would help (enough) to make sure things in missions (items, AI, loot, junk, etc) going forward have certain predictable properties on them.. You know, to prevent unexpected things like you mentioned with junk being a key. Not sure if that would be even possible, but it's got to be easier to prevent than to try and figure out after the fact. As I've mentioned before, a lot of things have changed and a lot of the "weird shit" that was done decades ago are no longer needed, so it should be definitely doable. I dunno.. maybe I'm just rambling too.

  4. #29
    Member
    Registered: Nov 1999
    Honestly, even in OMs some things tend to slip by. I remember having issues with a lever part in the lost city for some reason. At least playtesting these mods (x-raydar, "keyring", fairy light) gave me an excuse to run through both games and some classic FMs again.

    As for unpredictable stuff, that's fine, honestly. FM authors have a way bigger burden. If it's easier to take the best-fitting item and tweak it, power to them. It's more effort to take a junk debris piece and give it the golden candelabra model, than it is to place an actual golden candelabra and remove some loot-related properties. (That's a real-world example I've seen, not just a hypothetical.) Or slap loot properties onto a dumb rock and call it a geode. The Dark Engine's flexibility even before NewDark is pretty fantastic

  5. #30
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    Fair enuff!

  6. #31
    Member
    Registered: May 2008
    Location: Southern,California
    i wish they would add loot glint "thief 3 effect" into next newdark update for thief 1/g/2

  7. #32
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    It could be added manually.. of a sort, I think. I mean, it wouldn't look the same but it would most likely have to be added in from the start. I don't think it would be something that could be hacked in globally. Not 100% sure though. Certainly someone like vfig or fortuni, or some of the others that are knowledgeable with the whole DML system could tell us. That would be our most viable option at this time, I think.

  8. #33
    ZylonBane
    Registered: Sep 2000
    Location: ZylonBane
    Quote Originally Posted by downwinder View Post
    i wish they would add loot glint "thief 3 effect" into next newdark update for thief 1/g/2

  9. #34
    Member
    Registered: Nov 1999
    Quote Originally Posted by downwinder View Post
    i wish they would add loot glint "thief 3 effect" into next newdark update for thief 1/g/2
    Quote Originally Posted by Hit Deity View Post
    It could be added manually.. of a sort, I think. I mean, it wouldn't look the same but it would most likely have to be added in from the start. I don't think it would be something that could be hacked in globally. Not 100% sure though. Certainly someone like vfig or fortuni, or some of the others that are knowledgeable with the whole DML system could tell us. That would be our most viable option at this time, I think.
    One option today is the ExtraLight property, which is used to cause fire crystals and apparitions to appear lit up even in dark areas, without making the player more visible just by standing near them. ExtraLight works on a sliding scale, so it should even be possible to smoothly "fade in and out" of the brightening effect with a simple Squirrel script. (As opposed to a sudden, jarring flash of brightness.) The biggest hurdle here, I think, is what to do for objects already in well-lit areas. Briefly darken as well as brighten them? Also, I can't recall whether pickpocketable items apply their ExtraLight property, or just inherit the light level of the creature they're attached to.

    Tinting or coloring objects might be a nice addition or alternative, but I don't think we have those features in NewDark (other than for 2D bitmap "objects"). I'd be happy to learn I overlooked something, though. Might be useful for universal "freezing" and "turned to stone" type effects as well, like in Hexen and various Doom source ports.

    For really small items like rings and coins, they could be made to periodically shed actual dynamic light. Like a fire arrow in flight, but smaller. Cribbing an idea from the Fairy Light mod, this effect could be avoided when the player is nearby and might be illuminated. Unfortunately, even with that precaution, it could potentially reveal blood, dead bodies, or other things an AI would otherwise overlook in really dark spots. Rare corner case, but worth noting.

    A further option would be similar to this x-raydar mod, temporarily placing some kind of glinting/sparkle indicator on some object that's already in line of sight.

    Both of those last two options require use of more expensive game functions to check exactly how visible an object is. Otherwise, you might see the glint indicator on an item hidden in a barrel, or accidentally reveal a secret compartment when a ring inside it glows. I don't know that most players would even notice, on modern machines. In any case, the ExtraLight approach doesn't need this extra precaution.

    It may also be possible to do something fancy with a periodic particle effect attached to these objects. Depending on how it's set up, it may or may not risk revealing out-of-sight items.

  10. #35
    Member
    Registered: Apr 2001
    Location: Lost in the BSP...
    Quote Originally Posted by Saracoth View Post
    One option today is the ExtraLight property, which is used to cause fire crystals and apparitions to appear lit up even in dark areas, without making the player more visible just by standing near them. ExtraLight works on a sliding scale, so it should even be possible to smoothly "fade in and out" of the brightening effect with a simple Squirrel script. (As opposed to a sudden, jarring flash of brightness.) The biggest hurdle here, I think, is what to do for objects already in well-lit areas. Briefly darken as well as brighten them? Also, I can't recall whether pickpocketable items apply their ExtraLight property, or just inherit the light level of the creature they're attached to.

    Tinting or coloring objects might be a nice addition or alternative, but I don't think we have those features in NewDark (other than for 2D bitmap "objects"). I'd be happy to learn I overlooked something, though. Might be useful for universal "freezing" and "turned to stone" type effects as well, like in Hexen and various Doom source ports.

    For really small items like rings and coins, they could be made to periodically shed actual dynamic light. Like a fire arrow in flight, but smaller. Cribbing an idea from the Fairy Light mod, this effect could be avoided when the player is nearby and might be illuminated. Unfortunately, even with that precaution, it could potentially reveal blood, dead bodies, or other things an AI would otherwise overlook in really dark spots. Rare corner case, but worth noting.

    A further option would be similar to this x-raydar mod, temporarily placing some kind of glinting/sparkle indicator on some object that's already in line of sight.

    Both of those last two options require use of more expensive game functions to check exactly how visible an object is. Otherwise, you might see the glint indicator on an item hidden in a barrel, or accidentally reveal a secret compartment when a ring inside it glows. I don't know that most players would even notice, on modern machines. In any case, the ExtraLight approach doesn't need this extra precaution.

    It may also be possible to do something fancy with a periodic particle effect attached to these objects. Depending on how it's set up, it may or may not risk revealing out-of-sight items.
    Sounds easier than I previously thought..


    Quote Originally Posted by ZylonBane View Post
    LOL. My thoughts exactly, but since it would be a localized mod, I wouldn't mind if it existed.

    Still wish we could emoji-react posts. This is the 21st century... c'mon, TTLG!!

  11. #36
    Member
    Registered: Jan 2014
    This is a great tool, been wanting this since 2015 when I got into Thief fan missions! Thank you very much for making it, I might finally stop relying on walkthroughs and DromED!

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •