Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
Composite Characters v2.1
Created by Neon Black

What is it?
This script has two functions. This script allows you to create heroes who use composite graphics and can have different graphics (both face and walking graphics) depending on the equipped items. This script also allows you to call in in-game character creation screen that will allow the player to change how the composite looks. This script is NOT user friendly, but it is about as easy as I can think to make it. It has a god awful amount of settings to configure and tweak to get the composites and the creation screen to work properly. If you want to use this script just for composite characters, it is a bit easier to set up and use. Feel free to ask for any help until I have some time to write up a more advanced user manual.

How can I use it?
I'm going to say there are 3 main functions. These are the initial composites, the equip item composites, and the creation screen.
Tags:

First of all, the following are the tags that can be placed in an actor's notebox:
  • gender[male] -or- gender[female] - Sets the initial gender of the character. This is merely visual and has no effect on what a character can equip, etc.
  • tag init[handler, hue] - Sets the layer with the name ":tag" to the file named "File" with a hue of "hue" by default. For example, to set the :helmet layer to "Iron Helmet" with no hue, you would use "helmet init[iron Helmet, 0]".
  • alt name[Christopher] - Allows you to name the opposite gender of a character.  This takes effect if a player decides to change the gender of their character and they are still using the default name.
The following tags can be used in equip item noteboxes to change the composite when an actor is equipped with it:

  • tag image[handler, hue] - Changes layer ":tag" to the file handler "handler" on male and female characters and the hue to "hue". For example, if you want an armour to change the appearance of a character's clothing, you might use something like ":armor image[Heavy Armour, 120]".
Calls:

Finally, the script call to call the in-game character creation menu is as follows:
  • creation(x) -or- creation(x, array) - Bring up the character creation screen for the sprite associated with actor "x". The actor's ID my be assigned to a file name in the config section for this to work.  If an array of GUI options is not defined, the default one will be used. (see the demo for an example of this.)
  • composite_custom(x, layer, handler, hue) - Change the layer "layer" on actor "x" to file "handler" with a hue of "hue".  This works on the same level as layers edited with the character creation screen and as such works quite normally.
  • composite_force(x, layer, handler, hue) - Similar to above except takes priority over all other composite images.
  • composite_refresh(x) - Removes all layers added with composite_force.
Further Info:

Okay, I'll go over how this script works briefly. This script uses a number of user defined layers to create a composite for characters. There are a number of steps that allow the script to know how to create the composite.

First of all, in order to create a composite, create a dummy sprite and place it in the "Graphics/Characters" folder. This is used simply to hold the name of the composite image. Any event or hero that is set to this dummy image will look the same. You can have as many of these dummy files as you want, but you need one for each composite you want to do. After placing them and naming them, add them to the NAMES hash in the script (line 131 by default). Each name must also link up to an actor. This is so the script can check what the actor is wearing or their initial appearance to change how the sprite looks.
Secondly, we set up the file handlers (line 163 by default).  These are the handlers for each layer as well as the file names that go with it.  Each handler must be unique and reference a two element array.  The handler is the name used by the script for layers.  The script uses this name to reference this hash and find the files to use in the composite.  The array contains the file names for the male and female files in that order.  If a value of nil is used, the file handler will be skipped over and move on to the next one.

Nextly, we set up the order of layers. This is in the COMPOSITE hash (line 144 by default). There are a few things to remember while naming layers. The words "All", "Rear", and "Hueless" are reserved by the system. These three words are used to help define multiple layers that can be changed at once. For the most part, you only want to change the MAIN layer, and the other layers will follow. For example, if you have a layer called ":hair", the script will automatically look for the layers ":hairRear", ":hairHueless", and ":hairAll" as well. The same goes with the file. If you change the layer ":hair" to the file "Shaggy". The script will look for the file "ShaggyRear" for the layer ":hairRear", etc. Layers marked with "All" will generally not change and are rather used by the GUI to add unchanging images that can have alternate hues. Layers marked with ":Hueless" are similar to "Rear" layers, but the hue will always remain at "0".

The GUI has two separate hashes that allow it to be customized. The first one is GUI_OPTIONS (line 204 by default) which stores the different GUI options that can be used in the GUI.  This is made up of a handler which refers to the layer to customize, the name of the option to appear in the menu (or parent option), the type of hue bar to use, and the name of the "all" layer file for the item.  First of all, you need to give the option a handler.  This is used to identify the option when calling the GUI.  :Name and :Gender are reserved by the system and allow the character's name and gender to be changed in the GUI.  For the most part this must also be exactly the same as the layer you want the option to customize, the exception being options that have a parent.  Secondly, the name is the text for the option as it appears in the GUI.  If this is set to a handler (lead with a colon) it will use that GUI option as a parent instead and modify the layer with the same name as well as causing it's name to be the same as the parent's name (see line 211 of the default script for an example).  The next option, the hue bar, defines which type of hue bar is used.  Use a value of 1 or 2 to pick which type of hue bar to use or a value of 0 if you do not want to use a hue bar.  Finally, the all layer option just tells the script what image handler to use on the "all" layer of the composite.

