estriole 326 Posted November 27, 2015 (edited) â– Information â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› EST - Build And Decor EX Version: 1.2 By Estriole File name: EST_Build_And_Decor_EX.js â– Introduction â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› Conversion of my EST - BUILD AND DECOR SERIES script from ACE. Mainly this script make you can have 'decoration' item that you can place to customize your map. if you're using my EST - EVENT SIZE AND TRIGGER plugin... you can also make the decoration as building. this plugin also include EST - DECOR MOVEMENT conversion from ACE instead making it separate plugin. thus this plugin named: EST - Build And Decor EX â– Features â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› - bind 'decoration'/'building' to item. it's actually event in template map. - you can separate decoration by category. ex: building, wall, furniture, etc - you can move the decoration freely using parallel event page and selfswitch â– Changelog â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› v1.0 2015.11.10 Initial Release v1.1 2015.11.12 add documentation on how to use this.isAnyEventOnSelf() also minor bugfix on that method to recognize Through event. v1.2 2015.11.23 add mouse detection for decor move: Left mouse click => set event movement to that coordinate Right mouse click => cancel decor movement. set selfswitch cancel (so you can create event page to delete the event and give item) â– Plugin Download â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› Download Demo (updated dropbox link) https://www.dropbox.com/s/0uiu6pnp2aazt5w/Decor_and_build.rar?dl=0 â– How to use â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› Open the spoiler Below (it's quite long) 1) Make Decoration Item create an item in database... give it notetags: mandatory: <decor_map: mapId> <decor_id: eventId> <decor_type: type> optional: <decor_xmod: x> <decor_xmod: y> change mapId => your template map id... you can have more than 1 template map change eventId => event in in your template map you want to place as your decoration change type => any string to mark the decoration type. change x => to any number of tiles you want the new decoration to shift it's placement. positive value = right, negative value = left change y => to any number of tiles you want the new decoration to shift it's placement. positive value = down, negative value = up <decor_xmod: x> <decor_xmod: y> will be ignored if in your decor selection call you add posfix value (it will be placed in posfix coordinate instead) example notetags: <decor_map: 8> <decor_id: 12> <decor_type: Building> <decor_xmod: 1> <decor_xmod: -1> the item is listed in decor selection for "Building" when that item is selected in decor selection... it will grab event from map 8 event id 12 and place it in the position of event that called it but will shift it x by 1 and y by -1 2) Giving Decoration Item to player... just give the item using event command / monster drop / anything 3) Placing the Decoration using Decor Selection plugin command DECOR_SELECT decortype delete? posfix or script Call this.decorSelect(decortype,delete?,posfix) mandatory: decortype => will only list item with the decortype in script call this require you to pass a string... so wrap it in "". in plugin command it's not necessary. since all become string in plugin command. optional: delete? => delete the calling event / not. true = delete, false = don't delete. if you don't fill it... it will defaulted to true posfix => array containing [x,y] coordinate of where the new event placed. if you using this the <decor_xmod: x> and <decor_ymod: y> will be ignored... since the event will be FIXED to placed in that coordinate you can choose to not using the optional parameter. just don't fill anything and it works Some example: Plugin command: decor_select building Script Call : this.decorSelect("building"); yes the DECOR_SELECT is not case sensitive... i make it caps above so people read it better. will list all item which have <decor_type: building> (not case sensitive. so BuIlDiNG works fine) Plugin command: decor_select building false Script Call : this.decorSelect("building", false); will list all item which belong to building type. also will NOT delete the calling event Plugin command: decor_select building false [10,3] Script Call : this.decorSelect("building",false,[10,3]); will list all item which belong to building type. also will NOT delete the calling event and will PLACED the event at x = 10, y = 3 coordinate 4) Removing Decoration plugin command: REMOVE_DECOR mastermap masteritem xmod ymod or script call: this.rmvDecoration(mastermap, masteritem, xmod, ymod) ALL is optional: fill this parameter only if you want the deleted decoration REPLACED by other event. for example replace the event to event that call decor_selection again. mastermap => map id for event which will replace deleted event masteritem => event id for event which will replace deleted event xmod => when placing replacement event it will shift x tiles from deleted event position positive value = right, negative value = left ymod => when placing replacement event it will shift y tiles from deleted event position it's optional so you don't need to fill it examples: Plugin command: remove_decor Script Call : this.rmvDecoration(); will delete the decoration and that's it. Plugin command: remove_decor 8 3 Script Call : this.rmvDecoration(8,3); will delete the decoration and replace it with event from map 8 event 3 Plugin command: remove_decor 8 3 6 7 Script Call : this.rmvDecoration(8,3,6,-7); will delete the decoration and replace it with event from map 8 event 3 and shift x by 6 tiles to right and shift y by 7 tiles above 5) Moving Decoration make a page in existing decoration event. make it activate when selfSwitch C activated (you can change the selfSwitch in plugin parameter. but C is the default value) change it to Paralles Process. and make sure it's same as character priority you can add the plugin command / script call in the event page. plugin command FORMAT: DECOR_MOVE selfSwitchEnd or script call: this.decor_move(selfSwitchEnd); selfSwitchEnd => the selfswitch (default 'C') value when the decor move ENDED. true / false. it depend on how you set the event page... > if decor movement placed in an event page that have selfSwitch C = ON as condition and your "other" page is in page without condition. so you want selfSwitch C => OFF at end of decor movement... use false. > if decor movement placed in an event page that have no condition and the "other" event page is the one with condition selfSwitch C = ON. so you want selfSwitch C => ON at end of decor movement... use true. example: Plugin command: decor_move false Script Call : this.decor_move(false); will move the decoration... when the decor movement end... it will flip selfSwitch you set in parameter to false (OFF). Plugin command: decor_move true Script Call : this.decor_move(true); will move the decoration... when the decor movement end... it will flip selfSwitch you set in parameter to true (ON). Plugin command: decor_move Script Call : this.decor_move(); if you didn't fill true / false like above... it will defaulted to true (selfSwitch ON). 6) HAVING Event on Top of other event... and you don't want event below it to activate. example case: you place a table. then place a vase on top of it. you want vase to activate while table is not. in table event page use conditional branch: script: this.isAnyEventOnSelf() ` if true do nothing... if false (means there's nothing on top of it): place your event command if there's nothing on top of it. example you can remove the table, etc. which you don't want to trigger if there's vase on top of table. XXX) FOR OTHER SCRIPTER that want to make compatibility patch for this plugin. check EST.Build_And_Decor exist or not. ex: if(EST && EST.Build_And_Decor) { place your code here. } â– Dependencies â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› mandatory: EST - SAVE MAP EVENT EST - CLONE TRANSFORM DELETE EVENT optional: EST - EVENT SIZE AND TRIGGER EST - GRAPHIC SHIFT EST - REGIONMAPLOADER â– Compatibility â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› I'm new in JS... and MV is new engine... so i cannot say for sure. but it should be compatible with most things. â– Parameters â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› > VarIdForSelection Variable ID to be used to item selection default 7 > DecorMoveSwitchId Switch ID to mark decor is being moved. also to stop player movement, open save, open menu default 7 > DecorMoveSelfSwitch The self switch to flip when finishing decor movement A, B, C, or D default C â– License â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› Free to use in all project (except the one containing pornography) as long as i credited (ESTRIOLE). â– Support â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› While I'm flattered and I'm glad that people have been sharing and asking support for scripts in other RPG Maker communities, I would like to ask that you please avoid posting my scripts outside of where I frequent because it would make finding support and fixing bugs difficult for both of you and me. If you're ever looking for support, I can be reached at the following: [ www.rpgmakervxace.net ] pm me : estriole â– Author's Notes â•’â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•› This is FINAL part of the EST - DECOR AND BUILD SERIES. EST - SAVE MAP EVENTS EST - CLONE TRANSFORM DELETE EVENT EST - EVENT GRAPHIC SHIFT EST - EVENT SIZE AND TRIGGER EST - BUILD AND DECOR EX EST - REGIONMAPLOADER Edited September 27, 2020 by estriole Share this post Link to post Share on other sites