• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver
Resource icon

Release MQ2Medley

Joined
May 22, 2015
RedCents
3,467¢
Song scheduler for the modern bard.

Known issues:
* -targetid is not %100 reliable. works most of the time for me, but under some circumstances may not work.

This plugin grew out my frustration with MQ2Twist and it being hard to change from twist to twist while still being efficient and not recasting the songs that already had signification duration left. Was hard to use aria, "A Tune Struck in My Head", and burn twists effectively

This is the next evolution of MQ2Twist. Features
  • set conditions for each song in the medley. Only want to cast on named? Only want to do insult if mana > 10%? Only want to cast dots if attack is on? Only want to cast mana regen when not in combat?
  • Advanced queuing support. Can specific target of queued spells for mez or cure and plugin will switch back to existing target with plugin reflexes. Optional interrupt when queing song.
  • Adapt your song song set without missing a beat, pick up with what's most important after interupting (mezzing, etc)
  • priority scheduling. Did you just mez 3 mobs? Switch back to your most important spells automatically
  • switch from medley to medley while still remembering the duration of current songs. Named up? just do switch to your burn medley to introduce new songs to the mix, while knowing what songs are already up.

Ini/config library
Kiss fork and detailed instructions on using medley with it

Quickstart

Add a section to your server_playername.ini file like
Rich (BB code):
[MQ2Medley-melee]
song1=War March of Jocelyn^30^1
song2=Aria of Maetanrus Rk. II^30^1
song3=Blade of Vesagran^180^${Melee.Combat}
song4=Fjilnauk's Song of Suffering^30^1
song5=Arcane Melody^30^1
song6=Silisia's Lively Crescendo^45^1
song7=Nilsara's Chant of Flame^24^${Melee.Combat}

/plugin MQ2Medley
/medley melee

You are now singing songs

INI Format

Can define multiply medleys in section named MQ2Medley-medleyname.
Define up to 20 songs, song1-song20
Each song has 3 parts separate by carrot(^) symbol
Part 1: Song, Item or AA name
Part 2: Duration the song lasts, this must be an expression like you would send to ${Math.Calc[part2]}. This how long you expect the buff to last.
Part 3: Condition for this song to cast. Also an expression for Math.Calc

Scheduling
Songs will cast in priority order, song1 > song2 > ... > song20
Songs that are not ready, will be skipped (Crescendo, Items, AA, etc)
Songs that still have active duration will be skipped (typically will start casting a song if less than 6 seconds left on their duration)
If all songs are active, then will cast the one that will expire soonest.

Commands
/medley name - Sing the given medley
/medley queue "song/item/aa name" [-targetid|spawnid] [-interrupt] - add songs to queue to cast once
/medley stop/end/off - stop singing
/medley - Resume the medley after using /medley stop
/medley delay # - 10ths of a second, minimum of 0, default 3, how long after casting a spell to wait to cast next spell
/medley reload - reload the INI file
/medley quiet - Toggles songs listing for medley and queued songs

Command examples
/medley melee
play medley defined in [MQ2Medley-melee] ini setion
/medley queue "Dirge of the Sleepwalker" -interrupt
Interrupt current song and cast AA "Dirge of the Sleepwaler"
/medley queue "Slumber of Silisia" -targetid|${Me.XTarget[2].ID}
When current song ends, will mez XTarget[2], briefly switching target to XTraget[2] then switching back to current target.
Target will be switched for one pulse, which is typically less than 20ms
/medley queue "Blade of Vesagran"
Add epic click to queue
/medley queue "Lesson of the Devoted"
Lesson of the Devoted AA will be added to the twist queue and sung when current song finished

TLOs
Medley.Medley
- string of current medley
- false (boolean) if no current medley
Medley.TTQE (time to queue empty)
- double time in seconds until queue is empty, this is estimate only. If performing normal medley, this will be 0.0
Medley.Tune
- int deprecated This AA was reworked, and will now always return 0. Do not use.
Medley.Active
- boolean true if MQ2Medley is currently trying to cast spells

