[RESOLVED] (massive knowledge included) Extracting data from an .rxdata...

Started by shdwlink1993, March 30, 2008, 02:16:12 pm

Previous topic - Next topic

shdwlink1993

Thanks, Zeriab! That helped out with the scripts. And now I know that RMXP REALLY compresses those scripts.

As an illustration of how insane the file size differences were:


.rxdata.txt
2,842KB14,205KB


So, yea. Thanks again. Now all I need is that subclass information and I will rule the world!

Ah, who am I kidding? I will rule my 24x24 bedroom!
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Fantasist

lol! So can someone point me to more references on Zlib stuff?
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




shdwlink1993

@Fantasist:
http://www.zlib.net is their homepage. I don't think that'd be a good resource. ;D

@Zeriab: Just out of curiosity, how would I add in a new line after every script, so that the file is easier to read?
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Fantasist

Add a new line while printing out?
I'll tell you something. In his code, replace

p script


with this:


  file = File.open("Script Slots/#{i+1}. #{script_data[i][1]}.txt", 'w') rescue File.open("Script Slots/#{i+1}. Invalid characters in filename.txt", 'w')
  file.write(scripts[i])


Now make a new folder named 'Script Slots' in your game folder and try running the game for interesting results.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Blizzard

5) :P



Here's the help file BTW. I also has a beginner tute about scripting by an unknown author included.

http://www.sendspace.com/file/tgb7sg

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

shdwlink1993

@Blizzard: The unknown author is the person who wrote the japanese help file. For some reason, they removed that very useful section for the English release. And they did it again for VX! Sheesh...

@Fantasist: Thanks! That worked really well! I had something that did something like that, but it kept giving me an error message. I never realized that it was just a rescue thing. Also, why does it never get the first script?

So, i'm apparently almost out of questions about this thing, and most of them are fairly easy:

1) How do you get a table to display? (it's not .inspect, I tried that)
2) I'm still not very clear on how to get the maps out correctly.
and lastly, so ghastly:
3) Is it possible to get the save data out (Like saved games) in a similar method?
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Blizzard

1) I guess you'll have to do it manually, iterate through each dimension, etc. and write out the data.

2) Maps are loaded as I have shown you before. You can get an array of existing map IDs by loading MapInfos.rxdata and using the .keys method on the loaded data. Then iterate through the array and use the "load_data(sprintf(...))" command to load each map.

3) Sure, but that's done easier, you can simply use the same way the Scene_Load does it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

shdwlink1993

