Not that I know of. If there's one, I'd love to to extract CommonEvents.rxdata to a workable from... And be able to search a command/string in maps and events.
There are extraction/translation tools out there, some do something similar, but I never bothered to look at their source code seriously... Might be a good starting point?
I know for a fact (though way beyond what I'm able of) RPGM editor allows for this; you might also want to look into the "RGSS Built-in Functions".
However, I just don't know how to hook an 'each' to every single piece of content ... And don't have the time to look into it (...and probably, neither the brains xD).
PS: I'll delete the 'talk' stuff for now, 'cos it takes way too long to do a SHIFT+CTRL+F script searchHeck, 78*5000 = 390K lines
![]()
000 - 初期設定.rb
001 - Array(メソッド追加).rb
002 - RPG;;Cache.rb
003 - RPG;;SDB(種族値・設定用).rb
初期設定
Array(メソッド追加)
RPG:Cache
RPG::SDB(種族値・設定用)
000 - 初期設定.rb
000a- my new script.rb
001 - Array(メソッド追加).rb
002 - RPG;;Cache.rb
003 - RPG;;SDB(種族値・設定用).rb
初期設定
my new script
Array(メソッド追加)
RPG:Cache
RPG::SDB(種族値・設定用)
$: << File.expand_path("./")
if FileTest.exist?("SQ_Patch.rb")
require "SQ_Patch.rb"
end
Nostalgic! This is a line from the original SQ(s) script, which allowed the use of an external SQ_Patch.rb file for subsequent patches and mods. (inactive in SR, indeed)By the way, I found a hidden unused script in the array of デバッグ対策 in the .rxdata.
I have no idea how it ended here. Even more weird, it was not compressed like the other scripts.Code:$: << File.expand_path("./") if FileTest.exist?("SQ_Patch.rb") require "SQ_Patch.rb" end
module RPG
class CommonEvent
def initialize
@id = 0
@name = ""
@trigger = 0
@switch_id = 1
@list = [RPG::EventCommand.new]
end
attr_accessor :id
attr_accessor :name
attr_accessor :trigger
attr_accessor :switch_id
attr_accessor :list
end
#and the actual array which is of interest:
class EventCommand
def initialize(code = 0, indent = 0, parameters = [])
@code = code
@indent = indent
@parameters = parameters
end
attr_accessor :code
attr_accessor :indent
attr_accessor :parameters
end
end
I guess you know better than me, but here's the base def of common events, if it helps:
How their @ids are organized is still a mystery to me...Code:module RPG class CommonEvent def initialize @id = 0 @name = "" @trigger = 0 @switch_id = 1 @list = [RPG::EventCommand.new] end attr_accessor :id attr_accessor :name attr_accessor :trigger attr_accessor :switch_id attr_accessor :list end #and the actual array which is of interest: class EventCommand def initialize(code = 0, indent = 0, parameters = []) @code = code @indent = indent @parameters = parameters end attr_accessor :code attr_accessor :indent attr_accessor :parameters end end
I don't have much time to spare as of late, so forgive the lack of news![]()
[Label] "2番"
[Message] "\name[\v[2]]\_" #Speaker
[Message+] "What is a woman's best weapon?"
[Choice] {"Her lips", "Her hands", "Her chest", "Her butt"}, 0 # 0 for "cannot cancel"
# according to input:
# "Her lips" -> objlink(218)
# "Her hands" -> objlink(219)
# "Her chest" -> objlink(220)
# "Her butt" -> objlink(221)
[When] 0, objlink(218)
[Message] "\name[\v[2]]\_"
[Message+] "Nothing like a good kiss!\H\.\."
[Message+] "(Hero will get 【Mouth fetish】)\n"
[Choice] {"Yes", "No"}, 2 # 2 for "choose 'No'/237 if cancel"?
# "Yes" -> objlink(236)
# "No" -> objlink(237)
[When] 0, objlink(236)
[Script] "$game_actors[101].gain_ability("Mouth fetish")"
[Empty]
[When] 1, objlink(237)
[Message] "\name[\v[2]]\_"
[Message+] "Ah ah, no need to act shy\H"
[Jump] "2番" # back to selection
[Move Route] -1, obj(RPG::MoveRoute = @list = {
obj(RPG::MoveCommand = @parameters = {}, @code = 37), #objlink(474)
obj(RPG::MoveCommand = @parameters = {3}, @code = 29), #objlink(476)
obj(RPG::MoveCommand = @parameters = {}, @code = 12), #objlink(478)
obj(RPG::MoveCommand = @parameters = {4}, @code = 29), #objlink(480)
obj(RPG::MoveCommand = @parameters = {}, @code = 0)},
@skippable = False , @repeat = False )
[Move Command] objlink(474)
[Move Command] objlink(476)
[Move Command] objlink(478)
[Move Command] objlink(480)
[Wait for Movevement]
[Move Route] -1, obj(RPG::MoveRoute = @list = {
obj(RPG::MoveCommand = @parameters = {}, @code = 38), #objlink(498)
obj(RPG::MoveCommand = @parameters = {}, @code = 0)},
@skippable = False , @repeat = False )
[Move Command] objlink(498)
[Empty]
Wow, that looks really good! Congrats!
If you have a way to re-inject the new strings into the rxdata file without breaking anything, you'll have a very handy tool. As it stands now, it's already great to have the commonevents in 1 place, instead of in 255 different, unsearchable RPGM boxes :/
My uneducated guess for the 'objlinks', if we are looking at the same things: could it be that they are created & defined in the event itself, therefore NOT linking to anything external?
Something like this (extracted & truncated from your sheet):
The "When" command usually creates a conditional branch based on a previous input ("Yes/no", "HP>50%", "have 1+ candy in inventory"...).Code:[Label] "2番" [Message] "\name[\v[2]]\_" #Speaker [Message+] "What is a woman's best weapon?" [Choice] {"Her lips", "Her hands", "Her chest", "Her butt"}, 0 # 0 for "cannot cancel" # according to input: # "Her lips" -> objlink(218) # "Her hands" -> objlink(219) # "Her chest" -> objlink(220) # "Her butt" -> objlink(221) [When] 0, objlink(218) [Message] "\name[\v[2]]\_" [Message+] "Nothing like a good kiss!\H\.\." [Message+] "(Hero will get 【Mouth fetish】)\n" [Choice] {"Yes", "No"}, 2 # 2 for "choose 'No'/237 if cancel"? # "Yes" -> objlink(236) # "No" -> objlink(237) [When] 0, objlink(236) [Script] "$game_actors[101].gain_ability("Mouth fetish")" [Empty] [When] 1, objlink(237) [Message] "\name[\v[2]]\_" [Message+] "Ah ah, no need to act shy\H" [Jump] "2番" # back to selection [Move Route] -1, obj(RPG::MoveRoute = @list = { obj(RPG::MoveCommand = @parameters = {}, @code = 37), #objlink(474) obj(RPG::MoveCommand = @parameters = {3}, @code = 29), #objlink(476) obj(RPG::MoveCommand = @parameters = {}, @code = 12), #objlink(478) obj(RPG::MoveCommand = @parameters = {4}, @code = 29), #objlink(480) obj(RPG::MoveCommand = @parameters = {}, @code = 0)}, @skippable = False , @repeat = False ) [Move Command] objlink(474) [Move Command] objlink(476) [Move Command] objlink(478) [Move Command] objlink(480) [Wait for Movevement] [Move Route] -1, obj(RPG::MoveRoute = @list = { obj(RPG::MoveCommand = @parameters = {}, @code = 38), #objlink(498) obj(RPG::MoveCommand = @parameters = {}, @code = 0)}, @skippable = False , @repeat = False ) [Move Command] objlink(498) [Empty]
There are different 'move' commands in RPGM, but I guess you meant the "move player icon according to this route" command.
Looks like 1.12 is released, and seems its "part 2"?
You must be registered to see the links
I bit later that I envisaged (I was a bit busy), but I finished the tool to dump/compile CommonEvents.rxdata.
Drop CommonEvents.rxdata onto dump.exe to extract the content.
Do the same with the dump onto compile.exe to make a new CommonEvents.rxdata.
Be careful of accidental overwrites, it doesn't ask for a confirmation if the file already exists.
Always make a backup.
It may have some bugs left (hopefully not). Please report it to me if there is a big problem.
I would recommend to only edit strings to avoid any issue.
Note 1 : Strings are delimited by the character `, so don't use it in your strings. Obviously, ' is fine, it's not the same character.
I couldn't use " or something commonly used without making a more complicated parser, so I choose this character.
The notepad folder in the .zip has a user-defined language file for notepad++. It highlights the ` characters.
Feel free to modify it to your liking.
Note 2 : indentation is important, I don't recommand to remove the tabulations at the beginning of a line.
I've been looking for a commonevents extraction tool like yours for a while - anything to avoid having to ctrl+f through the awful editor. It's so far proven immensely helpful for versioning; just finished getting my copy harmonized with the v1.12 patch.
Thanks, Mimi!
You're welcome, it was a fun little project for me.
I'm not sure if it will try to do the same with the maps yet, it depends if I have the time and if I'm bored.
I may need to improve the parser, or add more error detections, at least. I used the simplest possible approach to read the commands parameters. For example, if you write "objlink something (" instead of "objlink(", it should work, because I don't check what's between the keyword and the bracket.
It's why I recommend to only edit the strings.
How is the translation project going? Its been quiet for a bit. Anything people need help with, or simply a case of life and stuff going on?
Check the top portion of the first post
I'm happy this hasn't been dropped, keep up the good work SFrame!