Plugin Interaction
MQ2Medley has no plugin dependencies

MQ2Twist - should be able to coexist, just don't /twist and /medley at the same time
MQ2Cast - recommend not using this on your bard. use "/medley queue" to cast items and aa with cast time. use /alt activate or /cast item to cast instant cast AA and items, can do this even while medley is active (bards are awesome like that)



Versions
1.0 initial version
1.01 add mana check (won't get stuck on song you don't have mana for), 2010 compile
1.02 fix Medley.Medley issue (I hope)
 

Attachments

Last edited:
Can you add a way to swap instruments in (using mq2exchange or any other way).
 
Sorry, I don't have a TLP bard, and advertise this plugin as "Song scheduler for the modern bard". And by modern I pretty much mean heroic character (85) or higher, when there are instrument mods on armor.

In generally, I've never liked MQ doing /exchange and avoid it whenever possible. I realize you probably have to as a TLP bard - really sucked to be a bard back in the day lol.
 
I see where this could be and probably is much more powerful then MQ2Twist, but most of us on here pay the fee to keep it simple(KIS_S) because we are stupid (but have money to pay the fee). So if you would KISS this down where we don't have to War March of Jocelyn^18 + (6*${Medley.Tune})^1 figure out every songs duration (an include file or something)? Then include all that in the next compile that would ROCK!
 
Is it just me, or is this not twisting anything right now?

Edit; Just noticed it needs updating with patches. Ack.
 
Sorry, In Africa for 2 more weeks.

If anybody has an updated compile, please post it.

Or pester Maskoi to add to vanilla compile :)
 
I got an error trying to compile it sorry.
Rich (BB code):
1>MQ2Medley.cpp(358): error C2668: 'std::to_string' : ambiguous call to overloaded function
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(688): could be 'std::string std::to_string(long double)'
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(680): or       'std::string std::to_string(_ULonglong)'
1>          C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(672): or       'std::string std::to_string(_Longlong)'
1>          while trying to match the argument list '(int)'
 
I think you need to compile with Visual Studio 2013 Maskoi. I dusted off my old compile and it didn't have issues. Here is the DLL for this plugin and the source from winnower. Props to him for working on this. Please redcent him!
 

Attachments

VS 2010 seems to be the friendliest most compatible way to compile overall for the Very vanilla.
 
- - - Maskoi Feedback - - -
You should upgrade to 2013, it will auto upgrade all the projects pretty seemlessly. Make a copy of your MQ2 base dir if you don't trust me ;) VS 2010 doesn't have the overloads to compile the code, but anything with a C++ 11 and greater compile will.

Here is the fix to the cpp if you want to incorporate that into the compile using VS2010
http://stackoverflow.com/questions/10664699/stdto-string-more-than-instance-of-overloaded-function-matches-the-argument

It describes the error you are running into, but I believe the following code in the accepted answer should do the trick.
Rich (BB code):
#include <type_traits>
#include <string>

template<typename T>
inline typename std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value,
                               std::string>::type
to_string(T const val) {
    return std::to_string(static_cast<long long>(val));
}

template<typename T>
inline typename std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value,
                               std::string>::type
to_string(T const val) {
    return std::to_string(static_cast<unsigned long long>(val));
}

template<typename T>
inline typename std::enable_if<std::is_floating_point<T>::value, std::string>::type
to_string(T const val) {
    return std::to_string(static_cast<long double>(val));
}

// ...

void SentryManager::add(std::string& name, std::shared_ptr<Sentry>) {
    name += to_string(counter);
}

- - - Winnower Feedback - - -
---------------
Plugin Feedback
---------------
${Medley.Active} is a go to for macroing. This basically tells if it is actively singing songs.
/medley melee (Melee INI handles everything but slowing mobs) I didn't find any kind of combination that was effective.
**Note: My workaround to this was to put a ${Target.Buff.Find[Requiem of Time]} with a delay of 12 seconds between casts in a sub-routine. This worked flawlessly.
Example Macro Snippit:
Rich (BB code):
/if (!${Target.Buff.Find[Requiem of Time]} && ${Me.SpellReady[Requiem of Time]} && ${slowready}==0) {
	/medley queue "Requiem of Time" -interrupt
	/varset slowready 13s
	}

Another downside is AE mezing was less than intuitive as if I pulled multiple adds I wanted to fire my AE mez. This is the code snippit I use for that:
Rich (BB code):
/if (${SpawnCount[npc radius 35]}>1 && ${Me.SpellReady[Wave of Dreams Rk. II]} && ${aemezready}==0) {
	/medley queue "Wave of Dreams Rk. II" -interrupt
	/varset aemezready 31s
	}

The ${Medley.Medley} command seems a bit buggy. Sometimes it would return "e" and other times it would return "melee"

Overall this is a vast improvement from MQ2Twist. Loving it!
 
When we use VS 2013 people get all kinds of errors in Win 8 and win 10
 
Well I had to stop using this plugin was causing some very odd startup issues with MQ2 and sometimes would just stop working. I really hate mq2twist and like winnower said, its terribly inefficient. I was looking at just writing a macro to run all the time, but I noticed ${Me.Song[blah].Timer} doesn't work. ${Me.Buff[Song name].Timer} also doesn't work. So any plugin will be a bit off as you estimating the actual song run time. I also wanted to read if a song was on cooldown... and couldn't find any number of way to do that either. I'm so disappointed with my options at this point on the bard that I'm just about to toss my hands up and say F it lol.
 
Well I had to stop using this plugin was causing some very odd startup issues with MQ2 and sometimes would just stop working. I really hate mq2twist and like winnower said, its terribly inefficient. I was looking at just writing a macro to run all the time, but I noticed ${Me.Song[blah].Timer} doesn't work. ${Me.Buff[Song name].Timer} also doesn't work. So any plugin will be a bit off as you estimating the actual song run time. I also wanted to read if a song was on cooldown... and couldn't find any number of way to do that either. I'm so disappointed with my options at this point on the bard that I'm just about to toss my hands up and say F it lol.
fwiw, you can use mq2bot and /bottwist until he is back to set it up however you like it. mq2bot is only set up for songs atm. so no items or AAs. but it doesnt require any setup and does pretty much the same thing. /bottwist 1 2 3 4 5 would twist songs 1 2 3 4 5 and skip whatever isnt ready yet so that you can use longer than normal songs and shorter than normal cast time songs and it figures out everything on its own.
 
Posted new version, based on 2015107 macroquest release. This version is built on visual studio 2010, and contains a fix to check to see if you have mana before casting a song with mana. Attachments on first post.

@Maskoi attached updated source which will compile on visual studio 2010.

@Noobhaxor Did you see the Medley.TTQE tlo, and how I use it in my kiss mods? Not sure your startup problems, that doesn't make much sense to me as I've barely changed that part from mq2twist (although I did fix a bug where mq2twist was creating an MQ2Twist file it never uses). I added a manacheck, which was one of my known issues in my testing, which would make it get stuck on a song. If it stops responding you can do /medley debug, and see if that says anything, or maybe attach debugger and look at debug console. It's possible you're using it in a way I didn't anticipate and found a bug.
 
Updated with a fix to Medley.Medley. Hope this works, looking at it it could have been a nasty type of bug which would maybe cause problems if you were accessing ${Medley.Medley}
 
Rich (BB code):
${Medley.Medley.Song.Gem.Instrument.Modifier.Bagslot.Equipped}
is not working for me.
 
Rich (BB code):
${Medley.Medley.Song.Gem.Instrument.Modifier.Bagslot.Equipped}
is not working for me.

Your druid is probably just rebelling because twincast isn't working.

Also, really just updated cpp and dll with version which really fixes ${Medley.Medley}
 
Looks like the version in the compile is working well now!

For some reason, the plugin takes a really long time to load now, like 10 sec. Not sure what's up, this kinda seems like it started it started when switched to visual studio 2010, but that doesn't make much sense. Anybody have any ideas?

- - - Updated - - -

