Changing Weapons

Use this forum for general discussions

Changing Weapons

Postby Gorka » Wed Mar 06, 2019 10:34 am

There is a game issue I'd like to discuss surrounding switching weapons, because as a stabber, gripper, warrior and user of proc weapons - things are complicated these days with the increased arsenal of options. Recently for example in MNM I stab and switch to a chopper to take advantage of a possible excruciating blow/chop combo. There isn't really a combination I don't use at some point as a tank...

Generally weapon switching has three important events...

1) Opening Weapon
2) After Opening Weapon
3) Change of Weapon On Mob Death

Eqmodes don't handle the issue correctly, (I think?) because depending on the mob I may stab, slash, grip, chop or strike the mob while not changing any worn eq, especially if I am tanking in AC.

These 3 events are not all able to be captured correctly using scripting which creates issues. For example, continuing to fight a second mob after the first dies triggers often unwanted weapon switches or a splork triggers a weapon swap when none is needed. MSDP can tell you what weapon you wear, but after a mob dies your status does not remain "FIGHTING" when continuing to fight a second mob so you can't mute a weapon change.

Weapon swaps factor on the mob, your eq mode or your desired opener. Coding the possibilities can lead to coding outcomes for 50+ possibilities. The inability to capture game data to precisely interpret the events correctly, and with rescues often requiring squelching changes makes this in my opinion one of the more difficult scripting issues.

I wonder how other players do it. But I'd be very interested to hear from Teker. I wonder if there could be a possibility of creating a eqset for weapons based around the 3 events... we could setup a profile where we set our opener weapon, our continuing weapon and a switch on death weapon if there is no second opponent. The idea being the switching would be done by the game automatically without the need to try and decipher the results of inconclusive game text.

But also if implementing this idea interfered with rebirth shop, whatever is happening with that... I'd much prefer rebrith shop of course!
Gimme a G! Gimme a ORKA!
User avatar
Gorka
Triple 40 Poster
 
Posts: 459
Joined: Tue Jul 12, 2016 5:50 am
Status: Offline

Re: Changing Weapons

Postby *teker* » Mon Mar 11, 2019 4:32 pm

Rather than have the game do things automatically, I would prefer to create a new MSDP variable that would give you a list of mobs (and/or players) in the room with information currently available to you via a LOOK or other command. So you could tell who is fighting whom, etc. Then you can choose what to do about it on the client side.
*teker*
Triple 40 Poster
 
Posts: 274
Joined: Sun Apr 05, 2015 3:41 pm
Status: Offline

Re: Changing Weapons

Postby Gorka » Mon Mar 11, 2019 7:44 pm

Perhaps if you made msdp.OPPONENT... msdp.OPPONENTS it might solve the multi-mob issue. If the OPPONENTS array has multiple mobs in it after a death I won't re-equip my stabber and continue slashing... however I know whats going to happen... I will kill the last mob and the array won't update quick enough... and I will keep wielding an incorrect weapon... Msdp isn't useful in every case because it's slightly delayed. For instance try build a healbot using msdp... terrible idea. Try echoing your status on mob death and you will find sometimes it still says you are FIGHTING and other times STANDING.

Splorks I usually solve by checking my equipped weapon on the "Total Exp" trigger. If it's my sword I requip my stabber ready for the next mob.

It's messy and I have to handle things in non centralised ways. Not sure how you can solve all the issues that I raised with Msdp. It's only good for some things, mud text is quicker for others. OPPONENT already doesn't update to catch a splork nor will it be quick enough to register a dead mob on the total xp line. Perhaps I could stop using the total xp line and catch the msdp.opponent change event instead, I just suspect it won't work very well.
Gimme a G! Gimme a ORKA!
User avatar
Gorka
Triple 40 Poster
 
Posts: 459
Joined: Tue Jul 12, 2016 5:50 am
Status: Offline

Re: Changing Weapons

Postby *teker* » Mon Mar 11, 2019 8:16 pm

Modern game architecture runs on a slight delay so that the client and server are both running independent simulations of the same events. You can script easier on that type of architecture because the client knows the future for a small period of time.

If I were to build the list as you suggest, I could include a field to identify which opponent you are currently fighting. At mob death, you could remove that element from the list (if it still exists due to msdp lag) and look at whether your list is empty. Not perfect, but would get you closer.
*teker*
Triple 40 Poster
 
