ASGARZIGEL'S PROFILE

Search

Filter

I made idea generators

There are also some bugs here or there, like minor spelling issues, empty strings (for hero weapon proficiency I've noticed it) and when you get an ogre for the enemy creation it always tells you it can be baited by cheese because it's a rat.

Oneshot Review

author=Hasvers
(Un)Fun fact: It's been disqualified due to using RM2k3. Thought you might want to update your review accordingly. Otherwise, good job!


As far as I know it has been disqualified not because of the RM2k3 (they probably have a legal version), but because the RTP-RT.exe was modified to make the various special featues possible, which is against the EULA.

Too bad, really :/

zbnewtitle.PNG

Looks sweet! :D

I made idea generators

This thing amazing, I love randomly rolling stuff. Reminds of dwarf fortress in the kind of silly things it produces.

Now I wonder what a charming graveyard looks like...

How to detect if an enemy is targetted? [VXA]

So basically, once your character executes the attack, the non-vip reacts?

Some clarifications:

Does this also happen when using AoE or random targeting, or a confused ally attacks the vip?

I assume you want the substitute only be active during this one attack?

Now that I think about it, it might be easier to make a custom substitute state that just works with one ally.

I'll look into it.

EDIT: And done.
I'm positive this can be done more elegantly/sensibly, but this hacked-together version should be alright if you just need it for a single battle.

First insert a new page called Game_BattlerBase in the script section between Materials and (Insert Here). Copy the following script into the page.

#==============================================================================
# ** Game_BattlerBase
#------------------------------------------------------------------------------
#  This base class handles battlers. It mainly contains methods for calculating
# parameters. It is used as a super class of the Game_Battler class.
#==============================================================================

class Game_BattlerBase
  attr_accessor :vip        # vip to protect
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_default initialize
  def initialize
    initialize_default
    @vip = nil
  end
  #--------------------------------------------------------------------------
  # * Determine if Substitute
  #--------------------------------------------------------------------------
  def substitute?
    (special_flag(FLAG_ID_SUBSTITUTE) || @vip ) && movable?
  end
end

Then add another page called Scene_Battle and copy this into it:

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Apply Substitute
  #--------------------------------------------------------------------------
  def apply_substitute(target, item)
    if check_substitute(target, item)
      substitute = target.friends_unit.substitute_battler
      if substitute && target != substitute && (substitute.vip == target || !substitute.vip)
        @log_window.display_substitute(substitute, target)
        return substitute      
      end
    end
    target
  end
end

You just have to add this in a script call at battle start:

$game_troop.members[a].vip = $game_troop.members[b]

a is the index of the substitute and b is the index of the vip. The index just conforms to the order in which the enemies were added afaik, starting with 0.

Note that the substitute only works if the vip has less than 25% health, like with the normal substitute. (The tooltip in the database is apparently wrong, in case you don't know that)

Also, this is hacked together and not well-tested, just a quick solution. It worked as intended for me in a vacuum, but if you have other enemies with a normal substitute something might get wonky or there might be problems with other scripts that override the BattlerBase or Scene-Battle classes.

How to detect if an enemy is targetted? [VXA]

If this is just for one boss fight I would do this via battle events. The easiest way is to check whether or not the VIP's HP are below 100%.

You can check the last target of an actor in a script, but I haven't gotten it to work yet and I don't have the time now, sorry. I'm pretty new to the RGSS.

[VX ACE] BGM Play Scripting Help?

You'd have to figure out when the song ends and then pay a new bgm. If you want to create a full on radio feature like in GTA, it's going to be a bit of work.
I'm not too familiar with the sound stuff in the RGSS, from what I see you can get the playback position of an ogg or wav file and figure it out with that, but for MP3s... the only way I can think of right now is doing it "per hand", having a timer that switches the song after it's time is up.
You'd have to put in the times for each song instead of detecting them, though, which is... sub-optimal.

I can't think of a title for this. Robin Williams commit suicide.

I don't have too much of an opinion of Robin Williams, not too much of a movie person. But having dealt with suicides of neighbors and friends and suffering from depression myself, my heart goes out to those he left behind.
I do think suicide is wrong, but it's not like you have much of a choice if suffering from depression, if it hits hard enough so you want to kill yourself. It's an altered state of mind.

[VX ACE] BGM Play Scripting Help?

class RPG::AudioFile 
  def initialize(name = '', volume = 100, pitch = 100) 
    @name = name 
    @volume = volume 
    @pitch = pitch 
  end 
  attr_accessor :name 
  attr_accessor :volume 
  attr_accessor :pitch 
end 

class RPG::BGM < RPG::AudioFile 
  @@last = RPG::BGM.new 
  def play(pos = 0) 
    if @name.empty? 
      Audio.bgm_stop 
      @@last = RPG::BGM.new 
    else 
      Audio.bgm_play('Audio/BGM/' + @name, @volume, @pitch, pos) 
      @@last = self.clone 
    end 
  end 
  def replay 
    play(@pos) 
  end 
  def self.stop 
    Audio.bgm_stop 
    @@last = RPG::BGM.new 
  end 
  def self.fade(time) 
    Audio.bgm_fade(time) 
    @@last = RPG::BGM.new 
  end 
  def self.last 
    @@last.pos = Audio.bgm_pos 
    @@last 
  end 
  attr_accessor :pos 
end 

module Radio 
  Radio_1 = :Shift 
end 

module CarRadio 
  if Input.trigger?(Radio::Radio_1) 
    Audio.bgm_play('Town1'[100[100]]) 
  else 
  end 
end


I've formatted the code for you so it becomes more readable.

I'm not really sure what you are trying to do here, honestly. Why are you redefining the BGM and audiofile classes?
If you're new to Ruby, it's also probably not the best idea to start with modules. I haven't done anything with modules yet as well, so can't help you with that. (I could get your example with the radio module)

The reason your code doesn't work is because it is never run. A method doesn't run by itself, but must be called by some other method, also you don't even have a method in your CarRadio module, so you can't call the input check.

You also seem to have misunderstood the documentation. In programming documentation, the brackets usually mean that whatever is within the brackets is optional. Therefore Audio.bgm_play(filename[, volume[, pitch]]) is read as follows: you always need the filename operator, while the other three are optional. If you want pos, though, you need to have both pitch and volume, if you need pitch, you have to have volume. That's why the brackets are nested like that. Between the parameters you have to put the commas.

When you want to add a new command for the player (I assume it's just meant to be on the normal map), you should first look through the code, where player-input is processed. It's organized a bit weirdly, but this happens in the Game_Player class, in the update method.

Therefore, the easiest way to accomplish what you want to do is to override the Game_Player class and extend the functionality of the update class with your input check.

Insert an entry between Materials and (Insert Here) in the Script window and call it Game_Player, then copy this code into it:

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. It includes event starting determinants and
# map scrolling functions. The instance of this class is referenced by
# $game_player.
#==============================================================================

class Game_Player < Game_Character
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias update_default update
  def update
    update_default
    update_bgm
  end
  #--------------------------------------------------------------------------
  # * BGM Update (change music when pressing shift)
  #--------------------------------------------------------------------------
  def update_bgm
    if Input.trigger?(:A) 
      Audio.bgm_play("Audio/BGM/Town1",100,100) 
    end 
  end
end


I'd suggest using :A instead of :SHIFT, since this one works both when pressing shift on a keyboard and the dash button on a controller, unless you want it to be keyboard only for some reason. (I at least prefer to play RM games with a controller)

Also, you have to put the full path to the music file into the bgm_play function call, otherwise it won't the file.

To make custom scripts you really have to learn your way around the RGSS code and how everything is organized. The easiest way is to figure out some functionality that's already in there and is close enough to what you want to do that you can learn from the implementation. Like for this example, looking up where the button checks for player input are defined and how to play music.

A good way to learn how everything is organized is to try to implement a custom menu of some sort, or change around one of the standard menu. Gives you some insight into how scenes and windows interact.
Well, that's how I started the ruby scripting. (then again, I've got prior programming knowledge)

Hope that long rambly post helps you a bit.

mysteries of rpgmaker?

You've got it mixed up I think, the second box is the maximum.
Pages: first 12 next last