So, I have noticed, sic seems to work, SMN bloodpacks work, but the ready ability always shows nothing, even when the jug pet should have abilities.
I would like to look into creating this, but I need to understand more of how the pet abilities work.
Can anyone explain to me where to find the smn pet abilities?
I know the actual smn abilities are scripted here: https://github.com/DarkstarProject/dark ... ities/pets
But I am more curious where the info is that says "x pet has y ability". Then I can see if I can recreate this for the ready ja.
/ja Ready
Re: /ja Ready
Ready would be so nice to have working. I just don't have the time with real life stuff to go through it.Delaide wrote:So, I have noticed, sic seems to work, SMN bloodpacks work, but the ready ability always shows nothing, even when the jug pet should have abilities.
I would like to look into creating this, but I need to understand more of how the pet abilities work.
Can anyone explain to me where to find the smn pet abilities?
I know the actual smn abilities are scripted here: https://github.com/DarkstarProject/dark ... ities/pets
But I am more curious where the info is that says "x pet has y ability". Then I can see if I can recreate this for the ready ja.
-
- Developer
- Posts: 176
- Joined: Tue Jul 31, 2012 7:21 am
Re: /ja Ready
If I'm with you, your looking for how the smn pet abilities work?
Seems like the core of what is calling those scripts is built in luautils.cpp:
https://github.com/DarkstarProject/dark ... autils.cpp
From Line 3284:
int32 OnPetAbility(CBaseEntity* PTarget, CBaseEntity* PMob, CMobSkill* PMobSkill, CBaseEntity* PMobMaster)
{
lua_prepscript("scripts/globals/abilities/pets/%s.lua", PMobSkill->getName());
If your looking for the checks to ensure the player/pet can use the ability, I am 98% sure it is all handled client side. closet thing I see if a query to database to get pet skill list:
https://github.com/DarkstarProject/dark ... tutils.cpp
Pet->m_MobSkillList = (uint16)Sql_GetUIntData(SqlHandle, 40);
There is another example for automations attachments:
Line 1911:
int32 OnManeuverGain(CBattleEntity* PEntity, CItemPuppet* attachment, uint8 maneuvers)
Both of these are what is exposing the entities from C to Lua. The lua is setting the proper directory for pets in line 3225:
int32 OnAbilityCheck(CBaseEntity* PChar, CBaseEntity* PTarget, CAbility* PAbility, CBaseEntity** PMsgTarget)
.....
if (PAbility->isAvatarAbility())
{
memcpy(filePath, "scripts/globals/abilities/pets/%s.lua", 38);
}
lua_prepscript(filePath, PAbility->getName());
if (prepFile(File, "onAbilityCheck"))
{
return 87;
}
hope this helps. I noticed the ability ready already has an id located in ability.h, so it likely needs only the ready.lua file to be made in srcipts/abilities/:
https://github.com/DarkstarProject/dark ... /ability.h.
The above file also lists all smn pet abilities at around ID number 246 + , it also appears to list all the pet jug abilities that ready could provoke (saw a few around ID 719).
Seems like the core of what is calling those scripts is built in luautils.cpp:
https://github.com/DarkstarProject/dark ... autils.cpp
From Line 3284:
int32 OnPetAbility(CBaseEntity* PTarget, CBaseEntity* PMob, CMobSkill* PMobSkill, CBaseEntity* PMobMaster)
{
lua_prepscript("scripts/globals/abilities/pets/%s.lua", PMobSkill->getName());
If your looking for the checks to ensure the player/pet can use the ability, I am 98% sure it is all handled client side. closet thing I see if a query to database to get pet skill list:
https://github.com/DarkstarProject/dark ... tutils.cpp
Pet->m_MobSkillList = (uint16)Sql_GetUIntData(SqlHandle, 40);
There is another example for automations attachments:
Line 1911:
int32 OnManeuverGain(CBattleEntity* PEntity, CItemPuppet* attachment, uint8 maneuvers)
Both of these are what is exposing the entities from C to Lua. The lua is setting the proper directory for pets in line 3225:
int32 OnAbilityCheck(CBaseEntity* PChar, CBaseEntity* PTarget, CAbility* PAbility, CBaseEntity** PMsgTarget)
.....
if (PAbility->isAvatarAbility())
{
memcpy(filePath, "scripts/globals/abilities/pets/%s.lua", 38);
}
lua_prepscript(filePath, PAbility->getName());
if (prepFile(File, "onAbilityCheck"))
{
return 87;
}
hope this helps. I noticed the ability ready already has an id located in ability.h, so it likely needs only the ready.lua file to be made in srcipts/abilities/:
https://github.com/DarkstarProject/dark ... /ability.h.
The above file also lists all smn pet abilities at around ID number 246 + , it also appears to list all the pet jug abilities that ready could provoke (saw a few around ID 719).
Re: /ja Ready
click line number when viewing on github and copy from address bar/right click line number and copy/paste the link, github auto scrolls to that line numberMetalfiiish wrote:If I'm with you, your looking for how the smn pet abilities work?
Seems like the core of what is calling those scripts is built in luautils.cpp:
https://github.com/DarkstarProject/dark ... autils.cpp
From Line 3284:
int32 OnPetAbility(CBaseEntity* PTarget, CBaseEntity* PMob, CMobSkill* PMobSkill, CBaseEntity* PMobMaster)
{
lua_prepscript("scripts/globals/abilities/pets/%s.lua", PMobSkill->getName());
If your looking for the checks to ensure the player/pet can use the ability, I am 98% sure it is all handled client side. closet thing I see if a query to database to get pet skill list:
https://github.com/DarkstarProject/dark ... tutils.cpp
Pet->m_MobSkillList = (uint16)Sql_GetUIntData(SqlHandle, 40);
There is another example for automations attachments:
Line 1911:
int32 OnManeuverGain(CBattleEntity* PEntity, CItemPuppet* attachment, uint8 maneuvers)
Both of these are what is exposing the entities from C to Lua. The lua is setting the proper directory for pets in line 3225:
int32 OnAbilityCheck(CBaseEntity* PChar, CBaseEntity* PTarget, CAbility* PAbility, CBaseEntity** PMsgTarget)
.....
if (PAbility->isAvatarAbility())
{
memcpy(filePath, "scripts/globals/abilities/pets/%s.lua", 38);
}
lua_prepscript(filePath, PAbility->getName());
if (prepFile(File, "onAbilityCheck"))
{
return 87;
}
hope this helps. I noticed the ability ready already has an id located in ability.h, so it likely needs only the ready.lua file to be made in srcipts/abilities/:
https://github.com/DarkstarProject/dark ... /ability.h.
The above file also lists all smn pet abilities at around ID number 246 + , it also appears to list all the pet jug abilities that ready could provoke (saw a few around ID 719).
Click here for a guide on scripting missions.<Giblet[NewBrain]> kj with this first step would be fine on my shit