Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Jun 21 2009, 08:49 AM
Post
#1
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Class Change Graphics v 1.0 by Mithran Introduction Some people like it when each class has their own set of walking and /or face graphics. While this can be easily accomplished with events for an evented class change system, it becomes much more of a pain in a scripted class change system (especially since you can't idependently change face and character sprites, the amount of conditional branches becomes staggering). This script allows you to set up automatic actor character/face changes when they change class. After racking my brain for ideas on how to make this as easy as possible, I decided to just make it customizable with Ruby code using simple case structure. Don't worry, everything is explained in the script... Features - change character graphics when they change class How to Use Install on its own script page in the materials section of the script editor above main and below default scripts. Read the instructions to configure the setup section in the script (found just after the examples section). Script Spoiler: How It Works The method in the module is called every time a class change occurs, evented or otherwise. This method is given the class and actor ids. The case (or if) statements check the method for a match, and when a return line is found, passes back this data. If the return was not nil, the variables @character_name and @character_index are switched to the filename and index returned. On the every frame update, the base scripts detect if the @character_name or @character_index has been changed, and if so, also change the bitmap displayed on screen. Faces are redrawn usually only if the window they are in refreshes, but dont worry, most windows will. FAQ q. Is this Tankentai compatible? a. Tankentai appears to change battler graphics automatically if when the character (walking) graphic is changed. The filename used would be the same as the 'character' graphics, and is bound to 'character' change. All the instructions on how to import and use graphics for the SBS/ATB are explained in that script, so please don't ask here. This should work exactly like an evented graphic change. Even if you somehow change class mid battler, this should take effect on the next main frame update. q. My scripted class change system doesnt work with this! a. First, try putting this script below the class change system. If that doesn't work, the creator has completely circumvented the normal class change method. If you provide a link to the script, I will write a small patch that will make this work. q. How about just making this work every frame update? a. You can run a parallel process with the following script command: CODE for member in $game_party.members member.class_graphic_swap(member.class_id, member.actor_id, true) end $game_player.refresh Although using this method would be pretty much the same as eventing it.. half the point is that this is bound directly to a class change. q. How about swapping graphic with a state? a. Check my script development for a temporary class change with state script, which is compatable with this. The SBS/ATB also both have methods for changing battler graphics during an animation, but they wont revert until the battle scene terminates (after battle). If you absolutely need something like this, please let me know. Credit and Thanks - Mithran - everyone who requested something like this (there are several) Author's Notes Feedback is welcome. This script is about 90% tutorial, so please let me know if you have any questions. -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jun 21 2009, 02:08 PM
Post
#2
|
|
![]() ![]() Type: Designer |
Another great and explanative script.
EDIT: I did everything you told me to do in the script, and it worked out perfectly! Its exactly as I imagined it, no, better! Thanks alot again! However, one little problem came up that wasn't there before, and I have no clue how it happened. When I'm about to level up, the game stops and I get a script error: "Script 'Level Up Display Window' line 220: NoMethodError occurred. undefined method '<' for nil:NilClass". As you can see, its BigEd781's 'Level Up Display Window' script, and I'm not sure what's causing the error... If nothing can be done, I can just take out BigEd's script, since your set of scripts are infinitely more important to my game design. This post has been edited by Kizuna: Jun 21 2009, 03:40 PM -------------------- My current project is a custom transformation system for a game I'm working on. I've recently finished it! If you're interested, please click the link below!
Demon Form Transformation System A few facts about the Demon Form Transformation System(in case you're interested or have ideas that can help): Spoiler: |
|
|
|
Jun 21 2009, 04:06 PM
Post
#3
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
I highly doubt the error is in BigEd's script. Whats on line 220? I can't seem to duplicate the crash, and there was no "<" on line 220 in BigEd's script in the version that I looked at. It would help if I knew what is getting nil'd. If you can provide me with a demo link, even better.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jun 21 2009, 04:33 PM
Post
#4
|
|
![]() ![]() Type: Designer |
I tried removing BigEd's script(it was one from rpgrevolution, with one from here, which is a bit longer) and the error is still the same, only the line dropped down to 277 now.
here's a demo, several things are incomplete, or are there to serve my messy thinking process, so I can't really say its a demo haha. http://www.megaupload.com/?d=PLE4P4O2 -------------------- My current project is a custom transformation system for a game I'm working on. I've recently finished it! If you're interested, please click the link below!
Demon Form Transformation System A few facts about the Demon Form Transformation System(in case you're interested or have ideas that can help): Spoiler: |
|
|
|
Jun 21 2009, 06:34 PM
Post
#5
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
An encrypted archive doesnt really help. I'll need an unencrypted version, just zip up the whole project folder and upload that. If you dont want to share your database stuff or resources (you can PM the link if you want it private), just copy the Scripts.rvdata file from the data folder and upload that so I can see your complete script layout. This script doesnt come near anything that has to do with level ups (actual code is like 20 lines long), so I'll need to examine them personally to see what the problem is.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jun 21 2009, 09:52 PM
Post
#6
|
|
![]() No method: 'stupid_title' found for 'nil:NilClass` ![]() Type: Coder Alignment: Chaotic Good |
I highly doubt the error is in BigEd's script. Thanks for the vote of confidence, but I wouldn't be so sure about that BTW, nice script EDIT: Looking at your script, I don't immediately see where the problem is coming from either. As long a 'character_name' is never nil it should just work, but I am just guessing really. -------------------- My blog - It's awesome, I assure you
QUOTE While sloppy writing does not invariably mean sloppy thinking, we've generally found the correlation to be strong -- and we have no use for sloppy thinkers. If you can't yet write competently, learn to. - Eric Raymond ---![]() My awards for being so awesome Spoiler: |
|
|
|
Jun 22 2009, 12:08 AM
Post
#7
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
Character_name and face_name would never have a comparison run with the less than symbol, either. To my knolwedge, character_index or face_index never do anywhere in the base scripts and I dont see many scripters running this comparison, either. A nil in character name or face name would likely throw a line 75 in Cache "cannot convert nil into string" when it tries to get the filename + path. A nil in the index would throw a nomethod error probably when it runs the modulus in the Sprite_Character script. A non-nil non-array return would throw a nomethod error [] within the script itself (unless only the string is returned, in which case the Cache will then produce a "cannot coerce fixnum into string" when trying to get the filename and path), and a nil return is anticpated and part of the function of the script. That rules out everything I can think of caused by this specific script (and all those are configuration errors anyway, which would be immediately apparent before the graphic changed). If I had to hazard a guess, I would say that something below the script overwriting the method change_exp, destroying the instance variable assignments in Game_Actor used by the level up display window, and that it simply wasnt noticed because it was never in a situation where it was displayed.
Edit: Yep. Move up KGC_LimitBreak above the other custom scripts (right under or right below the SBS scripts). KGC_LimitBreak is a core system changer, and overwrites nearly everything it changes, including the change_exp method. As a rule of thumb, these kind of scripts get placed high on the list. This post has been edited by Mithran: Jun 22 2009, 12:20 AM -------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Jun 25 2009, 06:26 PM
Post
#8
|
|
|
Fear me ![]() Type: Coder |
so if i am right, this script makes the npc change the class of the player and while doing that..
changes its graphix also? and umm how many class choice do we get.. or is it just a personne to change job or something like that. -------------------- Feed my dragons please, by clicking on them.
Spoiler: |
|
|
|
Jun 25 2009, 07:58 PM
Post
#9
|
|
![]() Scripter ![]() Type: Coder Alignment: True Neutral |
This is not a class changer script. This is an addon to a class change system (it should work with any system that does not go out of its way to break the default code, and if it does, tell me and I'll write you a patch), be it evented or scripted. Whenever a character changes class, the script checks and see if a new graphic should be assocaited with them, then changes it over. As I explained in the intro and the script itself, when working with evented class change systems, this is relatively simple (just have them change graphcis when you do an evented class change). If you are using a scripted class change system, however, eventing something like this would mean relatively large events filled with conditional branches and constant checking through a parallel process. Plus, this includes detailed explainations on how to set up your case or if structures to get it to change to the right graphic under the right conditions, so it should be simple enough for even a non-scripter to use.
-------------------- My scripts:
Spoiler: Searching for one of my snippets? Mithran's Snippet Repository My current scripting projects: Mithran's Script Development Thread Who says I'm always idle in the IRC? Spoiler: |
|
|
|
Oct 9 2009, 08:33 PM
Post
#10
|
|
![]() ![]() |
any chance of a demo?
-------------------- You've changed.
You've missed a few things. Well I wanna hear it all from the start Well it all started when I saw this sphere of you. dramatic music FTW! |
|
|
|
Oct 9 2009, 09:48 PM
Post
#11
|
|
![]() Gettin' the hang of chillin' on a pole... ![]() Type: Artist |
This is a great script for me, b/c my game has 6 classes to run around with ^^
-------------------- My Shop Spoiler: My Tutorials Spoiler: My Random Stuff Spoiler: |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 22nd May 2013 - 03:48 AM |
|
|