Composite Character Sets / Visual Equipment

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 86
I cant seem to make my own equips

I have a sprite, I added $ to it so now its $red

its a single file btw

I have \cg[$red, 1] now when my char puts it on.. I dont see it=\
i tried \cg[$red, 0] still nothing..

*
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
Ah, that's my fault. In the regexp, I didn't acount for symbols as I ought to have. Anyway, around line 259, try replacing this line:

Code: [Select]
while text.sub! (/\\cg\[([\w\s]+),*\s*(\d*),*\s*(\d*)\]/i) { '' } != nil

with this one:

Code: [Select]
      while text.sub! (/\\cg\[([^,\]]+),*\s*(\d*),*\s*(\d*)\]/i) { '' } != nil

See if that fixes it.

**
Rep: +0/-0Level 86
It works, thanks!

**
Rep: +0/-0Level 83
Modern Algebra, you're a friggen genious!

**
Rep: +0/-0Level 83
Hey Modern Algebera,

I was wondering if you could make some adjustments to the script. Say, for example, I equiped an iron plate. Then it would show my character graphic changed and is now wearing armor. I'm sure with your crazy awsomeness you could find a way to do this  :o

*
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
That's... what it does?

Quote
#    To set a graphic for an armor or weapon, all you need to do is place this
#  code in the Notes box of the item:
#
#    \CG[<Name of Character Set>, <index in character set>, <hue>]

**
Rep: +0/-0Level 83
I have an error with the script. Its weird, when I equip a gold beastplate, nothing happens. But when I walk down a couple steps, it flashes a picture of a green dude wearing a gold breastplate. I don't know what it is, but this is what I have under the notes.

\cg[5_yellow, 1]

(5_yellow is the picture i set as of the gold breast plate.)

 ???Im an Idiot  :tpg:

*
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
Can you post the resource 5_Yellow. So the actual picture you're using?

**
Rep: +0/-0Level 83
Can you post the resource 5_Yellow. So the actual picture you're using?
That's it. I just copied that from the website. It also flashes the green man when I don't have anything equiped =/

*
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
Put a $ in front of the name of the file since it's only a single graphic

The green man is likely being flashed because of the settings in the script. Go to this part of the script:

Code: [Select]
    #---------------------------------------------------------------------
    # EDITABLE REGION
    #|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  An actor will automatically have whatever you set in the database
    #  as a bottom layer for him, but if you need to have other character
    #  sets piled on top, then put them in this format:
    #
    #  when <actor_id>
    #    @composite_character.push (['graphic_name', index, hue])
    #      *for as many graphics as you want - first ones drawn first. If you
    #       want to know what each is, see the Instructions in the header.
    #----------------------------------------------------------------------
    when 1 # 1st Actor
      # Create Hair Sprite
      @composite_character.push (['VisEquipSample', 1, 100])
    when 3 # 3rd Actor
      # Create skin sprite with different hue
      @composite_character.push (['VisEquipSample', 0, 20])
      # Create Hair Sprites
      @composite_character.push (['VisEquipSample', 2, 75])
      @composite_character.push (['VisEquipSample', 3, 75])

Remove all of the @composite_character.push lines if you don't want them. Only have stuff there if you want to build the character graphic from individual parts rather than having a single base character graphic.

**
Rep: +0/-0Level 83
Ok, that helped out the flashing man problem... but now when I got to equip something, nothing hapens. I equiped the Golden Breastplate (\cg[$5_yellow, 1]) and it didn't work.

*
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
But did you rename the file too?

**
Rep: +0/-0Level 83
But did you rename the file too?
If your talking about the 5_yellow, yes i renamed it to $5_yellow


**
Rep: +0/-0Level 83
And you made the change suggested here? http://rmrk.net/index.php/topic,28124.msg397508.html#msg397508
I made that change to, but it doesn't work. The character just stays the same.

*
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
Oh, of course. I didn't even see this, but where you wrote:

\cg[$5_yellow, 1]

the 1 is wrong. It should be 0, or left blank.

So:

\cg[$5_yellow]

or

\cg-$5_yellow, 0]

is what you need to do.

**
Rep: +0/-0Level 83
Great script! Exactly what i needed. I was wondering though, if i could affect hue(or maybe even graphic) with an event.

