Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Seph's Test Bed V.4

Status
Not open for further replies.
Just downloaded it and already find a bug... Nothing really big...
It's on the battle memory script, line 82
Code:
  alias_method :seph_btmem_scnbtl_ssws,   :start_switch_select
I believe it's supposed to work with your battle switching script, right? If so, I guess you need to add an "if SDK.enabled?('Battle Switching')" including the start_switch_select and end_switch_select methods and the respective aliases.

I'll just play with some of the new MACL functions now. I'll report if I find anything else in the proper thread.

You did a great work here and on SDK/MACL too... Just loved the map screenshot script...

EDIT: Found another bug in the alternate difficulty script line 137: Game_Difficulty is suposed to be Game_Alt_Difficulty

EDIT AGAIN: This time is only a suggestion for your battle equipping script. It would be better the help window to show the equipment name and not only 'Changing equipment'. You know, something like:
Code:
    text = b[1] > 0 ? 'Equipping ' : 'Removing '
    if b[1] < 1
      text += b[0] == 0 ? $data_system.words.weapon : eval("$data_system.words.armor#{b[1]}")
    elsif b[0] == 0
      text += $data_weapons[b[1]].name
    else
      text += $data_armors[b[1]].name
    end
    @help_window.set_text(text, 1)
 
Hey Seph, thanks for the teleporter script, it looks perfect though I'm too burnt our rmxp-wise with releasing the Cell Chamber to try it just yet! Nice one with the whole package.
 
Er....... by the way, about 'Dynamic Enemies' script, it doesn't seem to show any error in your demo, but when I copied it and pasted it on other project, this error occurred:
Script 'RMXP SDK2 Part 1' line 411: TypeError occurred.
cannot convert Symbol into String

The error message refers:
Code:
  #--------------------------------------------------------------------------
  # * Check for Aliases
  #
  #   Value = [classname, methodname]
  #--------------------------------------------------------------------------
  def self.check_for_aliases(value)
    # Check If Method Ever Aliased
    @aliases.each do |script, list|
      # Pass Through Alias List
      list.each do |con|
        # If Class & Method Match
        if con[0] == value[0] && con[1] == value[1]
          # Print Error
          p 'The following script will not work : ' + script,
            'Reason : The (' + @last_script + ') overwrites the method ' +
            value[1].to_s + ' aliased from ' + "#{con[1]} to #{con[2]}" +
            'found in class ' + value[0]
        end
      end
    end
..........
 
@cainchild: I hope to have that out by sunday. I will be updating with small minor updates from here on out instead of big ones. The only exception will be when we update the SDK or MACL, in which then it will be longer than a week.

@tibuda: Thanks. I will be sure to fix that by this sunday's release.

@Landarma: Thanks. I will look into that as well.

Thanks everyone for their comments and bug checking for me. I didn't get a lot of time to test all these scripts out, and just added about 15 at the last minute, so I didn't get to test out their computability with each other.


I am going to keep a log of reported errors, and fixed errors. I won't update the demo, but I will keep the custom scripts page updated. So if you see that I have fixed a bug in my signature, check the scripts page if you need the bug fix.
 

Deebs

Sponsor

Okay, I’ve been putting asking about this off today and fooling around with the script myself in the slight hope that a miraculous light will shine down on me and some of it would make sense to my limited understanding, but, unfortunately, that’s not the case.

So here I am to n00b things up in regard to the ‘Dynamic Enemies’. Despite the instructions listed on the script itself, my lack of any scripting knowledge whatsoever causes it all to be Greek to me. I’m not sure what I’m tweaking with and haven’t been seeing any results from what changes I have put in the courage to actually do.

And since I learn best from observing and comparing things, I’d like to humbly ask for a demo with a properly configured script so that I can see what can be changed and what the effects of said changes are.

If you do not have the time I understand. Thanks in advance.
 
If you can give me some exact setup to what you are looking for for enemies stats to be, I can give you some sample setup.

If you need the curve generator setup, click me

For example:
Code:
# We will use the point slope formula for the enemy stats since its just simple
# Point Slope (Type : 0) (Args : min_level, max_level, start value, inflation)


