Jump to content


Photo

Newbie DarkRadiant Questions


8471 replies to this topic

#8451 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 202 posts

Posted 16 November 2018 - 05:38 PM

What's up with certain decal textures that they cause z-fighting when they are flush to a brush surface, but when lifted off 0.125 units they disappear entirely? I'm trying to use a snow edge texture on a street where part of it doesn't have any snow, and blending into a snow patch in the middle of the street...



#8452 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 21 November 2018 - 08:29 AM

Hi,

Scripting problem, most likely - Unsure how to do this, not sure if I ever knew.

Spoiler


I'm unsure of the script commands I might include to either call a spawn on an existing player clip (or activate it) and then destroy it when the movement script (only a rotation on axis - it's a brush door with a hurt stim, to crush an AI if the player chooses)..?

I know "entity (idk the name of the playerclip entity atm) = sys.spawn" and to perhaps set the spawnarg to the x,y,z co-ordinates, then "remove (clipbrush)" when the door is open...

 

Or:

Would it be best to make the playerclip brush, hide it outside of bounds - on "stonedoor.script being triggered" - "clipbrush.MoveToPosition (x, y, z)" then "RestorePosition (clipbrush) [to put back to hidden room] after "WaitFor(doormover)".

Or:

I'm totally wrong and ought to do it another way, or simply forget it and let the player figure it out themselves (either by dying, using the shadow by the door as cover while it opens - or that it's a lethal thing by purposefully or not trapping (in this instance, killing, because trapping an AI would be problematic) and AI by accident or through observation and on purpose.


Either way, a knowledge reward, except one is annoying and the other is ... kinda cool.

Would this happen every time the script to open the door is called, by the player using teh trigger switch that calls the script that opens the door that (potentially) crushes the patrolling guard.?


I'm not sure if either work nor which is the most elegant solution... Something says that it might be pointless, and to let the player learn themselves.

Spoiler

 

Thanks in advance.


// added spoilers - leaning towards no script, player learning, but it would still be useful to know for future (eg, spawn playerclips on, eg, burning building escape, funnel all AI down one path, etc...)


Edited by teh_saccade, 21 November 2018 - 08:37 AM.


#8453 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5713 posts

Posted 21 November 2018 - 12:01 PM

Dude, you are really maxing out the possibilities on how a text can be formatted. :mellow:


  • teh_saccade likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8454 ERH+

ERH+

    Advanced Member

  • Member
  • PipPipPip
  • 746 posts

Posted 21 November 2018 - 07:23 PM

I have question about handling movables in front of the player, particularly lanterns. I want lantern to be not in the middle of FOV, but rather near one of the edges. Is movable's position (in the middle, mouse wheel zooms in/out) hardcoded, or can I edit these properties for lantern or for all movables and replace used action script in said lantern?


S2wtMNl.gif


#8455 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1870 posts

Posted 21 November 2018 - 08:29 PM

you can kill things with a trigger_hurt entity

 

if you can detect guard in door then

$<named guard>.kill();

will kill the guard, they will do their death animation, if you have a no kill objective then guard must not be included in the no kill list. I think the kill() command is the same as player killing guard, not too sure though.


Edited by stumpy, 22 November 2018 - 01:27 AM.


#8456 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 163 posts

Posted 23 November 2018 - 03:34 PM

When I start the mission via "Start Mission" button, I receive the swirling background showing nothing:

 

beforebriefing.jpg

 

After pressing the left mouse button, the button-animated briefing (from Sotha) starts.

 

So far, so good, but how can I integrate the DM intro before my briefing?

 

intro.jpg

 

 



#8457 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 23 November 2018 - 11:52 PM

Dude, you are really maxing out the possibilities on how a text can be formatted. :mellow:

I do my best.

It'd be nice to figure out how to script that stuff and use it in the mission from triggers (or obj./stim/resp.) - it would be useful for other things too when working on the mission changing depending on player actions.

Seems having the object in a hidden room then triggering it to be put there and back again (switch calls script and triggers mover), trigger multiple in the doorway calls to place brush back in the hidden room, is the way to do it.

Same as 'porting in an AI or a bunch of brushes after a rockfall or something.

 

// $<named guard>.kill(); - that might be a good way to ensure it's only the guards that get trigger hurted... Didn't think of that. Thanks.

