Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

4 minutes ago, Destined said:

You can try to copy the shader of another surface and paste it onto your patch. If I remember correctly this had worked for some arches I made.

You need to copy from a brush's surface onto a patch, and the brush surface has to be on the same plane as the patch. This is a 2D projection, so it'll work best for flat patches.

Link to comment
Share on other sites

11 hours ago, Dragofer said:

You need to copy from a brush's surface onto a patch, and the brush surface has to be on the same plane as the patch. This is a 2D projection, so it'll work best for flat patches.

Good to know. In my case this apparently has been the case by chance.

Link to comment
Share on other sites

Ran into an issue with an AI last night: I'm trying to have a noble playing the lute, which I'm doing by giving the AI spawnargs "def_attach5 atdm:prop_playable_lute" and "pos_attach5 hand_l". I'm running into two problems: The lute is offset and floating above the character, and although they're playing the singing animation I don't hear anything. I'm hoping that for the song I won't need a speaker, as it's probably difficult to make it stop and resume whenever the AI becomes alert or goes back to sitting at the table.

map_scroll.pk4dir_2020-10-25_04_21_42.thumb.jpg.6af5d7408baca8b5d7891faf4b3afb71.jpg

Link to comment
Share on other sites

@MirceaKitsune

I found the entity definition for this lute:

Spoiler

// Springheel: attaching this lute will activate playing behaviour.
entityDef atdm:prop_playable_lute
{
    "inherit"                    "atdm:moveable_lute01"
    "editor_displayFolder"        "Props"
    "editor_usage"                "Attaching this lute will activate playing behaviour."

        "model"                        "models/darkmod/musical/lute01_held.lwo"

    "frobable"                    "0" // don't frob until the AI drops it

    "is_mantleable"                "0"
    "drop_when_ragdoll"            "1"
    "drop_set_frobable"            "1"

            "unbindOnalertIndex"    "2"

        "replace_anim_idle_sit"                 "play_lute_idle"

       "joint"                        "Hips"
       

}

It seems you only have to attach it and the rest is done for you, so you don't have to specify a joint.

As for the sound I guess you have to use a speaker. Here is a thread about the lute:

 

Edited by STRUNK
Link to comment
Share on other sites

4 hours ago, MirceaKitsune said:

The lute is offset and floating above the character

When attaching entities to AIs, the entities sometimes need to be rotated by putting spawnargs into their entity defs which specify their rotation and offset compared to a specific joint (in this case: something attached to the joint "velvetcap_1").

"angles_velvetcap_1"               "90 90 0"
"origin_velvetcap_1"               "3 1.2 .2"

I think if you specify a name_attach5 in addition to the def_attach5, for example "lute", then you can skip modifying the entity def and instead apply a spawnarg like "set angles_velvetcap_1 on lute" "90 90 0".

This is why you sometimes have "wearable" versions of props for attaching to AIs. Maybe there's one already for the lute? Can check Goldwell's missions for an existing example, I believe Northdale 2 is the one with a skeleton bard playing a lute.

Link to comment
Share on other sites

The lute player resuming playing isn't a necessity, just dropping the lute once the alert level is high enough for him to start walking around, he can stop playing forever then. The main issue is how to set up the speaker so the song also stops, I'm not sure how you make an AI trigger a speaker off at a given alert level... I'll check that thread in more detail.

In the meantime I really need help with flattening the texture on curve patches, particularly on end caps. Here's a screenshot of an arch I'm making which shows exactly why this is an issue and what I'm trying to avoid.

Screenshot_20201026_180721.jpg.07a9c029e98dc95f30aa4564ac2f5799.jpg

Link to comment
Share on other sites

3 hours ago, MirceaKitsune said:

In the meantime I really need help with flattening the texture on curve patches, particularly on end caps. Here's a screenshot of an arch I'm making which shows exactly why this is an issue and what I'm trying to avoid.

Screenshot_20201026_180721.jpg.07a9c029e98dc95f30aa4564ac2f5799.jpg