The second part of the GUI options are the lists for the options above (line 219 by default).  This is an array containing file handlers for the options of the GUI.  By default, options that the character cannot use are sorted out when viewing the list.

One other important thing I should point out is that the folders for character composites and face composites can have different images in them. In this way you can use different files to modify how a face or a character looks. For example, the ":armorRear" layer in the demo is not used for characters and the ":eyesAll" layer is not used by faces.
What does it look like?
8nsTH.png
What does it work with?
This script will not work with scripts that modify a sprite's appearance or a face's appearance in game. There should be no reason why it should not work with scripts that just pick different "emotions" from a sprite sheet (provided you create a composite for a sprite sheet).
This script also modifies the "characters_for_savefile" method in order to properly display composites in the savefile and as such will not work with other scripts that modify this method.

How can I get the script?
Version 2.1 (base script, 2.12.2012) is available from my pastebin account here or my mediafire account here.

I would like to use this code.

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's Disclaimer:
Okay, so I know this script looks a bit scary at first, but trust me, it works well. I couldn't really find any other way to give it the customization that I wanted without it looking spooky. Like I mentioned, if you need any help with getting it to work, I can certainly help out. Also, there's a good number of files from the Ace character generator in the demo to help get you started. Check the demo out first if you're having a little trouble setting everything up. As always, enjoy!
 
Last edited by a moderator:

hyde9318

RMC Coordinator
Regular
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Pretty bad ass script, I must say. First real create-a-char Ace has gotten, so kudos to you.

However, and I know you asked me about this before, but could I make a couple suggestions for future versions?

1. A saturation bar. You have a hue bar, which is fantastic and a very efficient way to go about doing this. But, could we also see about a saturation bar? Essentially, right now, you can only pick bright colors, or neon if you will. The very basic colors. But say I wanted my character to have blackish hair, or white, or even brown (i really want a plain brown). Brown is a less saturated version of a dark orange, but right now we can only just pick orange. However, I am not sure if a saturation bar would be possible, so just skip this if it isn't. I am here to make suggestions, not make things ten times harder for you.

2. Facial hair for men (or women too, if the player really wants that for some odd reason). Maybe allow a new option for the male characters to have a facial hair setting.

Really, that is all I can think of right now that would be considered important.
 

Tsukihime

Regular
Regular
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,928
First Language
English
I had started a character generator script but never went through with it.

I used the character generator that came with the editor as the base format for all of the different parts of the sprite.

Here is the script I wrote: http://db.tt/9KWU4AxL

All I did was parse the resources into different categories (in a hash), and then you could iterate over filenames and load it into your window.

While the names may end up being "hair1", "hair2", "hair3", etc you it would probably be easier to customize for the user since you could just upload the character generator resources and give it to them.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
1. A saturation bar. You have a hue bar, which is fantastic and a very efficient way to go about doing this. But, could we also see about a saturation bar? Essentially, right now, you can only pick bright colors, or neon if you will. The very basic colors. But say I wanted my character to have blackish hair, or white, or even brown (i really want a plain brown). Brown is a less saturated version of a dark orange, but right now we can only just pick orange. However, I am not sure if a saturation bar would be possible, so just skip this if it isn't. I am here to make suggestions, not make things ten times harder for you.
I'd considered it but didn't. I'll certainly look into it for a future update (which you can expect to see soon since I forgot about the save and load screens when doing composite faces...). Expect to see it!

