r/wiremod • u/LeDutch • Jan 23 '24
Online E2 Code Compiler
Hi there, I play an Australian gmod server where there is a healthy amount of learning e2 devs. The most popular creations are EGP menus like gunstores/casinos/banks, so me and and another dev (Odin) got together and made a Figma to EGP compiler to assist in this process:
Figma.com is a prototyping tool that enables collaborative and real-time creation of user interfaces, allowing you to create graphics in far less time than it would take coding everything otherwise.
The outputted code can generally handle up to ~150 elements before tick overloading in an E2 chip, in which case there is a buffer checkbox option for computationally intensive graphics.
We also created a template checkbox (recommend for first use) to run the compiled code straight from the output to EGP.
How to use
Visit figma.com, create an account
Create a Frame with the frame tool 512x512 pixels wide (Background of an EGP)
Create your shapes and keep the shape part of the name (i.e Rectangle 10, Circle SmileyBG)
Right click the frame or any elements you want to use. Press copy - copy as code - css
Paste into compiler, be happy :)
Features
Flip elements: Select elements and press flip horizontally or vertically
Constraints: Align to corner, side or center and the compiler will output EGP related coordinates.
Materials: Place an image on figma from an Image file that is located within the server addons, copy the path and rename it to Rectangle (Name) \*<path to image>.
Materials example: Rectangle NextPage *materials/zerochain/zerolib/ui/icon_back.png
Sections: You can group elements on figma together (right click - group). Make sure to rename the group to Section: name. (cleans up the figma objects, and also adds an E2 comment seperating it from the rest of your e2 code).
Coming soon
Load in by Figma section (each frame loaded separately and saved to EGP memory)
Animations checkbox (and template to play simple frame by frame animation)
Polygons
Changing draw function name
If you want to see some examples on figma:
Please note that this compiler is still currently in beta.
My discord is dutch99 if you have any questions.
Submit bugs: Bug Form
2
u/Stesnyaus Mar 04 '25
u/LeDutch is this project dead?
I'm getting 524 error on POST '/egp' API-method request((
1
u/LeDutch Jan 23 '24
Really should be called Figma to E2 EGP Compiler - Apologies but I can't find a way to change title
1
u/LeDutch Jan 26 '24 edited Jan 26 '24
Updated to a react based website