Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Search the Community

Showing results for tags 'rgss'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Main Center
    • Announcements & News
    • Feedback, Bug Report and Forum Help
    • Introductions and Farewells
    • Community Contests & Events
  • Game Development
    • General Game Development
    • Engine Discussion
    • Support
    • Requests
    • Project Recruitment
  • Community Projects
  • Creativity & Design
    • Programming & Web Development
    • Stories and Literature
    • Resource Showcase & Critique
    • The artsy side
  • Off Topic
    • The Cafe
    • Computers, Internet and Tech Talk
    • Video Games
    • Entertainment & Media
    • Role Playing, Interactive Story Telling & Forum Games
  • Archive
    • Forum Archive
  • RPG Maker VX
  • Gamers Corner

Blogs

  • Emily_Konichi's Blog
  • Wyzrd's Blog
  • Marks Bloggy
  • Punkid's blog
  • isaacsol's Blog
  • Cloudstrife's blog of items
  • Lammorra's Blog
  • The most magnificent blog EVER!
  • dietcherrycoke
  • Elric1816's Blog
  • COPY RIGHT...???
  • Chaos Impact - Production Blog
  • Encounters
  • Kiriashi's RMXP Activity
  • bugbite250's Blog
  • polraudio's Blog
  • The Silent Assassin Horror Blog
  • Elandryal's Blog
  • niemitoad's Blog
  • Awakening project Blog
  • XDoggStrafe's Blog
  • Code Geass: Painful Memories Daily Progress
  • Check out what I'm doing... you stalker
  • Aerow's Blog
  • Omar510's Blog
  • Agckuu Coceg Blog
  • My RMXP Projects Blog
  • Franklin's Adventures
  • RMXPUnlimited Dev Blog
  • HedgeKnight.net
  • Zanime Dev Blog
  • Tomo2000's Blog
  • The Programmer's Blog
  • A Bayonetta Inspired game
  • Elviar: Erufu Tairiku Blog
  • ShinyToyGuns' Development Blog
  • Zeriab's thoughts
  • Blogotry
  • Leerox4eva1's Blog
  • Tatsu's
  • O
  • Zark: The Time Storm Blog
  • DS (Devine Shadow) Development Blog
  • Silver Moon Blog
  • Rhijun568's Blog
  • Rhijun568's Blog
  • Mundane's Blog
  • Meh
  • Cutting Through Time Itself
  • This is not a Blog
  • RGangsta's Blog. :D
  • jporter917's Blog
  • Leon's Blog for the Minions
  • Inner Monologue
  • White Rabbit's cave with a view.
  • Darktom77's Blog
  • Salsa de salsa en Malaga
  • mwillems' Blog
  • aaa135139's Blog
  • withinsin's Blog
  • Final Fantasy XP VI
  • The progress of Crym
  • Free to Listen
  • Final Fantasy XP
  • Mega Man Transfer
  • Random Blog
  • Random Blog
  • RPG Maker Inventions
  • Xeyla's Blog
  • 808_legend's Blog
  • My First Non-Fan game
  • kellessdee's Blog
  • Chronicles of the Chronicles
  • YAY! Factors
  • Merlin The RPG Blog
  • newgamergirl2011's Blog
  • Calathandias Blog
  • Jon Bon's Blog
  • RMU Development Blog
  • Glaze Of The Slient
  • Illuminate the pathway, blind the corrosion and set sail for awakening!
  • Project GK
  • frida89's Blog
  • Octopus Shoes
  • Stuffs
  • Uninstaller
  • Music Mayehm
  • Development Blog 2.0
  • Nickz's Blog
  • RageMage's Blog
  • UrHappyPlz's Blog
  • Gmack's Blog
  • Night Horror
  • Tales of Druidia Blog
  • Arcatis Progress
  • Ex-Stigma
  • yiyi's Blog
  • yiyi's Blog
  • jianren925's Blog
  • gaogen's Blog
  • Prince Liam
  • Bon Ink Creations Independent Showcase
  • Video Game Series Where Are They Now?
  • buwawa's Blog
  • Bon Ink Creations Blog
  • Bon Ink Creations Forum Feed
  • White Rabbit's Thought Bubble
  • Pyramid_Head's Grotto of Wonders
  • DarthVollis's Project
  • Day of the Darkness
  • Ovan35's Blog
  • nightprince75's Blog
  • Arcatis Project
  • Code Runners Dev Blog
  • valerinwuba's Blog
  • shontellewilson's Blog
  • Bob Rambles
  • The Other World
  • Audio bible
  • Audiobible

Categories

  • RMXP Projects
  • RMVX Projects
  • Other Games
  • RGSS(RMXP) Scripts
  • Graphical Resource Packs
  • Audio Downloads
    • Audio Packs
    • BGM
    • BGS
    • ME
    • SE
  • Tools & Utilities
  • Misc. Downloads
  • Eventing Systems/Tutorials

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Steam Profile


Website URL


Skype


Facebook


Location


Interests


Other Skills


Project(s)


Referer


Google Plus Profile

Found 13 results

  1. Hello friends, I'm immersed in the project of a videogame "The Gymkhana of the Treasure" I've been working for months now but I still have a long way to go, I've reached the point where I need help to create more sprites and their respective images with emotions (manga style) , and on the other hand I also needed the support of someone who understands the RGSS to help me with the creation of SCRIPTS that improve the project. It is a long project, with 4 seasons, and events depending on it, and above all it is about exploration. I have the idea of undertaking with it, therefore I will do marketing courses once we finish it to try to take it to the top, trading it internationally if the players give it a pleasant welcome, translating it into English and Spanish, and later investing profits for it. translate it into more languages and reach more people. I offer 20% of the profit for each collaborator (I need two people) I look for transparency and good teamwork. I am putting all my heart into this project. Although I offer 20%, remember that in entrepreneurship, it does not always work out and that failure exists, therefore I do not promise that it will give benefits, but I will give 100% trying to overcome the obstacles that arise. If you are interested, I would be delighted to see your works to see if they adapt to the style of the video game, especially graphically. Thank you very much Postscript: my native language is Spanish, and my English is from Google (warning ).
  2. Warrior of Add-ons Author: Bigace360 Type: Add-on Collection Control Script Version: 1.51 Introduction This is a collection of different add-ons with the option to turn each on/off. If you have any ideas how to improve this collection, just say so. I will add you into the credits of this add-on collection if you have an own add-on. I will not add any add-ons made by somebody else than yourself, you can't ask me for somebody else to add an add-on. The creator has to ask me himself. Version History Version history inside the script at the bottom! Features Utility (make your game more unique and better/help you during debug): Help Window+ (A script that adds extra features to the Help window during battle.) Scene_Title_Skip (Used to test games without having to go through the title screen.) Outlined Text (Basically gives your text a outline.) Battler Stat: Barehand: (Gives actors stronger strength when no weapon is equipped.) MP Death: (Allows your character to die by MP also, like in Star Ocean.) Enemy Auto States: (This script allows you to create effects that stay always active for enemies) Status Effect (non-standard status effects) Status: Reraise: (Allows you to use the reraise status in battle.) Item (non-standard items): Special Elements (Allows it so for only certain enemies to be hurt by certain elements.) Instructions Inside the script in the first comment. Note the most add-ons have their own instructions. Script Warrior of Add-ons v.1.51 Compatitblity None known so far. Credits and Thanks Bigace360, for the script. Author's Notes As stated before if anyone has any add-ons they wish to add to it or have any ideals then ask away. Remember however, if you have an ideal, I may or may not be able to fulfil the demand right away as I'm still learning. I'm making this a GDUnlimited exclusive script, so only posters here will have this. So don't post this script on any other site without my premission. Enjoy the script
  3. Scene_Biography Authors: Bigace360 Version: 3.1 Type: Actor Biography Key Term: Misc Add-on Introduction Features Shows actors characteristic stats and battler image or imported image. Can also add a background to it now. Screenshots Script Instructions Insert this script above main, and call it Scene_Biography. Everything is in the module so there’s no need to go any further down unless you know what your doing. Also as default, the script uses the battlers set in the database unless you place a image in the picture folder and place _P at the end of the files name. Compatibility Requires Scene_Base scripts that may conflict with this Engine are stated in the comments in the SECTIONS. Credits and Thanks Bigace360, for the script [table=Author's Notes] Enjoy!
  4. Scene_Bestiary Author: Bigace360 Type: Enemy Catalogue Display Version: 2.7 Introduction This script will allow your characters to retrieve information about enemies they gained during battle and show them in a window. Version History 1.30.2012 (v1.0) – Initial Release 3.13.2012 (v1.1) – Fixed Incompatibilites 4.24.2012 (v2.0) – Overworked the system, Improved coding, Fix bugs 6.04.2012 (v2.4) – Improved coding, Add conditions to the ability page 8.21.2012 (v2.7) – Fixed Incompatibilites, Improved coding, added layouts Future Updates [table=Feature] Elemental and Status resist tables Enemies skill Page Show enemies description text You can test fight defeated monsters Some monsters data can stay hidden [color=#000000 Inside the script in the first comment. [color=#000000 [color=#000000 [color=#000000Q: The demo won't open, how to open it?A: Download Winrar and try again. Q: I'm having problem with working this with my CBS, can you help? A: No! Sorry but unless it's Tenkantai CBS, I suck at Custom Battle Systems so you're going to have to request help from some one else. [color=#000000 This is an Advisory for those of you using multiple scripts. If you are using other scripts that rewrite the same classes or methods as this one, there may be a conflict and things will work incorrectly in unpredictable ways. This script automatically adds itself to the default menu if you turn that feature on in the module. [color=#000000 Bigace360, for the script. Blizzard (Bitmap.Slice_text method) Kellessdee, for helping me add the conditions to the Bestairy Night_Runner, for helping fix a couple of things I was having trouble with [color=#000000 If you have any suggestion to add to the Monster Album, don't hestitate to ask. But just know that there's a chance that it won't be added.
  5. Scene_Title_Skip Author: Bigace360 Type: Title / Save / Load / GameOver Add-on Introduction This script basically does what the title says, it skips it. This is basically for developers who get tired of seeing the title screen over and over again when there testing there game. Feature Skips title screen Allows the Developer to add items when he starts the game at the top. Screenshot picture skipping the title screen in your head. Demo Not need Script Compatibility No known issues. Credits and Thanks Bigace360, for the script Author's Notes Enjoy!
  6. Help Window+ Author: Bigace360 Type: Menu Add-on Version: 1.0 Introduction It's simple plug-in-play script that just adds extra feature to the help window during battle. Version History v.1.0 (Feb. 1, 2012) ~ Original Script completed Features Help window Plus adds the HP & SP gauge for enemies, it also allows the developer choose which enemies will show ??? to hid the HP instead. Instructions It's plug and play, only thing that needs to be done is for you to add the enemies that you wish to have there HP & MP blocked which can be done in the module by putting the enemies id in the bracket array. Screenshot Close your eyes and image your help window with a HP and MP for your selected enemy. Script Compatitblity Shouldn't have any issues with any other script then another custom Help window script Credits and Thanks Bigace360, for the script. Author's Notes Enjoy the script
  7. Max Limiter Breaker Author: Bigace360 Type: Misc Add-on Version: 1.4 Introduction Tired of having only 99 items? Want to have be able to change maximum gold amount or party capacity? This is the script for you! This script allows you to change the max for a few things! Version History v.1.0 (I never released it) ~ Original Script completed v1.1 (Nov, 2. 2010)(I never released it) ~added a module for easy configuration ~added gain_item to the Game_party v1.4 (Oct, 23, 2011) ~added add_actor, gain_weapons, and gain_armors to Game_Party ~Upgraded the module, so you can now also choose which items that can be max out by ID Features Change Max Amount of Items (Items, Weapons, Armor) Owned Change Max Amount of Gold & Step count Change Max Amount of the Party size Instructions There in the script comment section in the beginning. Script Max Limiter Breaker v1.4 Compatitblity This script has modded Window_ShopBuy, Window_ShopSell, Scene_Shop, and Window_Item. DO NOT USE ANY OTHER MODDED VERSIONS OF THESE WINDOWS IF YOU WOULD LIKE THIS TO WORK! Credits and Thanks Bigace360, for the script. Author's Notes I never relesed the first 2 verisons of this script and the third verison was created way back in October 2011. So, I've been practically updating since then and now finally decided to release it exclusively here. Enjoy the script
  8. Hey all! I stumbled upon project which contained a script I made who knows how long ago. I admit I had completely forgotten about it. So who can guess what it does? It's obviously for XP since it does something with terrain tags, but what? I may update this post with the answer some time later :3 *hugs* class Game_Character attr_accessor :terrain_tag alias_method(:zeriab_terrain_tag_passable, :passable?) def passable?(x, y, d) new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0) new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0) if terrain_tag if (terrain_tag > 0 && $game_map.terrain_tag(new_x,new_y) != terrain_tag) || (terrain_tag < 0 && $game_map.terrain_tag(new_x,new_y) == -terrain_tag) return false end end return zeriab_terrain_tag_passable(x, y, d) end end class Game_Event < Game_Character alias_method(:zeriab_terrain_tag_init, :initialize) def initialize(map_id, event) zeriab_terrain_tag_init(map_id, event) if event.name.include?('<t>') self.terrain_tag = $game_map.terrain_tag(x, y) elsif /<t=(\d+)>/ =~ event.name self.terrain_tag = $1.to_i elsif /<t=-(\d+)>/ =~ event.name self.terrain_tag = -($1.to_i) end end end
  9. Here are a few thoughts on multi-threading in RGSS. They may very well be applicable to RGSS2, but on the other hand there might be differences. I am assuming that you have knowledge on the multi-threading in general. Single Core It doesn't matter how many threads you make, only a single core on a single cpu can be utilized in RGSS. I believe this is a short-coming of the Ruby interpreter itself although I am not completely sure. It does seem like the Audio runs in a thread outside the Ruby environment and thus may be able to use another core to process the audio. (I am not completely sure about this) In conclusion you should not expect any speed improvements by using more threads. Graphic.update As you can derive from the name this method updates the graphics. It also tries to keep the frame-rate stable. This means that it halts until enough time has passed. The problem is that Graphic.update does not only halt the thread calling the method. It halts all threads. You cannot stop calling Graphics.update since you will get a Script Hanging error after 8-10 seconds. You can basically expect the performance of the other threads to decrease significantly. Sprites Sprites appear not to be thread-safe. If you create sprites in one thread while another thread calls Graphics.update you may very well face a race condition which causes the game to crash. It may perfectly be possible to safe-guard the Graphics.update call (by aliasing and making critical regions) so that the internal Graphics.update will never be called. I suggest that you try to have all the sprite creation in the same thread as the Graphics.update. That way I don't think any nasty surprises will await you and allow normal thread-safety measures. Conclusion Performance-wise there is no real benefit in using more than 1 thread. In fact it will probably decrease the performance. Therefore only use more than one thread if alternatives makes the scripting much more complicated. An example of where multi-threading could help is with a loading script or progress script where one thread takes care of handling sprites and updating Graphics.update as little as possible while the other thread does its loading or fancy (slow) algorithms.
  10. Zeriab

    __END__

    Here's a little mention about an interesting special term, __END__. The rest of the section after that will not be run. In fact I believe the parser will stop at __END__ and therefore won't even build the abstract syntax tree for what comes afterwards. (An effect is the lack of syntax checking) This can be used for preventing the inclusion of test code except when you want to use it. I am sure you can see how it can be helpful in providing test data for scripters while being ignored normally. Of course you could use a if false ... end for similar effect. The different is that the abstract syntax tree will be created while it will not when using __END__. On the other hand copy-pasting several sections into a single section may disable sections. class Medal include Comparable attr_reader :titel, :time def initialize(titel, time) unless time.is_a?(Numeric) raise ArgumentError.new("Time must be a numeric") end @titel = titel @time = time end def <=>(medal) return time <=> medal.time end end __END__ class TestError < StandardError; end bronze = Medal.new('Bronze', 180) bronze2 = Medal.new('Bronze', 180) bronze3 = Medal.new('Bronze3', 180) silver = Medal.new('Silver', 105) gold = Medal.new('Gold', 87.5) unless (bronze == bronze2) raise TestError.new("Medal.== does not compare #{bronze.inspect} " + "and #{bronze2.inspect} properly") end unless (bronze == bronze3) raise TestError.new("Medal.== does not ignore the title") end unless (silver <=> bronze) == -1 raise TestError.new("Medal.<=> does not return -1 when its time is less" + " than the medal compared to") end unless (silver <=> gold) == 1 raise TestError.new("Medal.<=> does not return 1 when its time is greater" + " than the medal compared to") end unless (bronze <=> gold) == 1 raise TestError.new("Medal.<=> does not preserve transitivity.\n" + "I.e. <=> is highly problematic.") end p 'Medal testing completed successfully'
  11. To show one use of my Interpreter command_355 fix I'll show how you can make events wait for movement of a single event or the player to finish rather than all movements which the Wait For Move's Completion command does. Let's add this little snippet for checking whether Game_Character is moving or not. (Both Game_Player and Game_Event inherits from that class: (Add anywhere above main) http://paste-bin.com/view/6af9b1c2 It returns :wait when called. You can now put $game_player.wait_for_movement in a script call and that event will wait until the player has stopped moving before continuing. Likewise you can use $game_map.events[7].wait_for_movement for waiting until the event with id 7 has finished its movement. It's simple, elegant and much easier than had the wait functionality been removed from command_355. It was an excellent idea in the default scripts albeit a little poorly executed and unfortunately not well-understood. Next I will add some syntactic sugar to use in the call scripts which makes waiting for specific events easier. It's not needed at all, but it is more user friendly and nicer to use. Add this script anywhere above main: (Script put at bottom) You can now simply put wait_for_movement in a script call and it will wait for its own movement to to be completed. (Note that it will simply skip if the interpreter does not originate from a map event. See my Common Events tutorial for more information on this subject) You can specify a specific with wait_for_movement(id) where id is the id of the map event. If you for example want to wait for event 7 then use wait_for_movement(7). You can wait for the player by using wait_for_movement(0) or by using wait_for_players_movement. Note that it will do nothing if called in battle. class Interpreter ## # Wait for movement where: (Nothing will happen in combat) # id < 0: Current event (if there is one) # id = 0: Player # id > 0: Event with that id (if there is one) # def wait_for_movement(id = -1) # If in battle return if $game_temp.in_battle # Get actor actor = nil if id < 0 && @event_id > 0 actor = $game_map.events[@event_id] elsif id == 0 actor = $game_player else actor = $game_map.events[id] end # Wait for actor's movement unless actor.nil? actor.wait_for_movement end end ## # Wait for player's movement # def wait_for_players_movement wait_for_movement(0) end end
  12. This command has given people headaches and many don't really understand it. In the default scripts if the script call is evaluated to false then the event waits and tries evaluating the script again. Naturally if you don't think or accidentally cause false to be the result of the script call all the time, the event practically freezes. An example could be $game_switches[42] = false which will evaluate to false every time. I really think that is not the purpose. Of course you could have $game_switches[42] to halt the event until that switch is turned on. This can have some nice practical purposes that I haven't seen. The solution I most often see is: Oh god no! Let's remove it since it causes my game to freeze! This is obviously not the most ideal solution. It is true that in practice many errors has been cause by the default behavior and considering how little people seem to use that feature it does seem to better to remove it than to keep it as it is. As you can hear I am not too happy about the idea. It is a nice feature that I would want to keep. My solution would be to check if the call script evaluates to something which it is unlikely to do by accident. I have pushed through the check for FalseClass which is present in the SDK 2.4, but that doesn't really convey the purpose that well. Checking for the :wait symbol is a nicer solution since it conveys what it means very well. I believe it's very unlikely that someone would make a call script which returns :wait by accident. It is at least much more unlikely than false. Below is a script which also is compatible with the FalseClass version. class Interpreter SCRIPT_WAIT_RESULTS = [:wait, FalseClass] #------------------------------------------------------------------- # * Script #------------------------------------------------------------------- def command_355 # Set first line to script script = @list[@index].parameters[0] + "\n" # Store index in case we need to wait. current_index = @index # Loop loop do # If next event command is second line of script or after if @list[@index+1].code == 655 # Add second line or after to script script += @list[@index+1].parameters[0] + "\n" # If event command is not second line or after else # Abort loop break end # Advance index @index += 1 end # Evaluation result = eval(script) # If return value is false if SCRIPT_WAIT_RESULTS.include?(result) # Set index back (If multi-line script call) @index = current_index # End and wait return false end # Continue return true end end Notice that I also fixed the bug where it would not wait with multi-line call scripts. If you want to also have support for false then you can change SCRIPT_WAIT_RESULTS = [:wait, FalseClass] to SCRIPT_WAIT_RESULTS = [:wait, FalseClass, false] You can also put in your own objects to check for. *hugs*
  13. Here is a small script I cooked up some time ago. It extracts all the text messages and choices of all the events in the game. One file for the map events, another for the common events and a third text file for the battle events. It can be useful for reviewing purposes and also for simple-minded word spell-checking. Note that since there is loss of information to the format presented you should consider it infeasible to be able to inject your modifications back into the project by automatic means. I know there is a French project which can do this, but the text files are not as nice to read. To use the script create a new section right above Main and run the program. Delete the section afterwards. You now have 3 new dialogue_xxx.txt files in the project folder. *hugs* P.s. thanks to Trebor777 for the idea of using blocks instead of f = and f.close def update_sprite if @sprite.nil? @sprite = Sprite.new @sprite.bitmap = Bitmap.new(640, 120) end current = $current unless current == $last $last = current @sprite.bitmap.clear unless current.nil? @sprite.bitmap.draw_text(8,4,600,32,$last.map) @sprite.bitmap.draw_text(8,40,600,32,$last.event) end end end ## # A separate thread that will run and make sure the Graphics.update is updated # every now and then. # Thread.new { loop do # Lets the thread sleep for a while to minimize CPU usage sleep 0.1 # Update the sprite update_sprite # Update the graphics Graphics.update end } Current = Struct.new(:map, :event) $current = nil Map = Struct.new(:name, :map_id, :events) Event = Struct.new(:name, :event_id, :pages) Page = Struct.new(:number, :list) ListElement = Struct.new(:message, :type) ###### ###### class Map def write_to_stream(io) io.print "\r\n########################################" io.print "\r\n# Map #{map_id} ~ #{name} (#{events.size} events)\r\n" io.print "########################################\r\n" for event in events event.write_to_stream(io) end end end class Event def write_to_stream(io) io.print "\r\n-= Event #{event_id} - #{name} =-\r\n" for page in pages page.write_to_stream(io) end end end class Page def write_to_stream(io) io.print "Page #{number}:\r\n" for element in list element.write_to_stream(io) io.print "\r\n" end end end class ListElement def write_to_stream(io) io.print message end end ###### def process_list(list) # Go through the event commands in the list rlist = [] # resulting list command_index = 0 while command_index < list.size command = list[command_index] if command.code == 101 message = command.parameters[0].rstrip loop do break unless command_index + 1 < list.size if list[command_index+1].code == 401 command_index += 1 message += " " + list[command_index].parameters[0].rstrip elsif list[command_index+1].code == 102 command_index += 1 for text in list[command_index].parameters[0] message += "\r\n" + text.rstrip end else break end end rlist << ListElement.new(message, 'text') elsif command.code == 102 message = "" for text in list[command_index].parameters[0] message += "\r\n" + text.rstrip end rlist << ListElement.new(message, 'choice') end command_index += 1 end return rlist end ###### class CommonEvent < Struct.new(:name, :event_id, :list) def write_to_stream(io) io.print "\r\n-= Common Event #{event_id} - #{name} =-\r\n" for element in list element.write_to_stream(io) io.print "\r\n" end end end common_events = load_data('Data/CommonEvents.rxdata') ces = [] for ce in common_events.compact # Look at which event is currently processing cur = Current.new("Processing common events...", "Common event #{ce.id} - #{ce.name}") $current = cur # Process the list list = process_list(ce.list) unless list.empty? # Create struct current_ce = CommonEvent.new(ce.name, ce.id, list) ces << current_ce end end ###### ###### class Troop < Event def write_to_stream(io) io.print "\r\n-= Troop #{event_id} - #{name} =-\r\n" for page in pages page.write_to_stream(io) end end end troops = load_data('Data\Troops.rxdata') battle_events = [] for event in troops.compact # Look at which event is currently processing cur = Current.new("Processing battle events...", "Troop " + event.id.to_s + " - " + event.name) $current = cur # Create the event struct current_event = Troop.new(event.name, event.id, []) # Create pages event.pages.each_with_index do |page, page_index| list = process_list(page.list) unless list.empty? current_page = Page.new(page_index+1, list) current_event.pages << current_page end end # Let's disregard useless events battle_events << current_event unless current_event.pages.empty? end ###### ###### infos = load_data('Data\MapInfos.rxdata') maps = [] for map_id, map_info in infos.sort # Create map struct current_map = Map.new(map_info.name, map_id, []) maps << current_map map = load_data(sprintf("Data/Map%03d.rxdata", map_id)) # Create event structs for event_id, event in map.events.sort # Look at which event is currently processing cur = Current.new("Map " + map_id.to_s + " - " + map_info.name, "Event " + event_id.to_s + " - " + event.name) $current = cur # Create the event struct current_event = Event.new(event.name, event_id, []) # Create pages event.pages.each_with_index do |page, page_index| list = process_list(page.list) unless list.empty? current_page = Page.new(page_index+1, list) # Let's disregard useless pages current_event.pages << current_page end end # Let's disregard useless events current_map.events << current_event unless current_event.pages.empty? end end # Update status info cur = Current.new("All maps have been processed", "Writing to a text file") $current = cur File.open('Dialogue_Map.txt', 'wb') {|f| f.print "THIS FILE CONTAINS THE DIALOGUE EXTRACTED FROM THE MAPS\r\n\r\n" for map in maps map.write_to_stream(f) end } File.open('Dialogue_Common.txt', 'wb') {|f| f.print "THIS FILE CONTAINS THE DIALOGUE EXTRACTED FROM THE COMMON EVENTS\r\n\r\n" for ce in ces ce.write_to_stream(f) end } File.open('Dialogue_Battle.txt', 'wb') {|f| f.print "THIS FILE CONTAINS THE DIALOGUE EXTRACTED FROM THE BATTLE EVENTS\r\n\r\n" for be in battle_events be.write_to_stream(f) end } exit
×
×
  • Create New...