And here's the somewhat complicate medley I've been using
Rich (BB code):
[MQ2Medley-melee]
song1=Aria of Maetanrus Rk. II^13 + (6*${Medley.Tune})^1
song2=Blade of Vesagran^180^${Melee.Combat}
song3=Fjilnauk's Song of Suffering^18^1
song4=War March of Jocelyn Rk. II^18 + (6*${Medley.Tune})^1
song5=Arcane Melody^18 + (6*${Medley.Tune})^1
song6=Silisia's Lively Crescendo^45^${Me.PctMana} > 5
song7=Horthin's Psalm of Potency^18 + (6*${Medley.Tune})^1
song8=Garath's Insult Rk. II^6^${Melee.Combat} && ${Medley.Tune} && ${Me.PctMana} > 20
song9=Nilsara's Chant of Flame^24^${Melee.Combat} && ${Medley.Tune}
 
winnower, would be able to ditch mq2twist if you could add some way to do a /medley string 1 2 3 4 so can use it in alias's from within eq
 
I noticed that when I had this plugin set to load in my MacroQuest2.ini, I would frequently get an error when starting the application: "Inject Failed" - The parameter is not correct.

MQ2 partially loaded (apparently), and you could still login and play and use MQ2. However, the spell TLO seemed broken. For example:
Rich (BB code):
/echo ${Spell[xxxx]}
^ This command would take over 10 seconds to process, freezing the UI during this time. Since MQ2Melee (and this Plugin) use the spell TLO data heavily I would notice the client "freezing" as those plugins evaluated my conditions in a perpetual while loop.

In your plugin, I modified this line:
Rich (BB code):
long TUNE_SPELL_ID = GetSpellByName("A Tune Stuck in Your Head")->ID;
to
Rich (BB code):
long TUNE_SPELL_ID;

Then, I placed it inside of the Initialization routine you have since it is essentially an initialization variable.

Rich (BB code):
PLUGIN_API VOID SetGameState(DWORD GameState) 
{ 
    DebugSpew("MQ2Medley::SetGameState()"); 
    if (gGameState==GAMESTATE_INGAME) {
		MQ2MedleyEnabled = true;
		PCHARINFO pCharInfo = GetCharInfo();
        if(!Initialized && pCharInfo) {
	    //Load the tune spell now that we have spell data loaded
	    TUNE_SPELL_ID = GetSpellByName("A Tune Stuck in Your Head")->ID;

            Load_MQ2Medley_INI(pCharInfo);
	    Initialized = true;
        }
    } 
    else {
        if (gGameState==GAMESTATE_CHARSELECT)
            Initialized = false;
        MQ2MedleyEnabled = false; 
    }
}

After doing this, I would no longer get the Inject failure, nor the weird slow downs on TLO accessing.

Does this happen with anyone else? I observed this behavior on 2 different machines, and the above fix resolved it on both of them--along with my MQ2Melee woes. I am not a C++ expert by any means, but I am guessing it tried to load spell information on application inject when the spell information had not been loaded yet.

On a side note, I observe the same phenomenon with MQ2Heals, so there may be similar code there but I cannot see it to verify.
 
*EDIT*

After further testing this seems to be caused by the Tempus Faycite: Jembel's Lively Crescendo type 3 aug for this song:

Code:
song15=Jembel's Lively Crescendo Rk. II^45^1

If I put the item with the aug in my inventory the crashing stops.

This also happens with the earlier song in this line "Silisia's Lively Crescendo Rk. II".


*END OF EDIT*

Since the Jan 16 2019 update to MQ2 I have been having a problem when using this plugin.

Prior to the Jan 18 2019 update the character would crash to the desktop without any dialogue box.

Since updating to the Jan 18 2019 update when the crash happens it brings up the crash dialogue box and I can click it and continue playing.

The crash happens every time just before the last song in the rotation starts to cast (in my case Amplification).

Removing the song from the list just makes the crash happen a song sooner.

I have tried using the version from the official MQ2 forums and built using builder but it exhibits the same behaviour.

I include the MQ2Medley portion of my servername_charactername.ini below.

