0.3.0 • Published 27 days ago
growtopia-tools v0.3.0
Growtopia Tools
With Growtopia Tools you can make custom sets
Updates and usage see this website (i will update it)
Installing
npm i growtopia-tools
Example Usage
const { writeFileSync, readFileSync } = require("fs");
const { Render, ItemsDat, Types } = require("growtopia-tools");
(async() => {
const ItemData = await new ItemsDat(readFileSync("./Assets/items.dat")).parse();
// items.dat location
const lens = await colorWithDyes("BLUE/BLUE/BLUE/BLUE/GREEN/GREEN/GREEN/GREEN/BLUE/BLUE/GREEN");
const hair = await colorWithDyes("BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE/BLUE");
// Dyes (RED, GREEN, BLUE, BLACK, SHAMPOO)
// You can use dyes for hair, lens, eyedrops
// You can use SHAMPOO as lens/eyedrop cleaner
const renderPlayer = new Render({
hat: 4746,
skin: {
skinColor: { r: 65, g: 138, b: 42 }, // or Types.Skin.TONE4
},
hair: {
hair: 270,
dye: { r: hair.r, g: hair.g, b: hair.b } // or custom rgb
},
face: {
expression: Types.Face.TROLL,
eyeLens: { r: lens.r, g: lens.g, b: lens.b }, // or custom rgb
eyeDrop: { r: 137, g: 86, b: 154 } // or colorWithDyes() function
},
option: {
d_horn: Types.DHorn.GOAT
}
}, "Assets/sprites/", ItemData, 128)
//sprites location //item data // width_heigh
renderPlayer.addName("#FakeLeq", "#ff0000", true);
const output = await renderPlayer.renderPlayer() // returns buffer
writeFileSync("player.png", output);
})()
Contributing
Still need to configure placement of items.
If you help me about it i would be happy.
Credits
- Ubisoft / Growtopia with in-game assets