Heya
So, my game includes a friendship syste, made using the titular plug in
Single leader,BUT...
...They're also kinda supposed to be their own Friend? think like that thing Persona does where a link automatically goes up with the story.
Problem is, opening the friendship menu in game gives me the attached message.
Any help with tha? tell me i if need to give you something more!
MV - Problem with Moogle X Friendship System
● ARCHIVED · READ-ONLY
-
-
There is no attached message.
-
....let me try and fix it....
Edit:Done -
It says it's trying to read stuff from a field being passed in as null - i.e. it's trying to include information from a character that doesn't exist. Have you made modifications to the plugin, or just put it in, changed nothing, and opening the menu gives you that?
-
As long as plug-in parameters? Pretty sure i left It untouched if not for some repositioning of some elements.
As in like events and note-tags i moved the Acton in questione from slot 1 to slot 13 for reasons,and by consequence changed all the events and tags -
I can take a look at it, see if it requires setting up something that you missed...but you should try starting a new project and put it in, see if it works. If it does, then you can add in any other plugins your original project is using, try to find a conflict.
So if I understand you correctly, you had an event that does:
Plugin Command: AFS Show Leader 13
Plugin Command: AFS Show Friend 13 Leader 13
and then you get the error message when trying to open the friendship menu?
Try a test game again where you don't do the second command, just to make sure the friendship plugin overall is working for you in the first place without the leader being his own friend idea.
I see you already posted about this in the thread by Solar_Flare, where this bug has been reported. Unfortunately, as it appears to be a bug that appeared between versions of the plugins, I don't have any ideas. -
it kinda worked.
it doesn't crash, but the friend is missing from the list
edit:...just noticed the most basic error i could make....i have to set the actop up as a friend to....god i'm dumb
edit2:nope still nothing
if you need more info:
considering these notes
This crashes
this doesn't but it doest add the friend to the list
Edit 3 since the forum doesn't like doubleposting: well, apparently now it only works for friend 01 even if the notes are the same
Edit 4: tried making a new project and re-installed the plug-in. same error -
Hmm.
I'd have to do some debugging to figure out why the friend actor can't be found if it's the same as the leader actor, but as a first try, you could replace the following function:
JavaScript:Scene_ActorsFriendship.prototype.reserveFriendImages = function() { for(var i = 0; i < $gameActors._data.length; i++) { var actor = $gameActors._data[i]; if(actor && actor.isAfsLeaderVisible()) { for(let j = 0; j < actor._afsFriendList; j++) { let friend = $gameActors.actor(actor._afsFriendList[j]); if(friend) ImageManager.reserveFace(friend.faceName()); } if(Moogle_X.AFS.singleLeaderScene) return; } } };
There's just a one-line change there that prevents the error. However, this might cause the leader's face image to be missing... so let me know how it goes. -
Heya and thanks for your answer! Thing Is,as ive said in edit 3Hmm.
I'd have to do some debugging to figure out why the friend actor can't be found if it's the same as the leader actor,
It doesn't work for any friend, except the One with id 1,for some reasonEdit 3 since the forum doesn't like doubleposting: well, apparently now it only works for friend 01 even if the notes are the same -
It kind of sounds like this could be an issue of initialization ordering. Can you write a test event that adds every actor to your party (it can remove them afterwards) and see if that fixes it?
-
This is the code and the result...so no,adding and removing tha actor from the party doesn't fix
-
Okay, I'm probably going to have to take some time to sit down and reproduce it and debug it. I should have time for that this weekend.
-
Okay, so I can't reproduce it in a new project, which means there's probably something I'm missing in your setup. It might be your plugin parameters, or the note tags you've placed on other friends, or another plugin conflicting - without more information it's impossible to say.
This is a possibly incomplete list of information that could help me track down the issue:
- Your plugin list
- The note tags on your leader and on the friends. Please copy-paste the tags as text instead of posting a screenshot, so I can easily paste them into my test copy and know I have exactly the same tags as you. If they're all the same there's no need to show each one separately.
- Any plugin commands that are run before the crash occurs. If the ones you already showed are everything, there's no need to repost them.
- The plugin parameters for ActorsFriendshipSystem.
Did you try editing the plugin to replace this function? Here's an updated version that logs to the console instead of crashing when the error occurs, so if you could make this edit, do whatever it is you do to produce the error, and then show me what you find in the console (even if you don't get the error), that could help. Just find the chunk of code that looks almost the same as this (you can search "reserveFriendImages" in the file) and replace it. Maybe consider making a backup of the plugin file first in case you need to revert the edit.
JavaScript:Scene_ActorsFriendship.prototype.reserveFriendImages = function() { for(var i = 0; i < $gameActors._data.length; i++) { var actor = $gameActors._data[i]; if(actor && actor.isAfsLeaderVisible()) { for(let j = 0; j < actor._afsFriendList; j++) { let friend = $gameActors.actor(actor._afsFriendList[j]); if(friend) ImageManager.reserveFace(friend.faceName()); else console.warn("Couldn't find friend actor!?", actor, actor._afsFriendList, j) } if(Moogle_X.AFS.singleLeaderScene) return; } } }; -
i'll send those asap. i'll be sending the ones in the new, "test" project since it's easier
As for the "did you try editing the plugin".....no. As much as i'd love to learn more, JS is Hieroglyphics to me.
Edit
1)plugin list: well i's a new project i made just for the purposeof testing this,...sooo just the default ones+frienship
2.1) Leader tags:
<AFS Leader>
2.2) Friend tags
<AFS Max Level: 10>
<AFS Exp: 10, 25, 50, 75, 100, 150, 200, 250, 300, 400>
3)the one i sent is the only event in the game
4parameters: made a clean install just for this, but here they are anyways
-
As far as I can tell, my project is now identical to yours, and I still don't get the issue.
My plugin parameters are identical, MadeWithMV and Community_Basic are the only other active plugins (there's no chance of collision with them in any case), every actor has the tags you posted and the leader additionally has the leader tag (although it's set to all actors as leader so I think that has no effect). It's a default project with Harold's party and one event that I activate before opening the friendship screen:
Code:◆Plugin Command:AFS Set Mode Single Leader ◆Plugin Command:AFS Show Leader 1 ◆Plugin Command:AFS Show Friend 1 Leader 1 ◆Plugin Command:AFS Show Friend 2 Leader 1 ◆Plugin Command:AFS Show Friend 3 Leader 1 ◆Plugin Command:AFS Show Friend 4 Leader 1 ◆Plugin Command:AFS Gain 1 Friend 2 Leader 2
The only other possibility I can think of is that we're using a different version of MV, but I don't even know if that could cause this.
One thing you could try is turning off the very first plugin parameter, "Default All Leaders". I don't expect that to fix it but if you're lucky maybe it will have an effect.
Other than that I'm really at a loss... the only other way I can think of to try and reproduce this is to get you to send me your entire test project as a zip file (maybe without the audio and img folders, to keep the size down; if it's just default resources anyway then I can copy them over from my test project).
So... if it's not too much trouble, how about you do just that? Move or delete the img and audio folders in your test project, zip it up, and attach it to a post here on the forum (assuming you're allowed to do that) or upload it somewhere. -
@Solar_Flare to keep it smaller, you just need the plugin.js and teh data folder
entirely, copy/paste that and your also good to go (if not using custom tilesets)
but it does work on my end (version 1.6.1), so I dont know what his cause can be. -
1) yeah i also use 1.6.1
2)here ya go: -
Unfortunately I can't open that file...
-
....why?
-
@Solar_Flare if you have winrar, 7zip or others, right click to unpack it.
than copy the files whats inside to the correct folders/overwrite those.
or delete those first, than place them in :)