# Enemy 5
# Hp - Min Level : 1, Max Level : 99, Start Value : 500, Inflation : 150
# Sp - 1, 99, 200, 75
# Str - 1, 99, 50, 10
# Dex - 1, 99, 50, 10
# Agi - 1, 99, 50, 10
# Int - 1, 99, 50, 10
# I can do more stats, but you get the idea.

# Below this line

  Stats = {}

# Add this:
  Stats[5] = {}
  Stats[5]['hp'] = [0, 1, 99, 500, 150]
  Stats[5]['sp'] = [0, 1, 99, 200, 75]
  Stats[5]['str'] = [0, 1, 99, 50, 10]
  Stats[5]['dex'] = [0, 1, 99, 50, 10]
  Stats[5]['agi'] = [0, 1, 99, 50, 10]
  Stats[5]['int'] = [0, 1, 99, 50, 10]

You just do that for your enemies. Just toy around with the values until you find something you like.
 
the event sound script is awesome, although it would be even better if it allowed the user to add info on the pitch too. Either way im using this for definate. it would work so well for a market place ^_^

Im still worried about moving to SDK 2+ as i'm still using SDk 1.5 scripts, with the main one being action battlers. I have yet to try all my used scripts with the new SDK's (although the idea of using those seperate files for them is pretty cool); but i hope they all work.

Just a quick question on the SDK file things used in your test bed demo. Do these contain all the parts neccessary, so i dont have to worry about what SDK parts are required if i have those SDK data files (RSC hidden files)?

Oh and im realy happy to see a fix on the quick treasure chest script and the additon of a worldmap teleporter (although you didnt provide an event to activate the world map, i created an event anyways and was surprised how easy it was to call it although im a little confused on how to toggle the auto scroll mode).

However, when im using the manual mode on the world map, when i reach the edge of the screen, the world map does not scroll :(

Anyways, im pretty excited about implementing the world map script, especially since it allows for multiple world maps :D

thanks again. ^_^
 

Deebs

Sponsor

SephirothSpawn;253758 said:
If you can give me some exact setup to what you are looking for for enemies stats to be, I can give you some sample setup.

If you need the curve generator setup, click me

For example:
Code:
# We will use the point slope formula for the enemy stats since its just simple
# Point Slope (Type : 0) (Args : min_level, max_level, start value, inflation)


# Enemy 5
# Hp - Min Level : 1, Max Level : 99, Start Value : 500, Inflation : 150
# Sp - 1, 99, 200, 75
# Str - 1, 99, 50, 10
# Dex - 1, 99, 50, 10
# Agi - 1, 99, 50, 10
# Int - 1, 99, 50, 10
# I can do more stats, but you get the idea.

# Below this line

  Stats = {}

# Add this:
  Stats[5] = {}
  Stats[5]['hp'] = [0, 1, 99, 500, 150]
  Stats[5]['sp'] = [0, 1, 99, 200, 75]
  Stats[5]['str'] = [0, 1, 99, 50, 10]
  Stats[5]['dex'] = [0, 1, 99, 50, 10]
  Stats[5]['agi'] = [0, 1, 99, 50, 10]
  Stats[5]['int'] = [0, 1, 99, 50, 10]

You just do that for your enemies. Just toy around with the values until you find something you like.

Ah, thank you! This is quite helpful already, though I still do have questions that I hope that you may be able to answer for me. If you do not have the time to answer them, once again I understand.

Here are my questions:
1. Is that curve generator you just linked to required for this script to function properly, or does it add any benefits to this script? As I mentioned before, I'm not a scripter so please forgive me ignorance.
2. As you asked for a more exact set up, how would one, for example, do the statistics for the default RTP ghost and basalisk*- using their default statistics and giving them a medium ... er... experience curve, I suppose you'd call it. As in not a steep change from level to level but not an overly gentle one, a happy middle.
3. what does the 5 in "Stats[5]" signify? Everything else I can pretty much understand (or I think I do). Actually, let me tell you how I understand it just in case I have it wrong:

[0, 1, 99, 500, 150]
For the HP, the 1 means minimum or base level, the 99 means the highest level the monster can reach, 500 is it's base health, 150 is by how much it's health will increase per level. I don't know what the 0 signifies, if anything.

4. Using this script, does every monster in the database require an entry like the one you demo'd in the script, or...? I'd assume not, seeing as their is a tidbit of script mentioning defaults, as well as another mentioning listing monsters not effected by the script.
5. How does this script interact with the values entered in the monster database? I assume in cases where the script is asked to ignore certain monsters that the database statistics are then used, but what of for monsters that have entries in the script about them? Do their database statistics factor in at any time or is it all done by the script?

Anyway, I believe I've asked more then enough questions now. Thank you for your helpfulness so far, I greatly appreciate it.

*I ask for two as I wish to see the difference between the two monsters and how they would be listed in the script.
 
Mr.Seph. im going to say this with all the respect of the world..:)