In this case, you can select the surface next to the end caps (Ctrl+Shift+LMB) select "Copy Shader" (in the Edit tab), then select the end cap and choose "Paste Shader". This should lead to the end caps having the exact same shader as the surfaces around it (so you also don't have any transition problems).

Edited by Destined
Link to comment
Share on other sites

59 minutes ago, Destined said:

In this case, you can select the surface next to the end caps (Ctrl+Shift+LMB) select "Copy Shader" (in the Edit tab), then select the end cap and choose "Paste Shader". This should lead to the end caps having the exact same shader as the surfaces around it (so you also don't have any transition problems).

Thank you very much, that did it!

For the lute: I'm not sure how comfortable I am with using a fake objective just to turn it off from playing, that feels like a cheap hack to work around a limitation. Is there no other way?

Just as importantly, I can't fix its offset issue. What joint should I be attaching it to? Like I said I give the AI "def_attach5 atdm:prop_playable_lute" (which gets the object to show and the character's playing animation going). With that though I also need a pos_attach5 otherwise the map will crash at startup with a complaint. I tried both "pos_attach5 hand_l" and "pos_attach5 hand_r" however both cause the lute to be offset incorrectly and float above the hand.

  • Like 1
Link to comment
Share on other sites

@MirceaKitsune

You schouldn't attach it to a joint. You schould only have spawnarg "def_attach5 : atdm:prop_playable_lute" for the lute prop overwrites/sets the "idle anim" and the position of the lute.

https://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/&do=findComment&comment=452516

 

 

Link to comment
Share on other sites

In Siegeshop, I had set a lute player up like this before attaching props to AI w/ def_attach was a thing. Though in that mission the AI is ignorant to the world around him and never goes on alert.

The (manually positioned) model I used was 'models/darkmod/musical/lute01_held.lwo' and with 'bindToJoint' 'Spine_Dummy', in addition to bind to the AI. A rotation value was specified on the lute, which I floated about an inch in front of the t-posed AI's tunic, at waist level, in a playing position.

On the AI, I used 'bindToJoint' 'Spine_Dummy' and targeted him to a 'path_cycleanim' with 'anim' 'play_lute_idle' set on it. In the case of this AI, I also set him to have 0 awareness on everything so he just keeps playing.

Of course, in this case I just used a static speaker and if he's k/o'd, the speaker will just keep playing music and the lute will be still attached to him on the floor. So this won't help with the speaker or the ditching of the lute when alerted, but may provide a different approach of the AI holding the lute.

 

Edited by PranQster
clarification

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Fixed the attachment problem for now. For some reason it didn't crash any more after I removed the joint specification... maybe it only does that for atdm:prop_winebottle, I did the same thing for a drunk guard in parallel. How would I go about making the lute player completely unaware so he never becomes alert... and ideally immune to damage dealt by the player too so you can't kill him with weapons.

Also I'm running into a new issue: I'm teleporting a bunch of undead, and for some reason they become alert when they find the dead bodies of some guards / civilians I'm killing with a scripted trigger (the one we discussed earlier). Is there a flag to make a specific AI ignore dead bodies it finds and not become alert to them?

Link to comment
Share on other sites

There is a whole range of chanceNotice* spawnargs, that handle such things. From a quick search I gathered that ragdolls are considered persons (according to their AIUse spawnarg), so I assume that this is the reason they are recognised by the undead. You can try to set the spawnarg chanceNoticePerson to 0, but I am not sure, which other consequences this has. I assume the player is not defined as a person, so they might still see him as an enemy, but if you want them to interact with living AI (i.e. guards, townsfolk), this will not work anymore.

Link to comment
Share on other sites

"chanceNoticePerson 0" doesn't solve it, the AI becomes alert all the same. What else can I try?

Also please let me know how to make the lute player invincible as well as never becoming alert. That's going to look goofy but it's the best option easily available so I'll go for that.

Link to comment
Share on other sites

1 hour ago, MirceaKitsune said:

"chanceNoticePerson 0" doesn't solve it, the AI becomes alert all the same. What else can I try?

You could disable the visual stims emitted by those AIs, in the same script that kills / knocks them out.

$name_of_ai.StimEnable(14, 0);

14 is the ID# of visual stims (found in script/tdm_stim_response.script), 0 is to disable.

(If they start ragdolled at map start you can just disable the visual stim in the S/R Editor).

 

1 hour ago, MirceaKitsune said:

Also please let me know how to make the lute player invincible as well as never becoming alert. That's going to look goofy but it's the best option easily available so I'll go for that.

One method is to encase him in a brush of nodrawsolid and apply health 1000. If you want to go further you could make a looping script that refreshes his health every few seconds.

For never becoming alert, you can set all his acuities to 0.

  • Like 1
Link to comment
Share on other sites

@MirceaKitsune

In the script, could you test replace kill with becomeRagdoll to see if the zombies react to that?

void DropDead() //Or whatever name you gave it
{
$Target_1.becomeRagdoll();
$Target_2.becomeRagdoll();
$Target_3.becomeRagdoll();
}

If they don't react, the fallen ones should be stopped flopping around, and I still don't know how to do that. I found stopMove() and https://modwiki.dhewm3.org/StopAnim_(script_event)

You could try

void DropDead() //Or whatever name you gave it
{
$Target_1.becomeRagdoll();
$Target_1.stopMove();
$Target_2.becomeRagdoll();
$Target_2.stopMove();
$Target_3.becomeRagdoll();
$Target_3.stopMove();
}

but I don't know if it works.

I also don't know how and if stopAnim works ...

For the Luteplayer beïng invincible you could add this to your script

void KeepPlayingLute() // or void wathever_name_YouWant
{
$LutePlayer.ignoreDamage(); //Did test
}

void main() // this exact name "main" will be called by the system itself at gamestart. It only "knows" the things above it, not under it
{
KeepPlayingLute(); 	//This says: execute KeepPlayerLute. 
					//Note: The other script you made for the AI dropping dead when player gets the trophy is called by the objecive
}

Here is a page with the script events from doom3, they work for TDM. There is a lot to play around with: https://modwiki.dhewm3.org/Script_events_(Doom_3)

Edited by STRUNK
Link to comment
Share on other sites

4 hours ago, Dragofer said:

You could disable the visual stims emitted by those AIs, in the same script that kills / knocks them out.

$name_of_ai.StimEnable(14, 0);

14 is the ID# of visual stims (found in script/tdm_stim_response.script), 0 is to disable.

(If they start ragdolled at map start you can just disable the visual stim in the S/R Editor).

 

One method is to encase him in a brush of nodrawsolid and apply health 1000. If you want to go further you could make a looping script that refreshes his health every few seconds.

For never becoming alert, you can set all his acuities to 0.

As it happens I am actually working on the exact same thing as @MirceaKitsune for a Halloween update of CoS 3. I've ran into the exact same problem, my revenants go haywire when they see the corpses of the former guards around town. I tried adding the .StimEnable(14, 0); to the kill script, and it seems to work... partially. The revenants no longer "see" the corpses, but if they walk into them they become alerted. Don't know if there is a "proprioception" stim that you can turn off as well to maybe solve it?

 

3 hours ago, STRUNK said:

@MirceaKitsune

In the script, could you test replace kill with becomeRagdoll to see if the zombies react to that?


void DropDead() //Or whatever name you gave it
{
$Target_1.becomeRagdoll();
$Target_2.becomeRagdoll();
$Target_3.becomeRagdoll();
}

If they don't react, the fallen ones should be stopped flopping around, and I still don't know how to do that. I found stopMove() and https://modwiki.dhewm3.org/StopAnim_(script_event)

You could try


void DropDead() //Or whatever name you gave it
{
$Target_1.becomeRagdoll();
$Target_1.stopMove();
$Target_2.becomeRagdoll();
$Target_2.stopMove();
$Target_3.becomeRagdoll();
$Target_3.stopMove();
}

but I don't know if it works.

I also don't know how and if stopAnim works ...

For the Luteplayer beïng invincible you could add this to your script


void KeepPlayingLute() // or void wathever_name_YouWant
{
$LutePlayer.ignoreDamage(); //Did test
}

void main() // this exact name "main" will be called by the system itself at gamestart. It only "knows" the things above it, not under it
{
KeepPlayingLute(); 	//This says: execute KeepPlayerLute. 
					//Note: The other script you made for the AI dropping dead when player gets the trophy is called by the objecive
}

Here is a page with the script events from doom3, they work for TDM. There is a lot to play around with: https://modwiki.dhewm3.org/Script_events_(Doom_3)

I just tried becomeRagdoll and stopmove and hilarity ensued! I was walking up to one laying flat on the ground to see if the corpse was frobable and he turned his head and said "I could use an ale right now!" He then started flopping his feet around like he was trying to walk. If anything I would say he had one ale too many! ^^ It seems the script makes them fall to the ground and paralyze everything but their head, feet and hands, and they just keep going on as usual as if nothing was wrong.

After that I tried adding .kill() first in the script but similarly to Dragofer's StimEnable idea the revenants still alert if they touch the corpse. It also has the odd effect of killing them but freezing them in place like wax figures until you frob them when they fall flat.

All in all an interesting test session, but there are still some kinks to iron out in this script.

  • Haha 1

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

6 hours ago, MirceaKitsune said:

"chanceNoticePerson 0" doesn't solve it, the AI becomes alert all the same. What else can I try?

Also please let me know how to make the lute player invincible as well as never becoming alert. That's going to look goofy but it's the best option easily available so I'll go for that.

Not sure if it's helpful but I had a lute player in CoS 1 that was deaf, blind and mute. The setup is very ghetto, but if you can keep him from taking damage (or the lute stays floating mid air and sound keeps playing) and he's doesn't need to do anything but play the lute it should work.

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

@MirceaKitsune @Bienie

I think I found a solution!!

VIDEO - Guards and Zombies don't bother dead bodies, but react to the player

EDITED. What I posted first didn't work. This I tested and think really works.

void DropDead() //Or whatever name you gave it
{
$Target1.setEnemy($Guard1); //Target1 is becoming enemy to Guard1 (before it dies)
			    //Guard1 is the name of the AI that shouldn't bother about the corpse							
$Target1.setEnemy($Guard2);
$Target1.setEnemy($Guard3);
$Target1.kill();

$Target2.setEnemy($Guard1);
$Target2.setEnemy($Guard2);
$Target2.setEnemy($Guard3);
$Target2.kill();

$Target3.setEnemy($Guard1);
$Target3.setEnemy($Guard2);
$Target3.setEnemy($Guard3);
$Target3.kill();
}

Be sure to put the Guard(s) in a different team then the Target(s) (In the enty editor, spawnarg team) and that they are not too close to the Target(s) when they drop dead.

To work for zombies, just use the "old" DropDead script and set the zombie's spawnarg acuity_tact to 0

Edited by STRUNK
Link to comment
Share on other sites

Other venues towards making ragdolls invisible would be:

- set the "AIuse" spawnarg to something like "-"
- use actual ragdoll entities instead of killing AIs
- or show the ragdolls to the undead in a blue room so they can freak out there without being seen, give them time to relax before teleporting them to the playable area

For making the lute music stop, only thing that comes to mind now is to make an invisible objective that checks whether the AI is dead or alerted to level 3+, and triggers the speaker once.

Link to comment
Share on other sites

Seems I have to think how I'm going to deal with those two issues. For now there's another little thing I'm trying to achieve and don't know how to: After completing an objective, I want to change the music the player will hear until the end of the map. Is there a way to enforce a given ambiance after a trigger is executed, ignoring the one in the location info of the room? Or perhaps a way to turn off a location info then activate another one for a given zone, with the second location info disabled by default and flipped on once the trigger is hit?

Link to comment
Share on other sites

2 hours ago, MirceaKitsune said:

Seems I have to think how I'm going to deal with those two issues. For now there's another little thing I'm trying to achieve and don't know how to: After completing an objective, I want to change the music the player will hear until the end of the map. Is there a way to enforce a given ambiance after a trigger is executed, ignoring the one in the location info of the room? Or perhaps a way to turn off a location info then activate another one for a given zone, with the second location info disabled by default and flipped on once the trigger is hit?

Try this technique: https://wiki.thedarkmod.com/index.php?title=Location_Settings#Sound_Override. I think it was used by JackFarmer in the HH:TLC mission.

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • 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
×
×
  • Create New...