Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Scripting (Event) Help[RMVX]!

Is it possible for the game to save a quest's progress throughout the game, so a player can start and end quests in any order they choose? I'm trying to make it so the game doesn't look like a linear set of quests. Also, is it possible to change what the Quest NPCs say after you talk to them the first time?
i.e:
If you first talk to an NPC "Sam", he will say:
"I need cookies for breakfast!"
if you talk to him again, he will check whether you have the item "cookie", and say different things depending if you do have the cookies.

Also, how do you make the Quest NPCs say your name (dynamically)?
 

regi

Sponsor

Yes, you can use self-switches and multiple event pages for this.

On the first page, show some text (I need cookies for breakfast!) and then turn on "Self-Switch A".

Create a new event page, and check the conditions box "Self-Switch A is ON". Now use a Conditional Branch to check if you have a cookie, and put in messages according to that.

That's how you make NPCs say separate messages.

For saying your name dynamically, I believe you use \N[ x] (without the space), where x is the ID of the actor.
 
Regi:
like this?
http://img401.imageshack.us/img401/4236/page1rz7.jpg[/img]
http://img401.imageshack.us/img401/599/page2cc9.jpg[/img]
However, when I do this, the NPC disappears.
-----
I have another question.
  • If I want a quest or event to trigger the revelation of a new area(i.e.:the explosion caused an opening in a part of the cave, but the rest of the world remains the same), would I need to make a separate world, or do I use the cookie thing again?
  • How do I make my character's name change to text a user inputs?
 

regi

Sponsor

On the first page, uncheck the "Self Switch A is On" conditions box. Instead, after the text in the event commands, add "Control Self-Switches: Self-Switch A = On".

To open a new area, you can use self-switches again (one page with the cave blocked, one page with it blasted open) or switches, which is basically the same thing, except multiple events can be affected.

If you're still confused, you can try using the help (?) in the editor, read up some tutorials, or post here. Good luck.
 

Mean1

Member

I had to basically teach my self how to do switches for quests and stuff. But once you have it down pat it is the easiest thing in the world.
And yes Lonewolf I know how to set up a name input screen but I dont know how to get everyone else to say the name you put. As others have said If you put this in some one's speech
\n[1]
that puts the default name in its place. I dont know how to change it to put the name you choose.
 
Oh I see. As for the self switches in the quests, are they global, or local to that NPC only? If that i so, is it possible to create switches that apply to more than one NPC/map? Like if a man is healed at map A, a woman at map B would say something different as well.

Also, is it possible to do something, where if the main character enters an important geographical location, text would fade in in the middle of the map, stating the location, and fade out by itself in 3 seconds' time? And where can I find some good tiles for the inside of a town(houses, wall, etc). The default ones don't provide them, and all they provides seems more suited or a "world map"
 

Mean1

Member

Isnt it easier just to say you would like to know how to make text appear stating your location when enter a new place? It is possible I have seem it beofore Im working on that myself. I will post it once I get it to work. Unless s ome one already has it up some where
 
lonewolf80":1ita0x13 said:
Oh I see. As for the self switches in the quests, are they global, or local to that NPC only? If that i so, is it possible to create switches that apply to more than one NPC/map? Like if a man is healed at map A, a woman at map B would say something different as well.

Also, is it possible to do something, where if the main character enters an important geographical location, text would fade in in the middle of the map, stating the location, and fade out by itself in 3 seconds' time? And where can I find some good tiles for the inside of a town(houses, wall, etc). The default ones don't provide them, and all they provides seems more suited or a "world map"
Carrying over the last two questions I had, I have another question to add.

If I want an object, let's say, a hole appear in a map after the shaking animation if a control switch is on, how can this be done in the events?
 

Nachos

Sponsor

lonewolf80":2x2ojrd5 said:
Oh I see. As for the self switches in the quests, are they global, or local to that NPC only? If that i so, is it possible to create switches that apply to more than one NPC/map? Like if a man is healed at map A, a woman at map B would say something different as well.

For global things you would have to use a switch. The self-switches work separatedly in each event.

lonewolf80":2x2ojrd5 said:
Also, is it possible to do something, where if the main character enters an important geographical location, text would fade in in the middle of the map, stating the location, and fade out by itself in 3 seconds' time? And where can I find some good tiles for the inside of a town(houses, wall, etc). The default ones don't provide them, and all they provides seems more suited or a "world map"