(ps, "no kill objective..?" what's that? :P Worth noting, though - raises another question of how to stop the player being hurt if they touch the back-face of the door when it's finished opening... Will have to look into that - probably best to have it open so it's impossible for the player to touch the back face, but that means a section of wall will cause hurt... unless it has something in front, like a bookshelf, that slides the opposite way, so the wall is hidden... this is getting complicated...).
 


Edited by teh_saccade, 24 November 2018 - 12:08 AM.


#8458 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 24 November 2018 - 12:00 AM

Jack - doesn't the TDM intro video play automatically when you start the mission briefing anyway, once you've added some content..?

If not - take a look at the standard briefing gui and then copy-pasta the relevant stuff into the button mainmenu_briefing.gui.

NB - "by default":

http://wiki.thedarkm...rolled_Briefing

also mainmenu_custom_defs.gui, for the video:

http://wiki.thedarkm...Briefing_Videos

 



#8459 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 24 November 2018 - 12:26 AM

I have question about handling movables in front of the player, particularly lanterns. I want lantern to be not in the middle of FOV, but rather near one of the edges. Is movable's position (in the middle, mouse wheel zooms in/out) hardcoded, or can I edit these properties for lantern or for all movables and replace used action script in said lantern?

I think the grabber is SDK coded.

Idk if you can offsetRelation an entity that calls a script when frobbed.

No idea how the grabber works - never had a need to look at it.

Maybe a named item can have its position changed through spawnargs and frob action script...

Seems possible to offset position using Def Attach: http://wiki.thedarkm...itle=Def_attach

Perhaps the lantern can be altered so it's Def Attach includes an offset to appear in the position you'd like..? Same as attaching stuff to AI, but player1 instead of the AI. IDK if that works - never tried it.


Edited by teh_saccade, 24 November 2018 - 12:32 AM.

  • ERH+ likes this

#8460 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 163 posts

Posted 24 November 2018 - 02:08 AM

Jack - doesn't the TDM intro video play automatically when you start the mission briefing anyway, once you've added some content..?

If not - take a look at the standard briefing gui and then copy-pasta the relevant stuff into the button mainmenu_briefing.gui.

NB - "by default":

http://wiki.thedarkm...rolled_Briefing

also mainmenu_custom_defs.gui, for the video:

http://wiki.thedarkm...Briefing_Videos

 

 

1. If I replace my briefing.gui with the unchanged briefing.gui from Sotha I downloaded a few weeks back - same result.

2. If I replaced my briefing gui with the customized briefing.gui from Full Moon Fewer ( the mission uses also Sotha's button-animated briefing) - same result

 

That brings me to the conclusion I must have changed something outside this particular gui file but I cannot figure out where.

 

There is a gui in which I changed the sound files to play (mainmenu_custom_defs_gui), but this file only includes the following not relevant for visuals:

 

#undef MM_MENU_SOUND_CMD
#define MM_MENU_SOUND_CMD "music maintitle;"
#undef MM_BRIEFING_SOUND_CMD
#define MM_BRIEFING_SOUND_CMD "music hiddenhands;"

 

 

hm...



#8461 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 27 November 2018 - 06:25 PM

That's kinda weird - you might be right. Probably over my head.

Have you considered ripping the intro video and simply including it as part of your own intro video, leading to your button briefing (if you can figure that), and resetting your other defs (after backing them up)..?
It'd be easier to force the intro video played if it was part of your briefing.

Spoiler
.



#8462 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 27 November 2018 - 06:30 PM

Oh, you've changed the defs for the intro. Maybe that's it.

Personally, I hate watching videos when I could be reading something.

All these tutorial videos... I'd rather have a book.



#8463 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 163 posts

Posted 30 November 2018 - 05:52 AM

You are right.  I just removed the file mentioned above and now the DM intro is back, but my custom music is gone.

 

Do I have to add something in the definitions above to make sure that the game does still use settings I have not changed?



#8464 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 30 November 2018 - 09:26 AM

You're trying to change the music for the briefing (the drone on the difficulty select screen), and not the video (the "waaaaannng"), right..?
'Cos the defs you're changing are for the intro video and not the briefing.

Spoiler


 


Edited by teh_saccade, 30 November 2018 - 09:29 AM.


#8465 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1870 posts

Posted 01 December 2018 - 11:27 PM

no kill objective, is on objectives screen for, if you kill ai on team 2 then you fail map and its game over.


  • teh_saccade likes this

#8466 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 02 December 2018 - 04:54 PM

no kill objective, is on objectives screen for, if you kill ai on team 2 then you fail map and its game over.

(I forgot to include the :> sarcasm smilie to indicate that, "no kill objectives? Mines, broadheads and shiny new swords for everyone!" - forcing player moral decision is preferable, to me at least, than enforcing a restriction on player freedom)



#8467 teh_saccade

teh_saccade

    Advanced Member

  • Member
  • PipPipPip
  • 682 posts

Posted 03 December 2018 - 10:32 PM

JackFarmer - did you manage to figure an anwer to the problem you were facing..?

It would be good to update the wiki section on this, so others might more easily be able to find answers to these (slightly more advanced) questions.

Spoiler


Edited by teh_saccade, 03 December 2018 - 10:34 PM.


#8468 Aldo

Aldo

    Member

  • Member
  • PipPip
  • 38 posts

Posted 07 December 2018 - 03:37 PM

I'm having intermittent problems with a target_set_frobable clip box I have around some loot in a drawer.  If the clip box is touching the drawer model the whole drawer becomes unfrobable.  I had it working by making the clip box smaller and not touching the model, but when I tried to set the next drawer up the same, they both became unfrobable.



#8469 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 163 posts

Posted 08 December 2018 - 01:57 AM

I'm having intermittent problems with a target_set_frobable clip box I have around some loot in a drawer.  If the clip box is touching the drawer model the whole drawer becomes unfrobable.  I had it working by making the clip box smaller and not touching the model, but when I tried to set the next drawer up the same, they both became unfrobable.

 

 

Please insert the prefab with the name "dresser_darkS.pfb" (that's just an example; there are several of them where S/N/W/E refers to the opening rotation).

 

This prefab comes with all additional settings you need and the drawers include the frobblockers. I hope this helps you.



#8470 JackFarmer

JackFarmer

    Member

  • Member
  • PipPip
  • 163 posts

Posted 08 December 2018 - 02:16 AM

JackFarmer - did you manage to figure an anwer to the problem you were facing..?

It would be good to update the wiki section on this, so others might more easily be able to find answers to these (slightly more advanced) questions.
 

 

 

 

After consulting with Grayman and Duzenko I can confirm your assumption: as soon as a gui file originally found in the core file structure has been created in the mission map, the code disregards the original settings from the core file. Thus it is required to copy the core file to the map and create the changes there.

 

With respect to both music to be played on the main menu and during the briefings, the following has to be done:

 

1. Take a copy of the file "mainmenu_custom_defs.gui" and store in under "fms/missionname/guis".

2. Replace the ".gui" ending with an ".txt" ending

3. For changing the music in the main menu add at the end:

 

#undef MM_MENU_SOUND_CMD
#define MM_MENU_SOUND_CMD "music mysong1;"

 

 

4. For changing the music during the briefing add at the end:

 

#undef MM_BRIEFING_SOUND_CMD
#define MM_BRIEFING_SOUND_CMD "music mysong2;"

 

The word "music" and the ";" must be included by any means, otherwise it will not work.

 

 

5. A text file has to be added containing the following:

 

mysong1

{
  editor_displayFolder  ambient

  minDistance  20
  maxDistance  24
  volume  4
  no_efx

  sound/ambient/mysong1.ogg
}

mysong2
{
    editor_displayFolder    ambient
    looping
    omnidirectional
    volume 15
    sound/ambient/mysong2.ogg
    
}

 

 

6. After adding the lines quoted above, the ending of the file has to be changed into "sndshd".

 

 

7. The sound files (format: ogg) belong in the folder mymission/sound/ambient

 

 

--------------------------------------------

 

I hope I did not forget anything important and you can turn this into understandable English language.

 

JF


Edited by JackFarmer, 08 December 2018 - 02:25 AM.


#8471 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12730 posts

Posted 08 December 2018 - 01:19 PM

Corrections to these instructions:

 

2 - Don't change the file extension. Just leave it as ".gui".

 

3 - No need to add lines at the end. Just edit lines 426/427.

 

4 - No need to add lines at the end. Just edit lines 434/435.

 

6 - The missionname.sndshd file goes into missionname/sound.



#8472 Aldo

Aldo

    Member

  • Member
  • PipPip
  • 38 posts

Posted 08 December 2018 - 03:41 PM

 

 

Please insert the prefab with the name "dresser_darkS.pfb" (that's just an example; there are several of them where S/N/W/E refers to the opening rotation).

 

This prefab comes with all additional settings you need and the drawers include the frobblockers. I hope this helps you.

I am trying to use models/darkmod/furniture/cabinets/cabinet1_openable.ase, can't find this in prefabs.  It's only a minor detail, I'll come back to it later. Thanks





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users