1) And how exactly would I go about this... iteration of dimensions (I think I just found a new game title: Reiteration of Dimensions! OK, maybe not, but I should at least get a patent for it)? I just tried using table.self
  • , but that gets me an error message. And believe me, I've gotten my fair share of error messages this week.

    2) I wasn't sure on how exactly to do the second part of that.

    3) OK... done! I got a save file! And it looks like... well... this is a pretty small portion of the file (which makes this very scary. This is a save file in text:

    Spoiler: ShowHide
    #<Game_System:0x440d5a0 @analyzed=[], @FURY_STATUS=true, @EQUIPMENT_REQUIREMENT=false, @teleport_permit=true, @face_graphic_justification=2, @show_pause=true, @message_frame=0, @CHARGE_SKILL=false, @UNIQUE_SKILL_COMMANDS=true, @system_words=["Gold", "HP", "SP", "Strength", "Dexterity", "Agility", "Intelligence", "Attack Power", "Phys Defense", "Mag Defense", "Weapon", "Shield", "Helmet", "Armor", "Accessory", "Fight", "Skill", "Defend", "Item", "Equip"], @load_count=0, @ums_mode=0, @FACESETS=false, @map_interpreter=#<Interpreter:0x440d1b0 @button_input_variable_id=0, @list=nil, @main=true, @parameters=["$scene = Scene_SavePoint.new"], @move_route_waiting=false, @depth=0, @map_id=9, @branch={}, @message_waiting=false, @index=2, @loop_count=3, @child_interpreter=nil, @event_id=12, @wait_count=0>, @minimap_h=160, @DOOM_STATUS=true, @known=[], @choice_position=3, @map_name_id=9, @BETTER_TILEMAP_UPDATE=true, @animation_pause=80, @fontname="Arial", @MINIMAP=true, @window_height=128, @FACESETS_DSS=false, @DEMI_SKILL=false, @escaping_exp_cost_max=8, @name_window=true, @save_disabled=false, @cam=0, @FPS_MODULATOR=true, @SHADED_TEXT=false, @back_opacity=160, @INVINCIBLE_STATUS=true, @ITEM_REQUIREMENT=false, @face_graphic_position=1, @minimap_visible=false, @ENERGY_SKILL=false, @sound_effect="", @save_count=1, @skip_mode=1, @CATERPILLAR=true, @HEAL_AT_LVLUP=false, @message_event=-1, @minimap_a=160, @ABSORB_HP_SP=false, @name_timer=0, @CENTER_BATTLER=true, @face_frame_width=100, @window_width=480, @STATUS_ICONS=false, @fontsize=24, @ZOMBIE_STATUS=true, @order_only=false, @ENEMY_STATUS=false, @font="", @menu_disabled=false, @REVENGE_SKILL=false, @HUD=false, @chaos_party=[], @window_image=nil, @SPEED_MODULATOR=true, @shadowed_text=false, @minimap_x=0, @SP_COST_MOD=true, @HP_SP_CRUSH=false, @magic_number=76156056, @slave_windows={}, @version_id=0, @name="", @ddns_off=false, @HPSPPLUS=false, @text_skip=true, @ARROW_OVER_PLAYER=true, @train_actor=-1, @battle_interpreter=#<Interpreter:0x440be48 @button_input_variable_id=0, @main=false, @move_route_waiting=false, @depth=0, @map_id=0, @branch={}, @message_waiting=false, @child_interpreter=nil, @event_id=0, @wait_count=0>, @DEATH_ROULETTE=false, @escaping_gold_cost_min=0, @resting_face="", @BARS=false, @battle_order_only=false, @REGEN_STATUS=true, @SKILL_SEPARATION=false, @window_justification=1, @ANIBATTLERS_NON_ACTION_BS=false, @opacity=255, @encounter_disabled=false, @DESTRUCTOR_SKILL=false, @index=0, @encounter_count=0, @font_color=nil, @used_codes=["\\v", "\\n", "\\c", "\\g", "\\skip", "\\m", "\\height", "\\width", "\\jr", "\\jc", "\\jl", "\\face", "\\fl", "\\fr", "\\b", "\\i", "\\s", "\\e", "\\t1", "\\t2", "\\th", "\\nm", "\\font", "\\p", "\\w", "\\ws", "\\oa", "\\oi", "\\os", "\\ow", "\\tl", "\\tr", "\\tc", "\\ignr", "\\shk", "\\slv", "\\ind", "\\inc"], @DEATH_TOLL=false, @enemy_defeated=0, @TREMBLE=false, @FROZEN=true, @window_mode=0, @shadow_color=(0.000000, 0.000000, 0.000000, 100.000000), @minimap_y=0, @show_clock=true, @release="Alpha Testing", @indy_windows={}, @TARGET_EM_ALL=true, @write_speed=2, @ANIMATED_BATTLE_BACKGROUND=false, @bar_style=0, @BLUE_MAGIC_SKILL=false, @escaping_gold_cost_max=20, @comic_enabled=false, @bgm_volume=100, @timer=0, @LOCATION_NAMES=true, @resting_animation_pause=80, @MULTI_HIT=false, @AUTO_REVIVE=true, @DEATH_IMAGE=false, @face_graphic="", @analyze_mode=0, @teleport_dest=[], @message_position=2, @tileset_settings={}, @text_justification=2, @SP_DAMAGE_SKILL=false, @actor_defeated=0, @WINDOW_BATTLERESULT=false, @shortcuts={}, @ANIMATION_STACK=true, @shake=0, @minimap_w=160, @choice_justification=0, @BLUE_MAGIC_STATUS=false, @beasts=[], @animated_faces=false, @QUICK_PASSABILITY_TEST=true, @bar_opacity=255, @MAP_AS_BATTLEBACK=false, @text_mode=0, @timer_working=false, @comic_style=0, @escaping_exp_cost_min=0, @EMP_SKILL=false, @sfx_volume=100, @BLACKFADE=false, @windowskin="", @version=0.001>
    #<Game_Switches:0x4409460 @data=[nil, true]>
    #<Game_Variables:0x44093d0 @data=[nil, 1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 21, nil, nil, nil, nil, nil, nil, nil, nil, 0]>
    #<Game_SelfSwitches:0x4409340 @data={}>
    #<Game_Screen:0x44092b0 @flash_color=(0.000000, 0.000000, 0.000000, 0.000000), @shake_power=0, @weather_duration=0, @weather_type=0, @tremble_power=0, @shake_direction=1, @tone_duration=0, @weather_max_target=0.0, @tremble=0, @shake_duration=0, @tone_target=(0.000000, 0.000000, 0.000000, 0.000000), @weather_type_target=0, @pictures=[nil, #<Game_Picture:0x4409028 @opacity=255.0, @angle=0, @name="", @target_y=0.0, @zoom_x=100.0, @y=0.0, @target_opacity=255.0, @tone_duration=0, @target_x=0.0, @origin=0, @x=0.0, @target_zoom_y=100.0, @tone_target=(0.000000, 0.000000, 0.000000, 0.000000), @duration=0, @number=1, @blend_type=1, @rotate_speed=0, @target_zoom_x=100.0, @tone=(0.000000, 0.000000, 0.000000, 0.000000), @zoom_y=100.0>,
    (You get the idea)


    I didn't think that everything was saved! I mean, the map data is still there, even! Come ON! This is ridiculous! The save went from 48 to 188 KB.

    (Can you tell I'm excited?)
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Blizzard

1)

(0...table.xsize).each {|x|
  (0...table.ysize).each {|y|
    (0...table.zsize).each {|z|
      p table[x, y, z] # this would print out the element at x, y, z
    }
  }
}


or

for x in 0...table.xsize
  for y in 0...table.ysize
    for z in 0...table.zsize
      p table[x, y, z] # this would print out the element at x, y, z
    end
  end
end


Keep in mind that some tables have only 1 or 2 dimensions, it doesn't have to be 3, but this piece of code is universal as .ysize and .zsize will simply return 1 if the array doesn't have yet another dimension.

And error messages are good. At least they tell you wtf is wrong while logical errors need to be tracked thorough the code. #_#

2)
Quote from: Blizzard on April 01, 2008, 02:34:03 am
3)

map_data = load_data('MapInfos.rxdata')
maps = []
for id in map_data.keys
  maps.push(load_data(sprintf("Data/Map%03d.rxdata", id)))
end


or

map_data = load_data('MapInfos.rxdata')
maps = []
map_data.each_key {|id|
    maps.push(load_data(sprintf("Data/Map%03d.rxdata", id)))
}


"maps" will contain an array of all maps then.


3) Yeah, I can. :) It's not really ridiculious if you take into account that a kind of "dictionary compression" was applied to the Marshal format files. :P
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

shdwlink1993

1) I replace "table" with "actor.parameters", correct? Because if so, then it gives me an error on the first } or end in the code you gave me.

2) By second part, I meant getting the text file(s) open and printing the data. Oh, well. I got that done! ;D

3) Good point. I guess it was just the fact that the other files were all nice and ordered and had a lot of next lines, and this thing is this:


"#{$game_system.inspect}\n" +
"#{$game_switches.inspect}\n" +
"#{$game_variables.inspect}\n" +
"#{$game_self_switches.inspect}\n" +
"#{$game_screen.inspect}\n" +
"#{$game_actors.inspect}\n" +
"#{$game_party.inspect}\n" +
"#{$game_troop.inspect}\n" +
"#{$game_map.inspect}\n" +
"#{$game_player.inspect}\n"


so I don't have a lot of control over it.

4) So, is it possible to get this back in as a save file?
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Blizzard

1) If it is a Data_Actor instance, then yes. What is the error message anyway?