What happen to the Famous Ocarina Player and the Most waiting script Map Object Manager?? (in the beta you say that these will be released)...
(i cant sleep all the elapsed time between the TB3 and 4...;))

Its only a question from This server.:)
______________________________

in any case, Great work with the test bed, and i'll waiting for all your releases and updates.!

Good Luck!
 
the event sound script is awesome, although it would be even better if it allowed the user to add info on the pitch too. Either way im using this for definate. it would work so well for a market place

Im still worried about moving to SDK 2+ as i'm still using SDk 1.5 scripts, with the main one being action battlers. I have yet to try all my used scripts with the new SDK's (although the idea of using those seperate files for them is pretty cool); but i hope they all work.

Just a quick question on the SDK file things used in your test bed demo. Do these contain all the parts neccessary, so i dont have to worry about what SDK parts are required if i have those SDK data files (RSC hidden files)?

Oh and im realy happy to see a fix on the quick treasure chest script and the additon of a worldmap teleporter (although you didnt provide an event to activate the world map, i created an event anyways and was surprised how easy it was to call it although im a little confused on how to toggle the auto scroll mode).

However, when im using the manual mode on the world map, when i reach the edge of the screen, the world map does not scroll

Anyways, im pretty excited about implementing the world map script, especially since it allows for multiple world maps

thanks again.

Check the SDK instructions in the SDK topic. You just need the Hidden RSC Files folder and the SDK rsc file. You just need the Require SDK script that you see in the test bed.

I will look at the world map teleporter and work out some instructions for it.

Here are my questions:
1. Is that curve generator you just linked to required for this script to function properly, or does it add any benefits to this script? As I mentioned before, I'm not a scripter so please forgive me ignorance.
2. As you asked for a more exact set up, how would one, for example, do the statistics for the default RTP ghost and basalisk*- using their default statistics and giving them a medium ... er... experience curve, I suppose you'd call it. As in not a steep change from level to level but not an overly gentle one, a happy middle.
3. what does the 5 in "Stats[5]" signify? Everything else I can pretty much understand (or I think I do). Actually, let me tell you how I understand it just in case I have it wrong:

[0, 1, 99, 500, 150]
For the HP, the 1 means minimum or base level, the 99 means the highest level the monster can reach, 500 is it's base health, 150 is by how much it's health will increase per level. I don't know what the 0 signifies, if anything.

4. Using this script, does every monster in the database require an entry like the one you demo'd in the script, or...? I'd assume not, seeing as their is a tidbit of script mentioning defaults, as well as another mentioning listing monsters not effected by the script.
5. How does this script interact with the values entered in the monster database? I assume in cases where the script is asked to ignore certain monsters that the database statistics are then used, but what of for monsters that have entries in the script about them? Do their database statistics factor in at any time or is it all done by the script?

Anyway, I believe I've asked more then enough questions now. Thank you for your helpfulness so far, I greatly appreciate it.

*I ask for two as I wish to see the difference between the two monsters and how they would be listed in the script.

1. Yes, the curve generator is required, but the curve generator is included in the MACL, so all you need is the 2.1 version or the MACL.
2. You could more or less just use the point slope formula (this script randomizes stats, so it would still be unique stats). You just need to come up with a decent base value and growth value per level. Just try out values. If you have exact numbers and don't know how to set them up, I can show you how, but I don't know the values myself. It all depends on your stats in your game.
3. The [5] chooses the enemy. Stats[enemy_id] = {} followed by lines with Stats[enemy_id]['stat'] = curve_data is just a simple way to modify them. The 0 is just the first value passed to the curve generator, which is the curve type (there are 3 types).
4. Yes, you need to specify each enemy or create a default to the Stats hash. I am going to make a copy and paste addition that gives an easy setup for the default enemies. I will add this in tomorrow's release, but it is just going to be for the default database.
5. It doesn't effect the stats in the database, just ignores them. You can still read them, but the stats are ignored completely unless you set them as an enemy that isn't effected by this script.

