Jump to content

Recommended Posts

Z12 : Automatic Nameboxes

 

287j24l.png

 

Not much to say about this script. It's simple, effective, and best of all (unlike most message systems) you do not need to worry about adding the names manually every message event. Edit the module, and your done!

Edited by Zetu

Share this post


Link to post
Share on other sites

Nice script! Too bad that the game where I need to use name boxes doesn't use face graphics. Otherwise, I would have used this.

Edited by AABattery

Share this post


Link to post
Share on other sites

I guess the namebox should appear automatically... somehow... It doesn't for me tho and I'm not sure how to "call" it.

So, sorry to ask a properly stupid question, but how do I use this script/module? (I did insert it as a script in the script editor - under "custom scripts" (the section above the last one) or shall I insert it somewhere else?)

Share this post


Link to post
Share on other sites

I guess the namebox should appear automatically... somehow... It doesn't for me tho and I'm not sure how to "call" it.

So, sorry to ask a properly stupid question, but how do I use this script/module? (I did insert it as a script in the script editor - under "custom scripts" (the section above the last one) or shall I insert it somewhere else?)

 

me too :( sorry i'm very new with scripting...what should i edit to put the name according to face name? or how it work, i don't have idea :wacko:

Share this post


Link to post
Share on other sites

I've had quite a few PMs about how to set this up. I thought it was obvious, but I'll show you how it is.

 

Setting up the module:

module Z12

 def self.namebox(faceset, index)
case faceset
when "main"
  case index
  when 0; return $game_actors[1].name
  when 1; return $game_actors[2].name
  when 2; return $game_actors[3].name
  when 3; return $game_actors[4].name
  when 4; return "Fixed Name"
  end
end
return ""
 end

end

 

In the above code, you have a case switch. In it, you have....

case faceset

when "---"

when "---"

when "---"

end

 

Replace the string after when with the name of the face graphic you use.

 

Then, after the line that says when (but before the next one) you will need to place another case switch.

 

case index

when 0; return "---"

when 1; return "---"

end

 

This is where you place the index of the faceset (starting from 0) of the face. So the top left will be 0, the top left is 3, the bottom left is 4, and the bottom right is 7.

 

So if you want the third picture on the top of Actor3 to be called "Willy", you will place...

 

case faceset
when "Actor3"
 case index
 when 2; return "Willy"
 end
end

 

And remeber, you do not have to use a static string. If you want to use an actor's name, you can place $game_actor[iD].name

Edited by Zetu

Share this post


Link to post
Share on other sites

Sweet, thank you very much for helping us. Now I got one flaw/error tho..

module Z12

 def self.namebox(faceset, index)
case faceset
when "Actor4"
  case index
  when 0; return $game_actors[1].name
  when 1; return $game_actors[2].name
  when 2; return $game_actors[3].name
  when 3; return $game_actors[4].name
  end
end
case faceset
when "People3"
  case index
  when 2; return "Ella"
  end
end
return ""
 end

end

That's the code I'm using. Alright, now I have an event NPC.. NPC is saying stuff with its faceset (People3, 2) and the name gets displayed (Ella). After the NPCs text I have another "Display Text" with the main/first character saying something, also with his faceset (Actor4, 0 - first face). But instead of his name (actor1) the name of actor 3 gets displayed (probably because the index of that name is 2, from the earlier text). While typing this I just got an idea tho.. In "case index", can index be anything or does it have to be index? If it can be anything, might the cause be that there are 2 index cases so VXa just takes the index from the first textbox, which is 2 with the faceset, and keeps that value for the next textbox? (Sorry if that sentence is hard to understand, I'll try to make it more clear) - case index is 2 for the first textbox, value stays the same with the next textbox even when another face (index 0) is chosen.

Share this post


Link to post
Share on other sites

module Z12

 def self.namebox(faceset, index)
case faceset
when "Actor4"
  case index
  when 0; return $game_actors[1].name
  when 1; return $game_actors[2].name
  when 2; return $game_actors[3].name
  when 3; return $game_actors[4].name
  end
when "People3"
  case index
  when 2; return "Ella"
  end
end
return ""
 end

end

 

:/ I really don't understand what your saying.

Edited by Zetu

Share this post


Link to post
Share on other sites

On messages with no face at all, I still get an empty namebox.

I though the nameboxes would only apply when I had a face assigned to the message.

Did I do something wrong or that's how it's supposed to be?

Share this post


Link to post
Share on other sites

Why do I leave the simple mistakes? /me needs to test scripts moar before release.

 

Updated and fixed it.

Edited by Zetu

Share this post


Link to post
Share on other sites

Zetu, I need help I don't know how to use this script, i copy/paste into my proect, then I talk to a NPC It does nothing :( please tell me in full

description how to do it, I'll give you full credit.

 

Thankyou if you read this :)

 

- Jake

 

 

Nevermind My brother helped me :)

Edited by Jake171

Share this post


Link to post
Share on other sites

Almost got it working the way I needed it, but i have an issue.

 

I put in Actor4 for the index, but how do i start an index for Actor1, Actor2, etc? do I just copy and past the module and change the variables? If so where do i put them?

 

# Z-Systems by: Zetu #

#===========================#======================#===========================#

# * * * Z12 Automatic Nameboxes v1.04 * * * #

#=#==========================================================================#=#

# Set the module to decide what faces will return what names. You can #

# by-pass this by using a script call. #

# $game_message.forced_text = "" // Removes the next Textbox #

# $game_message.forced_text = "NAME" // Sets next Textbox to NAME #

#==========================================================================#

module Z12

 

def self.namebox(faceset, index)

case faceset

when "Actor4"

case index

when 0; return $game_actors[4].name

when 1; return $game_actors[2].name

when 2; return $game_actors[3].name

when 3; return $game_actors[5].name

when 4; return $game_actors[1].name

end

end

return ""

end

def self.namebox(faceset, index)

case faceset

when "Acotr5"

case index

when 0; return $game_actors[1].name

when 1; return $game_actors[2].name

when 2; return $game_actors[3].name

when 3; return $game_actors[5].name

when 4; return $game_actors[8].name

end

end

return ""

end

end

 

class Window_Message < Window_Base

 

This is what I have been trying, but it has failed... horribly.

Share this post


Link to post
Share on other sites
def self.namebox(faceset, index)
 case faceset
   when "Actor4"
   case index
   when 0; return $game_actors[4].name
   when 1; return $game_actors[2].name
   when 2; return $game_actors[3].name
   when 3; return $game_actors[5].name
   when 4; return $game_actors[1].name
   end
 when "Acotr5"
   case index
   when 0; return $game_actors[1].name
   when 1; return $game_actors[2].name
   when 2; return $game_actors[3].name
   when 3; return $game_actors[5].name
   when 4; return $game_actors[8].name
   end
 end
 return ""
 end
end

Share this post


Link to post
Share on other sites

okay im doing everything right and its still not working what am i doing wrong

 

 

def self.namebox(faceset, index)

case faceset

when "Kylee"

case index

when 0; return "Kylee"

 

end

when "Nylee"

case index

when 1; return "Nylee"

 

end

end

return ""

Share this post


Link to post
Share on other sites

You have error in what you puttet there( try to puyte if post a script or a part in code tags). I will try if can or if someone more expert in script and will help you.

Edited by AlexxanderX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted