[VXA] Composite Graphics / Visual Equipment

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Composite Graphics / Visual Equipment
Version: 1.0.1
Author: modern algebra
Date: 13 January 2013

Version History


  • <Version 1.0.1> 2013.01.13 - Fixed an incompatibility with various battle systems
  • <Version 1.0> 2012.01.13 - Original Release

Description


This script allows you to "compose" face and character graphics out of multiple graphics. This permits you to make it so that equipment worn by a character can change the appearance of that actor's sprite and/or face.

Unlike my VX version, this script has a lot of new and improved features, including, but not limited to: support for faces and not just character sprites; a more flexible configuration scheme; the ability to set one equipment to draw different graphics onto different actors (useful, for instance, if you want an equipment to show a different graphic on males than it would on females).

Features

  • Can compose characters and faces from multiple charactersets or facesets
  • Complete control over the order in which the character is composed from the other graphics - ie. which graphics show under which
  • Can control the hue and opacity of each character graphic as it is added to the composed graphix.
  • Allows you to have equipped items show up on the actor's on-map character, as well as their face
  • Composite types allow you to make it so that an equipped item can show different graphics on different characters - want an armor graphic to change depending on which gender is wearing it? That can be done
  • Can compose event sprites in the same way
  • Can set an event sprite to be identical to an actor, with all equipment - useful for cutscenes
  • R-codes allow you to make it so that some graphics, when equipped, will hide all others with the same r-code. This is useful, for instance, if when you equip a helmet, you don't want the character's hair to show since it is wider than the helmet and would not look right.
  • Can add and remove graphics from actors and events in-game with very simple codes in a comment - no more call scripts!
  • Can use new message codes, \af[n] and \pf[n], to show actor faces in message windows

Screenshots



Instructions

Paste this script into its own slot in the Script Editor, above Main but below Materials.

For instructions on use, please refer to the header. While it is very long, I am sure you will find the instructions there helpful.

Script


The script is too long. Please retrieve it from the attached text document or from Pastebin.

Leonsoft has also created a demo which formatted a lot of the basic generator graphics.

Credit


  • modern algebra

Support


Please post in this topic at RMRK to report any bug, request any compatibility patches, or to ask any questions as to how to use this script.

Known Compatibility Issues

This script will not work properly with any scripts which change how graphics are drawn by interpreting characters in the filename; ie, if a script will show some sprites or faces differently depending on whether there is some character or series of characters in the name of the graphic resource itself, then this script will not allow you to compose graphics with that graphic. Of course, it should still draw the graphic in the way the other script wants it drawn if there is only that graphic and other graphics are not meant to be pasted onto it.

Luckily, however, it is generally very easy to make scripts like that compatible, so if you find one like that, then just post in this topic with a link and I will write a compatibility patch for it.

Spoiler for FenixFyrex's MultiFrame Sprites:
By default, special sprites configured out of FenixFyrex's MultiFrame Sprites script will only work if the graphic isn't composed (ie. there is only one graphic, and none are stacked). To fix this so that you can use composite graphics with the special multi-framed sprites set up with that script, all you need to do is paste the following patch into its own slot, above Main but below the Composite Graphics script.

Code: [Select]
#==============================================================================
#    Composite Graphics / Visual Equipment + FenixFyrex's MultiFrame Sprites
#      Compatibility Patch
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: January 15, 2012
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    This script should be inserted into its own slot in the Script Editor,
#   above Main but below the Composite Graphics script.
#
#    Note that in order for a multiframe sprite to show properly if composing
#   graphics, then every graphic in the composite must have the special code.
#==============================================================================

if $imported[:MA_CompositeGraphics]
  module Cache
    # alias macgve_make_unique_name
    class << self
      alias macgve_gencomp_mkuniqname_4df2 macgve_make_unique_name
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Make Unique Name
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def self.macgve_make_unique_name(cg_array = [], *args)
      result = macgve_gencomp_mkuniqname_4df2(cg_array, *args) # Call Original Method
      # If using FenixFyrex's Custom Sprites script
      if defined?(FyxA::CustomSprites::Patterns)
        FyxA::CustomSprites::Patterns.keys.each {|pattern|
          result += pattern if cg_array.all?{|cg| cg.filename.include?(pattern)} }
      end
      result
    end
  end
