Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Makasu

1
Script Requests / A Simple merge request [MAPLINKS + BABS]
September 14, 2009, 11:18:21 pm
Howdy!

I'd like to request a simple merge of Wachunga's Maplinks script to be compatible with BABS v 2.x

I read on an rrr post that there was a merge done by Blizz himself. But somehow I don't know if its the same or if some alias' have changed or whatever the case may be.

Now according to the post that I read located here

All I need to change is the class Game_Player from:

class Game_Player

alias ml_cett check_event_trigger_touch
def check_event_trigger_touch(x, y)
check_maplinks(x,y)
ml_cett(x,y)
end

def check_maplinks(x,y)
if $game_map.valid?(x, y) then return end
dir = nil
if y == $game_map.height then dir = 2
elsif x == -1 then dir = 4
elsif x == $game_map.width then dir = 6
elsif y == -1 then dir = 8
end
if dir != nil
if $game_map.maplinks[dir] != nil
$game_map.maplinks[dir].activate
end
end
end

end


to:

class BlizzABS::Player_Controller

  alias ml_cett check_event_trigger_touch
  def check_event_trigger_touch(x, y)
    check_maplinks(x,y)
    ml_cett(x,y)
  end

  def check_maplinks(x,y)
    return if $game_map.valid?(x, y)
    if y == $game_map.height
      dir = 2
    elsif x == -1
      dir = 4
    elsif x == $game_map.width
      dir = 6
    elsif y == -1
      dir = 8
    else
      dir = nil
    end
    if dir != nil && $game_map.maplinks[dir] != nil
      $game_map.maplinks[dir].activate
    end
  end
 
end


But upon doing so I run into the error that reads:

Code: error
Script 'Maplinks' Line 125: NameError occured.
undefined method 'check_event_trigger_touch' for class BlizzABS::Player_Controller'


I have the maplinks script if it'll make the slight merge or the update of Blizz's other post easier?

Spoiler: ShowHide
Code: Maplinks
=begin
============
Maplinks - version 0.95 (2005-11-10)
============
by Wachunga

This script simplifies linking maps together: a single event sets up an
entire edge of the map as a teleport to another map. Players trying to
leave that edge of the current map are automatically teleported.

(This can also be achieved with many copies of teleport events along the edges
of a map or with a parallel-process event that sets variables and uses them to
teleport, but these methods are not optimal -- causing lag and/or inconvenience
for the mapper.)

To link a map with another on a specific edge (north, east, south or west),
create an event with <maplink> included in its name on the appropriate edge of
the map. (To avoid confusion, maplink events on corners of the map are
not valid.) Then, add a teleport ("Transfer Player") command to the event
to specify the destination map and other details (e.g. player direction,
fading on/off). If the destination is an east or west edge, then the Y
coordinate is calculated based on the player's Y coordinate when
teleporting; likewise, the X coordinate is calculated automatically when
the destination is a north or south edge.

Note: unlike normal teleport events, maplinks are activated when the player
tries to leave the screen instead of when stepping on the last tile. This
behaviour could be changed, but I feel that it's more natural this way:
it leaves the whole map open for actual exploration, instead of "wasting"
the outer tiles of a map.

=end

#-------------------------------------------------------------------------------

class Game_Event < Game_Character
alias ml_ge_init initialize
def initialize(map_id, event)
ml_ge_init(map_id, event)
if @event.name.upcase.include?('<MAPLINK>')
dir = nil
if @event.y == $game_map.height-1
dir = 2 unless @event.x == 0 or @event.x == $game_map.width-1
elsif @event.x == 0
dir = 4 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.x == $game_map.width-1
dir = 6 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.y == 0
dir = 8 unless @event.x == 0 or @event.x == $game_map.width-1
end
if dir != nil
@list.each { |command|
if command.code == 201
# make sure new location isn't be specified by variables
if command.parameters[0] == 0
$game_map.maplinks[dir] = Maplink.new(command.parameters)
break
end
end
}
end
end
end
end

