Jump to content
The Dark Mod Forums

Apples and Peaches: Obsttorte's Mapping and Scripting Thread


Obsttorte
 Share

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

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 1

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

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.

 Share


  • Recent Status Updates

    • nbohr1more

      The Dark Mod is hosting an Ask Me Anything thread on the PC Gaming reddit forum:  https://www.reddit.com/r/pcgaming/comments/10nfcwj/hello_we_are_the_international_development_team/
      Feel free to join the discussion there
      · 0 replies
    • stgatilov

      Bumped into an interesting piece of wisdom called Hyrum's Law:
      With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.
      · 5 replies
    • The Black Arrow

      I love playing The Dark Mod when it's cold in my place. Bonus points when it's a bit (or even very) dark and it's raining, too.
      · 1 reply
    • The Black Arrow

      I've been having stutters in Vulkan, apparently it's Nvidia Drivers' fault, so I reverted to 512 according to this: https://www.nvidia.com/en-us/geforce/forums/geforce-graphics-cards/5/505679/regular-microstutter-in-vulkan-applications-after-/?topicPage=40

      And no, that did NOT fix it. What's going on? My GPU is an RTX 2070, by the way.
      · 4 replies
    • datiswous

      I just figured out how to make subtitles work in TDM (srt) for ingame cutscenes and how to automatically generate the srt file in Kdenlive's speech recognition (I just had to edit it a bit).
      Kdenlive is a free and open source multiplatform pretty advanced video editor.
      Test case is the first builder gost scene in Requiem saying:
      1 00:00:00,180 --> 00:00:02,140 the builder be with you this night 2 00:00:02,600 --> 00:00:04,840 there will be secrets all around you 3 00:00:05,040 --> 00:00:06,439 so have a keen eye The following page gives you the basic info:
      https://wiki.thedarkmod.com/index.php?title=Subtitles
      These 2 tutorials give you the info for creating the srt files:
      If you run into the problem the Kdenlive cannot find your Python PATH, then here is a solution:
      https://www.mail-archive.com/kde-bugs-dist@kde.org/msg672183.html
      Edit: During the installation of Python, in the installer, if you select more options, you can specify to set the PATH. I tried this on another Windows computer and this fixed the issue. Much easier solution.
       
      This is all the code for the testcase:
       
      Maybe I will create a seperate (text,images based) tutorial on the wiki.
      · 8 replies
×
×
  • Create New...