Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Vahaz/props-xml-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

A much better version of this exist. Available on ook_3D youtube, and it is available on this video (download).

Props-XML-Extractor

Important

props-xml-extractor is archived and use Node.JS v23.10.0. Unexpected updates may occur. This ONLY works with .YTYP files converted in .XML format from CODEWALKER.

This project started as a small Node.JS app for a friend. The use case was to retrieve all props / rooms used in a building/interior on GtaV. You retrieve a .ytyp file converted into .xml with CodeWalker who contains all props / rooms used by a building/interior. This helps to get props to import them in Blender to modify the building.

USAGE

  1. In CodeWalker, extract a .ytyp file in .xml format, should get something like '[file_name].ytyp.xml'.
  2. Add the .xml files to the "input" folder.
  3. Run the main.js file using Node.JS v23.10.0 OR run the props-xml-extractor.exe with the "node_modules" folder. (Won't work otherwise)
  4. Read the created '[file_name].ytyp.xml-result.txt' file in the result folder, containing all not-duplicated props/rooms used in the .ytyp file.
  • If you use the .EXE file, you should have:
- [Your_Folder]
--- [node_modules]
--- [input]
------ your_file.ytyp.xml
--- [result]
------ your_file.ytyp.xml-result.txt
--- props-xml-extractor.exe

TOOLS

SEA - HOW TO BUILD YOURSELF

Use in a console (credits: Single executable applications from nodejs.org)

  1. Generate the sea.blob
node --experimental-sea-config sea-config.json
  1. Generate the .exe file named props-xml-extractor.exe
node -e "require('fs').copyFileSync(process.execPath, 'props-xml-extractor.exe')"
  1. Inject the .blob into the .exe
npx postject props-xml-extractor.exe NODE_SEA_BLOB sea.blob ` --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2

You will notice that to work, the executable need the "node_modules" folder from the source code. Because "SEA" can not add external modules to the executable.

UPDATES

  • 1.4.0

    • Update README.md
    • Changed from xml2js → node-xml-stream
    • Update to Node.JS v23.10.0
    • Added an input/result folder.
    • Can manage multiples inputs files at once.
  • 1.3.0

    • Update console logs / warn text.
    • Update README.md
    • Added .EXE thanks to SEA from Node.JS
  • 1.2.0

    • added props from entity sets.
    • update readme.
    • update package version / description.
    • update console log messages.
  • 1.1.0

    • syntax update in the code.
    • update readme.
    • remove unused "require".
  • 1.0.0

    • initial release.

About

[Archived] props-xml-extractor is archived. Unexpected updates may occur. This ONLY works with .YTYP files converted in .XML format from CODEWALKER.

Topics

Resources

License

Stars

Watchers

Forks

Contributors