Hime-Works / Requests

Bug reports and requests that may require longer discussions and is not suitable to leave on the blog
http://himeworks.com/
GNU General Public License v2.0
7 stars 9 forks source link

Trouble using Party Manager, Party Switching Scene, & Instance Actors #363

Closed Manic714 closed 6 years ago

Manic714 commented 6 years ago

Hello! I joined the HimeWorks Patreon in December of last year, (So tomorrow it will be my third month of pledging) But I am having a problem with the Party Manager, Party Switching Scene, and Instance Actors Plugins. I can not seem to add a new party to act as a storage place for party members or use new actors created. I am working to create a capture system similar to Pokemon, I was also using another plugin by YanFly but I was worried it was causing problems so I created a new file without it.

My first problem is the code for creating a new party, Anything I put causes an error. I tried

Party.create("Box");

but it still causes a crash. I think I need this script to start the command, var party = $gameSystem.reserveParty() or something similar, but I know very little about coding. (I am willing to learn)

When I remove the code for the box an entirely new problem appears. I am able to capture and add to my party one creature, but upon entering the next battle, I have no abblity to attack, guard or even use items with the new creature. I am unsure what I did wrong to create the creature. I used the script:

var newActor = InstanceManager.addActor(0003) $gameParty.addActor(newActor.id)

Where 0003 is conected to the common event as well as the enemy & actor number. They are all the same, Yet the new actor, despite having all the features of the selected one (Images and such) seems completely unusable.

Here is my game, with it working as much as It can. https://drive.google.com/open?id=1qZT3Az-tKjWvRgwLIynhh7pFAgxMrseU

Any help at all would be appreciated! Thank you in advance.

HimeWorks commented 6 years ago

Hi Manic, thank you for your continued support.

As for the issues you're having, I'm looking at the project but I don't see where you've set up the actor creation event. So, I decided to set on up based on your explanation to see what's happening. And it did crash as you explained.

I looked at your files and the names of the plugins do not match what is expected of the plugins themselves. These are old plugins so they require a certain filename. You can look at the top of the plugin in the plugin window to see what it should be.

The party manager should be named

HIME_PartyManager

And then it should work as described in the usage section. Check the names for the party switching system, instance actors, and some of the other plugins.

Manic714 commented 6 years ago

Thank you! I was not aware that the file name could hold such a big impact. All file names have been corrected. It indeed solved the problem of Intasce Actors not working. As for Party creation, I had that at the start of the game, causing it to crash on startup.

I have uploaded a newer version with an action button triggered event hidden in the pink tree in town. The game crashes when you activate the event and reach the script for party creation. The only thing I have that I am unsure of is I added the plugin by YanFly when I thought the filename correction fixed it. I also edited the creature capture common event to add a new common event, but as the Party System still can't create storage, I do not think I implemented it...

Last thing I am also trying now trying to work with Custom Party Leaders, another older Plugin of yours. I would like an actor present who is not persented in battle or the menu. I pulled it off once before using this plugin, but your page mostly directs plugin commands, rather than script calls and I'm not sure they can be used together. ... Which is how I'd have to use them to set up the opening of the game. For now, I attempted to set it up with one of the only script calls you illustrated on that page.

I appreciate your help with this and look forward to your future work as well.

HimeWorks commented 6 years ago

What do you mean by "storage"? Like, when you capture a monster, create a new actor out of it, and then send it to a different party that you could then switch between?

Plugin commands definitely won't work here because you only have the ID in your script call. This is the script call to set the leader to a different actor, given an ID

$gameParty.setLeader($gameActors.actor(ID))
$gamePlayer.refresh();

The second line is required only if you are changing the current party leader, because you need to refresh the graphic of the leader.

If you want to switch the leader for a different party, you can use Party.get(PARTY_ID) to get the specific party, and then call setLeader on that.

Manic714 commented 6 years ago

Yeah, thats what I mean by storage. But maybe I have some misconceptions on how the Party switch works? Do the new party and new actor need to have an actual in-game location? It's no problem if they do, but I suppose I didn't know that.Also, if the new actors do require an actual location can I set them to say things if the player arrives at the said location and interacts?

As for the Party Leader, your new code seems to have solved that problem, so now the only remaining problem is creating parties.

HimeWorks commented 6 years ago

The party switching scene just provides a way for you to allow players to switch members from one party to another. If you look at the usage details, when you call the scene, you specify which two parties you will be switching members between, and then it just opens up a new window where you perform the actual switching.

Actors do not have location information, only parties do. This means when you move an actor from one party to another, they'll just be where the party is.

If you are physically switching the player's control from one party to another (which is the Party.switch feature that the party manager provides), you would need the other party to have a location set up. But if you are simply using a party as storage for unused actors, you don't need to worry about location.

For creating parties, you can try using the Party.create again and then follow the instructions for adding members to it, now that the filenames are correct.

Manic714 commented 6 years ago

Thanks, I was able to create the new parties now, however, It has revealed a new problem, I am unable to access the switch menu. The error says "can not read property 'prepare'of null" Is this error created due to the fact I am using the switch when the one party is empty? or am using a wrong code?

I am using this code: SceneManager.prepareNextScene(Party.get("Box"))

and have tried this code: SceneManager.push(Scene_PartySwitch) SceneManager.prepareNextScene("Box")

Both return in error.

HimeWorks commented 6 years ago

Have you tried this:

SceneManager.push(Scene_PartySwitch)
SceneManager.prepareNextScene(Party.get("Box"))
Manic714 commented 6 years ago

It seems to have worked. And sorry I took a bit to reply, my family had had several things for me to do. Anyway, I almost have everything working, I have the ability to capture creatures and a set party limit so that overflow goes to a reserve. I can access the Switch system, however, After adding new creatures to my party and creatures to the "Box" party using the common event, I go to the switching system event, yet it returns an empty menu containing only the default character. I am unsure why...

HimeWorks commented 6 years ago

When you make this prepare call

SceneManager.prepareNextScene(Party.get("Box"))

It will display the current party on the left, and the "Box" party on the right. What do you see when you load the menu? Empty window on the right? Default character on the left (not even the current party)

Manic714 commented 6 years ago

Yes, default on the left, with no current party, and empty menu on the right. Even though I know I have characters in the Box party as well as the party.

HimeWorks commented 6 years ago

Ok so I downloaded the new project you uploaded, and started by adding two actors to the current party.

Then I created an event to make a "box" party

Party.create("box")
Party.addActor("box", 2)
Party.addActor("box", 3)

Then I make a call to the switch scene

SceneManager.push(Scene_PartySwitch)
SceneManager.prepareNextScene(Party.get("box"), $gameParty)

And it works. Sort of. The window on the right displays the two actors I added to the party.

However, the left window only showed one actor. The reason why this occurs is because the party switch scene on the left only shows either the total number of members in the party, or the total number of battle actors, whichever is lower.

So in your project, there's only one actor in battle at anytime, which is why only the first was shown. I'm not sure why I wrote the code that way...the party switch scene should always show all members in the party.

I have updated the party switch scene to display all members, regardless what the battle limit is.

Manic714 commented 6 years ago

I appreciate all your help, and regent how long this is taking, especially since it seems something went wrong. The file uploaded to the drive folder before I changed the common even to send creatures to the Box party, however, I don't think that should cause the problem I'm now having. Either way, I've uploaded the newest file to the drive.

In the current file, when I try to access the Party Switching Scene it displays this error,

"Cannot read properties 'members' of undefined"

Implying that either the Box party or the basic party are undefined. I created the Box party via an autorun event on a different map than the access to the Switching Scene. This is the only notable difference I can think of...

HimeWorks commented 6 years ago

There is a typo in your party ID's. The one in the house says "box", but the one near the tree says "Box". Party manager treats them as two different ID's (I didn't think of supporting case-insensitivity)

Also, for future reference, you can choose to upload only the js and data folders (assuming no new images), to make it easier to share new patches.

Manic714 commented 6 years ago

Hi again, Thanks for your help, I'm super close to fixing this problem, (I've been feeling really down due to unsealed stuff so sorry for a late response here) the only remaining issue is that the set max party members scrip seems to be ignored. The current version allows for basically limitless party additions.... The issue exists in the most current version uploaded to my folder, However I have made some scrip call changes in my current working version, (If you'd like I can do as you said and upload only js and data folders in a new version folder) However it seems to have no effect no matter where I place the script or what I do to the common event to effect the party limit but it seems to be ignored. It may be that I can't pin down the actual name of the default party....

HimeWorks commented 6 years ago

The name of the default party is set in the plugin parameters for the party manage plugin. I set it to 1 by default (as a string)

Manic714 commented 6 years ago

Thank you the script is working to limit the party now, and my else branch in the common event works to send all new actors created after hitting the limit to a new party. At least I think so, when accessing the Box party on the Switching Scene, It will show the current party, the default party, But not any of my new actors added using the event... it makes sense that the problem is in the common event, but I've looked over it and don't see it... Plus it plays though the game with no error...

I'll attach an image of the script I use for the common event, in addition, I've uploaded the current js and data files to the drive.

screen shot 2018-02-23 at 11 28 51 am

HimeWorks commented 6 years ago

For the call to add an actor to the "Box" party, It should be either

$gameParties.addActor("Box", newActor.id)

or

Party.addActor("Box", newActor.id)

Adding an actor to a specific party only accepts an actor ID. It will probably ignore anything that is not a valid actor ID.

Manic714 commented 6 years ago

Thanks so much! Everything works great now! Sorry this took so long!