I have been using the same ini (merely updating the level of the spells) for years and cannot remember crashing before.

For some reason when my Bard dropped to silver status yesterday the plugin worked perfectly, but when I consumed a krono the crashing started again.

I don't remember if the character has the station cash purchased Rk. II spell unlocker or not, but he was casting Rk. II songs when silver which suggests he does.

I have sent EQMule the dump generated by the Jan 18 2019 update.

Thank you.

Code:
[MQ2Medley]
Delay=3
Quiet=1
Debug=0
Medley=melee
Playing=0

[MQ2Medley-melee]
songif=!${Me.Invis}
song1=Aria of Begalru Rk. II^23 + (6*${Medley.Tune})^1
song2=Rapier of Somber Notes^60^${Spell[Symphony of Battle].Stacks}&&!${Me.Buff[Symphony of Battle].ID}
song3=Selo's Sonata^60^${Spell[Selo's Sonata].Stacks}
song4=Tune Stuck In Your Head^780^1
song5=War March of Dekloaz Rk. II^25+(6*${Medley.Tune})^1
song6=Pulse of Xigam Rk. II^20 + (6*${Medley.Tune})^1
song7=Blade of Vesagran^120^${Target.Type.Equal[NPC]}&&${Target.PctHPs}<98&&(!${SpawnCount[group pc shaman radius 100]}||${Me.Song[Prophet's Gift of the Ruchu].ID})
song8=Bladed Song^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song9=Fierce Eye^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song10=Fundament: Second Spire of the Minstrels^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song11=Funeral Dirge^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song12=Quick Time^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song13=Song of Stone^18^${Target.Type.Equal[NPC]} && ${Target.PctHPs}<98
song14=Travenro's Song of Suffering Rk. II^18^1
song15=Jembel's Lively Crescendo Rk. II^45^1
song16=Rigelon's Reckless Renewal Rk. II^20 + (6*${Medley.Tune})^1
song17=Arcane Ballad Rk. II^18 + (6*${Medley.Tune})^1
song18=Amplification^60 + (6*${Medley.Tune})^1
 
Last edited:
Hello there...
I am having an issue with this and conditions in downshit. Do they work properly together?

What is happening with the below frist 2 examples is that it is firing once like 4 or 5 times. Which means it is scheduling it after each song in succession that appear in my 3 line medley. So for muse it will cast storm blade then aura then nivs then aura then erikis then aura then storm blade then aura... etc.
It does the same for songblade of the eternal. However it does not do it for myrmidon's skill. My assumption after messing with it for awhile is it checks for the buff so many times in the time the casting for the buff is taking place and then proceeds to fire it off as many times as the check returns 0. So the cast time needed for aura and blade take a bit of time and so it returns buff or aura =0 and schedules more one time queues.
Is there a way to attach a timer to a queue for a conditional or perhaps there is a conditional wherein I can say check only 1 time in x secs?

Examples of the downshit conditions:
downflag0=1
downshit0=/if (!${Me.Song[Aura of the Muse Effect].ID} && !${Me.Aura[Aura of the Muse].ID} && !${Me.Buff[Aura of the Muse].ID} && !${Me.Moving}) /medley queue "Aura of the Muse"
downflag7=1
downshit7=/if (${Spell[Symphony of Battle].Stacks} && !${Me.Buff[Symphony of Battle].ID} && !${Me.Moving}) /medley queue "Songblade of the Eternal"

this one actually fires properly only once:
downflag1=1
downshit1=/if (${Spell[Myrmidon's Skill IX].Stacks} && !${Me.Buff[Myrmidon's Skill IX].ID} && !${Me.Moving}) /medley queue "Pauldrons of Punishment"

with a very simple mqmedley of:
[MQ2Medley-melee]
song1=Storm Blade^19^1
song2=Niv's Harmonic^19^1
song3=Eriki's Psalm of Power^19^1
 
Does this work better than mq2twist? what about integration with kissassist?
 
Release MQ2Medley

Users who are viewing this thread

Back
Top
Cart