Help with TheoAllen's Yanfly Victory Aftermath Addon

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
http://www.rpgmakervxace.net/topic/23744-yea-dynamic-victory-aftermath-addon/


I might sound stupid here, but I've been trying to get this script to work for a very long time, but with no luck. The notetags don't work at all and instead do the default Yanfly quotes.


Does anyone know how to use this script? If so, please explain it to me. Forgive me for being so incompetent with scripts.

  How to use :
  Put this script below Yanfly Victory Aftermath
  These are notetag you could use
  
  <win: Constant>
  <level: Constant>
  <drops: Constant>
  
  Constant is a constanta name you define below this editable area. The
  explanation is written down below
First of all, I don't understand what this means. Does that mean I replace the word constant with the quotes? Is constant like a x thing where you replace x with the string? That alone is confusing.


Then down below, when it gives the format for making new quotes...

  # Quote = [
  # ["face_name", face_index, "text","condition"],
  # ]
  #
  # Explanation :
  # Quote >> Constanta name you call it in notetag. The first letter have to
  #          be capitalized. For example, you add the Ralph_Win, then the
  #          notetag parameter would be <win: Ralph_Win>
  # face_name >> Faceset name that will be used. Just leave it empty if you
  #              want to use the currently used actor faceset
  # face_index >> Faceset index. From the top-left corner till bottom right 
  #               corner is around 0 - 7
  # text >> Texts which will be displayed in victory aftermath. Add \n if
  #         you want to separate the line
  # condition >> Script eval condition. If you want to display the quote 
  #              despite in any conditions, just write "true"
  # =============================================================


It still doesn't tell me what I'm supposed to do with the <win: Constant> notetag things and stuff. Even when I paste the example quotes from the script into my actors' noteboxes, it still does the Yanfly default quotes. I suspect it's because I'm not doing whatever the  <win: Constant> part is supposed to do, but it doesn't explain it, it doesn't even include it in the quotes (which are otherwise fully formatted). I then tried a whole bunch of different placements for the "constant" notetags, and all the combinations I tried either do nothing or make the game crash. Specifically, when it crashes, it says "uninitialized constant," what does that mean?
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
# Quote >> Constanta name you call it in notetag. The first letter have to
# be capitalized. For example, you add the Ralph_Win, then the
# notetag parameter would be <win: Ralph_Win>


All the big arrays you see (which contain the smaller arrays with the quote settings) are named in the script (Stella_Quotes, Stella_Level, Lunar_Level, and so on).


You can create as many big arrays as you like with any name you like, just follow the same format as the sample settings.


So, the name of the big array is what you should use in the note-tags.


You will need at least a basic coding knowledge (in the Ruby language, more specifically, in RGSS3) to make valid condition codes in your settings thou.
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
So does that mean I put the quotes into the script itself, replacing the samples? 
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
Here is an example:


You can add this into the script, where you see the other settings (in Theo's sscript):


Example_Quotes = [
["People1", 2, "This can be displayed always, yay!","true"],
["People1", 3, "Erm, what's wrong with my face? o.o\nAnd this only shows if I own at least 1 potion!","$game_party.has_item?($data_items[1])"],
["Actor1", 0, "Huh, though guys, these monsters!\nAnd this only shows if someone is dead from the party at the end of battle!", "$game_party.alive_members.size < $game_party.battle_members.size"],
]


This shows 3 examples.

  1. The first one can be shown always, because the condition for it is "true". It will show the text "This can be displayed always!" with the 3rd picture from the face image set called "People1". Note that 2 as the face index means the 3rd picture shown on the image, not the 2nd one!
  2. The second one will only show up if the player has at least 1 potion in the inventory at the end of the battle.
  3. The third one will only show up if at least one party member is dead at the end of the battle.

So, with this entered into the script itself, you can now use the following note-tags:


<win: Example_Quotes> # Shows up on the XP gain screen.
<level: Example_Quotes> # Shows up on the level up screen.
<drop: Example_Quotes> # Shows up on the drop screen.


The note-tagged actor will now use the quotes from the 'Example_Quotes' settings from the script.


As you can see, the condition settings do need coding knowledge, because that must be a valid ruby code which either returns true or false, but the rest of the settings are plain text and number settings.


Ohh, and a final interesting thing to know about Yanfly's Aftermath script and the quotes displayed...


You can NOT force a line break with the message code \n if you set up the quote in a single quotation mark ( ' ) ! It must be a double quotation mark ( " ) or else the message box will ignore the line break message code (it will strip the message code from the text, but it will not force the line break).


So, always use a double quotation mark for setting your quote texts up, be it in Yanfly's or Theo's script!
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Thanks a lot, I think I got it, It's working now. 


Just one more question, although I don't know much about coding, just from looking at the examples in the script, I can tell that putting stuff such as "hp_rate <= 0.5" as the condition makes it appear when HP is less than 50%, "hp_rate > 0.5" for when HP is more than 50%, and "$game_troop.turn_count <= 2" makes it show up if the battle took 2 turns or less. But what other kinds of conditions can be added? Is it possible to make it so a quote will only show up if a certain actor was in the active battle party? Or if an actor is a certain class? And is it possible to specify more than one condition?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
The condition settings you enter can be any valid ruby code.


That means you can check for anything you want, without exception, provided you know the methods and syntax to do it.


To check for multiple stuffs at once, you can either make your own methods directly in the classes you want and enter those for conditions, or you can combine already existing ones with logical operators. 


Those are:


&& - Means "and".


Example: "$game_party.battle_members.any? {|m| m.id == 5} && $game_party.dead_members.size < 0"


This would check if actor 5 is in the current battle party AND if there are no dead members at the end of the battle. If any of those conditions are false, the quote will NOT happen.


|| - Means "or".


Example: "$game_party.battle_members.any? {|m| m.class.id == 5 || m.name == 'Ernest'}"


This checks if anyone in the battle party is class 5 OR is named "Ernest". If any of these conditions are true, the quote CAN happen.


Logical "and" got a higher priority than logical "or", so, first the conditions connected with "and" will be checked, and after those the "or" checks happen.


This means that if you want to use more complex checks with multiple conditions, you will have to use brackets to check the conditions in the order you want if needed.


In short, if you want more complex conditions, you will have to learn coding, and you will have to understand how the basic engine works (code-wise).
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Thanks! 


Those basically cover all of the possible conditions I'd ever use for this, except for two of them (I would have asked before but they slipped my mind.)


If I were to make a switch or variable the condition, would it be $game_switches[number] $game_variables[number] respectively? (I'm just guessing.)


And lastly, how would you set an amount of gold you got as a victory spoil as the condition? Like if you got less or more than a certain amount of gold. (definitely something with the > or < signs like with what I saw for the turn ones in the examples which I used for a few of them.)


After that I think I'll be good with the rest of them. 
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
Yes, the switches and variables use that syntax.


For the gold, it should be something like:


$game_troop.gold_total >= 1500 # Checks if you got exactly 1500 or more gold.
$game_troop.gold_total < 100 # Checks if you got less than 100 gold.
$game_troop.gold_total == 5000 # Checks if you got exactly 5000 gold.
$game_troop.gold_total % 7 == 0 # Checks if the amount of gold you got is a multiplier of 7 or not.


I did not test this, but this should be it, I think.
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Alright! Thanks again!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top