The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Code Library => Topic started by: O Ilusionista on January 30, 2015, 01:04:58 pm

Title: Creating specific characters winquotes
Post by: O Ilusionista on January 30, 2015, 01:04:58 pm
First, you have to give a set of quotes to your char, like this:

[quotes]
victory1= "Fight ya absolute best, or don't fight at all!"
victory2 = "Don't get in my way again!"
victory3 = "Better luck next time, loser!"
victory4 = "Never get in my way!"
victory5 = "I'm Killer Croc! This brain ain't for fryin'!"
victory6 = "Ain'tcha heard? Crocodiles got real tough hide! But you... you got nowhere t'hide... "
victory7 = "Croc isn't going to the Arkham Asylum 'Zoo' Again"

Then, check the sctrl "VictoryQuote": http://elecbyte.com/mugendocs/sctrls.html#victoryquote (http://elecbyte.com/mugendocs/sctrls.html#victoryquote)

Lets imagine that I want to use "victory7" every time my character beats Batman. I need to add this code at the win states (well, it works in any other state):

Quote
[State 0, VictoryQuote]
type = VictoryQuote
trigger1 = p2name="Batman" || p4name ="Batman"
value = 7

The line in green tells against which character this Victory Quote will work. Note that you must use p2name and p4name, so it will detect both players. The operator "||" means OR, so it will trigger if the p2name is batman OR if the p4name is batman.

The value in red is the victory quote index you want to use.

Keep in mind: if you want to trigger a character called "Batman", it will get the info from the NAME field, and not the DISPLAYNAME field, which is what you see on the fights:

name = "TAS Batman"
displayname = "Batman"

In the case above, the trigger will fail, because the p2 name is TAS Batman, and not Batman.

You can use authorname and any other trigger you want to. One cool usage would be to set a different victory quote if haven't lose any round, or if it was a tough match :)
Title: Re: Creating specific characters winquotes
Post by: ELECTR0 on January 30, 2015, 05:35:01 pm
Thanks for the tutorial! I had no idea you could call upon the quotes. One question though, is it possible to not call upon a certain quote because I don't want to be fighting someone else and they say something about Batman?
Title: Re: Creating specific characters winquotes
Post by: O Ilusionista on January 30, 2015, 06:00:36 pm
Sure you can. Its just a matter of organize your quotes. For example, you can give a set of common quotes (from 1 to 6 here) and do this:

Quote
[State 0, VictoryQuote]
type = VictoryQuote
trigger1 = !time
value = 1+random%6

1+random%6 equals to 1 plus a random number out of 6 possible values (remember that it starts at 0, so the numbers are 0,1,2,3,4,5 only, 6 is not included. To make it easier to understand, its like to take 1 from the given value)

You code the special quotes using an index greater than 6:

Quote
[State 0, VictoryQuote]
type = VictoryQuote
trigger1 = p2name="Batman" || p4name ="Batman"
value = 7

Then you add the common quotes. Note: the specific quote should come BEFORE the normal ones.

Quote
[State 0, VictoryQuote]
type = VictoryQuote
trigger1 = !time
value = 1+random%6
Title: Re: Creating specific characters winquotes
Post by: R565 on January 30, 2015, 06:18:51 pm
That is really interesting....I didn't know that myself.
Title: Re: Creating specific characters winquotes
Post by: ELECTR0 on January 30, 2015, 10:06:33 pm
Yea that worked out good. I just had to place my code for certain players above the random code so it would fire first. I was a retard the first few times I tried it and kept getting my random quote LoL. :dizzy2: Thanks again!

[State -2, VictoryQuote]
type = VictoryQuote
trigger1 = p2name="Blackout" || p4name ="Blackout"
value = 13

[State -2, VictoryQuote]
type = VictoryQuote
trigger1 = !time
value = 1+random%10
Title: Re: Creating specific characters winquotes
Post by: XGargoyle on January 30, 2015, 10:28:55 pm
You should mention that this is only applicable to Mugen 1.0 and 1.1.

A character that has a type = VictoryQuote sctrl will crash if you use it in Winmugen.

So if you are using the VictoryQuote controller, ensure that you either do separate DEF files for winmugen  and 1.0/1.1, or that you clearly indicate to the players how to disable the controllers in WinMugen
Title: Re: Creating specific characters winquotes
Post by: O Ilusionista on January 31, 2015, 12:58:48 am
Quote
Yea that worked out good. I just had to place my code for certain players above the random code so it would fire first.
oh my it was my fault. yeah, the specific quote must come before the random ones. Fixed.

Quote
You should mention that this is only applicable to Mugen 1.0 and 1.1.
I've linked the 1.0 version of the manual and this is something which were implemented in 1.0. People should at least read the manual to work with mugen :)