Example:
My game has an alignment system. I'd like it to change the player's appearance based on their alignment. If their alignment is more toward "evil", it should be darker... More "good" = brighter, etc. So if a player steals from/kills a merchant their alignment will change, therein changing their appearance(hue or otherwise).

If there's any way you could help with this, I'd be super appreciative.

*
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, I mean you can set the hue of any character set with that third element in the array. As can be seen in the instructions:

Code: [Select]
#    \CG[<Name of Character Set>, <index in character set>, <hue>]

I don't have anything where the graphic can be a gradient based on a variable, but you could easily enough just replace it manually.

**
Rep: +0/-0Level 83
I understand how to change the hue of the character set for events... It's changing the player's hues(hair and else) while in game.

Unfortunately, my scripting abilities are nil... If there is a way to describe how to "replace it manually," that would be super helpful.

I attempted to change the 720 in following code to a variable with a few methods, all of which ending in failure:

when 1 # 1st Actor
      # Create Hair Sprite
      @composite_character.push (['VisEquipSample', 1, 720])

Is this not the correct method? Or am i on the wrong path entirely?

*
Rep: +0/-0Level 83
Yeah, that's the one I'm talking about. It now works the way I outlined in the previous post.
  I am a beginner and still don't get it. :-\  Can you make a demo or something so it would be easier to set it up. Maybe plug'n'play ? ??? Please ... I hope you help me... Anyways thank you, for the many handy scripts you've made.   :)
P.S. I tried to set it up by myself, but I got an error message:
''Unable to find file Graphics/Character/VisEuipSample''

P.S. (2) XD  ;8 Do you like my mapping?


*
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
The map's not bad, but the ground types don't mesh well and the bridge looks kind of strange.

Anyway, there is a demo. It's attached to the first post. The error you are getting is because you haven't a) grabbed the VisEquipSample graphic, which you don't actually need or want. But you need to change the graphics that are set up in the initial script. Just go down until you see the

Code: [Select]

    #---------------------------------------------------------------------
    # EDITABLE REGION
    #|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  An actor will automatically have whatever you set in the database
    #  as a bottom layer for him, but if you need to have other character
    #  sets piled on top, then put them in this format:
    #
    #  when <actor_id>
    #    @composite_character.push (['graphic_name', index, hue])
    #      *for as many graphics as you want - first ones drawn first. If you
    #       want to know what each is, see the Instructions in the header.
    #----------------------------------------------------------------------
    when 1 # 1st Actor
      # Create Hair Sprite
      @composite_character.push (['VisEquipSample', 1, 100])
    when 3 # 3rd Actor
      # Create skin sprite with different hue
      @composite_character.push (['VisEquipSample', 0, 20])
      # Create Hair Sprites
      @composite_character.push (['VisEquipSample', 2, 75])
      @composite_character.push (['VisEquipSample', 3, 75])

And erase it or change it to add only the graphics you want to the actors.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Hey MA, I have a couple questions. I'm just starting to use this script so I just want to know how to customize a few things.

1: Where do I go to get rid of the hair-do on the player character from your demo.
2: Why doesn't my individual character sheets show up when I equip the items? (I have the comments like this in the notes box "\cg[$Helm_plate1]") I have not yet used your modification up somewhere for the use of the "$" symbol, so I'm about to try that and see if that fixes it. ~Edit: Nope that didn't work. My character remains blank. I also tried in the notes box "\cg[$Helm_plate1, 0]" just in case. Still nothing though.
« Last Edit: May 04, 2009, 02:48:38 AM by grafikal009 »

*
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
See the post above you. Delete those lines.

And yeah, you need that patch. But I thought I had integrated it.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I also deleted those lines. Nothing changed. I still have the turquoise hair too.

Yep, I have no clue. It's probably something simple.

Here's a project with the script in it and my resources.
« Last Edit: May 04, 2009, 03:29:09 AM by grafikal009 »

*
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 changed it and then started a new game? It will still be there unless the character is reinitialized.

If you don't want ti re-initialize it, add the patch in post #24 to change Actor graphic to your game and write the code:

$game_actors[1].clear_graphic
« Last Edit: May 04, 2009, 03:26:48 AM by modern algebra »