Mr.Seph. im going to say this with all the respect of the world..

What happen to the Famous Ocarina Player and the Most waiting script Map Object Manager?? (in the beta you say that these will be released)...
(i cant sleep all the elapsed time between the TB3 and 4...)

Its only a question from This server.
______________________________

in any case, Great work with the test bed, and i'll waiting for all your releases and updates.!

Good Luck!

They are all on my to do list. I have a huge to do list, and I just haven't had the time to finish and update all these scripts and the SDK and MACL. This is why I am doing weekly small updates weekly now, because those are pretty well updated to the point where they need to be. No more long waits for everyone, but no major huge releases like this one. My goal will be update fix all bugs reported weekly, and releasing new or updating 3 or 5 old scripts a week, depending on the degree of difficulty of the scripts. This was my original plan, but with constant updating of the SDK and MACL, I couldn't do this.

So anyways, I am going through and organizing the 500 files in my to do folder, and getting up a list of everything I still have to do. So much to do, so little time.

Sorry if I told you I was going to have a script in this version and it isn't here. My original goal was to have this have a lot more scripts than what it does, but with a crazy personal life, that just hasn't been possible for me. I will get to them eventually, it just might take a while.
 
I have found a (sort of?) error, which I figured on fixing myself...(Yeah...finally, i am learning to script...just a little tho...lol:p)

In the Party Switcher screen, which is not the quick switcher but the one that shows stats and such...well in the middle the window shows the character, his/her class, level and exp...but I figured out a problem...if the characters name and class name are too big, they overlap each other...so i fixed the problem myself (For my game...) by changing part of the script a tid bit...

And here is the code I changed....


Code:
#---------------------------------------------------------------------
# * Draw Actor Information
#---------------------------------------------------------------------
  def draw_actor_information(actor, y)
    # If Nil Actor
    if actor.nil?
      # Sets Font
      self.contents.font.color = disabled_color
      # Draws Empty Sprite
      self.contents.draw_anim_sprite(0, y, 48, 64, 
        Game_Party::EmptySlot_CharacterFile, 0)
      # Draws Empty Postition Text
      self.contents.draw_text(32, y, 256, 64, Game_Party::EmptySlot_Word, 1)
      return
    end
    # Sets Font
    self.contents.font.color = normal_color
    # Draws Actor Sprite
    self.contents.draw_anim_sprite(0, y, 48, 64, actor.character_name,
      actor.character_hue)
    # Draws Actor Name, Class & Level
    self.contents.draw_text(48, y, 224, 32, actor.name)
    self.contents.draw_text(92, y, 224, 32, 
      "#{actor.class_name}", 1)
    self.contents.draw_text(48, y+24, 250, 32, 
      "Level - #{actor.level}", 1)
    # Draws Actor Experience
    self.contents.font.color = system_color
    self.contents.draw_text(48, y + 32, 224, 24, 'Exp')
    self.contents.font.color = normal_color
    self.contents.draw_text(48, y + 32, 224, 24, actor.exp_s, 2)
    l, c, n = actor.last_exp, actor.exp, actor.next_exp_s.to_i
    self.contents.draw_slant_bar(138, y + 56, (c - l), (n - l), 128, 6)
  end

But the part I chaged is located at this spot...
Code:
    # Draws Actor Name, Class & Level
    self.contents.draw_text(48, y, 224, 32, actor.name)
    self.contents.draw_text(92, y, 224, 32, 
      "#{actor.class_name}", 1)
    self.contents.draw_text(48, y+24, 250, 32, 
      "Level - #{actor.level}", 1)

All I did was change the position of the Actor Level by lowering it down to be right above the Exp bar...then I tryed to do a centering of the Class Name, and so far it works wonderfully:D...but tell me if anything should be fixed....and I do hope this helps out your script...

