Skip to content

Tool suggestions #15

Open
Open

Description

@Ghabry

Used to track ideas for tools:

LCFUsage
  • Generates a report where a specific Switch/Variable/CommonEvent/... is used. Useful for tracking down bugs.
LMTCrush

An alternative to using "encryption"

  • "Corrupts" lmt files in such a way, that the tree becomes unusable in the editor.
  • Names are removed
  • Maps with Escape/Save/Teleport set to "Inherit from parent" are calculated to a fixed value.
  • Tree is flattened and shuffled
  • Exception are Areas, needs investigation under what conditions they are still usable ;)

Activity

  1. Ghabry commented on May 24, 2017

    @Ghabry
    MemberAuthor

    rpgrt-tool

    • Extract Logo1-3, ExFont & Icons
    • Extract CODE and DATA
    • Detect Engine version (2k/2k3) and guess Version. (needs some fingerprint). For exact matches SHA1-Hash check possible.
    • Analysing for common patches
    • Detecting of UPX & Molebox
  2. Ghabry commented on Jun 18, 2017

    @Ghabry
    MemberAuthor

    lcfpack

    • Recompresses all audio files with OPUS.
    • Repacks all images with xyzcrush
  3. Ghabry commented on May 28, 2018

    @Ghabry
    MemberAuthor

    lcfviz

    • Parses all map files and creates a reachability graph (by checking for Teleport event commands) between maps
    • Output of dot files for feeding to graphviz
    • Optionally (for the dot) instead of the nodes being map name/filename they could be images of the map (lmu2png style)
  4. mateofio commented on Oct 15, 2018

    @mateofio

    Used to track ideas for tools:

    LCFUsage
    * Generates a report where a specific Switch/Variable/CommonEvent/... is used. Useful for tracking down bugs.
    

    I wrote a tool like this and I can tell you its game changer, especially when you have a lot of custom systems and need to to do refactoring. The general find references tool is great. Should also check where items given/taken, skills learned, etc.. All around "Show me all references to this type of thing".

    I have a lot of tools I wrote for my own use here:
    https://github.com/fmatthew5876/hh3-rm2k/tree/fixes-2.1/dev/hh3tool

    Feel free to steal any of my ideas or code if you like.

    Event Dumper

    Dump common, map, or troop event code in an easy to read format to stdout.

    $ ./hh3tool/hh3tool ../../ evdump C 4
    Info: Configuring system for map directory `../../'...                                                                                                                      
    Common Event `Goodberry' (4) trigger=3 swflag=1 switch=`Goodberry' (11) num_cmds=25                                                                                         
    0000: code=CallEvent(12330) indent=0 str="" params=[0 38 0]                                                                                                                 
    0001: code=ControlVars(10220) indent=0 str="" params=[0 1011 1011 0 3 1 5]
    0002: code=PlaySound(11550) indent=0 str="gotitem" params=[100 100 50]
    0003: code=ChangeFaceGraphic(10130) indent=0 str="" params=[0 0 0]
    0004: code=ConditionalBranch(12010) indent=0 str="" params=[1 1011 0 2 2 1]
    0005:  code=ShowMessage(10110) indent=1 str="You Found:" params=[]
    0006:  code=ShowMessage_2(20110) indent=1 str="     Goodberry x 1" params=[]
    0007:  code=ChangeItems(10320) indent=1 str="" params=[0 0 8 0 1]
    0008:  code=END(10) indent=1 str="" params=[]
    0009: code=ElseBranch(22010) indent=0 str="" params=[]
    0010:  code=ConditionalBranch(12010) indent=1 str="" params=[1 1011 0 4 2 1]
    0011:   code=ShowMessage(10110) indent=2 str="You Found:" params=[]
    0012:   code=ShowMessage_2(20110) indent=2 str="     Goodberry x 2" params=[]
    0013:   code=ChangeItems(10320) indent=2 str="" params=[0 0 8 0 2]
    0014:   code=END(10) indent=2 str="" params=[]
    0015:  code=ElseBranch(22010) indent=1 str="" params=[]
    0016:   code=ShowMessage(10110) indent=2 str="You Found:" params=[]
    0017:   code=ShowMessage_2(20110) indent=2 str="     Goodberry x 3" params=[]
    0018:   code=ChangeItems(10320) indent=2 str="" params=[0 0 8 0 3]
    0019:   code=END(10) indent=2 str="" params=[]
    0020:  code=EndBranch(22011) indent=1 str="" params=[]
    0021:  code=END(10) indent=1 str="" params=[]
    0022: code=EndBranch(22011) indent=0 str="" params=[]
    0023: code=CallEvent(12330) indent=0 str="" params=[0 39 0]
    0024: code=ControlSwitches(10210) indent=0 str="" params=[0 11 11 1]
    
    TreeMap dumper

    Given a map name or id it's hard to know what map it actually is. For example I have a lot of maps just named "2F" or "B1". If one of my other tools tells me there is a problem in map "B1" its not very helpful. This tool just takes a map id or name and prints out the entire sub-tree that the map belongs to.

    $ ./hh3tool/hh3tool ../../ treemap 24
    Info: Configuring system for map directory `../../'...
    `Heaven and Hell E3' (0) parent=0
     `World 1' (1) parent=0
      `Timon' (2) parent=1
       `subway system' (22) parent=2
        `2nd area' (24) parent=22                                                                                                                                              
    

    A general visitor style construct is useful (probably in liblcf). I use this one to easily "visit" parts of the game for certain tools. It handles iteration over the db and maps so you can just say something like "Call this function for all Event Commands."

    https://github.com/fmatthew5876/hh3-rm2k/blob/fixes-2.1/dev/hh3core/Visit.H

    Iterating the treemap in particular is annoying. You want to do it in the order of the treemap and not by map id. That way any reported errors come out in the same order as in the rm2k editor. Good to abstract this behind some interface so people don't have to do it again and again.

  5. MichaelHinrichs commented on Nov 8, 2018

    @MichaelHinrichs

    support for more engine versions would be reely helpful. if anyone can understand ruby, pleas take a look at https://github.com/Solistra/rvpacker for reference.

  6. Ghabry commented on Aug 31, 2020

    @Ghabry
    MemberAuthor

    More for the "Dependency Scanner":

    • Support renaming of files to "ASCII", using non-ASCII names causes lots of issues, especially outside of the Player.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions