Name Detector? (More info in thread)
#1
Before I begin, I would like to thank all those who helped me before for the Runic script. Going smoothly so far, that little bugger.
That said... I came across something interesting when I was trying out this certain "Advanced Message" script which was edited, fixed and enhanced by dubealex.

Basically, doing \n[insert Actor ID here] will allow the text box to write down that character's name even though we can already type said name by ourselves.
And there is doing \name[insert name or word here] will give the name/word in a box which is quite important to me.

So... I was wondering... does a script that allow us RPG Maker XP users to do something like this exist? (Note: I Googled as much as I can and found nothing.)
--------
Scenario...

1: This NPC is named "Baku". Yes, that Baku from Final Fantasy IX. I like to use him for examples.

2: I have installed Leon_Westbrooke's "Party Changer" script. Meaning I can set whoever I want as my leader via events (and the occasional script calling).

3: Now let's say my main character whom I will always use as the leader is named "Tiffany" and her Actor ID is "1" and let's say I have a 2nd in command named "Riona".

4: I type in the text box which is Baku's dialogue like... "Hey, little bugger. Are you \n[1] by any chance?".

Result of #4: As a result, the game will detect it and say "Hey, little bugger. Are you Tiffany by any chance?". Right? That brings me to the main questions from #5 onward.

5: Let's say I decided to CHANGE my main character to Riona in-game and THEN approach to talk to Baku instead of staying as Tiffany.

6: Baku will *unfortunately* stick to the dialogue I gave him as "Hey, little bugger. Are you Tiffany by any chance?" because of the \n[1] command.

Conclusion: As mentioned (if a script is needed to be involved especially), is it possible to have the database detect your main character player changes and change the name accordingly to fit the "new character" taking the position of leader? Thus, the title of this thread, Name Detector.

Do let me know your thoughts whenever, please and thank you.
Reply }
#2
Scriptwise it would be as easy as typing...

$game_variables[VARID] = $game_party.actors[INDEX].name

Then in the message box type \v[VARID] instead of \n[ID].

If my script call is too large, then hit enter right after the equal to symbol and type or paste the rest of the code in the next line.

INDEX is a number starting at 0.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#3
@kyonides
$game_variables[VARID] = $game_party.actors[INDEX].name

Alright. I get the "v\[VARID] instead of \n[ID]" part.
Is "VARID" one of the script commands? Or a character name made up on the spot by you?
Just wanting to make sure I am not going to go wrong here.

Edit: Never mind. I figured out how to use that script call. Thanks, kyonides.
Reply }
#4
Abbrevation of variable ID, while ID stands for actor ID, but it won't be used in my script call, plus INDEX is a position starting at 0, remember a party usually has 4 members so the last position would get 3 as its corresponding index.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#5
@kyonides
Aye, I figured that out via trial and error.
This is what I came up with.

$game_variables[1] =
$game_party.actors[0].name
$game_variables[2] =
$game_party.actors[1].name
$game_variables[3] =
$game_party.actors[2].name
$game_variables[4] =
$game_party.actors[3].name

I guess that means regardless of whoever is in the leadership position, if I use \v[1], that correct person will be speaking.
And using \v[2] results in the 2nd position person in the Caterpillar position doing the speaking and the correct person too,
\v[3] for the 3rd position person and \v[4] for the 4th position person.

Very good script for whom I want to speak at that time with their name displayed even though it's in the large text box itself instead of a small text box on its own which I can do via "\name[Tiffany]" for example.
I think I shall experiment and see whether I can succeed in doing so on my own. If not, cue Terminator's "I'll be back".

Edit: I now attached some images here.
As you can see, doing this "$game_variables[1] = $game_party.actors[0].name" gave me the one that is not in the Name Box (1st image attachment that I wanted): The one with the name "Celes" in the 2nd Image attachment.
The one with the "Tutorial Lenna" is done with "\name[Tutorial Lenna]" which is the 1st image attachment.

I was/am wondering how I am I able to accomplish that.
I tried something like "\v[1] \name[Celes]" or "\name[Celes] \v[1]" and yes, that does work.
But that one is very specific.
Because if I do "\v[1] \name[Terra]" or "\name[Terra] \v[1]", the "\v[1]" part's name goes into the big box and the \name[Terra] part goes into the small box as shown in the 3rd image attachment.

Any way for me to have that "Name Detecting" be scripted into the "Small Box" and not be in the Big one? Thoughts are still greatly welcome.
P.S.: Terra, Celes and Lenna are from FFVI and FV respectively whom I used as name examples to show my issues/references.


Attached Files
.png   Name in small Box.png (Size: 185.67 KB / Downloads: 6)
.png   Name not in small Box.png (Size: 135.8 KB / Downloads: 5)
.png   Different names, different boxes.png (Size: 187.44 KB / Downloads: 8)
Reply }
#6
So you're looking for a means within Dubealex's AMS R4 to:


1) Change/Show the name of the lead party member within dialog instead of using the \n[ index ] system which selects the name of an actor in the database.

2) Change/show the name of the speaker identified in the name box, preferably by a similar means.

You have already understood the way that $game_party.actors[0] can identify the lead party member... with actors[1], [2] and [3] in tow as the additional members therein, so I won't dwell on that.  Also, you can see how to use the Game_Variable class ($game_variables) to accept the name of an actor.

But now you wish to know how to substitute the name within the name box itself.   The technique is almost the same.  It's a matter of syntax, which you can see in the screenie I attached ... which also includes Kyonides's previously described solution for your first inquiry.

\name [ \v[id] ]

[Image: attachment.php?aid=970]

I doubled up and used two sets of $game_variables when only one was needed. I was thinking of setting the 2nd variable to have the reply of 'NO, I'm ****" instead.



.jpg   textoption.jpg (Size: 21.79 KB / Downloads: 26)
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#7
@DerVVulfman

Interesting. I'll give that one a go and give a post edit update whether it works or not.
Reply }
#8
No prob.

Oh, and moved to 'code support' as this topic is geared towards understanding or getting around the nuances of a script rather than crafting a whole new one.

Edit: You're less 'justpassingby' and more 'justhangingaround' Winking
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#9
Just like Kamen Rider: Decade then. Grinning

That aside, it worked. Once again, I thank both you and Kyonides. Another issue solved.
Though there is one off topic problem and that is Liz's Autosave.save script. Each time if players want to load their Autosave file instead of their main file, it crashes on me.
But that is a problem for another time. I'll try solving that on my own.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   The Self Data Suite support thread PK8 0 3,731 07-18-2015, 09:41 PM
Last Post: PK8
   [RUBY] Depack Thread Problem Narzew 1 4,453 07-20-2012, 01:16 PM
Last Post: Narzew



Users browsing this thread: 1 Guest(s)