4) Yes, but this would be quite a nasty job. Do you know what an FSM is? Well, you need to use an FSM to parse the text from the file, create new instances and set their variables. Of course you can't set most variables from the outside, so you have to do it from within the class. -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

shdwlink1993

1) Script '.rxdata to .txt' line 108: SyntaxError Occurred.

Line 108:
                       }


4) Never heard of a FSM.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Blizzard

1) What the...?! O_O It works fine with me. Try this:
table = Table.new(2, 2, 2)
(0...table.xsize).each {|x|
    (0...table.ysize).each {|y|
        (0...table.zsize).each {|z|
            p table[x, y, z]}}}

it's basically the same, but RMXP might being a bitch.

4) Finite States Machine. Nevermind then, in any case you need a reader that reads classes and stuff. Your main problem is of course that you need to add characters and stuff that say "the next string is a class name and it is X bytes long" like "s7". Of course 7 is binary, not the actual character 7 (which would be 55 as numeric). In other words, you need to create an alternative format next to Marshal. I don't suggest that you do that. Why are you not just using Marshal format anyways?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Fantasist

QuoteAlso, why does it never get the first script?

:???: It doesn't? It should, it worked fine for me. You didn't change any "i"s ti "i+1", did you?

QuoteI got a save file! And it looks like... well... this is a pretty small portion of the file (which makes this very scary. This is a save file in text: (somescarylookingcode)


There's one property for the Object class called 'instance_variables'. Instead of doing what you did to display that instance of Game_System, you can do this:

Let's say $game_system is an instance of gGame_System you extracted from the savefile.

file = File.open('Savefile Inspect.txt', 'w')
for var in $game_system.instance_variables
   file.write(var)
   file.write("\n")
end

So, since you have many other objects (like Game_Player, etc) in the savefile, you can load all the data with Marshal.load into an array, then iterate through that array to write the data to a file, with nice formatting. Let's say save_data is that array.

file = File.open('Savefile Inspect.txt', 'w')
for object in save_data
   file.write("---::#{object.class}::---\n")
   for var in object.instance_variables
      file.write(var)
      file.write("\n")
   end
end


You'll get a text file with everything listed down neatly. I've learnt about instance_variables from Blzzard's CP Debugger script. That's how it lets you read Game_System without making every variable an attr_accessor.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




shdwlink1993

@Blizzard:
1) It still is. It's probably something really stupid I did earlier, or that I didn't know about some ****ed up rule. Here's the relevant section of coding:

Spoiler: ShowHide
  Actor = load_data('Data/Actors.rxdata')
  (1...Actor.size).each {|i|
      unless Actor[i] == nil
        file.write("    when #{i}\n" +
                   "      @id = '#{Actor[i].id}'\n" +
                   "      @name = '#{Actor[i].name}'\n" +
                   "      @class_id = '#{Actor[i].class_id}'\n" +
                   "      @initial_level = '#{Actor[i].initial_level}'\n" +
                   "      @final_level = '#{Actor[i].final_level}'\n" +
                   "      @exp_basis = '#{Actor[i].exp_basis}'\n" +
                   "      @exp_inflation = '#{Actor[i].exp_inflation}'\n" +
                   "      @character_name = '#{Actor[i].character_name}'\n" +
                   "      @character_hue = '#{Actor[i].character_hue}'\n" +
                   "      @battler_name = '#{Actor[i].battler_name}'\n" +
                   "      @battler_hue = '#{Actor[i].battler_hue}'\n" +
                   "      @parameters = '#{Actor[i].parameters}'\n" +
                   table = Actor[i].parameters#.new(2, 2, 2)
                   (0...table.xsize).each {|x|
                       (0...table.ysize).each {|y|
                           (0...table.zsize).each {|z|
                               "      @parameters = '#{table[x, y, z]}'\n" +  # this would print out the element at x, y, z
                   }}}
                   "      @weapon_id = '#{Actor[i].weapon_id}'\n" +
                   "      @armor1_id = '#{Actor[i].armor1_id}'\n" +
                   "      @armor2_id = '#{Actor[i].armor2_id}'\n" +
                   "      @armor3_id = '#{Actor[i].armor3_id}'\n" +
                   "      @armor4_id = '#{Actor[i].armor4_id}'\n" +
                   "      @weapon_fix = '#{Actor[i].weapon_fix}'\n" +
                   "      @armor1_fix = '#{Actor[i].armor1_fix}'\n" +
                   "      @armor2_fix = '#{Actor[i].armor2_fix}'\n" +
                   "      @armor3_fix = '#{Actor[i].armor3_fix}'\n" +
                   "      @armor4_fix = '#{Actor[i].armor4_fix}'\n")
      end}
  file.close


The error message has (slightly) changed, though! It now says: Line 105 ("(0...table.xsize).each {|x|"): SyntaxError occurred. And a strange thing is that I don't think it's caused by a problem I made earlier, because it doesn't give me any errors at all when I comment those lines out.

4) OK, here's the main reason I've been trying to make this script: Our school's computers are, to put it as bluntly as possible, crap. Actually, they are a lot worse, it's just that I'm a bit glad we have computers to begin with. Everything the computer does not recognize doesn't run. And a lot of things the computer does recognize won't run either. You can't get into the C:\ drive normally. Luckily, Notepad ++ (which is my... just about everything editor) let me sneak into the C:\ drive. That's the only reason I got a help file open. I had to do some renaming to get it to open (as long as Game Maker was doing it, because the computer trusts an application that has crashed at least three computers, but not the guy who double clicked on the icon).

On top of this overbearing limitation, the computers are about as slow as moving glaciers. Like in Game Maker (that's the program we're using in our Intro to Programming (we hit scripting for about three days and the teacher just dropped it. This is programming?) class. Probably because it's only 15 bucks), it takes the better part of a minute to open an Object Properties thing. Every computer I have tried it on can do that in well under a second. So, not only would I be unable to open RPG Maker XP over there, but if I could, it'd take the better part of the class (90 minutes) to get anything done. Also, I don't have an English to Marshal dictionary. (If you've seen one, do let me know. :D)

So, this leaves me with .txt files and jumbled up .rxdata files that I can't read because I can't get the reader on. Oh, and while we're at it: The version of Notepad++ the schools are using is almost a full version off (theirs are on 3.7-ish and the newest one is 4.8), so it doesn't really recognize Ruby code when it sees it.

Also, returning to the point ::), couldn't you just get Marshal to rencrypt the file in a way similar to how it decrypted them?

@Fantasist: It doesn't get the first script. This looks right, yes?

Spoiler: ShowHide
      Dir.mkdir(EXTRACT_LOCATION + "/" + SCRIPTS_LOCATION) unless File.exist?(EXTRACT_LOCATION + "/" + SCRIPTS_LOCATION)
      script_data = load_data("Data/Scripts.rxdata")
      scripts = []
      for raw_script in script_data
        scripts << Zlib::Inflate.inflate(raw_script[2])
      end
      (1...scripts.size).each {|i|
        unless scripts[i] == nil
          file = File.open(EXTRACT_LOCATION + "/" + SCRIPTS_LOCATION + "/#{i+1}. #{script_data[i][1]}.rb", 'w') rescue File.open(EXTRACT_LOCATION + "/" + SCRIPTS_LOCATION + "/#{i+1}. Invalid characters in filename.rb", 'w')
          file.write(scripts[i])
        end}
      file.close


And thanks for the instance_variables thing. The problem is, it looks like this:

Spoiler: ShowHide
@analyzed
@FURY_STATUS
@EQUIPMENT_REQUIREMENT
@order_only
@face_graphic_justification
@show_pause
@message_frame
@CHARGE_SKILL
@UNIQUE_SKILL_COMMANDS
@system_words
@load_count
@ums_mode
@FACESETS
@map_interpreter
@minimap_h
@DOOM_STATUS
@known
@choice_position
@map_name_id
@BETTER_TILEMAP_UPDATE
@animation_pause
@fontname
@MINIMAP
@window_height
@FACESETS_DSS
@DEMI_SKILL
@escaping_exp_cost_max
@name_window
@save_disabled
@cam
@FPS_MODULATOR
@SHADED_TEXT
@back_opacity
@INVINCIBLE_STATUS
@ITEM_REQUIREMENT
@battle_order_only
@face_graphic_position
@minimap_visible
@ENERGY_SKILL
@sound_effect
@save_count
@skip_mode
@CATERPILLAR
@HEAL_AT_LVLUP
@message_event
@minimap_a
@ABSORB_HP_SP
@name_timer
@CENTER_BATTLER
@face_frame_width
@release
@window_width
@STATUS_ICONS
@fontsize
@ZOMBIE_STATUS
@ENEMY_STATUS
@font
@menu_disabled
@REVENGE_SKILL
@HUD
@chaos_party
@window_image
@SPEED_MODULATOR
@shadowed_text
@teleport_dest
@minimap_x
@SP_COST_MOD
@HP_SP_CRUSH
@magic_number
@slave_windows
@version_id
@name
@ddns_off
@HPSPPLUS
@text_skip
@ARROW_OVER_PLAYER
@train_actor
@battle_interpreter
@DEATH_ROULETTE
@escaping_gold_cost_min
@resting_face
@BARS
@REGEN_STATUS
@SKILL_SEPARATION
@window_justification
@ANIBATTLERS_NON_ACTION_BS
@opacity
@encounter_disabled
@DESTRUCTOR_SKILL
@index
@encounter_count
@font_color
@used_codes
@DEATH_TOLL
@enemy_defeated
@TREMBLE
@FROZEN
@window_mode
@shadow_color
@teleport_permit
@minimap_y
@show_clock
@indy_windows
@TARGET_EM_ALL
@write_speed
@ANIMATED_BATTLE_BACKGROUND
@bar_style
@BLUE_MAGIC_SKILL
@escaping_gold_cost_max
@comic_enabled
@bgm_volume
@timer
@LOCATION_NAMES
@resting_animation_pause
@MULTI_HIT
@AUTO_REVIVE
@DEATH_IMAGE
@face_graphic
@analyze_mode
@message_position
@tileset_settings
@text_justification
@SP_DAMAGE_SKILL
@actor_defeated
@WINDOW_BATTLERESULT
@shortcuts
@ANIMATION_STACK
@shake
@minimap_w
@choice_justification
@BLUE_MAGIC_STATUS
@beasts
@animated_faces
@QUICK_PASSABILITY_TEST
@bar_opacity
@MAP_AS_BATTLEBACK
@text_mode
@timer_working
@comic_style
@escaping_exp_cost_min
@EMP_SKILL
@sfx_volume
@BLACKFADE
@windowskin
@version
@data
@data
@data
@flash_color
@shake_power
@weather_duration
@weather_type
@tremble_power
@shake_direction
@tone_duration
@weather_max_target
@tremble
@shake_duration
@tone_target
@weather_type_target
@pictures
@flash_duration
@shake_speed
@tone
@weather_max
@tremble_direction
@shake
@data
@event_armor
@armor_recipes_made
@gold
@weapons
@item_recipes_made
@event_weapon
@weapon_recipe_availible
@items
@mission
@event_item
@weapon_recipes_made
@steps
@armor_recipe_availible
@armors
@item_recipe_availible
@actors
@enemies
@display_y
@panorama_hue
@terrain_tags
@fog_tone
@fog_sy
@events
@scroll_speed
@passables
@fog_opacity
@fog_opacity_duration
@display_x
@panorama_name
@priorities
@fog_oy
@fog_sx
@common_events
@scroll_rest
@map
@fog_hue
@fog_tone_duration
@map_id
@autotile_names
@passages
@fog_ox
@fog_zoom
@scroll_direction
@fog_name
@fog_tone_target
@tileset_name
@battleback_name
@fog_blend_type
@need_refresh
@fog_opacity_target
@opacity
@anime_count
@character_name
@original_pattern
@move_type
@real_y
@direction_fix
@jump_peak
@y
@pattern
@move_route
@original_move_route_index
@tile_id
@original_direction
@prelock_direction
@real_x
@step_anime
@jump_count
@x
@direction
@move_frequency
@original_move_route
@transparent
@always_on_top
@locked
@blend_type
@walk_anime
@stop_count
@id
@character_hue
@move_speed
@move_route_index
@encounter_count
@move_route_forcing
@through
@animation_id
@wait_count
@members


It's missing what the variable is equal to.

PS. Blizzard, just as a heads up, I didn't really hack the .dll file for dream, I just looked at the .rb and then altered the piece of code that we were supposed to put in the scripts, so technically does that mean that the license redefinition doesn't apply? ::)

PPS. The license redef was pretty funny.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Blizzard

Lol, you have some really funny syntax errors there.

          "      @parameters = '#{Actor[i].parameters}'\n" + 
                   table = Actor[i].parameters#.new(2, 2, 2)


This here will work:

  Actor = load_data('Data/Actors.rxdata')
  (1...Actor.size).each {|i|
      unless Actor[i] == nil
        file.write("    when #{i}\n" +
                   "      @id = '#{Actor[i].id}'\n" +
                   "      @name = '#{Actor[i].name}'\n" +
                   "      @class_id = '#{Actor[i].class_id}'\n" +
                   "      @initial_level = '#{Actor[i].initial_level}'\n" +
                   "      @final_level = '#{Actor[i].final_level}'\n" +
                   "      @exp_basis = '#{Actor[i].exp_basis}'\n" +
                   "      @exp_inflation = '#{Actor[i].exp_inflation}'\n" +
                   "      @character_name = '#{Actor[i].character_name}'\n" +
                   "      @character_hue = '#{Actor[i].character_hue}'\n" +
                   "      @battler_name = '#{Actor[i].battler_name}'\n" +
                   "      @battler_hue = '#{Actor[i].battler_hue}'\n" +
                   "      @parameters = '#{Actor[i].parameters}'\n")
        table = Actor[i].parameters#.new(2, 2, 2)
        (0...table.xsize).each {|x|
          (0...table.ysize).each {|y|
            (0...table.zsize).each {|z|
              file.write("      @parameters = '#{table[x, y, z]}'\n")
        }}}
        file.write("      @weapon_id = '#{Actor[i].weapon_id}'\n" +
                   "      @armor1_id = '#{Actor[i].armor1_id}'\n" +
                   "      @armor2_id = '#{Actor[i].armor2_id}'\n" +
                   "      @armor3_id = '#{Actor[i].armor3_id}'\n" +
                   "      @armor4_id = '#{Actor[i].armor4_id}'\n" +
                   "      @weapon_fix = '#{Actor[i].weapon_fix}'\n" +
                   "      @armor1_fix = '#{Actor[i].armor1_fix}'\n" +
                   "      @armor2_fix = '#{Actor[i].armor2_fix}'\n" +
                   "      @armor3_fix = '#{Actor[i].armor3_fix}'\n" +
                   "      @armor4_fix = '#{Actor[i].armor4_fix}'\n")
      end}
  file.close

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Sase

Well it's nice reading this stuff. It makes me feel myself stupid :(

Fantasist

(1...scripts.size).each {|i|


It's
0...scripts.size
. And you can use array.each_index to iterate through the array completely.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




shdwlink1993

And this one isn't nearly as long :D!

@Blizzard: OK, it's official. I am a certified nimrod.

The problem? Actor.parameters's table has two dimensions. TWO! And I never thought that the 'z' thing might be the problem. You know, over the last half month, I have realized two things:

1) I'm getting a bit better at this whole scripting thing.
2) This forum needs a slap face (or duh) emote.

Oh, yea. I left a note for you at the bottom of the last post, Blizz. I don't think you saw it, though.

@Fantasist: I can't find exactly where array.each_index goes in the code. I've tried in a few places to no avail.
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

Fantasist

Use
scripts.each_index {|i|
   code
}


instead of
(1...scripts.size).each {|i|
   code
}


That's it :)

Hey, you either didn't read Blizzy's Scripting Tute, or you've forgotten some points. It'll really helpful, believe me :)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews