Forcing Index Change for Event Charsets

manpaint

Veteran
Veteran
Joined
Aug 13, 2014
Messages
77
Reaction score
12
First Language
French
Primarily Uses
RMVXA
Following this thread and many hours of searching, I concluded that it is not natively possible to change the character/event graphic index with a script call (at least with those charsets preceded by a $) . So, my (what I assume to be) simple request is a script that allow the use of a script call in move route/events without needing to mention the file name (by changing the index of the graphic currently used) if possible. Thanks!
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
I modified Galv's move route Extras script to fit your request (specifically, the set_char script call).
I'm testing it right now; if it works, I'll send it to you.
Question, though. Why do you not want to mention the file name?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
... (at least with those charsets preceded by a $) ...
That's because images with $ at the start are single character images, the code treats them that way. The only valid index for them is 0 (aka the first and only character-set on the image).
I think you meant pattern AND direction (based on the topic you linked).
Each of character-set image got the same format.
Code:
=begin

               PATTERN
              ↓   ↓   ↓
            -------------   D
DOWN  [2] → | 0 | 1 | 2 | ← I
            -------------   R
LEFT  [4] → | 0 | 1 | 2 | ← E
            -------------   C
RIGHT [6] → | 0 | 1 | 2 | ← T
            -------------   I
UP    [8] → | 0 | 1 | 2 | ← O
            -------------   N

=end
The above "illustration" shows one character-set with it's direction and pattern layout.
The numbers beside the direction names are the numbers you have to set for the direction of the characters if you want to change it in a script call.
The pattern numbers are either 0, 1, 2 or 1, 2, 3. I haven't checked that since... no idea when. Just use whichever works.

The index of the characters loads a specific part of an image-sheet with multiple character-sets. On an image with only one character-set, it's pointless to change that.
So, what you have to do is change the direction and pattern of the characters instead.
 

manpaint

Veteran
Veteran
Joined
Aug 13, 2014
Messages
77
Reaction score
12
First Language
French
Primarily Uses
RMVXA
I modified Galv's move route Extras script to fit your request (specifically, the set_char script call).
I'm testing it right now; if it works, I'll send it to you.
Question, though. Why do you not want to mention the file name?
The way I plan to do it will be pretty much to when changing animation (and I mean charset by that), the way it will be handled and how file name will be orghanized it wwill be a scripted charset change (i.e filename_start [VAR_X][VAR_Y] (X being a specific npc ID and Y the invoked anim id). It is mostly to avoid making two thousand conditional branches.
The index of the characters loads a specific part of an image-sheet with multiple character-sets. On an image with only one character-set, it's pointless to change that.
So, what you have to do is change the direction and pattern of the characters instead.
YES! This is exactly what I wanted, thank you!


(The clunky transition at the end is done on purpose) It also work perfectly with modern algebra's composite charset script as shown in the gif. This really opens up loads of possibility.

Now if anyone stumble upon this thread in the future and don't understand what Sixth is saying / how I done it:
Code:
(Event move route)
Turn down
@original_pattern = 0
Wait 4 frames
@original_pattern = 1
Wait 4 frames
@original_pattern = 2
Wait 4 frames
Turn left
@original_pattern = 0
Wait 4 frames
@original_pattern = 1
Wait 4 frames
@original_pattern = 2
Wait 4 frames
Turn right
@original_pattern = 0
Wait 4 frames
@original_pattern = 1
Wait 4 frames

To admins/moderators, while technically fufilled I woluld like to hear tv.ghost's reply before the thread will be locked.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
added demo with edited Galv script below. In case the demo ever breaks or corrupts this is what I added to it:
Code:
  def set_frame(index,pattern,direction)
    @gstop = true
    @direction = direction
    @pattern = pattern - 1
    @character_index = index - 1
  end
first number in the script call is the character sheet slot (1-8), second is the pattern number (columns), third is the direction (2 = down, 4 = left, 6 = right, 8 = up) I tested it with a $ character and 8 character graphics. I haven't tested it with ! or !$ character graphics.

I kept in index so that it can work with non-$ character sheets, but you can always remove the index element from it to make it only change pattern and direction. For $ character scripts, just put the index to 1. add restore_char after move routes script call sequences.

Honestly what Sixth suggested probably works better than this, but if people ever want to do it with Galv's script included, at least they now know it's possible. I made a tiny animation example in the demo:
upload_2019-1-16_19-29-1.png
 

Attachments

manpaint

Veteran
Veteran
Joined
Aug 13, 2014
Messages
77
Reaction score
12
First Language
French
Primarily Uses
RMVXA
Honestly what Sixth suggested probably works better than this, but if people ever want to do it with Galv's script included, at least they now know it's possible. I made a tiny animation example in the demo:
View attachment 107326
Both method indeed work. You method mighjt be actually be prefferable because since it is a script call, it may be possible to import the direction of the npc (via a variable) for specific animations, but that still remain to see for me. Anyway thank to you guys!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top