- Joined
- Oct 15, 2017
- Messages
- 39
- Reaction score
- 10
- First Language
- english
- Primarily Uses
- RMVXA
Hi. So, first of all, this plugin is amazing. Kudos and thank yous for all the hard work that went into making it and for being generous enough to share it freely (SRD and those who added to it) and thank you Rhino for this amazing FAQ support and your own efforts supporting the plugin!
So, I backed myself into a rather unique corner and really need help solving this one.
Here's what I did:
I created a series of variables to determine race and gender. Using the toolkit, I made basic logic arguments in the character creator to say, "If race variable = n, allow this folder of pieces" and likewise for gender. It's all pretty simple.
For example, if the race variable is set to 0, then it allows folder assets for Human. Gender variable 0 = male.
So, I created four races this way, each with binary genders.
Now, here's where it becomes a problem. My game is open-ended, such that if the player dies or party wipes, they hit a respawn point (the Adventurer's Guild) where they are granted a new recruit (if they don't have any recruits waiting already).
The new recruit follows an algorithm that randomly determines their race and gender. However, the previously stored array of pieces created for the original character are presented, which results in 2 major issues:
1. The player can just roll with their previous image in spite of being a completely different race/gender and even with requirements for things their previous race didn't have (for example, horns are required for an Ogren, but if the player was previously a Sylvan, they don't have horns, yet can continue without assigning horns). In fact, it just gives the options for the previous race, despite the variables having been changed.
and 2. I attempted to troubleshoot problem 1 (which occurs after a game over - using a script to bypass game over and continue playing) by putting in a test event which would run a living character through the race/gender selection followed by a plugin call for the character creator. This time, it allows you to choose all the parts for the new race/gender, but it's overlaid with the previous race/gender selections.
So, what I need is to figure out how to tell the plugin to wipe the previous choices and start over, requiring the player to choose their parts for their new race/gender.
EDIT: My current thoughts, maybe this will help someone help me?
Create a non-race/gender for debug purposes. This race will have all file folder paths available. Create a 0 part for every object. Create a character with all the files with no parts - totally invisible. Output it, save it, then whenever the player has to remake a character, I set this as the default parts. Only issue with this is it will require putting 0 parts in the selection for every part, thereby allowing the player to make an "invisible" character. And while I don't really care what the player does for jollies, it's just bad game design.
There are two sections that stand out to me in the .js file.
line 1497 which is called on in Rhino's explanation of how to setup default parts (the part of it that calls for addInfos), and the lines below it that store the preview window's info into the variables. Basically, it seems the preview windows are held as temporary variables until confirmed, then stored as info/infos for the custom character. But I can't seem to find a method to wipe those variables clean.
EDIT EDIT: And the lines between those two areas that seem to maybe write the current sprites to the json?
SOLUTION:
At around line 1320, just need to comment out a few lines that retain the character preview, like so...
NOTE: With those lines commented out, it WILL NOT save the player's preferences so they have to select all the parts again from the start, but it does reset the required fields, preventing the player from backing out without selecting the parts as per the new requirements. This satisfies my purposes, but keep that in mind as it may be problematic for other users.
So, I backed myself into a rather unique corner and really need help solving this one.
Here's what I did:
I created a series of variables to determine race and gender. Using the toolkit, I made basic logic arguments in the character creator to say, "If race variable = n, allow this folder of pieces" and likewise for gender. It's all pretty simple.
For example, if the race variable is set to 0, then it allows folder assets for Human. Gender variable 0 = male.
So, I created four races this way, each with binary genders.
Now, here's where it becomes a problem. My game is open-ended, such that if the player dies or party wipes, they hit a respawn point (the Adventurer's Guild) where they are granted a new recruit (if they don't have any recruits waiting already).
The new recruit follows an algorithm that randomly determines their race and gender. However, the previously stored array of pieces created for the original character are presented, which results in 2 major issues:
1. The player can just roll with their previous image in spite of being a completely different race/gender and even with requirements for things their previous race didn't have (for example, horns are required for an Ogren, but if the player was previously a Sylvan, they don't have horns, yet can continue without assigning horns). In fact, it just gives the options for the previous race, despite the variables having been changed.
and 2. I attempted to troubleshoot problem 1 (which occurs after a game over - using a script to bypass game over and continue playing) by putting in a test event which would run a living character through the race/gender selection followed by a plugin call for the character creator. This time, it allows you to choose all the parts for the new race/gender, but it's overlaid with the previous race/gender selections.
So, what I need is to figure out how to tell the plugin to wipe the previous choices and start over, requiring the player to choose their parts for their new race/gender.
EDIT: My current thoughts, maybe this will help someone help me?
Create a non-race/gender for debug purposes. This race will have all file folder paths available. Create a 0 part for every object. Create a character with all the files with no parts - totally invisible. Output it, save it, then whenever the player has to remake a character, I set this as the default parts. Only issue with this is it will require putting 0 parts in the selection for every part, thereby allowing the player to make an "invisible" character. And while I don't really care what the player does for jollies, it's just bad game design.
There are two sections that stand out to me in the .js file.
line 1497 which is called on in Rhino's explanation of how to setup default parts (the part of it that calls for addInfos), and the lines below it that store the preview window's info into the variables. Basically, it seems the preview windows are held as temporary variables until confirmed, then stored as info/infos for the custom character. But I can't seem to find a method to wipe those variables clean.
EDIT EDIT: And the lines between those two areas that seem to maybe write the current sprites to the json?
SOLUTION:
At around line 1320, just need to comment out a few lines that retain the character preview, like so...
Scene_CharacterCreator.prototype.createFolderList = function() {
this._folderList = new Window_CharacterCreator_FolderList(this._mandatories);
this._folderList.setHandler('ok', this.onFolderListOK.bind(this));
this._folderList.setHandler('combined', this.onFolderListCombined.bind(this));
this._folderList.setHandler('cancel', this.onFolderListCancel.bind(this));
this._folderList.activate();
this._folderList.select(0);
this.addWindow(this._folderList);
};
Scene_CharacterCreator.prototype.createPreviewFaceWindow = function() {
this._previewWindowFace = new Window_CharacterCreator_Preview(0, 0, _.faceFileWidth, _.faceFileHeight, 'face');
this._previewWindowFace.x = (((Graphics.boxWidth - this._fileList.x - this._fileList.width) - this._previewWindowFace.width) / 2) + this._fileList.width + this._fileList.x + _.xOffset;
this._previewWindowFace.y = (Graphics.boxHeight - this._previewWindowFace.height) / 2;
this.addWindow(this._previewWindowFace);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'face')) {
// this._previewWindowFace.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'face'));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewWindow = function() {
this._previewWindow = new Window_CharacterCreator_Preview(0, 0, _.width, _.height, 'char');
this._previewWindow.x = ((this._previewWindowFace.width - (this._previewWindow.width*2))/2) + this._previewWindowFace.x;
this._previewWindow.y = this._previewWindowFace.y + this._previewWindowFace.height;
this.addWindow(this._previewWindow);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId)) {
// this._previewWindow.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewDeadWindow = function() {
this._previewWindowDead = new Window_CharacterCreator_Preview(0, 0, _.width, _.height, 'dead');
this._previewWindowDead.x = this._previewWindow.x + this._previewWindow.width;
this._previewWindowDead.y = this._previewWindowFace.y + this._previewWindowFace.height;
this.addWindow(this._previewWindowDead);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'dead')) {
// this._previewWindowDead.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'dead'));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewSvWindow = function() {
this._previewWindowSv = new Window_CharacterCreator_Preview(0, 0, _.svWidth, _.svHeight, 'sv');
this._previewWindowSv.x = (((Graphics.boxWidth - this._fileList.x - this._fileList.width) - this._previewWindowSv.width) / 2) + this._fileList.width + this._fileList.x + _.xOffset;
this._previewWindowSv.y = this._previewWindowDead.y + this._previewWindowDead.height;
this.addWindow(this._previewWindowSv);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'sv')) {
// this._previewWindowSv.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'sv'));
// this._loadedStuff++;
// }
};
this._folderList = new Window_CharacterCreator_FolderList(this._mandatories);
this._folderList.setHandler('ok', this.onFolderListOK.bind(this));
this._folderList.setHandler('combined', this.onFolderListCombined.bind(this));
this._folderList.setHandler('cancel', this.onFolderListCancel.bind(this));
this._folderList.activate();
this._folderList.select(0);
this.addWindow(this._folderList);
};
Scene_CharacterCreator.prototype.createPreviewFaceWindow = function() {
this._previewWindowFace = new Window_CharacterCreator_Preview(0, 0, _.faceFileWidth, _.faceFileHeight, 'face');
this._previewWindowFace.x = (((Graphics.boxWidth - this._fileList.x - this._fileList.width) - this._previewWindowFace.width) / 2) + this._fileList.width + this._fileList.x + _.xOffset;
this._previewWindowFace.y = (Graphics.boxHeight - this._previewWindowFace.height) / 2;
this.addWindow(this._previewWindowFace);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'face')) {
// this._previewWindowFace.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'face'));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewWindow = function() {
this._previewWindow = new Window_CharacterCreator_Preview(0, 0, _.width, _.height, 'char');
this._previewWindow.x = ((this._previewWindowFace.width - (this._previewWindow.width*2))/2) + this._previewWindowFace.x;
this._previewWindow.y = this._previewWindowFace.y + this._previewWindowFace.height;
this.addWindow(this._previewWindow);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId)) {
// this._previewWindow.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewDeadWindow = function() {
this._previewWindowDead = new Window_CharacterCreator_Preview(0, 0, _.width, _.height, 'dead');
this._previewWindowDead.x = this._previewWindow.x + this._previewWindow.width;
this._previewWindowDead.y = this._previewWindowFace.y + this._previewWindowFace.height;
this.addWindow(this._previewWindowDead);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'dead')) {
// this._previewWindowDead.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'dead'));
// this._loadedStuff++;
// }
};
Scene_CharacterCreator.prototype.createPreviewSvWindow = function() {
this._previewWindowSv = new Window_CharacterCreator_Preview(0, 0, _.svWidth, _.svHeight, 'sv');
this._previewWindowSv.x = (((Graphics.boxWidth - this._fileList.x - this._fileList.width) - this._previewWindowSv.width) / 2) + this._fileList.width + this._fileList.x + _.xOffset;
this._previewWindowSv.y = this._previewWindowDead.y + this._previewWindowDead.height;
this.addWindow(this._previewWindowSv);
// if($gameCharacterCreations.hasInfo($gameCharacterCreations._tempActorId, 'sv')) {
// this._previewWindowSv.setInfo($gameCharacterCreations.getInfo($gameCharacterCreations._tempActorId, 'sv'));
// this._loadedStuff++;
// }
};
NOTE: With those lines commented out, it WILL NOT save the player's preferences so they have to select all the parts again from the start, but it does reset the required fields, preventing the player from backing out without selecting the parts as per the new requirements. This satisfies my purposes, but keep that in mind as it may be problematic for other users.
Last edited: