Composite Characters / In-game Character Creation

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Neon Black, Oct 25, 2012.

  1. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    Hey ClownSage,

    RGSS3 is a case sensitive language, so when you call Creation() in your event's Script command, you need to actually call creation(). Based on your image, I think that's your only problem.

    Rose Guardian,

    Your problem is trickier to figure out. After a quick look at the script, it seems that the error you're getting is from the script not finding an actor in a (save?) file. What are you doing when you get the error, exactly?
     
    #81
  2. ClownSage

    ClownSage Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Thanks For the advice! that fixed it but now ive run into this problem http://puu.sh/9Ue8O/4b73b5c1d8.png

    Ive saw that somone else posted this problem as well before but i am unsure of the specifics as to remedying the problem  
     
    #82
  3. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    That I'm not so sure about. The include function that I assume that error is talking about is on line 304 of my file and looks like this:

    module Composites def self.include?(file) ## Checks if a file is a composite. return CP::COMPOSITE::NAMES.include?(file) endThen there are some other functions, but that's the important one. Can you check to see if your CP Character Composite script has that? I'm not sure how it wouldn't but that's my first guess.

    Edit:

    Did you see this? Maybe you don't have the character in your party?

     

     
    Last edited by a moderator: Jul 3, 2014
    #83
  4. ClownSage

    ClownSage Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    I have those exact lines In my script, At this point im pretty sure its te latter error, however I don't know if i messed up somewhere or there's some unknown error .  

    Here are screenshots of the script , event and character screens in case that helps 

    Characters:

    http://puu.sh/9Uzcq/fd51e06870.png

    http://puu.sh/9Uze0/37b919c12c.png

    Script:

     http://puu.sh/9UzfE/4fe8240d93.txt

    Event:

     http://puu.sh/9Uzha/d52e5d0fdb.png
     
    #84
  5. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    Disregard what was here; see next post.
     
    Last edited by a moderator: Jul 6, 2014
    #85
  6. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    Sorry for the delay, but I was just looking at my own project with this script and I'm confident that your error is because you haven't added the actor you're customizing to your party. Here's a screenshot from my own project:

    [​IMG]

    This event is triggered on autorun when the player first loads the game. You can see that pretty much the first thing I do is add Elume to the party because I'm about to have the player customize the character. When I removed the line adding Elume to the party, I got the weird error you posted previously.

    [​IMG]

    Then, in this section picture, you can see at the end of the event I call creation(11). This is because Elume's actor id is 011. I tested leaving the leading zeroes in, but it results in the script failing to open the customize character dialog. I tried using Elume's name instead and got the same result, despite what the documentation for the script says. So, add your character into your active party near the start of the event and then change your creation() call to not have any leading zeroes in the actor's id (so in your case, it'd be "creation(1)").

    Let me know if you have further issues, but I think this should take care of it for you.
     
    #86
  7. ClownSage

    ClownSage Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    THANK YOU SO MUCH FOR HELPING ME WITH THIS! Ive been rather busy today so im sorry i couldnt express my gratitude earlier But youve really taken a whole lot of stress out of my game :D
     
    #87
  8. Abagail Asta

    Abagail Asta Programer by birth Veteran

    Messages:
    33
    Likes Received:
    35
    First Language:
    Russian
    I'm not sure if there is a way but could you not show/check the sprites but just the face.

    Becasue I'm using a custom sprite and want to keep that sprite but it crashes with the sprite so

    is there a way to fix that?
     
    #88
    Abagail likes this.
  9. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    I'm not sure what exactly you're after, so I'm going to try to address both things I think you want.

    I think you're saying here that you want to not show the preview for the composite sprite during the character creation. To do that, just comment out (or delete) lines 1041 and 999 of the script. Line 999 instantiates the @chara_window variable and line 1041 refreshes the window. Removing this will cause the sprite window to not display during character creation.

    Here you're talking about using a custom sprite for a composite character. To do this, you would have to alter the script to prevent it from generating the composite sprite OR let it generate the sprite but then overwrite it with another command later. Honestly, I wouldn't recommend altering the script to such a huge degree and if you wanted to I'm not even sure to tell you where to start with that.

    You should be able to set up a scripting call to overwrite the actor's sprite manually. Though I don't know how to do it myself, here's a promising looking thread about this topic: http://www.rpgmakervxace.net/topic/12089-scripted-sprite-change/

    Finally, if neither of those options appeal to you, you could always go the brute force method of changing all the graphics in the /Graphics/Composite/Charas/ folder to your desired sprite sheet. Replacing every one of those images with your sprite sheet would be extreme, but it would achieve the effect that I think you're looking for here.
     
    #89
  10. luiscesjr

    luiscesjr Veteran Veteran

    Messages:
    117
    Likes Received:
    11
    First Language:
    Portuguese
    I checked the last pages and your post, I set it exactly like this, and I still get this error.

    Take a look.:

    [​IMG]

    I think I shouldn't even have to add him anyway, it's the main character! But I tried adding to the

    party as mentioned, and as you see, but no luck.

    It's blank because there should be a name processing as well.

    EDIT.: Never mind, I fixed it by just changing it's place inside the event... (??)

    EDIT2.: I found out it's actually because my actor name's empty. It will not work

    if you want to process a character's whose name is empty, so this is a kind of a bug?
     
    Last edited by a moderator: Sep 8, 2014
    #90
  11. StikElLoco

    StikElLoco Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Greece
    First Language:
    Greek
    Can someone direct me to the right direction for Equipment tags? I figured out how to use the character creation. But i can't seem to figure out how to use tags on equipment so it will change the graphic of an actor.
     
    #91
  12. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    Well, I'm glad you got it to work! However, when I deleted the name of my character in the example project I posted pictures from above, it worked just fine for me. Line 493 deals with equipment hashes, so I tried removing all starting equipment from my actor as well, but that didn't seem to cause a crash either. I'm not really sure what else could be causing this issue, though I'm glad having a name input somehow solves it for you. Perhaps you have some other script that is interfering with how the Game_Battler class deals with equipment? I wish I could be of more help here, but I think the name needing to be non-empty is just a symptom of a larger problem elsewhere.

    I can help point you in the right direction! The important information for this can be found on lines 43 and 44 of the script itself which I'll reproduce below:

    ## tag image[Handler, hue]## - Changes the default images for layer :tag to file handler "Handler".Later on in the file is a list of composite layers:

    # The order for composite layers. The first layer is the lowest layer.COMPOSITE =[ :hairRear, :cape, :armorRear, :headAll, :head, :eyes, :eyesAll, :eyesHueless, :armor, :hair, :glasses, :helmet,]So basically, you can create a tag on any piece of equipment by choosing a layer and then specifying a file handler. What are file handlers and how do you make more? File Handlers are specified starting on line 163 of the script. You can add your own pretty easily! Handlers go in this format:

    # "Handler" => ["Male_File", "Female_File"],Note: Make sure that you have the comma at the end since these are elements in an array!

    Double note: If an armor is only for one gender or effects no visual change on a gender, then you can use "nil" in place of a file name!

    You can pick any name for the Handler so long as it is not already a name in the array (i.e. you can't have two handlers of the same name).

    Finally, the Male_File and Female_File names need to be the names of files in the CHAR_FOLDER and/or FACE_FOLDER directories specified on lines 101 and 102.

    It might sound like a lot, but it's really pretty simple. Let's put it all together!

    Let's say I wanted to add some armor to my game that changed my character's appearance, we'll call it "Casual Clothes" armor.

    1. First I'll get the composite image I want to represent my armor and put it into the CHAR_FOLDER directory. Note: Make sure you use .png format for your images!
    2. Then, I add a file handler to the FILE_HANDLERS array in the script. "CasualClothes" => ["CasualClothesM", "CasualClothesF"],
    [*]Next, I look for an appropriate composite layer and decide the default "Armor" suits my needs. I use it to construct a tag to put on my armor:
    [​IMG]

    That's all there is to it! Hopefully that's enough to get you going. Please let me know if there are any more questions I could answer for you.

    P.S. You could put multiple tags down on one piece of armor if you wanted!
     
    #92
    luiscesjr and StikElLoco like this.
  13. StikElLoco

    StikElLoco Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Greece
    First Language:
    Greek
    #93
  14. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    I believe your problem is with the tag you put on your item. Your tag refers to "ArmourM" but that seems to be your image name. The file handler for that image is just named "Armor" (in this one: http://i.imgur.com/iXT74Tl.png). If you change your tag to reflect this, you should be okay.

    Like this:

    armor image[Armor, 0]Give that a try and let me know if that does the trick!
     
    #94
    StikElLoco likes this.
  15. StikElLoco

    StikElLoco Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Greece
    First Language:
    Greek
    Indeed it does. A couple more questions, 1. Even if the equipment works as it should be on the composite characters, doesn't work on the default characters. That means it only works on composite characters or i am doing something wrong? 2. Face sets don't seem to work on the character creation, but i probably didn't set up something right. It shows as blank.
     
    Last edited by a moderator: Sep 16, 2014
    #95
  16. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    I'm not sure what to tell you about the blank faces. I'd guess that it isn't finding the files correctly.

    As for getting the equipment change to work on default characters, I've been looking into this but it's turning out to be a bit more complicated than I thought.The short version is that it probably isn't worth the trouble to make it work and that you're better off allowing the player to customize each character who you want to have the armor OR use another script for this sort of thing.

    The longer story is that the default characters don't have composite information built for them and so they aren't affected when their equipment is changed. That information is built when the character creation window is used. It should be possible to create another script command that you can run on each character to create this information BUT it would basically mean that you would have to build their sprite from composite files by specifying defaults and then circumventing the character creation scene. It's definitely possible, but I don't have the time on hand to figure it out today, sorry. I may have some time later in the week to come back to this though and if so I'll post here about what I find.
     
    #96
    StikElLoco likes this.
  17. StikElLoco

    StikElLoco Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    Greece
    First Language:
    Greek
    Thanks for the help. I will look into the face sets. As you said i probably haven't set it up right.
     
    #97
  18. daniel1030

    daniel1030 Warper Member

    Messages:
    2
    Likes Received:
    0
    Hello, is there a way to use costumes that are not just one group?

    ie, I have armour png which is 3 by 4, but there are 8 of them in one png file.

    Is there a way to make the script navigate through this and choose one?
     
    #98
  19. JumbocactuarX27

    JumbocactuarX27 Veteran Veteran

    Messages:
    86
    Likes Received:
    39
    First Language:
    English
    With computers many things are possible, but I don't know enough about how to manipulate images in Ruby to tell you how to do this off the top of my head. It would be a whole lot of extra work. The far easier solution would be to open up your armour png in an image editor (e.g. photoshop, gimp, paint.net, etc) and slice it up into 8 seperate png files with one armour each. Is there some reason you can't or wouldn't want to do that?
     
    #99
  20. daniel1030

    daniel1030 Warper Member

    Messages:
    2
    Likes Received:
    0
    Hi, Thankyou for your reply I got this matter sussed :)

    I have another problem, I want a have a cat character in my game and I added him as an armor init in a blank sheet.

    However the base head and hair keeps coming up with this character and I want to get rid of it.. Could you please help me?

    Thankyou
     

Share This Page