#-------------------------------------------------------------------------------

class Game_Map
attr_accessor :maplinks

alias ml_gm_setup setup
def setup(map_id)
@maplinks = {}
ml_gm_setup(map_id)
end

def width(map_id = @map_id)
if map_id == @map_id
return @map.width
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).width
end
end

def height(map_id = @map_id)
if map_id == @map_id
return @map.height
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).height
end
end

end

#-------------------------------------------------------------------------------

class Maplink

def initialize(parameters)
@param = parameters
end

def activate
width = $game_map.width(@param[1])
height = $game_map.height(@param[1])
# modify x (p[2]) or y (p[3]) coordinates appropriately
if @param[2] == 0 or @param[2] == width-1
@param[3] = $game_player.y
elsif @param[3] == 0 or @param[3] == height-1
@param[2] = $game_player.x
end
# set up a dummy interpreter just for teleport
interpreter = Interpreter.new
interpreter.parameters = @param
interpreter.index = 0
interpreter.command_201
end

end

#-------------------------------------------------------------------------------

class Game_Player

alias ml_cett check_event_trigger_touch
def check_event_trigger_touch(x, y)
check_maplinks(x,y)
ml_cett(x,y)
end

def check_maplinks(x,y)
if $game_map.valid?(x, y) then return end
dir = nil
if y == $game_map.height then dir = 2
elsif x == -1 then dir = 4
elsif x == $game_map.width then dir = 6
elsif y == -1 then dir = 8
end
if dir != nil
if $game_map.maplinks[dir] != nil
$game_map.maplinks[dir].activate
end
end
end

end

#-------------------------------------------------------------------------------

class Interpreter
attr_accessor :parameters
attr_accessor :index
end


Its not that its majorly important. Its for simple recreation purposes and for some odd reason in BABS 2.57 whenever I have a lot of teleport events it causes the game to lag like crazy. :/

So any help or assistance is greatly appreciated. And will not go unnoticed. I'm willing to trade art in exchange for help. :)

Thank you in advance.
2
PROGRAM: RPG MAKER XP

Issue(s) with: Tons of Addons Different Difficulties issue

PROBLEM: I have another mode set up to be played after the game is completed, It unlocks the mode. The mode is then selected from the title screen We'll call it battle mode. I'm not having an immediate problem setting up getting to the mode or the seperate set of maps. Its just that when an enemy goes to attack I get this error:

image: ShowHide


which then takes me to this line of coding in TOA pt 2

Line 3475:  self.damage = self.damage * $game_system.enemy_rate / 100


WHAT I AM ASKING: Is there a way around this problem or would it require more scripting knowledge than I'm aware of? I think it might be because it doesn't know which difficulty to turn to or use in this case and if I cut off different difficulties then it works just fine. But then that makes it so that it can't be used in the main portion of my game. And I need that for the actual main part of my game.

So to make it short I'm not sure if there is a way around this or not. I have very very little scripting knowledge and I don't want to hack up TOA without knowing what I'm doing exactly. :P because then that'd just be a disaster in itself. I was hoping that maybe one of you talented scripters on here would be able to assist me in said issue. Or help me to counter it or something?

Spoiler: ShowHide

My Scripts:
-Character Select
-New Game Plus
-UMS
-Scene Credits
-Scene Savefile
-Hear Steps
-Item Limitations
-Sanity Meter
-Sound Emissions
-Scroll Delay
-ToA 1
-ToA 2
-ToA 3
-Stormtronic
-BABS pt 1
-BABS pt 2
-BABS pt 3
-Autofire
-Quick Equip
-Screencolor
-CustomStatGrowing
-CriticalSound
-New Debugger
-MAIN


Many many many thanks in advance for any assitance. :)
~Makasu
3
Script Requests / request for Hit sounds please?
March 13, 2009, 08:18:37 am
Introduction:

Howdy. I'm opening this up to fill a request. I believe NAMCKOR said that I should request a script so thats what I'm doing. :D
Anyways I was hoping one of the many talented scripters on here could possibly help me in scripting me a small addon for BABS that would add a sound effect for when the player or enemies are hit. IE: if the player is hit the game will play whatever sound you specify it to play for the player and vice versa for enemies.


Information about how I would like it to work:

Well I would like it to be able identify if the different players being hit. Actor 0,1,2,3 etc. each one to have a different sound effect that could be played if they were hit. As well as for the monsters. Like if a ghost gets hit it'll play a different sound effect vs if say a dog was hit. Just for an added effect of

If that makes any sense?



What I would like it to do:

Be able to set up and define different sound effects for different enemies and players configurable through script to play when the enemie is detected as being "hit" in BABS

 def self.hitsound(id)
      case id
      when 1 then return ('060-Cheer01', 80, 100) # Hunter
      when 2 then return ('060-Cheer01', 80, 100) # Basilisk
      when 3 then return ('060-Cheer01', 80, 100) # Sahagin
      end


and possibly for the player:

 def self.hitsound(id)
      case id
      when 1 then return ('grunt', 80, 100) # Actor in position 001 in the database
      when 2 then return ('hit', 80, 100) # Actor in position 002 in the database
      when 3 then return ('060-Cheer01', 80, 100) # Actor in position 003 in the database
      when 4 then return ('060-Cheer01', 80, 100) # Actor in position 004 in the database
      end

     
and so forth

How I would like it to work:

-Able to define a sound effect for each actor and/or enemy configured through either BABS script or defined in its own seperate plug-in using the following methods:
('FILENAME', VOLUME, PITCH)


'FILENAME' - the name of the file that is played when the player or enemy is hit 'grunt' being an example
'VOLUME' - Being the volume of the filename that is played when the player/enemy is hit. 0-150 being the highest I think RMXP allows for volume?
'PITCH' - the same as volume. See volume for additional information.

Additional Information:

For the player I feel it would be best if it were tied to the ID specified in the database as to prevent confusion as to whose in the lead and just playing the sound effect for the actor in Position 0 instead of 1 in the database. That way if the lead character you are currently playing with isn't a male then wouldn't want a female having a male grunt. So to keep confusion down to an all time low it just be best to tie it to the actors DATABASE ID instead of the PLAYER ID I think it is?

I'm not necessarily looking for an add-on to the blizzabs.config exe because I don't use that really just a hopefully simple plug-n-play script.


End notes/Thanks:

Now I'm not entirely sure if such a thing is possible. But seeing as how I posses little/no scripting knowledge of my own I turn to the community with the hopes that maybe they can assist me in my dilemma so any help is greatly appreciated to the fullest.

[shameless plug]And seeing as how no good deed goes unnoticed I would be willing to exchange artistic services for any assitance provided to me.[/shameless plug]

Many thanks in advance like I said.

-Makasu

4
Script Troubleshooting / Maplink in BABS?
March 04, 2009, 01:21:21 pm
Howdy! Not sure if this is in the right place or not so if it isn't can a mod or staff member move it to the correct place please? :D Thanks in advance.

Anyways now onto my problem.
I'm trying to get Wachunga's maplink script to work in BABS 2.x [[x=current version in case its changed]] But I seem to be stuck in a rut. I know I'm setting up the Maplink script correctly and have the events set up to work correctly as well but it just won't go with BABS. I don't know if its a conflicting error of some sorts but I figured it shouldn't be because it doesn't modify any of the direct workings of BABS. So if anyone can tell me if these two are compatiable or not I'd be greatly appreciated.

I've included the maplink script so that maybe a RGSS master could possibly assist me in making it work.

Credit: Wachunga: ShowHide
=begin
============
Maplinks - version 0.95 (2005-11-10)
============
by Wachunga