2. Facial hair for men (or women too, if the player really wants that for some odd reason). Maybe allow a new option for the male characters to have a facial hair setting.
This is actually doable with the current version of the script. Add the graphics to the respective folders. Next add a new :facialHair layer to the layer array wherever you want (right below :headAll would probably work. Add a :facialHair key to the GUI hash with the name and point it to new options for male and female submenus. Then just add in the facial hair options.

Sorry, I know it's really confusing, but it's the easiest way I could come up with that has perfect customization.
 

hyde9318

RMC Coordinator
Regular
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Really, it isn't all that bad. It is doable. Which is good, cause this kind of thing could have been a lot more difficult to use.

And I am excited for the saturation bar.

Also, not sure if this is doable, but would you be able to unlock hairs and new parts throughout gameplay? Like the person goes to a barbershop and orders the special, so a new hair style comes up.
 

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
Also, not sure if this is doable, but would you be able to unlock hairs and new parts throughout gameplay? Like the person goes to a barbershop and orders the special, so a new hair style comes up.
Hmm, that's a pretty neat idea. I know I can certainly add script calls to force change the hair which might work for a barber or something. Not sure how hard locked options would be to do (for the user I mean; I know I could add them). One thing I could do is allow you to re-define the submenus right before opening the customization screen through script calls. That would be no harder than it currently is.

But yeah, seriously, look forward to a saturation option.
 

hyde9318

RMC Coordinator
Regular
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Really, you wouldnt have to lock it. Let the player create a character once. Then, to change things from there, they have to go to either a barber, or a clothing shop, or so on. Each place can change one thing.

But I see where you are coming from too. I dont know how to go about it other than allowing in game customization of the menu.
 

Mudgrunt

Regular
Regular
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
WOW!!! YOU FINISHED IT!!! OH, THANK YOU!!! I will definetly use this all the time than you so much!!!
 

Mudgrunt

Regular
Regular
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
Im sorry but i am quite the noob...Demo please?
 

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
Demo is in the mediafire link right here or up top. You're free to use the graphics provided in the composite folder, after all it is all just rips from the ace generator. Like I said, not really user friendly, but I'll help if I can.
 

Mudgrunt

Regular
Regular
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
Oh thanks so much i am 12 so....Its kinda confusing considering im just learning algebra :p
 

d_a_renoir

Regular
Regular
Joined
Jun 12, 2012
Messages
261
Reaction score
35
First Language
English
Primarily Uses
Wow, this is really cool! Thanks for sharing!
 

DreamcasterDC

Villager
Member
Joined
Oct 23, 2012
Messages
9
Reaction score
1
First Language
English
Primarily Uses
I've tried to replace Gender with Race, and so far the label is successful. I've managed to make the third race appear when changing your race, but when I select it, it just pretends that it doesn't exist. Like, I click on it and it just goes back to the race it previously was. How do I fix this??
 

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
You'd have to add race like any other customization option. Just have the different bases reference the character bases and heads. Since most likely you won't want to change skin colour, make the colour option "false" then you can use ":race", ":raceHueless", and ":raceRear" for three separate sections (like head, body, and another if needed). Just use :raceRear for the body, that way you can place clothes that replace the body and also use :raceRearRear for the back of clothing. Like I said, it is pretty complex, but not impossible within the bounds.

And fyi, the reason you can't add more options to gender is because it is locked at just 2 genders. That's hard coded in.
 

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
Okay, you got the "ORDER" hash right (good enough anyway). Now add the following to the "GUI" hash:



Code:
:race => ["Race", :opRaceMale, :opRaceFem, false],
Then add the following to the "OPTIONS" hash:



Code:
:opRaceMale => [["Saiyan", "SaiyanBaseM"], ["Namekian", "NamekBaseM"]],
:opRaceFem => [["Saiyan", "SaiyanBaseF"], ["Namekian", "NamekBaseF"]],
Remove the options :headAll, :headN, :armor, and :armorN from the "STANDARD" hash. We're telling the program what graphics to use in the OPTIONS hash, so those aren't needed.

Name your head graphics "SaiyanBaseM", "SaiyanBaseF", etc. Then name your body graphics "SaiyanBaseMRear", "SaiyanBaseFRear", etc.

Also, you added a line:



Code:
RACE_NAMES = ["Saiyan", "Namekian"]
That's not doing anything, so just remove it.
 
Last edited by a moderator:

DreamcasterDC

Villager
Member
Joined
Oct 23, 2012
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Sweet, it works! Thank you so much for your help!

If it's not too much trouble, might I ask how to disable Gender if you choose Namekian, considering they are an asexual race?
 

Neon Black

The Classy Prostitute
Regular
Joined
Mar 17, 2012
Messages
1,149
Reaction score
386
First Language
Sarcasm
Primarily Uses
Just use the same images for both male and female. There's no way to disable options when certain other options are selected. That would be too crazy to try to work with.
 

DreamcasterDC

Villager
Member
Joined
Oct 23, 2012
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Alright, I understand. XD Thanks again for your help, by the way! It's much appreciated.
 
Last edited by a moderator:

Matthiasdeo

Warper
Member
Joined
Nov 18, 2012
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I'm having some incompatibility issues with the Victor Core script which you can find here. http://dl.dropbox.com/u/27014140/Scripts/Victor%20Engine%20-%20Basic%20Module.txt

With my limited knowledge I can see that the problem is with the following lines in the script posted above...



Code:
  def set_bitmap
    self.bitmap = Cache.character(set_bitmap_name, hue)
  end
and



Code:
  def set_character_bitmap
    update_character_info
    set_bitmap
    set_bitmap_position
  end
It's a great script and with the advice you gave in the comments above I was able to customise it to my needs. Unfortunately my entire battle system is dependent on the Victor script so if there is any chance of making the scripts work together It would be great.

Is this possible?
 

Latest Threads

Latest Profile Posts

Uh... Forum test, forum test. Am I live?
New but not so new here. (Like, been lurking around as a guest). I hope to change my destiny.
That is, to make friends and learn from the community. I hope we all have fun and create memories worth keeping. :ptea:
made a face sprite for the little guy using default cat for comparison, I'm rather pleased with how it turned out!

image.png
Playing arounnd with NUUN's Battle Result as a VS Victory Aftermath alternative. Loving it so far despite the learning curve (there are a LOT of parameters)

1701665328725.png

Just have to figure out how to addin sub class progress.
Partitito's story is supposed to be about defeating poverty while thinking he is a capitalist with socialist ideas. But it's really about stories of redemption and perseverance.

Forum statistics

Threads
136,730
Messages
1,269,269
Members
180,450
Latest member
MatrixPDF64
Top