KBM-Quine

doorUtils docs

Dec 17th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1.  
  2.  
  3. --custom BGO flags
  4. the values listed are what's used by doorUtils.defaults. change any as needed, and only use what's needed
  5. door=true -- used to differentiate this BGO from others. this assumes you're not overlapping other doors with this one. this is only used by BGOs and not in doorUtils.defaults
  6. usePluralMacguffins=true -- whether or not a plural message should be shown. good for making a single message.
  7. macguffin="star" -- the singular macguffin string used in messages. this is used in the message by putting [macguffin] where desired.
  8. macguffinPlural="stars" -- the plural macguffin string used in messages. this is used in the message by putting [macguffinplural] where desired.
  9. macguffinMessage="You need [number] [macguffin] to enter." -- the singular message string used by the door. [number] is where the number of macguffins required would be inserted into the string.
  10. macguffinMessagePlural="You need [number] [macguffinplural] to enter." -- the plural message string used by the door. [number] is where the number of macguffins required would be inserted into the string.
  11. macguffinIcon=nil -- the BGO id of the doors macguffin icon
  12. centerMacguffinOnBackground=false -- whether or not the macguffin icon should center on the door or the warp. false for the warp, true for the door.
  13. macguffinAlignX=0.5 -- the macguffin's alignment amount on centered object on the x-axis. 0 for left, 0.5 for center, 1 for right. not recommeneded to go above that limit, but i'm not your parent.
  14. macguffinAlignY=1 -- the macguffin's alignment amount on centered object on the y-axis. same as previously stated.
  15. macguffinOffsetX=0 -- how many pixels to move the macguffin icon from it's center by on the x-axis. positive numbers move right, negative left.
  16. macguffinOffsetY=0 -- how many pixels to move the macguffin icon from it's center by on the y-axis. positive numbers move down, negative up.
  17. lockIcon=nil -- the BGO id of the doors lock icon
  18. centerLockOnBackground=false -- whether or not the lock icon should center on the door or the warp. fasle for the warp, true for the door.
  19. lockAlignX=0 -- the lock's alignment amount on centered object on the x-axis. same as preivously stated.
  20. lockAlignY=0 -- the lock's alignment amount on centered object on the y-axis. same as preivously stated.
  21. lockOffsetX=0 -- how many pixels to move the lock icon from it's center by on the x-axis. same as preivously stated.
  22. lockOffsetY=0 -- how many pixels to move the lock icon from it's center by on the y-axis. same as preivously stated.
  23. effect==751 -- effect id spawned upon entering a door warp infront of the door.
  24. effectOffsetX=0 -- how many pixels to move the spawned effect from it's center by on the x-axis. same as preivously stated.
  25. effectOffsetY=0 -- how many pixels to move the spawned effect from it's center by on the y-axis. same as preivously stated.
  26. autoResizeWarp=false -- if the bgo is longer then 32 pixel wide, resize the warp to fit the door's width. it takes 16 pixels of legnth from each side of the warp. not optimal for anything 64 pixel wide or below.
  27.  
  28. --library things
  29. each BGO flag has a default flag associated with it in the library, these control the default behavior if said flag has not been set in a BGOs .txt. e.g. doorUtils.defaults.usePluralMacguffins.
  30.  
  31. doorUtils.defaults.autoRegisterBaseDoors = true -- used in lua after loading, as any other defaults field would be. there are no BGO equvalant, as this is used to determent if the user wants 1.3 doors that have effects to be registered with the system by default.
  32.  
  33. ---custom range effect documentation
  34. [1]
  35. onTick=TICK_DOORUTILS -- the custom effect onTick included with doorUtils.lua. made to mimic 1.3 door effects behavior.
  36. frames=5 -- mimics 1.3 door effects behavior.
  37. priority=BACKGROUND -- needed to ensure it doesn't render over the player, but infront of the door.
  38. lifetime=60 -- mimics 1.3 door effects behavior.
  39. framespeed=5 -- mimics 1.3 door effects behavior.
  40. --
  41. this is a basic setup for a 1:1 recreation of a 1.3 door, using custom range effects.
  42. it's intended to be used for custom doors.
  43. frames can be increased/decreased, just adjust lifetime/framerate as needed.
  44. TICK_DOORUTILS ticks the frames up by frame rate until the door hits it's last frame.
  45. it keeps it at the last frame until it reaches 2/3s of it's life time.
  46. then, it ticks down by it's frame rate until it reaches beyond the last frame, killing it's self.
Add Comment
Please, Sign In to add comment