Implementing: Procs
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: CoE Spells Validation
I was starting to think the same thing as looping through all equipped items and active spells is just to much. I am currently debating the actual "proc" function in the script as I had the first param as item/spell, however we don't have spells really exposed to lua like we do items. I was trying to keep the functions similar to each other but starting to think they will have to be different. I like your idea of a Proc struct though, I was leaning towards a map<int8, LuaSpell*> when I started thinking about adding the map.
Another question about procs, is there more then offensive/defensive? I seem to remember a proc that will only go off on spell attacks, so that doesn't really fit into offensive. Is that actually in the game still and is there other procs that don't really fit into offensive or defensive?
PS - John, all this proc stuff should probably be broken off into a new topic, maybe in the public forums?
Another question about procs, is there more then offensive/defensive? I seem to remember a proc that will only go off on spell attacks, so that doesn't really fit into offensive. Is that actually in the game still and is there other procs that don't really fit into offensive or defensive?
PS - John, all this proc stuff should probably be broken off into a new topic, maybe in the public forums?
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: CoE Spells Validation
That's where the proc type portion of the map comes in, you could create many different categories and for things like spell attack, block ect, and just check for them where needed in the code.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: CoE Spells Validation
This is what I got so far design wise
Lua:
As for proc types I have come up with this
Lua:
Code: Select all
AddProc(Spawn, (int8)Type, (float)chance, [Item]) --Item only needs to be set if it is a proc from an item
RemoveProc(Spawn, [Item]) -- Again, only set item if it is a proc from an item
proc((Spawn)Caster, (Spawn)Target) -- proc function for a spell, can add lua spell data after if we want
proc(Item, (Spawn)Caster, (Spawn)Target) -- proc function for an item
- Offensive
- Defensive
- Physical Offensive
- Physical Defensive
- Magical Offensive
- Magical Defensive
- Block
- Parry
- Riposte
- Evade
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: CoE Spells Validation
On healing spell/on beneficial but looks like a pretty good list to start
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Procs
Split the Procs topic off into it's own.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Implementing: Procs
Started coding this and came up with another question, is it possible for a single item/spell to have a proc of different types, so can there be a offensive and defensive proc on the same item/spell?
- xinux
- Team Member
- Posts: 680
- Joined: Wed Mar 10, 2010 11:10 am
- Location: Destroyer of Servers
Re: Implementing: Procs
EQ II - Build=1360 (Orig) - Build=1360 (DoF) - Build=2654 (KoS) - Build=3375 (Classic) - Build=3554 (EoF)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Procs
"This has all the info you need, unless it doesn't." ~Xinux
PS: I'm done trusting eq2.wikia for anything. That article history: 10:42, November 11, 2007 FzyBot
PS: I'm done trusting eq2.wikia for anything. That article history: 10:42, November 11, 2007 FzyBot
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: Implementing: Procs
Took me awhile to find this but I used to have this belt http://eq2.wikia.com/wiki/Belt_of_Resilience
- thefoof
- Retired
- Posts: 630
- Joined: Wed Nov 07, 2012 7:36 pm
- Location: Florida
Re: Implementing: Procs
Also while I'm thinking about it, I think defensive procs can go off on multi attacks as well. Offensive only go off on the first attack. Just to clarify what I said above about triggers.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Procs
Ugh, that is kinda swinging the vote for "separated spells" again. Unless the proc implementation can be managed from within the item/spell script itself as discussed.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Implementing: Procs
I will pass the type of proc to the lua function so it can be handled in the script. I have noticed a problem however, SpellDamage and SpellHeal functions can only be called from a spell script, so those functions which would probably be the most likely to be used in procs can't be used in item scripts...
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Implementing: Procs
I guess you will just have to invent ItemDamage and ItemHeal LUA's then
unless what you mean to say is there's no way for swinging an item, it proc'ing, and interacting with the Spells functions. That would be a bummer.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Implementing: Procs
I could make functions like that, was also debating a way to allow SpellDamage/SpellHeal to work for items, going to see if I can get procs working at all in general with a generic Say() for the proc first though.
Another issue I just ran into, items don't have an equip and unequip lua function calls like I thought they did. While this shouldn't be hard to implement I doubt I will be able to get it tested enough to commit tonight like I had originally planned.
Another issue I just ran into, items don't have an equip and unequip lua function calls like I thought they did. While this shouldn't be hard to implement I doubt I will be able to get it tested enough to commit tonight like I had originally planned.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Implementing: Procs
Added the equipped and unequipped functions for items and got procs working, mostly, here is the test item script I have been using.
There is a client crash issue with RemoveProc however so I am unable to commit it at this time, hopefully I will have it figured out tomorrow.
Code: Select all
function equipped(Item, Player)
AddProc(Player, 1, 50, Item)
Say(Player, "Equipped")
end
function unequipped(Item, Player)
RemoveProc(Player, Item)
Say(Player, "UnEquiped")
end
function proc(Item, Caster, Target, Type)
Say(Caster, "Proc type: " .. Type)
end
Last edited by Jabantiz on Wed Nov 27, 2013 1:56 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 0 guests