else
  p "Error: Composite Graphics + FenixFyrex's MultiFrame Sprites;\n
  the Compatibility Patch must be inserted below the Composite Graphics\n
  in the Script Editor. It must still be above Main though."
end

Spoiler for MSX XP Characters in VX/VX Ace:
By default, MSX XP Characters in VX/VX Ace would only work on graphics that are not composed - in other words, you could only show an XP graphic with the $xp code properly if nothing else was added on to it. This compatibility patch makes it so that if every graphic in a composed graphic has the $xp code, then it will show up as an XP character.
Code: [Select]
#==============================================================================
#    Composite Graphics / Visual Equipment + MSX XP Characters on VX/Ace
#      Compatibility Patch
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: January 17, 2012
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    This script should be inserted into its own slot in the Script Editor,
#   above Main but below the Composite Graphics script.
#
#    Note that in order for an XP sprite to show properly if composing
#   graphics, then every graphic in the composite must have the $xp code.
#==============================================================================

if $imported[:MA_CompositeGraphics]
  module Cache
    # alias macgve_make_unique_name
    class << self
      alias macgve_msxxponacecomp_uniqname_5fr1 macgve_make_unique_name
    end
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * Make Unique Name
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    def self.macgve_make_unique_name(cg_array = [], *args)
      # Call Original Method
      result = macgve_msxxponacecomp_uniqname_5fr1(cg_array, *args)
      # Set If all graphics in composite have special $xp code
      result += "$xp" if cg_array.all?{|cg| cg.filename.include?("$xp") }
      result
    end
  end
else
  p "Error: Composite Graphics + MSX XP Characters on VX/VX Ace;\n
  the Compatibility Patch must be inserted below the Composite Graphics\n
  in the Script Editor. It must still be above Main though."
end

Demo


A demo would be useful, but I am still operating from the trial version of VXA, so it is not currently possible. Please refer to the voluminous instructions for the time being. Should I ever get a copy of VXA, I will make a demo.

Author's Notes


I was doing a bit of experimenting with this script; in particular, my objective was to devise a way to make this script so that I did not have to directly modify the way characters are drawn normally - ie. I wanted a way for this script to be automatically compatible with other scripts which modify characters or faces, such as one which allows characters to have extra frames.

In the end, this led to a lot of convolutions, and this script is poorly designed as a result, but I got sick of writing it and I didn't want to rewrite it, so I published it anyway. I just wanted to say sorry to any hapless person who should choose to examine the script.
« Last Edit: September 05, 2016, 10:05:02 PM by modern algebra »

*****
Rep:
Level 84
This text is way too personal.
Bronze - GIAW 11 (Hard)Silver - GIAW Halloween
I was doing a bit of experimenting with this script; in particular, my objective was to devise a way to make this script so that I did not have to directly modify the way characters are drawn normally - ie. I wanted a way for this script to be automatically compatible with other scripts which modify characters or faces, such as one which allows characters to have extra frames.

In the end, this led to a lot of convolutions, and this script is poorly designed as a result, but I got sick of writing it and I didn't want to rewrite it, so I published it anyway. I just wanted to say sorry to any hapless person who should choose to examine the script.

Don't be so hard on yourself MA, I took a quick look at the script and for the most part it looked fine. Trying to create a method to manually draw the characters from outside Sprite_Character was a bold feat (I certainly wouldn't have tried myself).

The script itself looks amazing. I really like the R-Codes; it's just bothersome keeping track of all of them :P

**
Rep: +0/-0Level 66
Artist
You always make the best script !! next time try  creating ABS! that will fit this EXTREMELY PERFECT script of yours.. :tpg: :tpg: :tpg: :tpg: :tpg: :tpg: :tpg:
My Profile Picture is made of RMVXACE

*
The Hero of Rhyme
Rep:
Level 82
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Now, sorry for posting lately on this one, but I may have a possible bug report. (If not, it's just my stupidity). ;9

I've been getting the hang of this script (which I love so much, btw :)), but it seems I might be having trouble with the /ct stuff. My character is originally a bald lady, with these codes put as her initial bangs and hair style in the back (using the generator's graphics in Ace). That worked just fine like this in the notebox:

Code: [Select]
\cf["HairBack2", 3, h200, o255, z-1, r0]
\cf["Bangs1", 3, h200, o255, z2, r0]

Then, I tried adding this:

Code: [Select]
\cf9["HairBack2", 3, h200, o255, z-1, r0]
\cf9["Bangs1", 3, h200, o255, z2, r0]
\ct[1, 9]

And it leaves my gal bald, again. ;9 I even tried leaving the "9" as a "0" to see if that helped, but it left her bald, as well. Getting rid of the number after the "\cf" seemed to make it work again completely. :o

I'll attach an image of what my notebox looks like currently.
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Hmm, well it is unnecessary to put type down for the actor settings - you would only need to do that for equipment, since its purpose is to make equipment show differently on different actors or actresses. Where you are setting the actress herself, there is no danger of that, so it is intended that you just use:

Code: [Select]
\cf["HairBack2", 3, h200, o255, z-1, r0]
\cf["Bangs1", 3, h200, o255, z2, r0]
\ct[1, 9]

And tell me if that works. But it really shouldn't have been affected so greatly simply by putting the type down, so I will look into it sometime.

*
The Hero of Rhyme
Rep:
Level 82
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
First of all, thanks for the time!

That does work. :)

I thought the ct worked for the faces, because my intention was to do a "hair cut" shop (using Yanfly's Event Shop - I think it's Yanfly's, at least) and I didn't want the guys and girls to share the same hairdos. :o

But I may be able to find a way to do this through eventing, so I've been looking around. 8)
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
\ct does work for faces, it's just that it doesn't mean anything to give types to the graphics you set in the actor. In other words, there wouldn't ever be any reason to put a \cf[] code in an Actor's notebox unless you wanted it to show up on the Actor. But certainly if you had the following in the actor's notebox:

Code: [Select]
\cf["HairBack2", 3, h200, o255, z-1, r0]
\cf["Bangs1", 3, h200, o255, z2, r1]
\ct[1, 9]

And if you made a Helmet which had this in its notebox:

Code: [Select]
\cf4["MaleHelm1", 1, z3, r1]
\cf9["FemaleHelm1", 1, z3, r1]

Then when she equips that helmet, only the "FemaleHelm1" graphic would show up, since she doesn't have 4 in her \ct[] array. So yes, \ct[] does work on face graphics as well as character graphics; you just don't need to identify those types on the graphics you set directly in the actor's own notebox.



On an unrelated note, you don't need to include in the code anything that you aren't changing from the default. In other words:

\cf["Bangs1", 3, h200, o255, z2, r0]

is the same as:

\cf["Bangs1", 3, h200, z2]

*
The Hero of Rhyme
Rep:
Level 82
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Alrighty, thank you again. :)

I tried putting this in a weapon's notebox:

Code: [Select]
\cf9["HairBack2", 1, z-1]

And it worked perfectly, and the hair popped on as the weapon was equipped. :)

;9 However, I entered this as a comment in an event and it didn't work:

Code: [Select]
\add_a1_cf9["HairBack2", 1, z-1]

When I removed the "9" in the event "add" command, it worked perfectly. :o

I apologize once again for the issues. ;9
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Well, yeah; again, you're adding it to the actor herself, and so there is no need to put the type as 9. That's not a different issue, and it's not really a problem.

The purpose for composite types is so that the same equipment can show up differently on chosen actors. For instance, it permits you to change the graphic of "Body Armor" depending on whether you equip it to a male actor or a female actor. That feature is useless when you are adding a graphic directly to an actor, since you don't need to account for the possibility that you might want it to not to show up differently on different actors. In other words, if you were attaching a graphic of a type the actor doesn't possess (for instance, \cf8[]), then why would you ever try to put it on the actor since that graphic could never show up or be used for anything?

So don't set a type when you are adding the graphics directly to actors, and you should be fine. I suppose I should have accounted for the possibility that people would try to set types on actors, but I don't regard that as a particularly pressing issue.

*
The Hero of Rhyme
Rep:
Level 82
( ͡° ͜ʖ ͡°)
2014 Best RPG Maker User - StoryProject of the Year 20142014 Queen of RMRK2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
Oh... oh, wow. I'm totally sorry about that. :-[ I see what you mean about the visual being added directly to the actor, and I guess I was being a little ditzy today!
Spoiler for:
Which reminds me... I totally forgot "p1" existed and kept using "a1" for everything, too! ;9 I read the instructions a few times, but it's been one of those days... whew... :o

Anyways, thanks for clarifying all that! I'm going to read and think a bit more carefully with scripts from now on! :-[

*yuyubabe learns a life lesson!

MODERN ALGEBRA CAN WE GO DIDNEY WORL?! WE SHOULD GO DIDNEY WORL!!!
« Last Edit: April 05, 2012, 04:50:11 AM by Pacman »
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]


*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
haha, no worries. It's an understandable mistake and my instructions weren't very clear.

AND YES WE CAN GO DIDNEY WORL WOOO
« Last Edit: April 05, 2012, 04:50:40 AM by Pacman »

**
Rep: +0/-0Level 72
RMRK Junior
I'm using this script with yanfly equip engine and when i start the game the error,
"line 605 typeerror, cannot convert nil into array" is there a way to fix this?

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Try switching the order of the scripts. Ie. if Yanfly Equip Engine is currently below the Composite Graphics script, try putting it above it instead. If that doesn't work, create a new project and recreate the error in it, then upload it and let me see the error.

**
Rep: +0/-0Level 72
RMRK Junior
I'm using this script with yanfly equip engine and when i start the game the error,
"line 605 typeerror, cannot convert nil into array" is there a way to fix this?
i've fixed it by using fomar's custom slot instead, but when i remove equipment the sprite doesn't change.
also, sprites don't show on custom slots.
« Last Edit: June 11, 2012, 05:48:30 AM by Watfordj »

**
Rep: +0/-0Level 54
RMRK Junior
Hellooo, made an account just to ask for support on this. Is there any way we can set a piece of equipment to have different priority depending on which direction the character is facing? Like if you had wings or even long hair you'd want it to be behind the character while they're facing the camera and in front of em when you see their back.
Sorry for reviving an old thread but I wasn't sure where else to ask.

A girl on each arm... the life of a cookie is never boring!
.:: TOTAL NEWBIE ::.
Divided between ideas for a norse mythology game and a sandbox romp through an original setting...
Gathering resources and learning in preparation!!
My deviantART account: bunni89.deviantart.com

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
It is acceptable and encouraged to post support requests in the thread itself, and it is perfectly acceptable to revive an old thread for that purpose.

As for your actual question: no, there is no way to do that in the script. You could, however, separate the wings into two separate graphics and set the back ones to a higher priority and the front ones to a lower priority.

Ie. if we had the following graphic (extracted from the character generator), named "Wings" in your Characters folder:


You could put the following in your equipment's notebox:

\cc["Wings", i0, z-2]
\cc["Wings", i4, z2]

The values I chose for z were sort of random, but that would make the front wings graphic show at -2 priority and the back wings graphic show at +2 priority.

**
Rep: +0/-0Level 54
RMRK Junior
Aha, thank you! I never would have thought of that and it seems so obvious now, sorry for the dumb question :)
By the way I adore this and I'm using it to make a character creation scene in my game, so thank you loads for being such an amazing scripter!  ;D

A girl on each arm... the life of a cookie is never boring!
.:: TOTAL NEWBIE ::.
Divided between ideas for a norse mythology game and a sandbox romp through an original setting...
Gathering resources and learning in preparation!!
My deviantART account: bunni89.deviantart.com

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
You're welcome, and thank you for the kind words.

**
Rep: +0/-0Level 54
RMRK Junior
Whoops I have a few more questions! Is there any way to make an equipment use two r-codes? Like I set one that means 'tall person' and one that means 'male' and then an actor having both codes means they get the equipment drawn to fit 'tall male'? Whereas only having 'male' uses the default sprite. Or would I have to make separate R-codes for every combination of bases? (1= short male human, 2= normal male human..)