There are plenty scripts for it:

Code:
#_______________________________________________________________________________
# MOG_MPW Map_Name V1.2            
#_______________________________________________________________________________
# By Moghunter       
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF(True - False).
MPNMFD = true
#Fade Time(in seconds).
MPNMTM = 10
#Window Position.
# 0 = Upper Left.
# 1 = Lower Left.
# 2 = Upper Right.
# 3 = Lower Right.
MPNMPS = 2
# Disable Window Switch(ID).
WM_SWITCH_VIS_DISABLE = 15
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mpmapname"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdtm
attr_accessor :mpnm_x
attr_accessor :mpnm_y
alias mog24_initialize initialize
def initialize
mog24_initialize
@fdtm = 255 + 40 * MOG::MPNMTM
if MOG::MPNMPS == 0 
@mpnm_x = -300
@mpnm_y = 0
elsif MOG::MPNMPS == 1
@mpnm_x = -300
@mpnm_y = 380
elsif MOG::MPNMPS == 2
@mpnm_x = 640
@mpnm_y = 0
else 
@mpnm_x = 640
@mpnm_y = 380
end  
end
def mpnm_x
return @mpnm_x
end
def mpnm_y
return @mpnm_y
end
def fdtm
if @fdtm <= 0
@fdtm = 0 
end
return @fdtm
end
end 
############
# Game_Map #
############
class Game_Map
attr_reader   :map_id  
def mpname
$mpname = load_data("Data/MapInfos.rxdata") 
$mpname[@map_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_mapic 
mapic = RPG::Cache.picture("")     
end  
def draw_mpname(x,y)
mapic = RPG::Cache.picture("Mpname") rescue nd_mapic   
cw = mapic.width  
ch = mapic.height 
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 22
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1)
end
end
##########
# Mpname #
##########
class Mpname < Window_Base
def initialize
super($game_system.mpnm_x, $game_system.mpnm_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpname(10,0)    
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog24_main main
def main
@mpnm = Mpname.new
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false  
end  
mog24_main
@mpnm.dispose
end
alias mog24_update update
def update
mog24_update  
$game_system.mpnm_x = @mpnm.x
$game_system.mpnm_y = @mpnm.y
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
if $game_system.fdtm <= 0
@mpnm.visible = false  
else
@mpnm.visible = true  
end 
else
@mpnm.visible = false  
end 
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1 
if @mpnm.x < 0
   @mpnm.x += 8
elsif @mpnm.x >= 0
   @mpnm.x = 0
end   
else
if @mpnm.x > 400
   @mpnm.x -= 8
elsif @mpnm.x <= 400
   @mpnm.x = 400
end     
end 
@mpnm.contents_opacity = $game_system.fdtm
if MOG::MPNMFD == true
$game_system.fdtm -= 3
end
end
alias mog24_transfer_player transfer_player
def transfer_player
mog24_transfer_player
if MOG::MPNMPS == 0 
$game_system.mpnm_x = -300
$game_system.mpnm_y = 0
elsif MOG::MPNMPS == 1
$game_system.mpnm_x = -300
$game_system.mpnm_y = 380
elsif MOG::MPNMPS == 2
$game_system.mpnm_x = 640
$game_system.mpnm_y = 0
else 
$game_system.mpnm_x = 640
$game_system.mpnm_y = 380
end  
@mpnm.y = $game_system.mpnm_y
@mpnm.x = $game_system.mpnm_x
$game_system.fdtm = 255 + 40 * MOG::MPNMTM
@mpnm.refresh
end
end
You will have to add the picture "MpName" to the pictures folder.

http://img216.imageshack.us/img216/6728/mpnamevu9.png[/img]

lonewolf80":2x2ojrd5 said:
If I want an object, let's say, a hole appear in a map after the shaking animation if a control switch is on, how can this be done in the events?
Use a conditional branch

Mean1":2x2ojrd5 said:
\n[1]
that puts the default name in its place. I dont know how to change it to put the name you choose.

as for this..try searching, someone already asked this yesterday.

\n[ x] (x = id of the actor)

It works with CURRENT name of the actor, if you change it with the "Change actor name" command, it displays the new  name.
 

Mean1

Member

ok yes but wasnt it you nahchito that said it was the same thing as \n[1] ? cause I have tried that but  it didnt work. I will try the new one though.

And it didnt work. I will have to check with my friend to see what Im doing wrong
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top