Giter Club home page Giter Club logo

flashreloader's Introduction

FlashReloader

A work-in-progress scaleform UI reloader proxy for reducing the need to restart the workshop tools for every UI update.

Please note that currently this code is only minimally functional and is not meant for actual use. Once/if it becomes possible to diagnose and fix the major issues remaining, it may become useful at that point.

Instructions

Install the FlashReloader.swf in your addon's resource/flash3 directory. Rename your old custom_ui.txt to be "reloader.txt". FlashReloader will use this file to determine which UI files to proxy on reload. Use the custom_ui.txt provided for you in this repo in place of your old one(it contains only a reference to this swf.)

When you launch the workshop tools, you should see your UI as normal with only a single "UPDATE+RESTART" button added to the bottom right of the screen. If you require the restart.lua provided (or simply copy in the command registration) inside your game mode vscript code, then clicking this button will unload all UI files handled by FlashReloader.swf and then restart the game 2.5 seconds later. Issuing a "restart" to the console may also work, though it's possible for the game to reload quicker than it garbage collects the old UI.

When you want to release your game mode, you can rename your "reloader.txt" to be "custom_ui.txt" once more, and the game should load everything the same (but without the reloader proxy).

Coding Instructions

It is still very possible to get your UI files to be "stuck" and uncollected by dota during a restart if your code does not manually unload things like Timers and external gameAPI override references. In your UI file, you can create an "onUnloaded" function which will be called by Dota or the reloader proxy when the game is restarting. Make sure that you stop any running timers, adn remove event liteners that have been added to objects which are not attached to/present in your UI file. If a reference to some object or function in your UI file is not cleaned up by the time the game restarts, your UI file class won't be collected and will get "stuck" on future game restarts, and will likely require a complete restart of the tools to remedy.

Please Note!

This code is still unproven, and I've found many cases where a file seems to get "stuck" and uncollectable for no discernable reason. If you notice anything and report it, I may be able to find out why and fix it.

flashreloader's People

Contributors

bmddota avatar

Stargazers

Martin Noya avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.