Closed AtillaG1 closed 2 months ago
I added this piece of code recently but it was working. https://github.com/Sphereserver/Source-X/commit/eef10d80709153b304b37c54d2764ce35fc05912
mmm the one you posted isnt in core right now actually. 🤔
Update, connection to the problem is flag listed below. If both activated, its bugging the taming. If I disable this one, its fine.
// EF_FollowerList 000080 // Save the followers to the list and enable CURFOLLOWER.n.UID, CURFOLLOWER.ADD/DEL
and CURFOLLOWER.CLEAR commands.
These flag is a new feature.seem s bug was added
Updated first post, with connections I found.
Also with both flags activated, the followerslots property doesnt work. Its always = 1.
If I understand you clearly, it's not a bug. Because EF_FollowerList is a new flag to add option to create list automatically for your followers. I meant FollowerSlots only working without this flag activated, because old system only keeping the number of followers while new system keeps list of followers. If you want to add npc manually to someone's follower list with EF flag active, you need to use
<PLAYER>.CURFOLLOWER.ADD <FOLLOWER.UID>
or
<PLAYER>.CURFOLLOWER.DELETE <FOLLOWER.UID>
to remove.
<PLAYER>.CURFOLLOWER.CLEAR
clears the list.
IF you activate EF_FollowerList you tell the Sphere, that you gonna use new system, so you need to use ADD command to add something manually to the list, CURFOLLOWER += 1 or anything similar to this not working with new system.
Ok and what about the Taming not working at all?
"If I activate this sphere.ini setting, set followerslots on NPC to 1, and have on char MAXFOLLOWERS=5 and try to tame the creature, it will immediately fall into this part." "it also add curfollowers to my status, but the creature is not tamed and doesnt act like it is"
Hmm, okay I see the issue I will take a look now
Just to have it clear myself: is every pet "worth" 1 slot if using EF_FollowerList? How do you set an upper limit, by tweaking the trigger or is there some default/fixed value?
solved on dev branch, thank you!
I have a question about the new system, if a follower have FollowerSlots > 1, isn't curfollower returning the wrong number? CHC_CURFOLLOWER return m_followers.size() as followers number but that is the followers number not the followers total slots. For example if i have 2 followers, the first 1 with FollowerSlots = 1 and the second one with FollowerSlots = 2, CURFOLLOWER return 2 instead of 3.
Yea because apparently this new system (EF_FollowerList) was made as new thing and is not using the followerslots. ( you would need to script your own ) with the new trigger.
The fact is the function seems to use FollowerSlot but even if you change it using the @FollowersUpdate trigger they don't get updated, because CURFOLLOWER read only the follower array dimension, so you can't customize it. That would require a two-dimension array where for each follower you can save also the FollowerSlots.
@xwerswoodx
CScriptTriggerArgs Args;
Args.m_iN1 = (iFollowerSlots >= 0) ? 0 : 1;
Args.m_iN2 = abs(iFollowerSlots);
if (OnTrigger(CTRIG_FollowersUpdate, pChar, &Args) == TRIGRET_RET_TRUE)
return false;
if (Args.m_iN1 == 1)
{
iFollowerSlots = -(short)(Args.m_iN2);
}
else
{
iFollowerSlots = (short)(Args.m_iN2);
}
// OF_PetSlots 00000010 // Enable AOS pet follower slots on chars. If enabled, all players must have MAXFOLLOWER property set (default=5)
If I activate this sphere.ini setting, set followerslots on NPC to 1, and have on char MAXFOLLOWERS=5 and try to tame the creature, it will immediately fall into this part.
Here is the full code: (it also add curfollowers to my status, but the creature is not tamed and doesnt act like it is.
FOUND CONNECTION! Im using also this flag, and this flag is making it not work together with the above one. If i disable this flag, the behaviour above works fine.
CONNECTION NO.2
If i disable OF_PetSlots and enable EF_FollowerList, new curfollower is not being added at all, via Taming.
I think these two are interfering in to each other somehow a bugging.