Anyways, I am off to do more work...;)

AoW-Nitewraith
 
question about the quick treasure chest list...

it does not seem to be adding up the items correctly...

I made a test and put in for about a total of 16 max items...
1st test is gold and 2 items with a guaranteed chance and random number...

items gained
gold gained (random number)
items 1
items 2

ok that works perfectly...

now for my weapon chest and armor chests this is what it does...

items gained
item 1
item 2

and it does not list anymore... T_T

but in my inventory it has more items than what gets listed is there a way to make the counting fix itself???

Code:
    # Finds Item Max
    list.each do |sub_list|
      if sub_list.is_a?(Hash)
        item_max += sub_list.keys.size
      else
        item_max += 1
      end
    end
    # If Item Max is 0

I am guessing its in this section where it counts the item key size??? I just have no idea what to look for T_T

I thought I would use this script for like finding berries in bushes XD where you would get so many of different types or none at all its just that it shows just 2 items for me... and if I make it do items armors and weapons in 1 script it does 4 items for me... so I was wandering what I could change to make it show them all...


ok also I was playing around in the test bed earlier and went to use a potion this is the error I got

Script 'Enhanced Item Parameters' line 87:NoMethodError occured.
undefined method 'item_effect[ for #<rpg::item:0x6201908>

thats the potion item for the quick treasure chest...

I am guessing its not supposed to have an status effect like increasing maxhp or that stuff... thought I would say something just incase its really important I am probably not gonna use that script though even though an item that increases tons of stats might be nice...


I have decided that I am gonna make goodie bag items XD and put your quick treasure chest item to some annoyingly fun use XD random goodie bags of random candy and ammounts or random weapons XD

or you could sell the goody bag to the shop and get a decent amount of money??? if its found somewhere or shops could sell goody bags... hmm I love this XD your quick treasure chest script can be used for so many things XD

but I got 1 question... ok I want to make different types of goody bags... but I want to put it into 1 common event script... how would I get the goodybag id and load a list of items for that id without more than 1 event... hmm maybe I have to learn lots more scripting and make a rgs script to do it... that way I could store the items and stuff almost the same way you do in your quick treasure script... T_T I wish I was not such an idiot XD
 

Deebs

Sponsor

SephirothSpawn;254602 said:
1. Yes, the curve generator is required, but the curve generator is included in the MACL, so all you need is the 2.1 version or the MACL.
2. You could more or less just use the point slope formula (this script randomizes stats, so it would still be unique stats). You just need to come up with a decent base value and growth value per level. Just try out values. If you have exact numbers and don't know how to set them up, I can show you how, but I don't know the values myself. It all depends on your stats in your game.
3. The [5] chooses the enemy. Stats[enemy_id] = {} followed by lines with Stats[enemy_id]['stat'] = curve_data is just a simple way to modify them. The 0 is just the first value passed to the curve generator, which is the curve type (there are 3 types).
4. Yes, you need to specify each enemy or create a default to the Stats hash. I am going to make a copy and paste addition that gives an easy setup for the default enemies. I will add this in tomorrow's release, but it is just going to be for the default database.
5. It doesn't effect the stats in the database, just ignores them. You can still read them, but the stats are ignored completely unless you set them as an enemy that isn't effected by this script.

Thank you, you've really helped me quite a bit, and I happily await the new version of the script! Thanks, again!
 
@AoW-Nitewraith: Haha. Not so much of a bug as personal prefrence on appearance. I personally don't like the screen, because the bar is so far spaced away from everything else. It all depends on your style. I keep everything spaced evenly.

@wsensor: What is your exact call script? You may have erased the hash key/value pairs which is causing the error.

@Deebs: Sure thing. I might make a little addon, that reads the values from the database as base values, and you just need to give them growth values. That should make things workable for people who don't like over-complexing things like me. I just like to give you options. 8-)
 

Deebs

Sponsor

SephirothSpawn;254923 said:
@Deebs: Sure thing. I might make a little addon, that reads the values from the database as base values, and you just need to give them growth values. That should make things workable for people who don't like over-complexing things like me. I just like to give you options. 8-)

!!!
That'd be a *fantastic* add-on! I greatly appreciate the work you put in for folks.
 
