NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
1. Pausing timer
When the monster is chasing in the game that I'm creating, a timer pops up and you'll have to run until the timer reaches zero in order for the monster to stop chasing you, however, there is a possibly exploit that, when you interact with a object, such as a item, a shelf, etc., the player will comment on whatever they'd interacted with, the monster is also meant to remain still until the end of such action, as it is possible to do so with simple events...however, I'm incapable of stopping the timer, meaning that the player could just keep a text box up while the timer slowly drains itself, and unfortunately, I don't know how to stop the timer at all, so I'll need help on this.

2. Changing all specific sprites with a script
This won't really be a major, needed thing, as I could simply change with different event pages and such, but would be a lot more complicated: In short, I'm wondering if there's any script that could, well, change every single instance of a sprite, not only in the current map or time, but also through the entire game, into a different one whenever it shows up, for instance, let me give you a example: Similar to the portraits of Ao Oni 6.23, when the cheatcode "HIROSI" is inserted, but instead of portraits, the sprites are replaced. I hope I made it clear enough, because really, it's hard to describe it.

Thanks in advance for anyone who can help me out!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,756
Reaction score
15,316
First Language
English
Primarily Uses
RMMV

I've moved this thread to RGSS3 Script Requests. Thank you.



You will need to state what other scripts you're using, as XP has a greater chance of incompatibilities between scripts than other later engines.
 

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
The only ones that I currently have are Ccoa's UMS, one that customizes the title screen and only that, one that speeds up the gameplay by holding shift, but only when doing a playtest, and that's about it
 

Zero_G

Veteran
Veteran
Joined
Mar 28, 2020
Messages
97
Reaction score
60
First Language
English
Primarily Uses
RMVXA
I might look into this (at least point 1), can you share a link to the speedup plugin so I can test?
 

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
I presume by speedrun you mean the playtest speed one, so here it goes:

# テストプレー高速化対応 Ver 1.01
# 配布元・サポートURL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ■ Graphics
#------------------------------------------------------------------------------
#  グラフィック全般の処理を行うクラスです。
#==============================================================================

class << Graphics
# update_speed が定義されていない場合、updateメソッドの再定義を行う
alias :update_speed :update unless method_defined?("update_speed")
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# シフトが押下され、かつフレームカウントが 3 の倍数でない時
if $DEBUG and Input.press?(Input::SHIFT) and Graphics.frame_count % 3 > 0
# グラフィックの更新をせず、カウントだけ加算する
Graphics.frame_count += 1
# シフトが押下されていないか、フレームカウントが 3 の倍数の時
else
# グラフィックの更新を行う
update_speed
end
end
end

Sorry that it is in japanese, tho it doesn't really matter considering the actual scripting of the script aren't.
 

Wecoc

Veteran
Veteran
Joined
Jul 4, 2021
Messages
79
Reaction score
231
First Language
Catalan
Primarily Uses
RMXP
1. A long time ago I made a script that enhances the default timer so you can pause it and rewind it, add seconds to the current count, make it go backwards, etc.

You can find it here

2. Doing what you suggested could cause problems with the Cache, so I wouldn't do it by image directly, but I'm thinking a "parch" for event graphics could work.

Ruby:
# Change all instances of a graphic event to another one
# Activate or deactivate it using $game_temp.character_modifier = true / false

# Note: If you want that to be saved when you save the game, change the line
# "class Game_Temp" to "class Game_System" and use $game_system on the script
# calls instead

# Note: You can define more than one graphic alternative, but they will all
# change at the same time. To do it simply include them with commas in the
# hash in the very start: { A => A', B => B', ... }

module Character_Modifier
  Alterning = {"001-Fighter01" => "002-Fighter02"}
end

class Game_Temp
  attr_reader :character_modifier
  alias charmod_ini initialize unless $@
  def initialize
    charmod_ini
    @character_modifier = false
  end
 
  def character_modifier=(character_modifier)
    if @character_modifier != character_modifier
      @character_modifier = character_modifier
      $game_map.refresh
    end
  end
end

class Game_Character
  def character_name
    if $game_temp.character_modifier == true
      if Character_Modifier::Alterning.keys.include?(@character_name)
        return Character_Modifier::Alterning[@character_name]
      end
    end
    return @character_name
  end
end

Place this script over main.

On the very top of the code you will have to define both the original graphic and its alternative.
To activate the script, use this on an event:
$game_temp.character_modifier = true

No credits required.
 
Last edited:

NardBruh

Villager
Member
Joined
Jun 2, 2021
Messages
17
Reaction score
1
First Language
Portuguese
Primarily Uses
Other
Okay, wow, thank you so much! They worked out perfectly!
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
900
Reaction score
446
First Language
PT-BR
Primarily Uses
RM2k3
1. Pausing timer
It is possible to do with events, using the Script command.

Common Event: Timer Pause -> Activated by switch 30 (Parallel Process)
Code:
@>Script: @timer_paused=$game_variables[57]
:       : $game_system.timer=@timer_paused
@>Comment: User as Anti-Lag
@>Wait: 5 frame(s)
@>

Talking to any NPC on the map:
Code:
@>Script: @timer_memo=$game_system.timer
:      : $game_variables[57]=@timer_memo
@>Control Switches: [0030: Timer_Pause] = ON
@>Text: Hello!
:     : Keep running!
@>Control Switches: [0030: Timer_Pause] = OFF
@>

Edit:
I entered the same code twice.
When I get back from work I'll edit, because now I won't remember how I did it.

Sorry for my mistake.

Edit 2:
Now that's right, unfortunately the RMXP Script box is too small and generates line breaks spoiling any line of code longer than 37 characters, so I had to adapt.
 
Last edited:

Latest Threads

Latest Profile Posts

unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?
Doing RPG Maker News for 26th October 2021

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD

Forum statistics

Threads
116,103
Messages
1,095,802
Members
151,493
Latest member
xuincy
Top