Jump to content
The Dark Mod Forums

Apples and Peaches: Obsttorte's Mapping and Scripting Thread


Obsttorte

Recommended Posts

6 hours ago, Obsttorte said:

As per request of @Dragofer I've updated the shader work from this post.

 

gl_overlay.thumb.jpg.1c12ee77e56d037b588220851fca68d7.jpg

The image manipulation takes place in the fragment shader gl_overlay.fs and can be tweaked as needed. I haven't found a way to pass arguments via the gui to the material to allow on the fly alterations, so the effect is static.

gl_overlay.pk4 4.51 kB · 0 downloads

Very cool for in-game effects or cinematics!

If players just want to play any TDM mission in "Black and White mode", they can set:

r_postprocess_desaturation 1.0
  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Link to comment
Share on other sites

As requested by @Spooks (#5930) I've created a set of modified versions of the graffiti decals added by Necrobob and Bikerdude (Commited with revision #16491)graffiti.thumb.jpg.8769daadc411f316d40658a60fcb8548.jpg

Those materials are placed under textures/darkmod/decals/graffiti and located under darkmod/materials/tdm_decals_graffiti.mtr (new file).

The upper version can be colored using the _color spawnarg if turned into an entity. As using black as a color will make the decals dissapear (it is na additive blend), I've created a black version, too (multiplicative blend). Their names are extended with _black, e.g. the cross most-left is

textures/darkmod/decals/graffiti/allright
textures/darkmod/decals/graffiti/allright_black

###############################

While working on this I've noticed a bug: When turning the decal into a func_static it can happen that it won't get offset anymore, so when placed exactly at a surface it simple isn't visible. As there is no z-fighting I assume that the polygon offset gets screwed up. The occourence of this issue depends on the direction the decal is facing. It works when facing the positive x-,y- or z-direction, but not in the negative one. Is this a known issue?

 

EDIT: I've tried to create a testmap to file a bugtracker entree but wasn't able to reproduce the issue. It occours in the map the above image was taken, however. Guess there is something screwed up with that, dunno. So probably a map and not a TDM bug considering it doesn't seem to have been reported before. (Which is somewhat good news but leaves me confused ... and sooo tired 😕 )

  • Like 2

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

  • 3 weeks later...

Just some notes on the above video. (Should have added that with the video). What you can see there are some script functions that got added and allow to modify the animation speed on the fly. That was actually a request from 14 years ago :D

string getAnimList(int channel)
prints a list of all available animations on the specified channel to the console

float getAnimRate(int channel, string animName)
returns the current animation speed of the named anim on the specified channel
returns -1 if anim or channel not available
  
float setAnimRate(int channel, string animName, float rate)
sets the animation speed of the named anim on the respective channel to the specified value. 
returns 1 on success, -1 otherwise
negative values are not allowed as they lead to insta-death (why ever)

The channels are ANIMCHANNEL_HEAD, ANIMCHANNEL_TORSO and ANIMCHANNEL_LEGS.

One use-case that came to my mind was an icebomb, that slows down enemies (and creates ice floes when thrown on water - wait, where did I see that 🤔)

Another feature would be some sort of time warp effect that slows down or speed up everything around you (moveables would need a different approach, though) or guards that run slower if they got injured at their legs (which would give broadheads a non-lethal usecase or allow the usage of crow's feet weapons).

 

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

It's part of the idActor class. What do you have in mind, weapons?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Those are usually no animations, but movers. There speed can already be altered via script.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

  • 6 months later...
On 1/20/2021 at 5:54 PM, RedNoodles said:

Hi, I've been playing around with your halloween sandbox (helloween.pk4) and I wanted to say the lantern looks awesome. I'd love to see this in a horror mission.

lamp.thumb.jpg.6df0b02fa0238c70901f1332b1274b19.jpg

do you know if theres a way to separate it from the sword?

Ive been experimenting with the def files and haven't had much luck.

first thing I did was go into the tdm_player_thief def file and add a new weapon def (there are 12 weapon slots, but TDM only uses 10)

then I duplicated the default tdm_weapon_shortsword def from TDM and renamed it tdm_weapon_lamp. I compared it to your shortsword def and copied some of the references while giving the functions new names. At this point I could start up darkradiant, create this new lamp entity, load the map, pick it up and equip it alongside the sword.

I then tried to repeat this process with your shortsword script file (which the lamp def file is supposed to point to) after including it in tdm_custom_scripts

TDM doesn't like this new script file for some reason. it crashes on start up citing errors in the weapon_lantern::Idle() function

Error: tdm_weapon_lantern.script, line 90: '.' is not a name

I'm stuck. any idea what could be causing this?

@Obsttorte, @RedNoodles and all,

Is this available anywhere, please? Can't find it in this topic.

TDM Modpack 4.0

Link to comment
Share on other sites

On 3/19/2013 at 4:52 PM, Obsttorte said:

wiki article describing the note book scriptobject: http://wiki.thedarkm...matic_note_book

Sounds pretty neat. Has this ever been used in a mission?

 

Edit: I think it has been used in A house of locked secrets. Just started playing that one.

Edited by datiswous
Link to comment
Share on other sites

On 6/5/2022 at 9:42 AM, Obsttorte said:

As per request of @Dragofer I've updated the shader work from this post.

 

gl_overlay.thumb.jpg.1c12ee77e56d037b588220851fca68d7.jpg

The image manipulation takes place in the fragment shader gl_overlay.fs and can be tweaked as needed. I haven't found a way to pass arguments via the gui to the material to allow on the fly alterations, so the effect is static.

Would it for example be possible to make a camera view which shows black and white, but the rest of the world is in color? So you could for example make a window that looks out in a black and white world. Or a black and white picture on the wall that actually shows an ingame scene.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
On 1/28/2023 at 5:41 PM, snatcher said:

@Obsttorte, @RedNoodles and all,

Is this available anywhere, please? Can't find it in this topic.

Sorry for the late reply. This is the file. It was shared by Dragofer on the discord.

Quote

Here's the .pk4 if anyone wants to try it out in a mission and maybe also give feedback. Simply place it in your TDM base install. You can access the lantern by scrolling through your weapons, or bind it to i.e. the p key by pasting this into the console: bind "p" "_impulse11"

 

z_handheld_lantern.pk4

Link to comment
Share on other sites

The lantern has seen some improvements by myself, Amadeus and Goldwell. If I shared that file on Discord its probably the version that has those improvements.

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
On 3/25/2023 at 3:30 PM, datiswous said:

Oh so this is like a Doom 3 style lantern that you use instead of a weapon?

Yep!

I have completed my clean-up of the handheld lantern, I just don't know what to do with it now 🤨

I think it deserves its own topic.

EDIT - Here:

Edited by snatcher

TDM Modpack 4.0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...