-
Active Member
Text to speech for Boss spawns
Can someone make a plugin that says "Perendi has spawned" or just "Perendi" / "Saxtris" etc. when boss spawns? only for GR's ofc. TY
-
Active Member
here is a snippet
Code:
public void PaintWorld(WorldLayer layer)
{
var shrines = Hud.Game.Shrines;
foreach (var x in shrines)
{
if (!x.IsOperated) //already clicked?
{
if ((x.LastSpeak == null) && (Hud.LastSpeak.TimerTest(5000)))
{
//shrines texttospeech
if ((x.Type != ShrineType.HealingWell) && (x.Type != ShrineType.PoolOfReflection))
{
Hud.Speak(x.SnoActor.NameLocalized);
x.LastSpeak = Hud.CreateWatch();
x.LastSpeak.Restart();
}
//pools texttospeech
if (x.Type == ShrineType.PoolOfReflection)
{
Hud.Speak(x.SnoActor.NameLocalized);
x.LastSpeak = Hud.CreateWatch();
x.LastSpeak.Restart();
}
}
}
}
var monsters = Hud.Game.AliveMonsters;
foreach (var x in monsters)
{
//Boss texttospeech
if (x.Rarity == ActorRarity.Boss)
{
if ((x.LastSpeak == null) && (Hud.LastSpeak.TimerTest(5000)))
{
Hud.Speak(x.SnoActor.NameLocalized);
x.LastSpeak = Hud.CreateWatch();
x.LastSpeak.Restart();
}
}
}
}
-
Member
in which plugin do I have to insert the snipped.
Can someone maybe create a complete plugin.
-
Member
Interested as well.
Noobz
-
Member
Here's a simple plugin that announces the Rift Guardian's name when it spawns.
Save it as "SpeakGuardianPlugin.cs" under \plugins\User\
Code:
using System.Linq;
using System;
using System.Collections.Generic;
using Turbo.Plugins.Default;
//written in response to Csavo's request at https://www.ownedcore.com/forums/diablo-3/turbohud/turbohud-support/624252-text-speech-boss-spawns.html
namespace Turbo.Plugins.User
{
public class SpeakGuardianPlugin : BasePlugin, IInGameWorldPainter
{
public SpeakGuardianPlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
}
public void PaintWorld(WorldLayer layer)
{
var mobs = Hud.Game.AliveMonsters;
foreach (var mob in mobs)
{
if (mob.Rarity == ActorRarity.Boss)
{
if ((mob.LastSpeak == null) && (Hud.Sound.LastSpeak.TimerTest(5000)))
{
Hud.Sound.Speak(mob.SnoActor.NameLocalized + " has sponned"); //250818 change this to "has spawned" if you like to, but this sounds better IMO
mob.LastSpeak = Hud.Time.CreateAndStartWatch();
mob.LastSpeak.Restart();
}
}
}
}
}
}
Edit: 27/08/2018
I apologise for the quick and dirty snippet, I'm very new to coding and would appreciate any help/feedback.
In the next edit, I will try to address the following issues:
- Announces Echoes of Orlash
- Repeats announcement when player moves to a new area before returning to the RG
I'm thinking of adding the following:
- Information about RG that has spawned (RG skills, adds spawned, specific strategies) that can be toggled on and off
- Plugin to be customised so it will only be active in Greater Rifts
Again, any help/instructions would be awesome! TYVM in advance!
Last edited by evan6944; 08-26-2018 at 09:47 PM.
-
Post Thanks / Like - 1 Thanks
dr_m (1 members gave Thanks to evan6944 for this useful post)
-
Member
Thanks evan6944
Thanks,
evan6944
Great Job. The Plugin is working perfectly.
-
Post Thanks / Like - 1 Thanks
evan6944 (1 members gave Thanks to Fokkus for this useful post)
-
Member
Great job, thank you, works fine.
Noobz
-
Post Thanks / Like - 1 Thanks
evan6944 (1 members gave Thanks to Noobz for this useful post)
-
Active Member
anyone know what has been changed in TTS ? its not working for me since upgrading from turbohud 7.6 to 7.7
-
Member
Originally Posted by
d2k2
anyone know what has been changed in TTS ? its not working for me since upgrading from turbohud 7.6 to 7.7
Hi there!
In the update to v7.5, KillerJohn has made a few changes which might have broken your plugins. For clarity, this is what KJ mentioned in his post:
(7.5)
- BREAKING CHANGE: Hud.CurrentTime -> Hud.Time.Now (7.5)
- BREAKING CHANGE: Hud.CreateWatch -> Hud.Time.CreateWatch
- BREAKING CHANGE: Hud.CreateAndStartWatch -> Hud.Time.CreateAndStartWatch
- BREAKING CHANGE: Hud.LogIntoFile -> Hud.Time.TextLog.Log
You mentioned that the issue began when you updated from v7.6 to v7.7. Since the above update happened before that, I'm not sure if I'm pointing you to the right direction. I hope it helps anyway!
-
Active Member
Originally Posted by
evan6944
Hi there!
In the update to v7.5, KillerJohn has made a few changes which might have broken your plugins. For clarity, this is what KJ mentioned in his
post:
You mentioned that the issue began when you updated from v7.6 to v7.7. Since the above update happened before that, I'm not sure if I'm pointing you to the right direction. I hope it helps anyway!
yes, i made this changes when i migrated from 7.5 to 7.6.
but now there seems no changes required when migrating from 7.6 to 7.7. at least no info about this avaible and no errors in the logfiles.
@even6944, did you test v7.7 with TTS?
-
Member
I do not know if there have been other changes in tts but ..
Now the initial volume of TH depends on what you have in d3 (specifically the general volume and that of the effects). See if you have it activated and increase the volumes of the previous ones. Anyway if it is under the volume of the TH it could be increased individually from the windows administrator. If you are one of those who are restarting a lot th to check code you can insert a line like this, in customize
Hud.Sound.VolumeMultiplier = 20f; // (modify the 20 according to preference)
and so do not have to be modifying volumes every time
-
Active Member
Originally Posted by
taotse
I do not know if there have been other changes in tts but ..
Now the initial volume of TH depends on what you have in d3 (specifically the general volume and that of the effects). See if you have it activated and increase the volumes of the previous ones. Anyway if it is under the volume of the TH it could be increased individually from the windows administrator. If you are one of those who are restarting a lot th to check code you can insert a line like this, in customize
Hud.Sound.VolumeMultiplier = 20f; // (modify the 20 according to preference)
and so do not have to be modifying volumes every time
ok thx for the info.
my ingame volume settings are very low 0-20. i played this game over 10000 hours, so i dont want to hear all the diablo sounds while playing.
i set them for testing purpose to max (100) and after this change i could hear TTS from turbohud, but only on the left speaker. any workarounds for this?
changing Hud.Sound.VolumeMultiplier to a higher Value than 20 did not increase the volume for me. 20 seems to be max, but thats ok. only problem is, that i hear TTS only on left speaker.
Last edited by d2k2; 08-27-2018 at 11:22 AM.
-
Member
I have the multiplier to 100 to hear it well
Listening to sounds on one side only happens to some people, but according to KJ he does not control that, I do not know what will happen. It works for me
-
Member
I can only hear from the left channel as well. How can we debug this? Can I assist somehow? Thanks.