@ SephirothSpawn: well, i try to help out as much as possible...lol...I just thought maybe the overlapping text was a little issue someone else may have wanted changed...and it also increased my limited knowledge of scripting a tid bit more...
 
Hello again...i found a fault in the Multiple languajes, the knows letter will not display, i agree the faults (i take for the TB3). and with this fixes now.
Code:
#==============================================================================
# ** Multiple Languages
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 2.1
# 2007-03-02
# SDK : Version 2.0+, Part I & III
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1 ---------------------------------------------------- (2005-09-04)
#    - Note : 99% of the System Created By Makeamidget
#   Version 2 ---------------------------------------------------- (2006-08-27)
#    - Update : Rescripted Entire System System
#    Version 2.1 ------------------------------------------------- (2007-03-02)
#     - Update : Updated to SDK 2.0
#------------------------------------------------------------------------------
# * Description :
#
#   This script was designed to let you simulate multiple languages through
#   letter transfers. It allows you to transfer one letter to another, until
#   you learn the letter (One Letter = Another Letter). You can set up
#   multiple languages and control color of known and unknown letters for
#   each language.
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place The Script Below the SDK and Above Main.
#
#   Turning on Different Language:
#    - $game_languages.language_id = language_id
#
#   Turning off multiple langauges:
#    - $game_languages.language_id = nil
#
#   To Learn a letter, use:
#    - $game_languages.learn_letter(language_id, 'letter')
#
#   ** NOTE: Due to the complexity of message systems, you cannot use special
#   commands such as the show gold window when displaying an alternate language
#------------------------------------------------------------------------------
# * Setting Up A Language
#
#   Setting Color for Known and Unknown letters
#    - Known_Letter_Color = {language_id => text_color, ...}
#    - Unknown_Letter_Color = {language_id => text_color, ...}
#
#   Setting Up Language Table
#    - Languages = {language_id => <language_table>, ...}
#
#   <language_table> is a hash of all letters and symbols that will transfer
#   to something else. The keys are what the letter is, and the values are
#   how the letters will appear until translated.
#
#   Example:
#    {'a' => 'j', 'b' => 'k', 'c' => 'l', 'd' => 'm', 'e' => 'n'}
#
#    CbaEBac -> LkjNKjl
#------------------------------------------------------------------------------
# * Credits :
#
#   Thanks To Makeamidget For helping me with previous versions
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Multiple Languages', 'SephirothSpawn', 2.1, '2007-03-02')
SDK.check_requirements(2.0, [3]) 

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.enabled?('Multiple Languages')

#==============================================================================
# ** Game_Languages
#==============================================================================

