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)?
 

Mean1

Member

I did change the name on the database and it still didnt work. I got the event command to work though but to change the name at the beginning It doesnt. Dont worry about it though I can live with the name right now. Once I get finished with the game I will go back through and fix the mini problems Im having. Thanks though
 

Mean1

Member

I play test everythign before deciding on if I want it. I changed the name alot of time. Left it blank even and it didnt. Other stuff works. I mean it took me some time to get switches to work and they work fine now. Maybe its my computer? It hates me :lol: Really though its fine for now. I will have to consult with my friend about this later on. For now Im just putting together maps and stuff
 
For the Map Name, does it take the name I set it to when I create the map, or does it set it to something I want? Also, can you link me to some conditional branch guides, ro can you teach me here?

EDIT: Where do I place the script in the script database?
 

Mean1

Member

Scripting goes under the section Materials right above Main Process. All this is under the Script Editor. As for the map name. Do you mean for each individual map you create? Right click the maps and go to map properties and change the name. You can change it at any time to what ever you want it to be
 

Mean1

Member

Thats how I do it and it works fine for me unless you are using XP cause mine is VX. I know nothing about XP. What exactly do you want? I mean if you rename the map it will appear on the left side under your "project" the name you just put in. Unless you are still talking about wanting the name to appear while you are playing the game then I have no clue what you are doing wrong
 

Nachos

Sponsor

No. Just put the script above MAIN and under the other default scripts. Then donwload the picture and saver it in the picture's folder.

When you enter a map, the name of it that you set ( right click > map properties) appears on the top left corner.
Conditional branches is practice, just make an event an fool around with it.
 

Mean1

Member

You dont name maps in scripting. What exactly are you trying to do? What you are asking and what you are showing are 2 different things. To name a map make sure you are on the screen where you are puting things on the map (like buildings and people and trees...) then move the mouse over the to left side of the screen and right click on a map that you are working on and click map properties. A box will appear and in the top left corner it will have a name like this "Map030" you delet this and put in the desired name. Its not that hard. Make sure you click ok and then save it

Oh and nahchito...my friend is the one who set up my name changing screen and what was going on (which you were correct in your matter about everything and so was I) what was going on was the he had set up something to where the game initialized with the default name anyways before you could change the name. So basically The name was engraved into the game he just turned it off so I could choose the name. :lol:
 

Mean1

Member

ok now that is making sense. I know nothing of the script. You were making it sound as if you didnt know how to name the map. Yeah I dont know about that script. I would talk to the maker of the script about that...Would you mind if I take a look at the script? Or did you not get it off this site?
 
the script is the script nahchito posted.
nahchito":3ckitcni said:
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]
 

Mean1

Member

pretty short code. Gimme a minute let me try something on mine with it
Yes I have the same problem you have. Why would the player need to be transfered beats me. Thats a bit frustrating. I tried changing some things around but it didnt work. If only he was on right now we could ask him (unless he isnt the author)
 
I figured as well. I found a VX version, and it works perfectly. But as for the script, is it possible to get the name of maps you choose? I find it annoying for it to display the name of every map in the game, even the maps without a name.
 

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