Hey,
I'm using a couple of scripts that use the character's default graphic (i.e. from the database) for various functions - a battle system, for example. However if I change the character's graphic via events, the scripts don't pay attention to that change - that is, when the battle scene starts etc, the 'old' character graphic defined in the database is shown rather than whatever I changed it to. Is there any way to change the default graphic via a script call so that my battle system etc will use the graphics I want?
Thanks!
$data_actors[ID].character_name = "your graphic here"
Thanks for the reply! I tried that out, but it gave a NoMethodError:
undefined method 'character_name=' for nil:NilClass
I assumed it was maybe that you didn't mean to write character name, so I tried 'character_sprites', but that gave the same error. Any suggestions?
Where are you using that script call? It looks like it's being called before the title scene.
But I think G_G meant to say $game_actors. Making a change to $data_actors wouldn't make any changes in-game since those are the database configurations. But you will have to turn Game_Actor#character_name into an attr_accessor first.
So open up your scripts, find Game_Actor, and then find
attr_reader :character_name
Turn
reader into
accessor. Your script call should now be
$game_actors[ID].character_name = "your graphic here"
It's running in a parallel process. I tried what you said, but it returned the same error as before! What could be wrong?
When does the error occur? Before/After the title screen?
What scripts are you using?
It's running after the title screen, in a parallel process on a map. Here's a list of all other scripts I'm using:
Prexus Crafting
ForeverZer0 Item Weight
Hermes CMS
game_guy's Quest Log
Modified Name Input (Don't remember who it's by!)
game_guy's Item Storage
game_guy's Skill Items
Reno-S--Joker's Ring Menu
Enu's Sideview Battle System
Could any of these be disrupting it?
Sounds like a possible script conflict then.
Make a new project (you'll delete it afterwards) and do the same things I have instructed you to do. If the error doesn't pop up, then I will require a demo. I don't know why but one of your scripts is most likely not defining $game_actors upon starting a new game.
EDIT: You aren't using a 0 in place of ID, right?
Same errors in a blank project, yeah :/
Oh... I am using 0 for the ID, yeah. What should I be doing?
The values used should match the actor's position in the database. The first actor, Aluxes, is 1. Basil is 2. etc.
Ah, there we go! Ha I'm quite an idiot.
It's fine now, but it hasn't really fixed my initial problem... My battle system still uses the charset set in the database rather than the one I set with that script command. Any idea at all how to fix that?
EDIT: Ulp, I'm a fool. I forgot that for testing purposes I set the script to change to 001-Fighter01 rather than the one I wanted. It's fine! Thanks for all your help!
@KK20: I meant $data_actors, because his issue it sounded like that the scripts were using $data_actors[ID].character_name rather than $game_actors[ID].character_name so that's why I chose that one.