• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: [v13+] FLUtil

FL

Pokémon Island Creator
  • 2,452
    Posts
    14
    Years
    • Seen yesterday
    This script is for RPG Maker XP. It adds a lot of useful classes and methods for scripters:
    • RandomHelper who make doing things like raffle a lot easier. Recommended even for non-scripters.
    • Variable Switches Alias, who makes switch/variable access shorter and more readable
    • Tween system
    • Multiversion/non-essentials layer (partial)
    • Misc classes and methods
    Link

    Works with or without Essentials. Tested in Essentials v13 and v21.1. If this script isn't working on latest Essentials version, please inform on this thread. Below, examples based in Essentials, but most works in a vanilla RPG Maker XP project:

    RandomHelper
    Ruby:
    helper = ItemRandomHelper.new
    helper.add(60, :POTION) 
    helper.add(30, :ANTIDOTE)
    helper.add(10, :ETHER)
    pbItemBall(helper.get)

    Variable Switches Alias

    Original code to remove an apricorn:
    Ruby:
    $bag.remove(pbGet(8))
    data = GameData::Item.get(pbGet(8))
    pbSet(3, data.name)
    With this script:
    Ruby:
    $bag.remove($gv[:APRICORN_DELIVERED])
    data = GameData::Item.get($gv[:APRICORN_DELIVERED])
    $gv[:TEMP_PKMN_NAME] = data.name
    Or
    Ruby:
    $bag.remove($gv[8])
    data = GameData::Item.get($gv[8])
    $gv[3] = data.name

    Tweener
    [PokeCommunity.com] [v13+] FLUtil


    All movements in this gif were made in sample scene. The first Marill's movement was made with this code:

    Ruby:
    # Move Marill to (x:Graphics.width/2 and y:64) in 1.5s.
    @tweener.add(MoveTween.new(@sprites["Marill"], Graphics.width/2, 64, 1.5))

    EsBridge
    Ruby:
    # Display message in all Essentials versions
    EsBridge.message("Message here")
    # Returns frame delta. Works with or without MKXP-Z
    EsBridge.delta
    # Returns item name in all Essentials, and even in base RPG Maker XP (but you should use a number as parameter)
    EsBridge.item_name(:POTION)

    Misc Util
    Ruby:
    # Random value from range
    (2..5).random
    # Access Color rbga like an Array
    some_color[1] = 200
    # Lerp between two tones (for mixing). Below example means 80% red and 20% blue
    Tone.lerp(Tone.new(255,0,0), Tone.new(0,0,255), 0.8)
    # Format Time from seconds. This code will returns "01:01:40"
    FLUtil.format_time_from_seconds(3700)
    # Returns all player pokémon (including party, boxes and Day Care)
    FLUtil.all_player_pokemon
    # Change all deoxys forms in party to +1. Go to 0 after last
    FLUtil.swap_species_form(:DEOXYS)
    # Returns if the item is in the bag, pc or hold in any pokémon 
    FLUtil.has_item_at_bag_or_pc_or_hold?(:POTION)
     
    Back
    Top