PDA

View Full Version : idea...want to make sure it would work.



trueoutsoldier
03-12-2016, 04:57 PM
So im pretty sure this would work, just curious if anyone knows for sure, and how big a project i will most likely be looking at.
Im going to start working on an ambush script that will keep track of the crit ranks on the target, and alter the aim location if needed.
ex. ambush head, get a rank 3, now ambush wont hit the head, so it alters to neck(etc) for the next swing, then will swap back for new targets.

Insodus
03-12-2016, 05:29 PM
Certainly possible and I dont know of a script already that does this. I've written ones that will ambush legs until prone and then go for head, but quite what you are describing.

elcidcannon
03-12-2016, 05:48 PM
this would be a cool idea. one reason I went away from scripting with my ranger was the difficulty in scripting ambushes like you've laid out.

Cereal Killer
03-12-2016, 07:24 PM
Check out ;fire in the repository. It does a similar thing aiming for eye shots, and moving on if they're already blinded.

Donquix
03-12-2016, 08:36 PM
you can either track what has happened or do LOOK and parse the injuries, or both (start with a look, track until the script finishes so if you have to pick up an already wounded target)

trueoutsoldier
03-18-2016, 01:54 AM
Any easy way to pull wound info through lich? I am guessing so because uberbar shows your wound ranks....any insight? Tillmen?

Tgo01
03-18-2016, 02:09 AM
Any easy way to pull wound info through lich? I am guessing so because uberbar shows your wound ranks....any insight? Tillmen?

I think the only way to track critter wounds is what Donquix suggested, either LOOK at the critter before attacking it to gather wounds or track what wound you just gave it by going by the crit information of your attack.

elcidcannon
03-18-2016, 08:45 AM
I think the only way to track critter wounds is what Donquix suggested, either LOOK at the critter before attacking it to gather wounds or track what wound you just gave it by going by the crit information of your attack.

Yeah, ;crit_type_tracker is pretty good at diagnosing the damage/crits done from your attacks.

m444w
03-18-2016, 09:26 AM
The biggest pain is compiling the strings from all the different sources

You should be able to adapt https://github.com/ondreian/Olib/blob/master/lib/Olib/combat/creature.rb#L100:L147

to do most of your work.

I think I even have some ambushing logic in there, you are welcome to steal.

Or just install the gem if you are more familiar with Ruby https://rubygems.org/gems/Olib

Whirlin
03-18-2016, 12:18 PM
I love Crit_type_tracker... a lot. Like super a lot.

The problem is that it's not the fastest script. It simply can't be due to the volume of potential outcomes that need to be manually matched to determine the critical tier.

Then, compile the problem that if you use an AoE, you'd be needing to track all sorts of critters' crit outcomes/blahblahblahs.

The only potential solution was posed earlier in this thread... do a look at the critter, evaluate strings of criticals, alter ambush/aim command as necessary, and then input your attack command... I just dunno if that would be a fast enough of an action to not feel laggy to the user.

m444w
03-18-2016, 12:29 PM
I love Crit_type_tracker... a lot. Like super a lot.

The problem is that it's not the fastest script. It simply can't be due to the volume of potential outcomes that need to be manually matched to determine the critical tier.

Then, compile the problem that if you use an AoE, you'd be needing to track all sorts of critters' crit outcomes/blahblahblahs.

The only potential solution was posed earlier in this thread... do a look at the critter, evaluate strings of criticals, alter ambush/aim command as necessary, and then input your attack command... I just dunno if that would be a fast enough of an action to not feel laggy to the user.

It is when you squelch the looks with a hook and do your looks (except for the first one to get the creature's current state) while in RT from your ambush.

Haldrik
03-18-2016, 02:10 PM
This is actually fairly easy to do and it won't take much compute power.

There is at least 2 crit trackers available that will have most of the info you need as far as messaging.

.crit_type_tracker was written by Gib.
.crit-tracking was written by Dreaven.

It's actually pretty cool to see how each person tracks the messaging.


#####Right Eye Crits############################################# ################################################## ################################################## ################################################## ################
'Attack bumps an eyebrow\.' => { :r => 0, :d => 0, :l => "Right Eye", :t => "Puncture", :stat => "None", :wound => "None" },
'Minor strike under the right eye\, that was close\!' => { :r => 1, :d => 1, :l => "Right Eye", :t => "Puncture", :stat => "None", :wound => "Rank 1 Right Eye" },
'Well aimed shot almost removes an eye\!' => { :r => 2, :d => 5, :l => "Right Eye", :t => "Puncture", :stat => "Stun 3", :wound => "Rank 2 Right Eye" },
'Slash across right eye\!' => { :r => 3, :d => 10, :l => "Right Eye", :t => "Puncture", :stat => "Stun 5", :wound => "Rank 3 Right Eye" },
'Attack punctures the eye and connects with something really vital\!' => { :r => 4, :d => 17, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Shot knocks .*\'s head back by pushing on the inside of the skull\!' => { :r => 5, :d => 20, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Incredible shot to the eye penetrates deep into skull\!' => { :r => 6, :d => 25, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Shot destroys eye and the brain behind it\!' => { :r => 7, :d => 30, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Strike through eye\, .* is lobotomized\!' => { :r => 8, :d => 35, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Strike to the eye penetrates skull\, ocular fluid sprays widely\!' => { :r => 9, :d => 40, :l => "Right Eye", :t => "Puncture", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },

^This is Dreaven's code for eye wounds.


/Slash across right eye/ => "RANK 3 RIGHT EYE PUNCTURE: Damage: 10 Status Effect: Stunned 5 Rounds Wounds: Rank 3",
/Attack punctures the eye and connects with something really vital./ => "RANK 4 RIGHT EYE PUNCTURE: Damage: 17 Status Effect: FATAL Wounds: Rank 3, + head Rank 3",
/Shot knocks the .*?'s head back by pushing on the inside of the skull./ => "RANK 5 RIGHT EYE PUNCTURE: Damage: 20 Status Effect: FATAL Wounds: Rank 3, + head Rank 3",
/Incredible shot to the eye penetrates deep into skull./ => "RANK 6 RIGHT EYE PUNCTURE: Damage: 25 Status Effect: FATAL Wounds: Rank 3, + head Rank 3",

Gib's. His code is 3000 lines of messaging. And 100 for the actual captures. It's cool to look at.

That being said, all these guys are doing way too much and isn't specific enough. I can't tell where Gib actually separates out left and right eye, so this won't work for you. And you don't need the smaller ranks.

i'd do something like this:

#The idea here is to grab the least amount of code that is unique for the rank 3 crit. location does not matter for these.
#This setup is for easier presentation and viewing.
rank3crits = [
'Attack punctures',
'Incredible shot',
'Shot destroys',
]

# joining the rank3crits array, again a presentation decision
rank3_find = /#{rank3crits.join('|')}/

while line = get
if line =~ /You fire/

while line2 = get
$hit_location = $1 if line2 =~ /(right eye|left eye|head)/
$crit_rank = 3 if line2 =~ rank3_find
# another option
##crit_3 = true if line2 =~ rank3_find
break if line2 =~ /Roundtime/
end

end
end

then adjust your targeting script via $hit_location and $crit_rank. You may need to adjust the regex capture depending on how it captures it can be placed into an array or a string. Don't recall off the top of my head which is which.

I'm assuming you are using a separate script, if you aren't you might not need globals and can use @ instead.

Gnomad
03-18-2016, 06:40 PM
What? No. No. Stop that. Learn your data structures. This is not a time to use an array.

Tgo's code looks closer to the right idea. You want one giant Hash map. Use the crit strings as keys, replacing the critter name with an X or something. Hashes should generally give you O(1) time to look them up. I doubt we'll have many (if any) collisions in this case. Make a Crit object to be they key or just use another hash like Tgo did.

Look for the swing line, use a regex to extract the critter name. Look for the damage line, pull the next line, and use another regex to pull the crit message into two variables surrounding the critter name. Concatenate them with an X in the spot of the critter's name or whatever you did before. Whatever you did in your Hash.

Look up that string in your hash, and you'll find your crit. It'll be super quick.

Tgo01
03-18-2016, 06:50 PM
Yeah you can steal my code in crit-tracking if you want. In fact I think that script already LOOKs at a critter to determine what kind of wounds it has.

Here is the relevant code:



gather_critter_information = proc{
action = proc { |server_string|
if (server_string =~ /I could not find what you were referring to\.|has nothing at this time\.|\<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>.*noun\=\".*\"\>(.*)\<\/a\>/) && (server_string !~ /is stunned\.|appears to be dead\.|You see a fairly typical|appears to be in good shape|bleeding|lacerations|(blinded|swollen|bruise d) .* eye|severed (left|right)|convulsions|minor bruises|minor cuts|muscle twitching/)
DownstreamHook.remove("#{script.name}_gather_critter_information")
nil
elsif (server_string =~ /is stunned\.|appears to be dead\.|You see a fairly typical|appears to be in good shape|bleeding|lacerations|(blinded|swollen|bruise d) .* eye|severed (left|right)|convulsions|minor bruises|minor cuts|muscle twitching/)
nil
elsif (server_string =~ /^\s+$/)
nil
else
server_string
end
}
DownstreamHook.add("#{script.name}_gather_critter_information", action)
before_dying { DownstreamHook.remove("#{script.name}_gather_critter_information") }
silence_me
fput "look ##{enemy_id}"
silence_me
while line = get
if (line =~ /bleeding|lacerations|(missing|blinded|swollen|brui sed) .* eye|severed .* (arm|leg|hand)|convulsions|minor bruises|minor cuts|muscle twitching/)
if (line =~ /strange case of muscle twitching/)
critter_nerves = "Rank 1 Nerves, "
elsif (line =~ /case of sporadic convulsions/)
critter_nerves = "Rank 2 Nerves, "
elsif (line =~ /case of uncontrollable convulsions/)
critter_nerves = "Rank 3 Nerves, "
end
if (line =~ /minor bruises about the head/)
critter_head = "Rank 1 Head, "
elsif (line =~ /minor lacerations about the head and a possible mild concussion/)
critter_head = "Rank 2 Head, "
elsif (line =~ /severe head trauma and bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> ears/)
critter_head = "Rank 3 Head, "
end
if (line =~ /minor bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> neck/)
critter_neck = "Rank 1 Neck, "
elsif (line =~ /moderate bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> neck/)
critter_neck = "Rank 2 Neck, "
elsif (line =~ /snapped bones and serious bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> neck/)
critter_neck = "Rank 3 Neck, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> chest/)
critter_chest = "Rank 1 Chest, "
elsif (line =~ /deep lacerations across \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> chest/)
critter_chest = "Rank 2 Chest, "
elsif (line =~ /deep gashes and serious bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> chest/)
critter_chest = "Rank 3 Chest, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> abdomen/)
critter_abdomen = "Rank 1 Abdomen, "
elsif (line =~ /deep lacerations across \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> abdomen/)
critter_abdomen = "Rank 2 Abdomen, "
elsif (line =~ /deep gashes and serious bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> abdomen/)
critter_abdomen = "Rank 3 Abdomen, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> back/)
critter_back = "Rank 1 Back, "
elsif (line =~ /deep lacerations across \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> back/)
critter_back = "Rank 2 Back, "
elsif (line =~ /deep gashes and serious bleeding from \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> back/)
critter_back = "Rank 3 Back, "
end
if (line =~ /bruised right eye/)
critter_right_eye = "Rank 1 Right Eye, "
elsif (line =~ /swollen right eye/)
critter_right_eye = "Rank 2 Right Eye, "
elsif (line =~ /(missing|blinded) right eye/)
critter_right_eye = "Rank 3 Right Eye, "
end
if (line =~ /bruised left eye/)
critter_left_eye = "Rank 1 Left Eye, "
elsif (line =~ /swollen left eye/)
critter_left_eye = "Rank 2 Left Eye, "
elsif (line =~ /(missing|blinded) left eye/)
critter_left_eye = "Rank 3 Left Eye, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> right leg/)
critter_right_leg = "Rank 1 Right Leg, "
elsif (line =~ /fractured and bleeding right leg/)
critter_right_leg = "Rank 2 Right Leg, "
elsif (line =~ /completely severed right leg/)
critter_right_leg = "Rank 3 Right Leg, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> right hind leg/)
critter_right_hind_leg = "Rank 1 Right Hind Leg, "
elsif (line =~ /fractured and bleeding right hind leg/)
critter_right_hind_leg = "Rank 2 Right Hind Leg, "
elsif (line =~ /completely severed right hind leg/)
critter_right_hind_leg = "Rank 3 Right Hind Leg, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> left leg/)
critter_left_leg = "Rank 1 Left Leg, "
elsif (line =~ /fractured and bleeding left leg/)
critter_left_leg = "Rank 2 Left Leg, "
elsif (line =~ /completely severed left leg/)
critter_left_leg = "Rank 3 Left Leg, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> right foreleg/)
critter_right_fore_leg = "Rank 1 Right Fore Leg, "
elsif (line =~ /fractured and bleeding right foreleg/)
critter_right_fore_leg = "Rank 2 Right Fore Leg, "
elsif (line =~ /completely severed right foreleg/)
critter_right_fore_leg = "Rank 3 Right Fore Leg, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> left foreleg/)
critter_right_fore_leg = "Rank 1 Left Fore Leg, "
elsif (line =~ /fractured and bleeding left foreleg/)
critter_right_fore_leg = "Rank 2 Left Fore Leg, "
elsif (line =~ /completely severed left foreleg/)
critter_right_fore_leg = "Rank 3 Left Fore Leg, "
end

if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> left hind leg/)
critter_left_hind_leg = "Rank 1 Left Hind Leg, "
elsif (line =~ /fractured and bleeding left hind leg/)
critter_left_hind_leg = "Rank 2 Left Hind Leg, "
elsif (line =~ /completely severed left hind leg/)
critter_left_hind_leg = "Rank 3 Left Hind Leg, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> right arm/)
critter_right_arm = "Rank 1 Right Arm, "
elsif (line =~ /fractured and bleeding right arm/)
critter_right_arm = "Rank 2 Right Arm, "
elsif (line =~ /completely severed right arm/)
critter_right_arm = "Rank 3 Right Arm, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> left arm/)
critter_left_arm = "Rank 1 Left Arm, "
elsif (line =~ /fractured and bleeding left arm/)
critter_left_arm = "Rank 2 Left Arm, "
elsif (line =~ /completely severed left arm/)
critter_left_arm = "Rank 3 Left Arm, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> right hand/)
critter_right_hand = "Rank 1 Right Hand, "
elsif (line =~ /fractured and bleeding right hand/)
critter_right_hand = "Rank 2 Right Hand, "
elsif (line =~ /completely severed right hand/)
critter_right_hand = "Rank 3 Right Hand, "
end
if (line =~ /minor cuts and bruises on \<pushBold\/\>\<a exist\=\".*\" noun\=\".*\"\>(his|her|its|the)\<\/a\>\<popBold\/\> left hand/)
critter_left_hand = "Rank 1 Left Hand, "
elsif (line =~ /fractured and bleeding left hand/)
critter_left_hand = "Rank 2 Left Hand, "
elsif (line =~ /completely severed left hand/)
critter_left_hand = "Rank 3 Left Hand, "
end
critter_wounds_message += "#{critter_left_hand}" if critter_left_hand
critter_wounds_message += "#{critter_right_hand}" if critter_right_hand
critter_wounds_message += "#{critter_left_arm}" if critter_left_arm
critter_wounds_message += "#{critter_right_arm}" if critter_right_arm
critter_wounds_message += "#{critter_left_leg}" if critter_left_leg
critter_wounds_message += "#{critter_right_leg}" if critter_right_leg
critter_wounds_message += "#{critter_right_hind_leg}" if critter_right_hind_leg
critter_wounds_message += "#{critter_left_hind_leg}" if critter_left_hind_leg
critter_wounds_message += "#{critter_right_fore_leg}" if critter_right_fore_leg
critter_wounds_message += "#{critter_left_fore_leg}" if critter_left_fore_leg
critter_wounds_message += "#{critter_right_eye}" if critter_right_eye
critter_wounds_message += "#{critter_left_eye}" if critter_left_eye
critter_wounds_message += "#{critter_back}" if critter_back
critter_wounds_message += "#{critter_abdomen}" if critter_abdomen
critter_wounds_message += "#{critter_chest}" if critter_chest
critter_wounds_message += "#{critter_neck}" if critter_neck
critter_wounds_message += "#{critter_head}" if critter_head
critter_wounds_message += "#{critter_nerves}" if critter_nerves
if (critter_head =~ /rank 2|rank 3/i) || (critter_right_arm =~ /rank 3/i) || (critter_left_arm =~ /rank 3/i) || (critter_nerves =~ /rank 2|rank 3/i)
critter_cannot_cast = true
end
if (critter_right_arm =~ /rank 3/i) || (critter_right_hand =~ /rank 3/i)
critter_cannot_swing = true
end
if (critter_left_arm =~ /rank 3/i) || (critter_left_hand =~ /rank 3/i)
critter_cannot_use_shield = true
end
if (critter_left_arm =~ /rank 3/i) || (critter_left_hand =~ /rank 3/i)
critter_cannot_use_shield = true
end
if (critter_right_leg =~ /rank 3/i) || (critter_left_leg =~ /rank 3/i) || (critter_right_hind_leg =~ /rank 3/i) || (critter_left_hind_leg =~ /rank 3/i) || (critter_right_fore_leg =~ /rank 3/i) || (critter_left_fore_leg =~ /rank 3/i)
critter_cannot_stand = true
end
end


There is probably a better/easier way of doing this but I was lazy at this point in the code so threw together whatever worked :P

The way it is setup makes it so you don't even see the LOOK command from the script nor any associated information when looking at the critter.

Of course a straight copy/paste of this code won't do what you're looking for, it would need to be tweaked a bit.

Tgo01
03-18-2016, 06:54 PM
And like Gnomad said that script already has all of the crit types tracked and stuff and determines what rank wound was caused by which attack and stuff and stuff.

calael
03-19-2016, 01:36 PM
Here is another example of a script that auto targets for you. This was derived from Ondreian's fire.lic script but I improved it to be more efficient with commands (e.g. so it's not LOOKing at the target before firing, which adds latency) as well as a few other things. Probably simpler than using the crit tracker code, but YMMV. Lots of stuff hard coded in here for my exact setup, but it could be a good starting point.

https://www.dropbox.com/s/m3b5d4fn7gg6h82/hurl.lic?dl=0

Haldrik
03-24-2016, 01:36 PM
What? No. No. Stop that. Learn your data structures. This is not a time to use an array.

Tgo's code looks closer to the right idea. You want one giant Hash map. Use the crit strings as keys, replacing the critter name with an X or something. Hashes should generally give you O(1) time to look them up. I doubt we'll have many (if any) collisions in this case. Make a Crit object to be they key or just use another hash like Tgo did.

Look for the swing line, use a regex to extract the critter name. Look for the damage line, pull the next line, and use another regex to pull the crit message into two variables surrounding the critter name. Concatenate them with an X in the spot of the critter's name or whatever you did before. Whatever you did in your Hash.

Look up that string in your hash, and you'll find your crit. It'll be super quick.

Erm. You probably shouldn't tell me what code structures to use when you can't even properly read what the guy wants. You don't need a hash for this.
Not every crit string has a critter name in it and not every crit string has the damage location.

And Dreaven's doesn't take into account left/right eye, which is exactly what the guy wants.

Calael's script is much more manageable and doesn't need all the crit strings but it still looks at a creature after every attack. I think I'd still prefer parsing the lines but Calael is a pretty smart guy, so if he's doing it that way, there's probably a good reason.

Tgo01
03-24-2016, 03:44 PM
And Dreaven's doesn't take into account left/right eye, which is exactly what the guy wants.

Yes it does.



#####Right Eye Crits############################################# ################################################## ################################################## ################################################## ###################
'Swing at .*\'s eye catches an eyebrow instead\!' => { :r => 0, :d => 0, :l => "Right Eye", :t => "Crush", :stat => "None", :wound => "None" },
'Cut over .*\'s right eye\.' => { :r => 1, :d => 1, :l => "Right Eye", :t => "Crush", :stat => "None", :wound => "Rank 1 Right Eye" },
'Strike to the eye clips the eyebrow\.' => { :r => 2, :d => 3, :l => "Right Eye", :t => "Crush", :stat => "Stun 1", :wound => "Rank 2 Right Eye" },
'Smack to the eye bursts blood vessels\.' => { :r => 3, :d => 5, :l => "Right Eye", :t => "Crush", :stat => "Stun 3", :wound => "Rank 2 Right Eye" },
'Crack to the head swells eye shut\.' => { :r => 4, :d => 10, :l => "Right Eye", :t => "Crush", :stat => "Stun 6", :wound => "Rank 2 Right Eye" },
'Eye crushed by a hard blow to the face\!' => { :r => 5, :d => 15, :l => "Right Eye", :t => "Crush", :stat => "Stun 10", :wound => "Rank 3 Right Eye" },
'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Right Eye", :t => "Crush", :stat => "Stun 12", :wound => "Rank 3 Right Eye" },
'Blow to eye impacts the brain\.' => { :r => 7, :d => 40, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Right eye ripped from head\, along with most of brain\.' => { :r => 8, :d => 45, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Smash to cheek driving bone through the eye and into the brain\.' => { :r => 9, :d => 50, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
#####Left Eye Crits############################################# ################################################## ################################################## ################################################## ####################
'Swing at .*\'s eye catches an eyebrow instead\!' => { :r => 0, :d => 0, :l => "Left Eye", :t => "Crush", :stat => "None", :wound => "None" },
'Cut over .*\'s left eye\.' => { :r => 1, :d => 1, :l => "Left Eye", :t => "Crush", :stat => "None", :wound => "Rank 1 Left Eye" },
'Strike to the eye clips the eyebrow\.' => { :r => 2, :d => 3, :l => "Left Eye", :t => "Crush", :stat => "Stun 1", :wound => "Rank 2 Left Eye" },
'Smack to the eye bursts blood vessels\.' => { :r => 3, :d => 5, :l => "Left Eye", :t => "Crush", :stat => "Stun 3", :wound => "Rank 2 Left Eye" },
'Crack to the head swells eye shut\.' => { :r => 4, :d => 10, :l => "Left Eye", :t => "Crush", :stat => "Stun 6", :wound => "Rank 2 Left Eye" },
'Eye crushed by a hard blow to the face\!' => { :r => 5, :d => 15, :l => "Left Eye", :t => "Crush", :stat => "Stun 10", :wound => "Rank 3 Left Eye" },
'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Left Eye", :t => "Crush", :stat => "Stun 12", :wound => "Rank 3 Left Eye" },
'Blow to eye impacts the brain\.' => { :r => 7, :d => 40, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },
'Left eye ripped from head\, along with most of brain\.' => { :r => 8, :d => 45, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },
'Smash to cheek driving bone through the eye and into the brain\.' => { :r => 9, :d => 50, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },


Obviously there isn't much that can be done if it's the exact same crit message no matter which eye you hit, such as the rank 9 crit.

Gnomad
03-24-2016, 05:33 PM
Erm. You probably shouldn't tell me what code structures to use when you can't even properly read what the guy wants. You don't need a hash for this.
Not every crit string has a critter name in it and not every crit string has the damage location.

And Dreaven's doesn't take into account left/right eye, which is exactly what the guy wants.

Calael's script is much more manageable and doesn't need all the crit strings but it still looks at a creature after every attack. I think I'd still prefer parsing the lines but Calael is a pretty smart guy, so if he's doing it that way, there's probably a good reason.First off, I re-read my post and while I meant the tone to be flippant, but I realize it could have just as easily read as douchey. Apologies.

Whirlin was concerned about the speed of the script, and said that there's no way to speed it up, because there's so many strings to check. That's not the case; a hash map is pretty much built for that purpose. You don't need one to implement the script, but it will vastly speed things up. The tradeoff is space and pulling the data together for the script.

Calael's script is more manageable to write and maintain. The tradeoff is that it relies on looking at the target, which'll add latency, and screen scroll, which will either look awkward or add overhead to squelch it.

If you want the fastest script, you'll want to minimize server roundtrips (looking at the creature after a shot) and heavy calculation (regexes, lots of comparisons).

The rest of your concerns I figured were straightforward enough to not address, but:

Yes, not every crit string has a critter name in it. You build that into the regex. Off the top of my head:

if string =~ /^(.*?)(?:#{Regex.escape(creature.name)})(.*?)?$/ ; string = $1 + " X " + $2 ; end

The script wouldn't looking for the damage location in the string. It would use the crit string as a hash key. The hash value will have the damage location.

Yes, there are some crit messages that don't make it obvious whether you hit the left or right side. You can fall back to looking at the creature in those specific instances.

edit: Just realized, you can also just play the probability game and assume you hit the eye/arm/hand/leg you were aiming for if you get a doubled crit message on a target you wanted. You randomly hit an eye what, 3% of the time? A dedicated ambusher should hit their target what, 90% of the time or more? That's like a 3/1000 chance of you switching targets when you shouldn't. If you're that concerned about a fast script, not much of a cost to pay.

Haldrik
03-24-2016, 08:08 PM
Yes it does.



Not that I can tell. What you posted doesn't do anything.


Yes it does.


#####Right Eye Crits############################################# ################################################## ################################################## ################################################## ###################
'Swing at .*\'s eye catches an eyebrow instead\!' => { :r => 0, :d => 0, :l => "Right Eye", :t => "Crush", :stat => "None", :wound => "None" },
'Cut over .*\'s right eye\.' => { :r => 1, :d => 1, :l => "Right Eye", :t => "Crush", :stat => "None", :wound => "Rank 1 Right Eye" },
'Strike to the eye clips the eyebrow\.' => { :r => 2, :d => 3, :l => "Right Eye", :t => "Crush", :stat => "Stun 1", :wound => "Rank 2 Right Eye" },
'Smack to the eye bursts blood vessels\.' => { :r => 3, :d => 5, :l => "Right Eye", :t => "Crush", :stat => "Stun 3", :wound => "Rank 2 Right Eye" },
'Crack to the head swells eye shut\.' => { :r => 4, :d => 10, :l => "Right Eye", :t => "Crush", :stat => "Stun 6", :wound => "Rank 2 Right Eye" },
'Eye crushed by a hard blow to the face\!' => { :r => 5, :d => 15, :l => "Right Eye", :t => "Crush", :stat => "Stun 10", :wound => "Rank 3 Right Eye" },
'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Right Eye", :t => "Crush", :stat => "Stun 12", :wound => "Rank 3 Right Eye" },
'Blow to eye impacts the brain\.' => { :r => 7, :d => 40, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Right eye ripped from head\, along with most of brain\.' => { :r => 8, :d => 45, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
'Smash to cheek driving bone through the eye and into the brain\.' => { :r => 9, :d => 50, :l => "Right Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Right Eye, Rank 3 Head" },
#####Left Eye Crits############################################# ################################################## ################################################## ################################################## ####################
'Swing at .*\'s eye catches an eyebrow instead\!' => { :r => 0, :d => 0, :l => "Left Eye", :t => "Crush", :stat => "None", :wound => "None" },
'Cut over .*\'s left eye\.' => { :r => 1, :d => 1, :l => "Left Eye", :t => "Crush", :stat => "None", :wound => "Rank 1 Left Eye" },
'Strike to the eye clips the eyebrow\.' => { :r => 2, :d => 3, :l => "Left Eye", :t => "Crush", :stat => "Stun 1", :wound => "Rank 2 Left Eye" },
'Smack to the eye bursts blood vessels\.' => { :r => 3, :d => 5, :l => "Left Eye", :t => "Crush", :stat => "Stun 3", :wound => "Rank 2 Left Eye" },
'Crack to the head swells eye shut\.' => { :r => 4, :d => 10, :l => "Left Eye", :t => "Crush", :stat => "Stun 6", :wound => "Rank 2 Left Eye" },
'Eye crushed by a hard blow to the face\!' => { :r => 5, :d => 15, :l => "Left Eye", :t => "Crush", :stat => "Stun 10", :wound => "Rank 3 Left Eye" },
'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Left Eye", :t => "Crush", :stat => "Stun 12", :wound => "Rank 3 Left Eye" },
'Blow to eye impacts the brain\.' => { :r => 7, :d => 40, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },
'Left eye ripped from head\, along with most of brain\.' => { :r => 8, :d => 45, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },
'Smash to cheek driving bone through the eye and into the brain\.' => { :r => 9, :d => 50, :l => "Left Eye", :t => "Crush", :stat => "Fatal", :wound => "Rank 3 Left Eye, Rank 3 Head" },


Obviously there isn't much that can be done if it's the exact same crit message no matter which eye you hit, such as the rank 9 crit.



'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Right Eye", :t => "Crush", :stat => "Stun 12",
'Crushing blow to head closes that eye for good\.' => { :r => 6, :d => 20, :l => "Left Eye", :t => "Crush", :stat => "Stun 12",

How are you differentiating between right and left eye here? This won't work for OP because OP can't tell which eye has the rank 3 crit, therefore cannot switch. You need to have a separate line capture the location and/or use a different method.

I didn't see in your code where it separates hit location. If so, feel free to post it!

Tgo01
03-24-2016, 08:17 PM
Not that I can tell. What you posted doesn't do anything.

What I posted "doesn't do anything"?

Like I said it is impossible to differentiate between certain left eye crits and right eye crits going by just crit messaging, but where there is a difference, such as:

Cut over .*\'s right eye\.
Cut over .*\'s left eye\.

It will provide the correct eye damage location.

This is (partly) why that script also LOOKs at the critter after attacking so it can get the exact wound information.


You need to have a separate line capture the location and/or use a different method.

There is nothing else I "need" to do in this regard because unless the wiki is wrong there is no way to tell which eye was crushed in the example you provided just by going by the crit messaging.

According to the wiki this is the entire crit message for the wound you pointed out:

Crushing blow to head closes that eye for good.

Assuming this is true how would I get the script to tell which eye was affected going by just the crit message?

Tgo01
03-24-2016, 08:32 PM
Just to make sure it's not a limitation of gswiki I went through my logs to find an example of a rank 9 disruption critical eye attack:



You weave another verse into your harmony, directing the sound of your voice at a glistening cerebralite.
CS: +492 - TD: +395 + CvA: +25 + d100: +96 == +218
Warding failed!
A glistening cerebralite reels under the force of the sonic vibrations!
Sound waves disrupt for 106 damage!
A translucent shell appears around the cerebralite, absorbing most of the blow.
... 65 points of damage!
The glistening cerebralite's eye explodes shattering the skull into a thousand pieces.
An intangible ripple of pure energy courses through the air as the cerebralite's pupils widen a final time, its eyes clouding over as it dies.
The brilliant aura fades away from a glistening cerebralite.
The brilliant luminescence fades from around a glistening cerebralite.
A shadow seems to detach itself from a glistening cerebralite, swiftly dissipating into the air.
The bright luminescence fades from around a glistening cerebralite.
The dim aura fades from around a glistening cerebralite.
The silvery luminescence fades from around a glistening cerebralite.


The words "right" and "left" are completely absent.

Haldrik
03-24-2016, 08:49 PM
First off, I re-read my post and while I meant the tone to be flippant, but I realize it could have just as easily read as douchey. Apologies.

Whirlin was concerned about the speed of the script, and said that there's no way to speed it up, because there's so many strings to check. That's not the case; a hash map is pretty much built for that purpose. You don't need one to implement the script, but it will vastly speed things up. The tradeoff is space and pulling the data together for the script.

Calael's script is more manageable to write and maintain. The tradeoff is that it relies on looking at the target, which'll add latency, and screen scroll, which will either look awkward or add overhead to squelch it.

If you want the fastest script, you'll want to minimize server roundtrips (looking at the creature after a shot) and heavy calculation (regexes, lots of comparisons).

The rest of your concerns I figured were straightforward enough to not address, but:

Yes, not every crit string has a critter name in it. You build that into the regex. Off the top of my head:

if string =~ /^(.*?)(?:#{Regex.escape(creature.name)})(.*?)?$/ ; string = $1 + " X " + $2 ; end

The script wouldn't looking for the damage location in the string. It would use the crit string as a hash key. The hash value will have the damage location.

Yes, there are some crit messages that don't make it obvious whether you hit the left or right side. You can fall back to looking at the creature in those specific instances.

edit: Just realized, you can also just play the probability game and assume you hit the eye/arm/hand/leg you were aiming for if you get a doubled crit message on a target you wanted. You randomly hit an eye what, 3% of the time? A dedicated ambusher should hit their target what, 90% of the time or more? That's like a 3/1000 chance of you switching targets when you shouldn't. If you're that concerned about a fast script, not much of a cost to pay.

No worries.

Cal's version has downstream remove so there is no screen scroll.
I mean, if you really wanted to use a hash I feel like you would end up using a multi value hash because you are going to end up repeating the key a lot. But it's a lot more difficult to write then an array.

Here's the deal, he only cares about rank 3 criticals that don't result in death, because you can't target the location any longer, resulting in a random hit. So let's assume that he's using an arrow that's puncture/slash.

There is relatively few messages that he actually needs to care about.

R3 w/o death:
Puncture:

Slash across right eye! Hope the left is working.
Surgical strike removes the [target]'s left eye!

Slice:
Upward slash gouges the [target]'s cheek! Right eye lost! Pity.
Grazing slash to the [target]'s face! Scratches its left eye. Ouch!

Crush Right Eye:
Eye crushed by a hard blow to the face!
Crushing blow to head closes that eye for good.

Crush Left Eye:
Eye crushed by a hard blow to the face!
Crushing blow to head closes that eye for good.

^

You can't capture rank 3 crush criticals via this method. So unless there is another line that we can capture to determine hit location, then the "look" method is the only fall back. Granted, if someone is not planning on ambushing with a crush weapon, then a simple line capture using 4 matches would be sufficient.

I'd set my targets on a loop- Right eye, left eye, head, chest. If you receive one of the above messages, move to the next hit location. Then you won't need to capture any values from the regex.

Haldrik
03-24-2016, 08:52 PM
Just to make sure it's not a limitation of gswiki I went through my logs to find an example of a rank 9 disruption critical eye attack:



You weave another verse into your harmony, directing the sound of your voice at a glistening cerebralite.
CS: +492 - TD: +395 + CvA: +25 + d100: +96 == +218
Warding failed!
A glistening cerebralite reels under the force of the sonic vibrations!
Sound waves disrupt for 106 damage!
A translucent shell appears around the cerebralite, absorbing most of the blow.
... 65 points of damage!
The glistening cerebralite's eye explodes shattering the skull into a thousand pieces.
An intangible ripple of pure energy courses through the air as the cerebralite's pupils widen a final time, its eyes clouding over as it dies.
The brilliant aura fades away from a glistening cerebralite.
The brilliant luminescence fades from around a glistening cerebralite.
A shadow seems to detach itself from a glistening cerebralite, swiftly dissipating into the air.
The bright luminescence fades from around a glistening cerebralite.
The dim aura fades from around a glistening cerebralite.
The silvery luminescence fades from around a glistening cerebralite.


The words "right" and "left" are completely absent.

Yar, I was thinking there was another message that provided the location.

Regardless, that mean's you can't actually use your method to determine hit location for those instances. They are probably all being assigned to the same eye. Which, obviously is not correct or useful here. Good thing most people aren't ambushing with disruption criticals. :)

Tgo01
03-24-2016, 09:10 PM
It's the same problem across all crit tables that don't specify right/left in the crit message.

It's also why I agreed with Donquix back on the first page of this thread that LOOKing at the critter is probably the best bet and why I even provided an example of how this could work.

Yes, no one held the person's hand and gave them the exact script they were looking for, people have provided plenty of examples of how this could work (both with crit messages and looking) and suggested they could adapt said scripts to work for what they want it to do.

Haldrik
03-24-2016, 09:44 PM
It's the same problem across all crit tables that don't specify right/left in the crit message.

It's also why I agreed with Donquix back on the first page of this thread that LOOKing at the critter is probably the best bet and why I even provided an example of how this could work.

Yes, no one held the person's hand and gave them the exact script they were looking for, people have provided plenty of examples of how this could work (both with crit messages and looking) and suggested they could adapt said scripts to work for what they want it to do.

Right. Hence me saying your version wouldn't work.

Anyways, this whole discussion is probably moot because of the extremely low chance of crush interfering. You would need an ambusher aiming a weapon that happens to have a crush % and then aiming for the eye, landing that rank 3 wound w/ no fatal, THEN a 50% chance to guess the wrong eye. There is no way I could justify looking at EVERY mob to mitigate this. In fact if i ever got the rank 3 wound with a crush weapon, i would just automagically set my target to head and escape the entire proposition altogether.

Or everyone could just go UAC where this problem doesn't exist!

Tgo01
03-24-2016, 10:05 PM
Right. Hence me saying your version wouldn't work.

You were the one who even brought up my script, seemingly just to mock it for some strange reason.


There is no way I could justify looking at EVERY mob to mitigate this.

Looking at critters isn't really a big deal. My bard looks at every critter before he attacks it to see if they are carrying something in their hands so he can use 1002 on them. I literally don't notice it slowing him down at all.

Regardless trueoutsoldier's original request was if there was a way to get critter wound information, the correct answer thus far has been: yes, by LOOKing at the critter.

Donquix
03-24-2016, 10:23 PM
You can also do a hook and squelch the look so you don't get spammed. If you're hide and ambushing you're either already safe from hiding, if you're sneaking or already hidden waiting around like a creeper, or in hide RT so the look is completely inconsequential.

If you're open ambushing the worst case is you lose like a fraction of a second of time to perform the look on your first attack only, after that you perform the look during swing RT so again...completely inconsequential. For the first hit if open ambushing good chance you're feinting or using some other setup maneuever or spell first, and would again be in RT making the look inconsequential.

trueoutsoldier
03-25-2016, 05:36 PM
So this is a start, but its not working. Getting a syntax error on the loop


def aimlocation
fput "look ##{target.id}"
woundinfo = matchtimeout(0.1,/(he|she|it|the) has .*/i)
if woundinfo =~ /severe head trauma and bleeding from .* ears/ and woundinfo =~ /severed left leg/ and woundinfo

=~ /severed right leg/ then fput "aim neck"
elsif woundinfo =~ /severed left leg/ and woundinfo =~ /severed right leg/ then fput "aim head"
elsif woundinfo =~ /severed left leg/ then fput "aim right leg"

elsif woundinfo =~ /severed right leg/ then fput "aim left leg"

else fput "aim left leg"
end

def stand
until(standing?)
change_stance('defensive')
fput "stand"
end
end
def hide
until(hidden?)
change_stance('defensive')
fput "hide"
end
end
def ambush
stand
if target.status !~ /dead|gone/ && !Spell[9607].active?
change_stance('offensive')
fput "ambush ##{target.id}"
else
change_stance('defensive')
start_script("sloot")
wait_while{running?("sloot")}
break

end


loop {
stand
hide
aimlocation
ambush
}

the syntax error messaging

--- Lich: ambush active.
--- Lich: error: ambush:46: syntax error, unexpected end-of-input, expecting keyword_end
C:/Users/trueoutsoldier/Desktop/lich/lich.rbw:2517:in `eval'
C:/Users/trueoutsoldier/Desktop/lich/lich.rbw:2517:in `block (3 levels) in <class:Script>'
--- Lich: ambush has exited.

Donquix
03-25-2016, 06:27 PM
The ambush function, at the very least, isn't properly ended.

Tgo01
03-25-2016, 07:22 PM
So this is a start, but its not working. Getting a syntax error on the loop


def aimlocation
fput "look ##{target.id}"
woundinfo = matchtimeout(0.1,/(he|she|it|the) has .*/i)
if woundinfo =~ /severe head trauma and bleeding from .* ears/ and woundinfo =~ /severed left leg/ and woundinfo

=~ /severed right leg/ then fput "aim neck"
elsif woundinfo =~ /severed left leg/ and woundinfo =~ /severed right leg/ then fput "aim head"
elsif woundinfo =~ /severed left leg/ then fput "aim right leg"

elsif woundinfo =~ /severed right leg/ then fput "aim left leg"

else fput "aim left leg"
end

def stand
until(standing?)
change_stance('defensive')
fput "stand"
end
end
def hide
until(hidden?)
change_stance('defensive')
fput "hide"
end
end
def ambush
stand
if target.status !~ /dead|gone/ && !Spell[9607].active?
change_stance('offensive')
fput "ambush ##{target.id}"
else
change_stance('defensive')
start_script("sloot")
wait_while{running?("sloot")}
break

end


loop {
stand
hide
aimlocation
ambush
}

the syntax error messaging

--- Lich: ambush active.
--- Lich: error: ambush:46: syntax error, unexpected end-of-input, expecting keyword_end
C:/Users/trueoutsoldier/Desktop/lich/lich.rbw:2517:in `eval'
C:/Users/trueoutsoldier/Desktop/lich/lich.rbw:2517:in `block (3 levels) in <class:Script>'
--- Lich: ambush has exited.



def aimlocation
fput "look ##{target.id}"
woundinfo = matchtimeout(0.1,/(he|she|it|the) has .*/i)
if woundinfo =~ /severe head trauma and bleeding from .* ears/ and woundinfo =~ /severed left leg/ and woundinfo =~ /severed right leg/
fput "aim neck"
elsif woundinfo =~ /severed left leg/ and woundinfo =~ /severed right leg/
fput "aim head"
elsif woundinfo =~ /severed left leg/
fput "aim right leg"
elsif woundinfo =~ /severed right leg/
fput "aim left leg"
else
fput "aim left leg"
end
end

def stand
until(standing?)
change_stance('defensive')
fput "stand"
end
end

def hide
until(hidden?)
change_stance('defensive')
fput "hide"
end
end

def ambush
stand
if target.status !~ /dead|gone/ && !Spell[9607].active?
change_stance('offensive')
fput "ambush ##{target.id}"
else
change_stance('defensive')
start_script("sloot")
wait_while{running?("sloot")}
break
end
end


loop {
stand
hide
aimlocation
ambush
}

calael
04-27-2016, 09:46 PM
Calael's script is more manageable to write and maintain. The tradeoff is that it relies on looking at the target, which'll add latency, and screen scroll, which will either look awkward or add overhead to squelch it.

If you want the fastest script, you'll want to minimize server roundtrips (looking at the creature after a shot) and heavy calculation (regexes, lots of comparisons).


Sorry I lost track of this thread, just wanted to comment on this. Responsiveness is important to me, so I don't want a round trip to the server to be on the critical path. In the script I posted, the LOOK happens *after* the attack, and the wound info for the creature is stored for a later attack. Hence, the LOOK is overlapped with roundtime from the actual HURL. If there is no wound info for a creature (e.g. for the initial attack), I assume it's not wounded at all.

This works well if you're hunting solo, but has clear drawbacks in a group. It provides the right tradeoffs for me w/respect to maintainability, functionality, etc. I have other scripts I'd rather spend time on than cataloging and parsing crit strings, etc. That just sounds like a time sink to me. :)

calael
08-24-2016, 05:54 PM
Ignore this... didn't realize I'd already responded. Sorry for resurrecting a dead thread.

Haldrik
08-24-2016, 06:24 PM
Ignore this... didn't realize I'd already responded. Sorry for resurrecting a dead thread.

Haha.

I saw your second post. Just wanted to point out that a hook is not a squelch and thus far more efficient. It prevents the game from sending the lines to the window altogether.

Versus send to game window, check for lines, remove/sub.

So all in all not very resource intensive. Assuming the hooks are done right.