Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Wecoc on January 28, 2017, 10:47:09 PM

Title: [XP] Grid-Free Doodads
Post by: Wecoc on January 28, 2017, 10:47:09 PM
Grid-Free Doodads
Authors: Wecoc
Version: 1.01
Type: Doodad System
Key Term: Game Utility

Introduction

Grid-Free Doodads is a system that implements on your game the use of Doodads, in other words, tiles which are not fixed on the default editor grid.

With this you can get an effect very similar to those made with parallax mapping but this time controlled on the game, with extra options. Also, the size of the game file will be much lower, solving this way the main problem found on games that use parallax.

This system was inspired by the Grid-Free Doodads (http://yanfly.moe/2016/09/17/yep-116-grid-free-doodads-rpg-maker-mv/) plugin for RPG maker MV, made by Yanfly.
It contains a total of 7 scripts: Mouse and Keyboard support, a script containing all the info you need to know to use this system in your game, and the system by itself divided in 4 parts.

Features


Screenshots

(click to show/hide)

Demo

Grid-Free Doodads 1.01 (http://share.cherrytree.at/showfile-27195/grid_free_doodads_101_eng.zip) (English)
Grid-Free Doodads 1.01 (http://share.cherrytree.at/showfile-27196/grid_free_doodads_101_esp.zip) (EspaƱol)

Script

You will find the 7 scripts in the demo, place them in your game (first you should save a copy of you game on its current state). Place them over main and over other custom scripts. You will find more detailed Instalation info inside the script Doodad Info.

Instructions

Inside the script Doodad Info

(click to show/hide)

Compatibility

If you are using other Mouse and Key support scripts in your game you can use them instead of the ones found in the demo, but you will have to edit the last script (Doodad Setup) to adapt it to your scripts.

You will probably get an error if you try to load a save file of your game, if you saved it before inserting Grid-Free Doodads.

No other compatibility issues were found.


Credits and Thanks


Author's Notes

This is for rebels who still use RPG maker XP but want Doodads because f*ck, they are great.
Enjoy~
Title: Re: [XP] Grid-Free Doodads
Post by: KK20 on January 28, 2017, 11:09:41 PM
(click to show/hide)
I remember seeing the MV script on Youtube and was like "Damn we need that shit in XP--I should make it once I finish my other things".
But dude you have delivered.
++ bro
Title: Re: [XP] Grid-Free Doodads
Post by: Blizzard on January 29, 2017, 10:31:59 AM
This is awesome! How did you implement them in the backend? With tiles or events?
Title: Re: [XP] Grid-Free Doodads
Post by: Wecoc on January 29, 2017, 09:02:33 PM
How did you implement them in the backend? With tiles or events?

I thought events would probably increase lag much more, so I created an entire new type.

The Doodads are default RPG::Sprite stored on Spriteset_Map, but their properties are defined using a new class "Doodad", and saved to Doodads.rxdata, which is created the first time you insert a doodad.
The Area info is saved in Map(ID).rxdata in a very easier way as many other default properties of the map; my first plan was doing the same with all the doodads data but I had some troubles with that so I decided to store all their info in a new rxdata.

Some project compilators still work anyway, some others will need some changes to compile Doodad.rxdata with the others.

Also, talking about lag, I tested it adding 200 animated doodads in the map and lag is nearly the same as you can see here.
(click to show/hide)
Title: Re: [XP] Grid-Free Doodads
Post by: Blizzard on January 29, 2017, 09:39:54 PM
Nice. It was a good idea to make it a separate file so maps can be still easily edited in RMXP's editor.

(click to show/hide)
Title: Re: [XP] Grid-Free Doodads
Post by: KK20 on January 30, 2017, 06:14:07 AM
Things I noticed in the demo:
Code: [Select]
        result =
        begin
          eval(@doodad.condition)
        rescue SyntaxError
          print $!
          nil
        rescue
          print $!
          nil
        end
Title: Re: [XP] Grid-Free Doodads
Post by: Wecoc on January 30, 2017, 07:06:20 PM
Thank you KK20 for testing it all.

Fortunately, many of these bugs were easy to fix, I already fixed them and upload the demo(s) again.
But there's one I don't know how to fix or if it's even possible...

Quote
When placing Areas, if you scroll around the map, it sometimes would not be in the position of the mouse cursor.
I knew using Mouse.tile_x and Mouse.tile_y for that would not be a good idea after all. I believe I fixed it, now it's done with Mouse.x and Mouse.y

Quote
Why is it that if I place Areas, change the map size, then check the placed Areas again, Areas that I newly place are gone but the ones you pre-defined that came in the demo are still there?
I see what happens, you have to quit the program and restart it after defining new Areas so they will not be erased when changing the map properties on the editor after that.
I have no idea how to fix this.

Quote
While placing a doodad, if you edit it, but press Input::B, it takes you back to the main menu and places the doodad you currently had selected (should function like I pressed 'Finished Edition' (by the way, the correct word is "Editing")
Ok silly mistake (and silly misspell, lol). Fixed.

Quote
Window cursor index should be reset to zero. For example, if you edit a doodad, go all the way to the bottom ("Condition"), press Input::B, then Edit Doodads again, you get this
Fixed on the Edit window, I don't know if the same problem is anywhere else. I've been trying some combinations and everything seems fine.

Quote
You should handle invalid syntax when making Conditions.
Good point. Done!

I also fixed another bug I found; hue changes were not working properly on animated doodads.

If somebody finds other bugs please let me know.
Title: Re: [XP] Grid-Free Doodads
Post by: KK20 on January 30, 2017, 08:55:22 PM
Quote
I see what happens, you have to quit the program and restart it after defining new Areas so they will not be erased when changing the map properties on the editor after that.
Can't you just do the same thing as you did with Doodads.rxdata and make an Areas.rxdata?
Title: Re: [XP] Grid-Free Doodads
Post by: LiTTleDRAgo on February 02, 2017, 09:33:38 AM
Just want to point out

Code: [Select]
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  def setup(map_id)
    doodads_setup(map_id)
    if FileTest.exist?("Data/Doodads.rxdata")
      doodads = load_data("Data/Doodads.rxdata")
      @doodads = doodads.select{|doodad| doodad.map_id == map_id}
    else
      @doodads = []
    end
  end

FileTest.exist? won't detect items inside encrypted project
try this instead : RPG_FileTest.exist? (http://pastebin.com/krvZgfPj)
Title: Re: [XP] Grid-Free Doodads
Post by: whitespirits on March 09, 2018, 09:45:18 PM
Is there any chance this can be released for VXACE? it would save all the damn parallaxing :D
Title: Re: [XP] Grid-Free Doodads
Post by: whitespirits on September 03, 2018, 08:25:16 PM
Hello all, I was wondering if anyone can convert this to VX ACE so I can overcome the VX mapping system that is just terrible