This script simplifies linking maps together: a single event sets up an
entire edge of the map as a teleport to another map. Players trying to
leave that edge of the current map are automatically teleported.

(This can also be achieved with many copies of teleport events along the edges
of a map or with a parallel-process event that sets variables and uses them to
teleport, but these methods are not optimal -- causing lag and/or inconvenience
for the mapper.)

To link a map with another on a specific edge (north, east, south or west),
create an event with <maplink> included in its name on the appropriate edge of
the map. (To avoid confusion, maplink events on corners of the map are
not valid.) Then, add a teleport ("Transfer Player") command to the event
to specify the destination map and other details (e.g. player direction,
fading on/off). If the destination is an east or west edge, then the Y
coordinate is calculated based on the player's Y coordinate when
teleporting; likewise, the X coordinate is calculated automatically when
the destination is a north or south edge.

Note: unlike normal teleport events, maplinks are activated when the player
tries to leave the screen instead of when stepping on the last tile. This
behaviour could be changed, but I feel that it's more natural this way:
it leaves the whole map open for actual exploration, instead of "wasting"
the outer tiles of a map.

=end

#-------------------------------------------------------------------------------

class Game_Event < Game_Character
alias ml_ge_init initialize
def initialize(map_id, event)
ml_ge_init(map_id, event)
if @event.name.upcase.include?('<MAPLINK>')
dir = nil
if @event.y == $game_map.height-1
dir = 2 unless @event.x == 0 or @event.x == $game_map.width-1
elsif @event.x == 0
dir = 4 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.x == $game_map.width-1
dir = 6 unless @event.y == 0 or @event.y == $game_map.height-1
elsif @event.y == 0
dir = 8 unless @event.x == 0 or @event.x == $game_map.width-1
end
if dir != nil
@list.each { |command|
if command.code == 201
# make sure new location isn't be specified by variables
if command.parameters[0] == 0
$game_map.maplinks[dir] = Maplink.new(command.parameters)
break
end
end
}
end
end
end
end

#-------------------------------------------------------------------------------

class Game_Map
attr_accessor :maplinks

alias ml_gm_setup setup
def setup(map_id)
@maplinks = {}
ml_gm_setup(map_id)
end

def width(map_id = @map_id)
if map_id == @map_id
return @map.width
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).width
end
end

def height(map_id = @map_id)
if map_id == @map_id
return @map.height
else
return load_data(sprintf("Data/Map%03d.rxdata", map_id)).height
end
end

end

#-------------------------------------------------------------------------------

class Maplink

def initialize(parameters)
@param = parameters
end

def activate
width = $game_map.width(@param[1])
height = $game_map.height(@param[1])
# modify x (p[2]) or y (p[3]) coordinates appropriately
if @param[2] == 0 or @param[2] == width-1
@param[3] = $game_player.y
elsif @param[3] == 0 or @param[3] == height-1
@param[2] = $game_player.x
end
# set up a dummy interpreter just for teleport
interpreter = Interpreter.new
interpreter.parameters = @param
interpreter.index = 0
interpreter.command_201
end

end

#-------------------------------------------------------------------------------

class Game_Player

alias ml_cett check_event_trigger_touch
def check_event_trigger_touch(x, y)
check_maplinks(x,y)
ml_cett(x,y)
end

def check_maplinks(x,y)
if $game_map.valid?(x, y) then return end
dir = nil
if y == $game_map.height then dir = 2
elsif x == -1 then dir = 4
elsif x == $game_map.width then dir = 6
elsif y == -1 then dir = 8
end
if dir != nil
if $game_map.maplinks[dir] != nil
$game_map.maplinks[dir].activate
end
end
end

end

#-------------------------------------------------------------------------------

class Interpreter
attr_accessor :parameters
attr_accessor :index
end


Again thanks in advance for any assistance in the manner!