class Game_Languages
  #--------------------------------------------------------------------------
  # * Letter Colors
  #
  #  ~ language_id => text_colors
  #
  #  The Text Colors are the colors you would use when you use \c[n].
  #  By Default, these are the colors:
  #
  #  0 : White            1 : Dark Blue
  #  2 : Red              3 : Green
  #  4 : Light Blue       5 : Purple
  #  6 : Yellow           7 : Gray
  #--------------------------------------------------------------------------
  Known_Letter_Color = {
    1 => 0
  }
  Unknown_Letter_Color = {
    1 => 6
  }
  #--------------------------------------------------------------------------
  # * Language Tables
  #
  #  ~ language_id => {a => 'f', 'b' => 'c', ...}
  #
  # * Template For Letters
  #  = {'a' => '', 'b' => '', 'c' => '', 'd' => '', 'e' => '',
  #     'f' => '', 'g' => '', 'h' => '', 'i' => '', 'j' => '',
  #     'k' => '', 'l' => '', 'm' => '', 'n' => '', 'o' => '',
  #     'p' => '', 'q' => '', 'r' => '', 's' => '', 't' => '',
  #     'u' => '', 'v' => '', 'w' => '', 'x' => '', 'y' => '',
  #     'z' => ''}
  #--------------------------------------------------------------------------
  Languages = {
    1 => {'a' => 'y', 'b' => 'p', 'c' => 'l', 'd' => 't', 'e' => 'a',
          'f' => 'v', 'g' => 'k', 'h' => 'r', 'i' => 'e', 'j' => 'z',
          'k' => 'g', 'l' => 'm', 'm' => 's', 'n' => 'h', 'o' => 'u',
          'p' => 'b', 'q' => 'x', 'r' => 'n', 's' => 'c', 't' => 'd',
          'u' => 'i', 'v' => 'v', 'w' => 'f', 'x' => 'q', 'y' => 'o',
          'z' => 'w'
    }
  }
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :language_id
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @language_id = nil
    @known_letters = {}
    @known_letters.default = []
  end
  #--------------------------------------------------------------------------
  # * Learn Letter
  #--------------------------------------------------------------------------
  def learn_letter(language_id, letter)
    unless @known_letters.has_key?(language_id)
      @known_letters[language_id] = [] 
    end
    unless @known_letters[language_id].include?(letter.downcase)
      @known_letters[language_id] << letter.downcase
    end
  end
  #--------------------------------------------------------------------------
  # * Change To Language
  #--------------------------------------------------------------------------
  def change_to_language
    return_text = ''
    text = $game_temp.message_text
    last_color = 0
    begin
      while ((c = text.slice!(/./m)) != nil)
        if @known_letters.has_key?(@language_id)
          if @known_letters[@language_id].include?(c.downcase)
            next_color = Known_Letter_Color[@language_id]
            unless next_color == last_color
              last_color = next_color
              return_text += '\c' + "[#{next_color}]"
            end
            return_text += c
            next
          end
        end
        if Languages[@language_id].include?(c.downcase)
          if c.upcase == c
            c = Languages[@language_id][c.downcase].upcase
          else
            c = Languages[@language_id][c]
          end
        end
        next_color = Unknown_Letter_Color[@language_id]
        unless next_color == last_color
          last_color = next_color
          return_text += '\c' + "[#{next_color}]"
        end
        return_text += c
      end
    end
    $game_temp.message_text = return_text
  end
end

#==============================================================================
# ** Window_Message
#==============================================================================

class Window_Message
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_gmlngs_wdmsg_refresh, :refresh
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # If Alternate Languages Isn't Nil
    unless $game_languages.language_id.nil?
      $game_languages.change_to_language
    end
    # Original Method Refresh
    seph_gmlngs_wdmsg_refresh
  end
end

#==============================================================================
# ** Scene_Title
#==============================================================================

class Scene_Title
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_gmlngs_scnttl_cnggd, :commandnewgame_gamedata
  #--------------------------------------------------------------------------
  # * Command : New Game - Game Data
  #--------------------------------------------------------------------------
  def commandnewgame_gamedata
    # Original Command New Game
    seph_gmlngs_scnttl_cnggd
    # Creates Game Languages Game Data
    $game_languages = Game_Languages.new
  end
end

#==============================================================================
# ** Scene_Save
#==============================================================================

class Scene_Save
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_gmlngs_scnsave_wd, :write_data
  #--------------------------------------------------------------------------
  # * Write Data
  #--------------------------------------------------------------------------
  def write_data(file)
    # Original Write Data
    seph_gmlngs_scnsave_wd(file)
    # Saves Game Languages Data
    Marshal.dump($game_languages, file)
  end
end

#==============================================================================
# ** Scene_Load
#==============================================================================

class Scene_Load
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias_method :seph_gmlngs_scnload_rd, :read_data
  #--------------------------------------------------------------------------
  # * Read Data
  #--------------------------------------------------------------------------
  def read_data(file)
    # Original Write Data
    seph_gmlngs_scnload_rd(file)
    # Saves Game Languages Data
    $game_languages = Marshal.load(file)
  end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

I make this to help you to make the testbed greater!!..
(i wait this not angry you..XD)

#--------------------------------------------------------------------------
attr_accessor :language_id
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@language_id = nil
@known_letters = {}
@known_letters.default = []
end
#--------------------------------------------------------------------------
# * Learn Letter
#--------------------------------------------------------------------------
def learn_letter(language_id, letter)
unless @known_letters.has_key?(language_id)
@known_letters[language_id] = []
end

unless @known_letters[language_id].include?(letter.downcase)
@known_letters[language_id] << letter.downcase
end
end

I agree the red lines...:thumb:

Gbye!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top