HUDS.TF

Hello There, Guest!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HUDGEN: A HUD diff manager
#1
HUDGEN
A tool built in NodeJS to help streamline HUD development. 


Instructions on usage can be found in the Github repository.

HUDGEN is an opinionated tool written by me in order to help with HUD development. I am the developer of a former TF2 HUD by the name of GIVHUD. GIVHUD was based upon IVHUD, which was written by a former developer, errur. 

Unfortunately, GIVHUD has become woefully out of date for the same reasons IVHUD became out of date. Both of us found ourselves not able to keep up with the changes in revisions to the HUD. By the nature of how the HUDs change, it is hard to track what has changed. Furthermore, by the nature of modifications, additions are very hard to track as well as they are not always additions at the end of a file.

As a result, HUDGEN was created as a way to easily find out what changes have occurred from a custom HUD to a stock HUD. Furthermore, HUDGEN can be used to automatically add any NEW content provided in a stock HUD that isn't found in a custom HUD. This is achieved by the following:

Process
  • The user provides their custom HUD under /src/custom
  • The user provides the latest stock HUD under /src/official
  • The user runs a "diff" script. The diff script takes both a full custom HUD and full stock HUD and converts them to JSON.
  1. After turning them into JSON, there is a check to see if any differences exist between stock and custom. 
  2. All modifications that are found are written out to src/diff in their respective file names
  3. If a value exists in custom that does NOT exist in stock, it is written out to its respective file
  4. If a value that does NOT exist in custom that DOES exist in stock, it is NOT written out to its respective file
  5. If a value exists in custom and stock that is different, the custom value is written out to its respective file
  6. If a value exists in custom and stock that is identical, the value is NOT written out to its respective file
  • A diff file is generated in VDF that ONLY shows differences in the custom HUD compared to stock.
  • The user now runs a "generate" script, which will take the diff and the stock HUD, and compares them
  1. After turning them into JSON, there is a check to see if any differences exist between diff and stock
  2. All modifications that are found are written out to src/output in their respective file names
  3. If a value exists in diff that does NOT exist in stock, it is written out to its respective file.
  4. If a value that does NOT exist in diff that DOES exist in stock, the stock value is written out to its respective file
  5. If a value exists in diff and stock that is different, the diff value is written out to its respective file (Values declared as empty ("") are written as (""))
  6. If a value exists in diff and stock that is identical, the value is written out to its respective file

Special Notes:
  • In the above process, only .res files are converted and compared. .vdf and .txt files do not follow VDF format. Therefore, .vdf and .txt files are copied unmodified. A warning is logged when a user tries to copy hudanimations_tf.txt as the user should create a custom one and apply it to the hudanimations_manifest.txt
  • In src/diff, a series of files are written out that ONLY show the differences between the two HUDs (in VDF format). This is powerful in seeing ONLY what the differences are (if only a single line or two is modified in a user's custom HUD, this can be quickly seen in a small file)
  • "src/diff" files can be passed around from developer to developer and applied to stock HUDs. There is no need to pass around full custom HUDs.
  • The src/output is a fully functional HUD that is generated that a user can copy and paste into their tf/custom folder and can use it right away.
  • The above process can be used to take old HUDs (including those found here in huds.tf) to update them. This process will patch an old HUD with all the new files it is missing, while preserving the old HUDs custom values. This does not guarantee the HUD will be seamless (overlay conflicts may happen), but the HUD should be functional within reason.
If there's any questions on setup or use, I'd love to hear them here.


TODO: Release of GIVHUD 2.0 using HUDGEN.



Copyright © 2014 - 2019 huds.tf | Site by omnibombulator | Powered by MyBB, © 2002 - 2019 MyBB Group and Steam.