[VXACE] [Yanfly:Aftermath] Request for Language-variable

Status
Not open for further replies.

sebulon

Villager
Member
Joined
Nov 10, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMVXA
Hi, I am using the Yanfly Engine Ace - Victory Aftermath v1.04

I want to translate my chosen victory quotes. Depending on the game's variable 10 (0 = GER, 1 = ENG, ...), I'd like to give different victory quotes.
I figured, it would be easiest to create
VICTORY_QUOTES for var10 = 0 and VICTORY_QUOTES_ENG for var10 = 1, and so on.

Now I'm looking for a way to rescript the part where the quotes are being grapped.
I figure that happens around line 365
So my thought was something along the lines of:

if $game_variables[10] = 0 then
quotes = ...::VICTORY_QUOTES
end;
if $game_variables[10] = 1 then
quotes = ...::VICTORY_QUOTES_ENG
end;

Doesn't work, though. I'd be happy for some advice ... :)
Kind regards!
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
'Scripts' is where people who have written completed scripts that they want to share with others can post them.
[move]RGSSx Script Support[/move]
Please edit your opening post to remove Yanfly's script. His terms expressly forbid reposting of any of his scripts. Instead give a link to the web page where that script can be found.

Thanks.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Problem with that is, the victory quotes are loaded when the game starts up.
For example, you start a new game. The game would load all database, read notetag. And the victory quotes are saved, and it wont change. Simply changing variable wont refresh the loaded victory quotes. You have to refresh it.

However, in my game, I managed to create dual language that change the victory quotes. But it also offers some features that you might not want / request it. I could give you the script for you to learn, but how far you understand Ruby/RGSS3? Because my script structure is kinda unusual and I believe some people could have a hard time reading it.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
Short of rewriting the script to have it check for a variable and load notetags based on what the variable is set to, I would maybe suggest that you have multiple actors, and when the player requests german then you specify a specific set of characters to control, when they select english a different set.
So you would basically have two of every character (if you only had english and german) each one would then have their victory quotes written as per the script in the language for the character.

The rewriting of the script would have to done by adding options for the other languages
Code:
module YEA
  module REGEXP
  module BASEITEM
    
    NEW_QUOTE = /\[(?:NEW_QUOTE|new quote)\]/i
    
    WIN_QUOTE_ON    = /<(?:WIN_QUOTES|win quote|win quotes)>/i
    WIN_QUOTE_OFF   = /<\/(?:WIN_QUOTES|win quote|win quotes)>/i

    WIN_QUOTE_GER_ON    = /<(?:WIN_QUOTES_GER|win quote ger|win quotes ger)>/i
    WIN_QUOTE_GER_OFF   = /<\/(?:WIN_QUOTES_GER|win quote ger|win quotes ger)>/i

    LEVEL_QUOTE_ON  = /<(?:LEVEL_QUOTES|level quote|level quotes)>/i
    LEVEL_QUOTE_OFF = /<\/(?:LEVEL_QUOTES|level quote|level quotes)>/i
    DROPS_QUOTE_ON  = /<(?:DROPS_QUOTES|drops quote|drops quotes)>/i
    DROPS_QUOTE_OFF = /<\/(?:DROPS_QUOTES|drops quote|drops quotes)>/i
    
  end # BASEITEM
  end # REGEXP
end # YEA
Code:
class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :win_quotes
  attr_accessor :level_quotes
  attr_accessor :drops_quotes

  attr_accessor :win_quotes_ger
  attr_accessor :level_quotes_ger
  attr_accessor :drops_quotes_ger
 
  #--------------------------------------------------------------------------
  # common cache: load_notetags_va
  #--------------------------------------------------------------------------
  def load_notetags_va
    @win_quotes_ger = [""]
    @level_quotes_ger = [""]
    @drops_quotes_ger = [""]

    @win_quotes = [""]
    @level_quotes = [""]
    @drops_quotes = [""]
    @victory_quote_type = nil
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
     if $game_variables[xx] = 0
      when YEA::REGEXP::BASEITEM::WIN_QUOTE_ON
        @victory_quote_type = :win_quote_ger
etc...

Haven't tried this, but in my mind it is the way it would have to go. Others that know more about ruby could maybe provide a better solution.
 

sebulon

Villager
Member
Joined
Nov 10, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMVXA
However, in my game, I managed to create dual language that change the victory quotes. But it also offers some features that you might not want / request it. I could give you the script for you to learn, but how far you understand Ruby/RGSS3? Because my script structure is kinda unusual and I believe some people could have a hard time reading it.
Hi, TheoAllen! I'd like to have a look at your script for sure. :) Not an experienced scriptkid but I dabble and more things to learn is always good.

I have been using the Language File System Version 1.4.1 by DerTraveler in order to create external files to read the appropriate dialoges from. They do not need to refresh, somehow ... so I hoped that there would be a possibility with said Yanfly-Script.
hmm.

So you would basically have two of every character (if you only had english and german) each one would then have their victory quotes written as per the script in the language for the character.
Hi, Roninator2 ... I'll think about that.

Thank you both!
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Firstly, you need to have this https://www.rpgmakercentral.com/topic/23744-yea-dynamic-victory-aftermath-addon/
It's my script that allows you to have victory quotes based on condition. Also you can change the face. Up to this point, you can actually use that feature for dual language. For example, making the quotes appear when a variable has a certain value.

If, however you decide to use the condition feature for something else and you ended up having too many quotes, and you want an easy replacement. Use this https://github.com/theoallen/RGSS3/blob/master/Untranslated/Dual VA.rb

The script above was never made in public though, and it only support 2 languages so far, but if you can write a script, feel free to modify my code. But before you do that, try to understand my code. Ask me anything about it.
 

sebulon

Villager
Member
Joined
Nov 10, 2017
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMVXA
That was swift and helpful! I used TheoAllen's Addon and it works like a charm!
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,972
Members
137,561
Latest member
JaCrispy85
Top