• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Resource Advanced Character Customization 2.0.0

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
unknown.png

and the error code is the same
unknown.png
I'm a bit stumped, I don't understand why it's not recognizing that the 0A file exists, especially since things are running smoothly in my download of v18 Essentials. If you wanted to you could send me your game file to me to try and debug, I'll try and figure out what could be causing the error tonight regardless though.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
38
I think that's what's causing it not to save. Have you added "boy_surf_offset" into the hash SPRITE_CONVERT_HASH?
If you haven't already, you need to add the line
Ruby:
Expand Collapse Copy
"boy_surf_offset" => "overworld surf",
under the "boy_surf" line into the SPRITE_CONVERT_HASH hash, because part of the code that updates a player's current outfit relies on this hash. Lmk if this does/doesn't work or if you've already done this.

yep it worked, outfits save but the error on loading resides, and its to do with corrupted saves, but usually it wont let you load the save.


can try removing the script and seeing if its fine without but. (the issue usually only happens on old saves not new) okay so using a save prior to adding it loaded fine and saving after worked fine but my save made with it doesnt. okay so adding it back causes it but it also breaks the multiple save script. e.g. i was using my second save but it instead saved over my first slot. and i get the error now, guessing its connected to your rewrite of pbsave?

yep! its fixed. wasnt connected to the actual code but the overwrite of pbsave so.
 
Last edited:

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
yep it worked, outfits save but the error on loading resides, and its to do with corrupted saves, but usually it wont let you load the save.


can try removing the script and seeing if its fine without but. (the issue usually only happens on old saves not new) okay so using a save prior to adding it loaded fine and saving after worked fine but my save made with it doesnt. okay so adding it back causes it but it also breaks the multiple save script. e.g. i was using my second save but it instead saved over my first slot. and i get the error now, guessing its connected to your rewrite of pbsave?

yep! its fixed. wasnt connected to the actual code but the overwrite of pbsave so.
Cool. Also I'd add this line to the hash, or else you might run into the same problem with female trainers:
Ruby:
Expand Collapse Copy
"girl_surf_offset" => "overworld surf",
I've update my post so that it's more specific for v16. Thanks for the help!
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
38
Everything seems to run fine now and did it for the female one too so dw, im working on my intro boy stuff, i have a folder called "trainer front" then all the sections of the clothing aswell as their variants and the graphics in there, including a seperate base graphics folder with "trainer front" in them but when doing charactercustomization.new and finalizing my choices, the OW updates but the Intro boy stays like this.
u8dWOpt.png

I know the other sections arent part of the resource but ofc are intended to work. the location is like this "\Graphics\Pictures\trainer front\hair\0" (also it never created blank ones when it was missing them so...) the introboy should be there but its empty rn.

had no issues with the code since that last one, but a seperate question, but in "drawCharacterCustomizedBitmap" the order the bitmaps are added is the "layers" their shown in (e.g. if headgear is above hair it always displays above hair on saving, or if i add a new one i put it before tops or bottoms it loads under them?)
 

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
I'm a bit stumped, I don't understand why it's not recognizing that the 0A file exists, especially since things are running smoothly in my download of v18 Essentials. If you wanted to you could send me your game file to me to try and debug, I'll try and figure out what could be causing the error tonight regardless though.
hey, sorry I'm late but if you haven't figured it out I could send you the files
 

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
hey, sorry I'm late but if you haven't figured it out I could send you the files
update, deleted old folder and made a new one and it all worked! i guess the problem was just me? still, some problems remain. when selecting something on the customization screen, this pops up (at least for v18)
unknown.png

and this happens when using pbChooseBaseGraphic still
unknown.png

anyway, ty for your help and for making this script! ^^
 
Last edited:

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
Everything seems to run fine now and did it for the female one too so dw, im working on my intro boy stuff, i have a folder called "trainer front" then all the sections of the clothing aswell as their variants and the graphics in there, including a seperate base graphics folder with "trainer front" in them but when doing charactercustomization.new and finalizing my choices, the OW updates but the Intro boy stays like this.
u8dWOpt.png
I just looked at the code for the trainer card, and I saw that the image it overlays on the trainer card is trainer000. In the script PScreen_TrainerCard on line 26, the trainer image it loads is determined by pbPlayerSpriteFile, which does not fetch the introBoy image. I think it would probably work if you replaced the line
Ruby:
Expand Collapse Copy
   @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))
with the lines
Ruby:
Expand Collapse Copy
tmp = ($Trainer.isFemale? ? "introGirl" : "introBoy")
if @savedoutfit && (File.exists?("Graphics/Pictures/"+tmp+".png")
    @sprites["trainer"].setBitmap("Graphics/Pictures/"+tmp)
elsif File.exists?("Graphics/Pictures/"+tmp+"_curr.png")
    @sprites["trainer"].setBitmap("Graphics/Pictures/"+tmp+"_curr")
else
    @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))
end

I know the other sections arent part of the resource but ofc are intended to work. the location is like this "\Graphics\Pictures\trainer front\hair\0" (also it never created blank ones when it was missing them so...) the introboy should be there but its empty rn.
Put all of your folders (including "trainer front") in the "graphics/characters" folder. None of them should be in any other folder, the script won't be able to find them if they aren't specifically in that folder. Also the script only creates blank files for "overworld walk", and that's because those are the files needed for the script not to crash (the other images will be blank, but the script will still execute).

had no issues with the code since that last one, but a seperate question, but in "drawCharacterCustomizedBitmap" the order the bitmaps are added is the "layers" their shown in (e.g. if headgear is above hair it always displays above hair on saving, or if i add a new one i put it before tops or bottoms it loads under them?)
Yeah the bitmaps are added in layers, so the ones added first will be below the ones added later. Ie. Right now the bottom bitmap code is above the top bitmap code, so the bottom will appear below the top in the saved image.
 

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
update, deleted old folder and made a new one and it all worked! i guess the problem was just me? still, some problems remain. when selecting something on the customization screen, this pops up (at least for v18)
unknown.png

and this happens when using pbChooseBaseGraphic still
unknown.png

anyway, ty for your help and for making this script! ^^
No problem, sorry this is still bothering you.
For the first problem, when you say it pops up when selecting something, is it a bodypart (ie. hair, top) or is it an item on the right side?
For the second problem, it seems like the BaseGraphic script is acting up here:
Ruby:
Expand Collapse Copy
    # Trainer backsprite
    for j in 0...@commands.list.length
      name=SPRITE_CONVERT_HASH["#{$game_player.character_name}"]
      files.push(root+name+"/#{j}"+($PokemonGlobal.playerID+65).chr)
    end
Does the SPRITE_CONVERT_HASH have the line
Ruby:
Expand Collapse Copy
"trchar000" => "overworld walk"
?
And if it does can you put the lines
Ruby:
Expand Collapse Copy
p name
p ($PokemonGlobal.playerID+65).chr
under the line "name=SPRITE_CONVERT_HASH["#{$game_player.character_name}"], run the pbChooseBaseGraphic script and tell me what messages you get?
If you get the same messages over and over again that's okay, just let me know if you only get them once or multiple times.
 

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
Does the SPRITE_CONVERT_HASH have the line
Ruby:
Expand Collapse Copy
"trchar000" => "overworld walk"
?
Yup, except I changed trchar000 to the name of my male mc's sprite after it didn't work for a while and it still didn't work.
And if it does can you put the lines
Ruby:
Expand Collapse Copy
p name
p ($PokemonGlobal.playerID+65).chr
under the line "name=SPRITE_CONVERT_HASH["#{$game_player.character_name}"], run the pbChooseBaseGraphic script and tell me what messages you get?
It displays three messages. First is "nil", then "'A'", then the interpreter error.
unknown.png

For the first problem, when you say it pops up when selecting something, is it a bodypart (ie. hair, top) or is it an item on the right side?
It's a specific item. Displaying variants of an item works and they show up, but when you select a variant or an option that has no variants, that's when the error occurs.
 

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
Okay I think I've got a grasp of both problems, they seem to be tied to the same thing. Let me know if I'm confused about anything in the rest of this post.

Yup, except I changed trchar000 to the name of my male mc's sprite after it didn't work for a while and it still didn't work.

