Main Menu
  • Welcome to The RPG Maker Resource Kit.

Composite Character Sets / Visual Equipment

Started by modern algebra, July 05, 2008, 10:33:07 PM

0 Members and 1 Guest are viewing this topic.

xakiru

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..

modern algebra

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:

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

with this one:


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


See if that fixes it.

xakiru


jwburks


madlyplinge

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

modern algebra

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>]

madlyplinge

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:

modern algebra

Can you post the resource 5_Yellow. So the actual picture you're using?

madlyplinge

Quote from: Modern Algebra on April 18, 2009, 08:42:03 PM
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 =/

modern algebra

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:


    #---------------------------------------------------------------------
    # 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.

madlyplinge

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.

modern algebra


madlyplinge

Quote from: Modern Algebra on April 19, 2009, 12:20:20 AM
But did you rename the file too?
If your talking about the 5_yellow, yes i renamed it to $5_yellow

modern algebra


madlyplinge


modern algebra

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.

slayerofman

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.

modern algebra

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:


#    \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.

slayerofman

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?

begin2manga

Quote from: modern algebra on March 13, 2009, 11:48:53 PM
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?


modern algebra

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



    #---------------------------------------------------------------------
    # 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.

Grafikal

#46
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.

modern algebra

See the post above you. Delete those lines.

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

Grafikal

#48
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.

modern algebra

#49
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