Posts: 274
Joined: Sun Apr 05, 2015 3:41 pm
Status: Offline

Re: Changing Weapons

Postby Gorka » Mon Mar 11, 2019 10:55 pm

That's possibly a good idea... I could manually remove the opponent I am fighting from the opponents array. However it's not fool proof, there are potential problems to do with the timing of when the msdp OPPONENTS updates and other mobs of the same name in the existing room. I can see a scenario where the msdp updates in a timely fashion, and my manual update, removes incorrectly the second mob of the same name.

In any case Teker, I still think even if it didn't solve the multi-fighting weapon switching issue... the OPPONENTS array could prove useful in other situations... Tossing summons for instance... prioritising enemies... engaging mobs which are closest to death... lots of very interesting possibilities to geek out on.
Gimme a G! Gimme a ORKA!
User avatar
Gorka
Triple 40 Poster
 
Posts: 459
Joined: Tue Jul 12, 2016 5:50 am
Status: Offline

Re: Changing Weapons

Postby Roga » Mon Mar 25, 2019 11:54 pm

I mostly do this manually with an automated assist. In Mudlet I use the following to capture my current wielded weapon in VAR.wielded (Item 16 appears to stay constant for me as wielded):

Scripts -> Name -> Char_Eq
Add user Event Handler -> msdp.CHARACTER_EQUIPMENT

Code: Select all
function Char_Eq()
  local eq16 = msdp.CHARACTER_EQUIPMENT['16']
  if eq16['ITEM'] ~= nil then
    VAR.wielded = eq16['ITEM']['KEYWORDS']
  else
    VAR.wielded = ''
  end
end

You can then make aliases like...
Alias -> swap_weapon
Pattern -> ^swap$

Code: Select all
local prevwield = VAR.wielded
send('rem ' .. prevwield)
if string.match(prevwield, 'bolt') then
  send('wield valor')
else
  send('wield bolt')
end

Which will swap between valor and bolt. Or any such combination. Doesn't solve the 50 different combinations or address issue #3.

The main reason I wanted to comment is that I very much like teker's idea about an msdp variable that would list mobs attacking players (available via LOOK) but for an entirely different reason. This would have the potential to improve rescue scripts. As some group member engagement events are not reported this might solve that.

Roga
Roga
 
Posts: 2
Joined: Sat Dec 16, 2017 5:09 pm
Status: Offline

Re: Changing Weapons

Postby Gorka » Tue Mar 26, 2019 3:11 am

I also use msdp to get my wielded item in the eqset from position 16, but the core of the issue is not that I don't know what I am wielding, but what I am fighting and at what stage - and if the best weapon is equipped for that.

I'd stop short of supporting an MSDP variable that has all the mobs in the room in it... but instead support an MSDP variable that at least had all of my opponents in it. I think all the mobs in the room, goes a little bit too far... takes a little bit of the reactionary element from the game and assists roboting (not that anything can stop that really). It seems logical that if I am fighting something - I know it is there. If it is there, and I am not fighting it, then that's really another story... that would expose, hidden, invis and hunting mobs potentially. That surprise arguably adds to the game.

Regarding rescue's there are ways to capture everything as far as I know... even silent disengages... that doesn't mean a player like Ezekiel in his best pjyamas won't go splat in a single round though... Good rescue scripts are really what separates the top tanks from each other at the highest level (where essentially we all have the same stats and eqsets, and we are much the same). The following script nearly captures everything that's not a proc special.

(.*) massacres (.*) with - (Mudlet regex)

Code: Select all
if tanking == 1 then
   for key,value in pairs(msdp.GROUP) do
      if msdp.GROUP[key]["NAME"] == matches[3] then
         send("|;rescue "..matches[3]..";@@")
      end
   end
end
Gimme a G! Gimme a ORKA!
User avatar
Gorka
Triple 40 Poster
 
Posts: 459
Joined: Tue Jul 12, 2016 5:50 am
Status: Offline

Re: Changing Weapons

Postby Roga » Tue Mar 26, 2019 7:49 am

Thanks Gorka. Sometimes I get too focused on a particular solution. Adding your method should capture the majority of those situations that I was missing.

Roga
Roga
 
Posts: 2
Joined: Sat Dec 16, 2017 5:09 pm
Status: Offline


Return to General Chat (Registered)

Who is online

Users browsing this forum: No registered users and 0 guests

cron