Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

Can I use two models simultaneously on one AI? I'm thinking about semitransparent human model, plus skeleton model - as both of them are using same bones and animations they should move together nicely, IF I could stack them together (also binding additional models of internal organs).


S2wtMNl.gif

Share this post


Link to post
Share on other sites

I had wondered about that too. If the werebeast ever gets working, I wanted to toy around with the idea of an AI who transforms. Have an invisible model that swaps under certain circumstances. Is that feasible?

Share this post


Link to post
Share on other sites

If you just want to change the model and  both models use the same bones for animation (which is not the case for the werebeast, unfortunately), it may work, that you simply change the model via script / the S/R system. But I am not sure if there are problems with that, as AI may have more definitions that include the model.

For a transparent model, where the skeleton shines through, I am not sure if this is possible. I fear you would rather have to merge the two models in Blender.

Share this post


Link to post
Share on other sites

I remember from some fm lights that are dimming gradually (not in levels) when switched on and off. Is it a program in the material, or some function of light entity?


S2wtMNl.gif

Share this post


Link to post
Share on other sites
14 minutes ago, ERH+ said:

I remember from some fm lights that are dimming gradually (not in levels) when switched on and off. Is it a program in the material, or some function of light entity?

FadeInLight and FadeOutLight script events should do this:

http://wiki.thedarkmod.com/index.php?title=TDM_Script_Reference

That said, you could also use a parm value for rgb in the light material def and just have your script decrement the parm.

  • 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...)

Share this post


Link to post
Share on other sites
19 hours ago, nbohr1more said:

you could also use a parm value for rgb in the light material def and just have your script decrement the parm.

And if I want pulsating light I would need something like (time * sintable) but my attempts failed - how it should look like?


S2wtMNl.gif

Share this post


Link to post
Share on other sites

Also, I can't find elemental's model, so I could modify it - its directory supposed to be models/md5/chars/monsters/elemental/tdm_elemental.md5mesh but I've unpacked all related archives and still don't see it.


S2wtMNl.gif

Share this post


Link to post
Share on other sites
On 11/3/2019 at 1:56 AM, ERH+ said:

And if I want pulsating light I would need something like (time * sintable) but my attempts failed - how it should look like?

Similar to this:

 

https://www.iddevnet.com/doom3/materials.html

rgb scTable[ time * .5 ] 

 

  • 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...)

Share this post


Link to post
Share on other sites

Does anyone have a DR Python script that selects all loot items? Or a particular type (particularly interested in type 3, LOOT GOODS)? Either type of script would be more useful to me than the tdm_show_loot command.

Share this post


Link to post
Share on other sites

I did review that earlier, but the filter granularity as reported didn't seem to me to extend down to the spawnarg level, which is what I would need to filter for loot. DR custom Python scripting looked like it could do it, but then you'd have to work with an intricate DOM-like model... maybe an elephant gun to kill a flea. Just hoping someone had already killed that flea.

Share this post


Link to post
Share on other sites

Loot should have its own entity class and according to the wiki it is possible to filter by them. I have no access to DR right now, so I cannot test this, though. I assume the filter as written in the section "More Complex Filters" would be exactly what you are looking for. All you need is the correct word for loot as an entity class. You could check in the def file, which entity type is defined there.

Share this post


Link to post
Share on other sites

You are correct, except that there are actually around 100 loot entity classes. But on further consideration, given their naming convention, I can use regex. So the following is now working for me as a custom filter, to hide everything except loot:

 

<?xml version="1.0"?>
<filters>
  <filter name="All But Loot">
    <filterCriterion type="entityclass" match=".*" action="hide"/>
    <filterCriterion type="entityclass" match="^atdm:loot_.*|^atdm:moveable_loot.*" action="show"/>
  </filter>
  ...
</filters>

The first criterion hides everything. The second criterion overrules the first one by showing “atdm:moveable_loot_...” and “atdm:loot_…” entities.

This solves my immediate needs. But noticing that there was in "DR/Filters/Edit Filters..." an undocumented (in the wiki page) filter type EntityKeyValue, I tried to use it to restrict visibility to Type 3 Loot (Goods), using this filter:

  ...
  <filter name="All But Loot Goods">
    <filterCriterion type="entityclass" match=".*" action="hide"/>
    <filterCriterion key="inv_loot_type " type="entitykeyvalue" match="3" action="show"/>
  </filter>
  ...

This failed, that is, did not show anything. I see other forum posts in the past that claimed to use this filter type EntityKeyValue OK, so I don't know.

If I had permission to edit the wiki (perhaps some day), and assuming EntityKeyValue is working and the problem is just me, here’s what I would add as a bullet point to "What filter types do exist?":

  • entitykeyvalue: With this type, you can specify an “entitykey” (i.e., spawnarg name) and “match” (spawnarg value).

Other possible wiki page improvements follow.

Following the mention of "filters.xml":

Quote

In more recent versions of Windows, direct editing of App Data content like filters.xml is protected. Instead, use DR’s “Filter/Edit Filters…”.

Following the mention of Regex, include a reference to the particular flavor/syntax being used. Perhaps

https://www.w3schools.com/python/python_regex.asp

  • Like 1

Share this post


Link to post
Share on other sites

BTW, in the "All But Loot" filter code above, the 2nd criterion match should have a trailing underscore, i.e.,

match="^atdm:loot_.*|^atdm:moveable_loot_.*"

as the comments indicate. But this doesn't affect the results in practice.

As to the failing "All But Loot Goods", removing the unwanted trailing space in the key value did not fix anything. Also tried a match of "^3". No luck.

Could it be that the problem is that the "3" value is represented by a float, not a string, and that matching can't handle that?

Share this post


Link to post
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.


×
×
  • Create New...