Also is there any way to change an actor's CT-code ingame via script call? Or set it to change based on a variable? Since I'm doing character customization it kinda messes up the equipment side of things and I just get male-fitted equips floating on a tall girl or whatever. (cos the main character changes I can't give them the right code for whatever the player picked)
Basically I want the actor to for example have \ct[1, 4] for a female human and then I can change it to \ct[2, 6] via script call when they select male elf or whatever.

Also (last one I promise!) can you add/remove equips en masse in one code, or do you have to type the whole thing out each time? Just cos my character customization is currently setup with for example Eyes 1's comment calls going:
 \add_a1_cc["eyes", i0, h0, o255, z0, r0]
 \remove_a1_cc["eyes", i1, h0, o255, z0, r0]  \remove_a1_cc["eyes", i2, h0, o255, z0, r0]...
Which makes the events huge and laggy and will just get worse when I move on to stuff that needs to vary by skintone.. (add wings1white, remove wings2-7white, remove wings1-7black....)
It would be neat if it had functionality like ["filename", i0, i1, i3] would get rid of em all.

Sorry if I made any more dumb mistakes and thanks for all the help :3

EDIT: Ignore questions 1 and 3, in retrospect they do look real dumb XD Easily solved the lag problem just by making the 'remove all parts not in use' comment block into a common event. But I still really need help with the dynamic CT-code thing...
EDIT EDIT:Whoops I've been calling the CT code the R code for the entirety of this post! It must've been totally incomprehensible XD
« Last Edit: October 22, 2012, 01:57:14 PM by Bunni89 »

A girl on each arm... the life of a cookie is never boring!
.:: TOTAL NEWBIE ::.
Divided between ideas for a norse mythology game and a sandbox romp through an original setting...
Gathering resources and learning in preparation!!
My deviantART account: bunni89.deviantart.com

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Hi, sorry for the delayed response. I didn't have time to answer when I first saw it and then forgot about the question.

1. There isn't a way to use assign 2 r-codes or 2 types to the same equipment. Sorry.

2. You could do it by a script call:

Code: [Select]
a = $game_actors[x]
a.composite_equip_types = [y1, y2, ..., yn]

Where x is the ID of the actor, and y1, y2, ..., yn are the composite types.

3. I know you said you've resolved this, but just in case you weren't aware, the remove_cc thing will remove all graphics that correspond to the specified arguments. So, if you, for instance, had an "eyes" graphic that had eight different sets in it and wanted to remove any that might be applied, you wouldn't need to do:

Code: [Select]
\remove_a1_cc["eyes", i0, h0, o255, z0, r0] \remove_a1_cc["eyes", i1, h0, o255, z0, r0], etc...

eight times. You would just need to do:

Code: [Select]
\remove_a1_cc["eyes"]

and that removes any that are applied.

However, there is no other shortcut.


**
Rep: +0/-0Level 54
RMRK Junior
Great, thank you so much! SO that script call overwrites the current composite types, or just adds more to the list? It seems like what I wanted so woohoo! And also I'm embarrassed how dumb I am that I didn't realise you could delete the whole spritesheet like that XD That fixes all my problems and sorry for taking up your time :3

A girl on each arm... the life of a cookie is never boring!
.:: TOTAL NEWBIE ::.
Divided between ideas for a norse mythology game and a sandbox romp through an original setting...
Gathering resources and learning in preparation!!
My deviantART account: bunni89.deviantart.com

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
I'm happy I could help. That script call overwrites it. If you wanted to just add one new type, say 4, you would do something like:

Code: [Select]
a = $game_actors[x]
a.composite_equip_types << 4

**
Rep:
Level 72
Impossibre!
Participant - GIAW 11
Hey I think I found a compatibility issue! I'm a fan of your ATS series of scripts, so this is a rather important issue to me. When I put Composite Graphics in, the paragraph formatting stopped. The only way I could find to get formatting back was to delete Composite, which is lame, 'cause I like both scripts. Is there a fix?

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Well, it will need to be fixed in the next version in any event, but for now just insert ATS: Formatting into a slot below Composite Characters in the Script Editor, but still above Main.

In other words, you have it like this (where ellipses are other scripts or else nothing):

Materials
...
ATS: Formatting
...
Composite Characters
...
Main

It has to be like this:

Materials
...
Composite Characters
...
ATS: Formatting
...
Main

**
Rep:
Level 72
Impossibre!
Participant - GIAW 11
Yay! It works now! Thanks a lot! Exclamation points!