SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Software (2.1.X) (https://mb.srb2.org/forumdisplay.php?f=109)
-   -   GetCoord (a sprite coordinate retreiver) (https://mb.srb2.org/showthread.php?t=45222)

Varren 07-29-2019 10:08 PM

GetCoord (a sprite coordinate retreiver)
 
3 Attachment(s)
This is a Lua script for Aseprite that extracts HUD coordinates or creates TEXTURES data using sprite cel layers in the program


It can also be used to prototype on screen elements and copy their positions for later use

It is very simple to use, and all you need to do in the end is ctrl+c the log and paste anywhere in a wad/pk3 or script for use

Usage:
Spoiler: Hud item


This lets you be able to arrange hud items and get tne output x and y values without needing to second-guess them yourself


https://i.imgur.com/5dSGld3.jpg

You can make a background layer for reference, and switch the layer to continuous (two dots) to exclude it from the output log


Spoiler: TEXTURES


This lets you be able to form a TEXTURES group and get the definition to paste inside of a TEXTURES lump of a wad

https://i.imgur.com/BHyaWnw.jpg

Switch the layer to continuous (two dots) to exclude it from the output log

To enable, open aseprite, and go through 'File -> Scripts -> Open scripts folder' to place it in the scripts folder




If you use aseprite and are tired of counting pixels (and is the sole reason why I made this), then it may be useful to you :)



Spoiler: "Other notes

Due to the aseprite api not being flexible enough, features such as using sprite groups can not be done at the moment.
sprites inside group folders can still be read, but the entire group will not be treated as one entire cel

Prime 2.0 07-29-2019 10:31 PM

That sounds pretty cool, but is there a way to set where the HUD elements are anchored to so that they stick to the correct side of the screen in non-green resolutions?

As for judging, may I cooperate with a non-judge to help test this?

Varren 07-29-2019 11:04 PM

Quote:

Originally Posted by Prime 2.0 (Post 808439)
That sounds pretty cool, but is there a way to set where the HUD elements are anchored to so that they stick to the correct side of the screen in non-green resolutions?

As for judging, may I cooperate with a non-judge to help test this?


Not at the moment, not sure either because the api is very limiting in what it allows me to do right now, but I can see if there is a way to attempt that soon!


And sure, go for it!

SeventhSentinel 07-31-2019 08:18 PM

Welcome to Releases! Special thanks to Chrispy for verifying this works for us.

Chrispy 08-01-2019 10:34 PM

A neat tool! I'm excited to see someone making srb2 tools with aseprite's scripting extensions.


All times are GMT. The time now is 01:33 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.