It displays three messages. First is "nil", then "'A'", then the interpreter error.
unknown.png
What's the name of your male character's new sprite? Have you altered any other code in other scripts or PBS files for this new sprite? This error seems to be popping up because the line
Ruby:
Expand Collapse Copy
name=SPRITE_CONVERT_HASH["#{$game_player.character_name}"]
Is trying to find trchar000 in your hash but can't, so it returns nil and crashes the script. So you could either change the name of your sprite back to the original or change "#{$game_player.character_name}" to whatever the new name is.

It's a specific item. Displaying variants of an item works and they show up, but when you select a variant or an option that has no variants, that's when the error occurs.
Is there any image that shows up in the top box when you initially run the script?
Based on what your telling me the problem occurs in the portions of the code which look like:
Ruby:
Expand Collapse Copy
$PokemonTemp.savedoutfit = true
changeClothes
$PokemonTemp.savedoutfit = false
@sprites["player"].bitmap.clear
@sprites["player"].charset=$game_player.character_name
@selectionMade=true
Look familiar? The code is trying to set your player's character set in the script to $game_player.character_name, which is trchar000. It doesn't load anything since the file trchar000_curr (I'm guessing?) doesn't exist, so it crashes when it tries to update that image. Again you could either change the name of your sprite or change "$game_player.character_name" to the name in your script. The only problem with the second option is based on the problems you're having, you might have to edit a lot of other mentions to that variable in the script. Again you could send then save file over to me and I could try to do that, but it would be difficult to guarantee that it wouldn't have bugs.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
38
I just looked at the code for the trainer card, and I saw that the image it overlays on the trainer card is trainer000. In the script PScreen_TrainerCard on line 26, the trainer image it loads is determined by pbPlayerSpriteFile, which does not fetch the introBoy image. I think it would probably work if you replaced the line
Ruby:
Expand Collapse Copy
   @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))
with the lines
Ruby:
Expand Collapse Copy
tmp = ($Trainer.isFemale? ? "introGirl" : "introBoy")
if @savedoutfit && (File.exists?("Graphics/Pictures/"+tmp+".png")
    @sprites["trainer"].setBitmap("Graphics/Pictures/"+tmp)
elsif File.exists?("Graphics/Pictures/"+tmp+"_curr.png")
    @sprites["trainer"].setBitmap("Graphics/Pictures/"+tmp+"_curr")
else
    @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))
end


Put all of your folders (including "trainer front") in the "graphics/characters" folder. None of them should be in any other folder, the script won't be able to find them if they aren't specifically in that folder. Also the script only creates blank files for "overworld walk", and that's because those are the files needed for the script not to crash (the other images will be blank, but the script will still execute).


Yeah the bitmaps are added in layers, so the ones added first will be below the ones added later. Ie. Right now the bottom bitmap code is above the top bitmap code, so the bottom will appear below the top in the saved image.

Riiight! sorry i just assumed it was in pictures, and my trainer card already uses introboy/girl, why i showed it but yea let me move them and see if it fixes it.

okay so the base shows but after editing and saving the outfit only the base still shows. (do have the corresponding graphics for each slot so it should show and both the base graphic and then "trainer front" folder so not sure.

actually, edit: the "introboy" sprite is the base, "introboy_base" is the base but "introboy_curr" has the outfit and isnt blank/just base, right see you said i needed _curr, i cant read
 

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
Okay I think I've got a grasp of both problems, they seem to be tied to the same thing. Let me know if I'm confused about anything in the rest of this post.


What's the name of your male character's new sprite? Have you altered any other code in other scripts or PBS files for this new sprite? This error seems to be popping up because the line
Ruby:
Expand Collapse Copy
name=SPRITE_CONVERT_HASH["#{$game_player.character_name}"]
Is trying to find trchar000 in your hash but can't, so it returns nil and crashes the script. So you could either change the name of your sprite back to the original or change "#{$game_player.character_name}" to whatever the new name is.


Is there any image that shows up in the top box when you initially run the script?
Based on what your telling me the problem occurs in the portions of the code which look like:
Ruby:
Expand Collapse Copy
$PokemonTemp.savedoutfit = true
changeClothes
$PokemonTemp.savedoutfit = false
@sprites["player"].bitmap.clear
@sprites["player"].charset=$game_player.character_name
@selectionMade=true
Look familiar? The code is trying to set your player's character set in the script to $game_player.character_name, which is trchar000. It doesn't load anything since the file trchar000_curr (I'm guessing?) doesn't exist, so it crashes when it tries to update that image. Again you could either change the name of your sprite or change "$game_player.character_name" to the name in your script. The only problem with the second option is based on the problems you're having, you might have to edit a lot of other mentions to that variable in the script. Again you could send then save file over to me and I could try to do that, but it would be difficult to guarantee that it wouldn't have bugs.
I changed the name back, added trchar000_curr (which isn't mentioned in the OG post) and the problems persist. If you want, I could send you a copy of my project so you could check it out.
 

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
Yeah I think at this point it would be best to send me the project so I can figure it out. Feel free to DM me whenever you want.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
38
No issues this time, but i know base items cant have conflicting names but does it matter for variants? (e.g. i have a hoodie and a hat that have a variant called "black" issue)

Also minus manually unlocking them is there anyway to have them all unlocked in debug mode?
 

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
No issues this time, but i know base items cant have conflicting names but does it matter for variants? (e.g. i have a hoodie and a hat that have a variant called "black" issue)
It's fine to make two variants for different items have the same name. The problem only occurs with items because the dressAccessory function will find the wrong item which glitches the script, it doesn't apply to variants.

Also minus manually unlocking them is there anyway to have them all unlocked in debug mode?
At the moment no, that's a good idea for an update though. Right now I'd keep a textfile you'd use with the final game where you'd keep all the arrays and set whether or not they're unlocked, and then set all of them to true in your actual script. Then swap the two when you need to.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
38
All running great, one minor visual bug is sometimes the preview shows the items last seen in the previous category (e.g. i saw something in hair then look in tops it still shows the hair preview) however applying/wearing it works fine.

Also, is there a way to manually set the base outside of ChooseBase.new? (like how you can force wear clothing)

Just noticed now that in "choosebase.new" the box that shows the trainer front base doesnt show anything for me even though their there, not a big deal just noticed its missing for me.
 
Last edited:

WolfHeretic

Novice
Member
Joined
Jul 20, 2017
Posts
21
Also, is there a way to manually set the base outside of ChooseBase.new? (like how you can force wear clothing)
Do you mean like through a script? You can manually set the base without having to use ChooseBase.new by naming an image trchar00X_base in the Graphics/Characters folder, but I don't have a script that can do that atm.

Just noticed now that in "choosebase.new" the box that shows the trainer front base doesn't show anything for me even though their there, not a big deal just noticed its missing for me.
That's weird. In the version I released the folder for the trainer front is named "examples" in case someone wanted to put an example image there of the trainer sprite, is it named examples or trainer front? Only thing I could think of that could be causing that.
 

PorousMist

Novice
Member
Joined
Aug 2, 2020
Posts
37
I get this error during the intro right after choosing my gender:

---------------------------
Pokémon: Oracle of Creation
---------------------------
[Pokémon Essentials version 18]

Exception: NoMethodError

Message: private method `gsub' called for nil:NilClass



Backtrace:

CharacterCust_Utilities:490:in `character_name'

Sprite_Character:104:in `shadow_update'

Sprite_DynamicShadows:157:in `update_or'

Tilemap_Perspective:438:in `update'

Spriteset_Global:28:in `update'

Scene_Map:152:in `updateSpritesets'

Scene_Map:170:in `follow_update'

Following Pokemon:1554:in `update'

Scene_Map:229:in `main'

Scene_Map:226:in `loop'



This exception was logged in

C:\Users\Elijah\Saved Games\Pokémon_ Oracle of Creation\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
 

Nomi

Trainer
Member
Joined
Feb 24, 2018
Posts
77
Hey, when using the script, after selecting the Pale (first option) skin tone, it sets the player's current skintone to Dark (last option), but still makes the bases pale. Is there any way to fix this?

1605461132987.png
 
Back
Top