Retro Gadgets

Retro Gadgets

Naming parts?
Is there any way to give parts useful names so we are not stuck with trying to remember display1, display2, is which etc.
< >
Showing 1-5 of 5 comments
ZeldaACFan17 18 Jul, 2023 @ 11:11am 
That's something I think would be nice too, especially if you want to have labels for different parts that look the same or use the same base component (Labels for buttons, switches, knobs, or screens, for example)
Last edited by ZeldaACFan17; 19 Sep, 2023 @ 6:58pm
DIT  [developer] 20 Jul, 2023 @ 12:46am 
Unfortunately the feature is not there yet :(
Fractaline 12 Jul, 2024 @ 11:00pm 
While there is no in game feature for this if you have notepad++ or some other text editor that can handle any sort of file or HxD or another binary/hex editor you can change the 'displayName' value for the component in the .rgadget file.

First you'll want to put the gadget in the archive to make sure it's 1) Saved at current state and 2) Ready to be reloaded from the file.

Then copy and paste the .rgadget file somewhere to make a backup (or make a backup some other way) (It's quite easy to corrupt the file and it can be difficult to change it back, or you might lose the undo etc)

To do this in notepad++ open the file, make sure in view show all characters and such are off, if there's still NUL or other non-readable characters in the view just click to a different file open in notepad++ then back.

Then open the find menu with ctrl-f or by navigating to it in the dropdowns.
Enable 'Regular Expression' matching then type in the components current name but adding a period '.' between each character. ('.' in regex matches any character)

Then click on the components name in the text view and use arrow keys to navigate so each time you click toward the other side of the character you want to change it swaps between the side, then replace just that character using shift and clicking arrow keys or deleting it from the right (to make sure you don't delete the extra characters that are important), and then you can change that character.

To shorten the components name you'll need to replace the character at the end with a SPACE not by deleting it, if you delete it it'll corrupt the file.
This method doesn't work to lengthen component names unfortunately and I'm not quite sure how to do that yet.

Then just save the file and pull the gadget out of the archive in game and the component will be renamed including for usage in the CPUs.

Also a not as good solution is you can have at the start of a lua file that runs as either a require or as the main cpu file that stores the not as good name to a better name for your use like "LB0 = gdt.LedButton0" allowing you to just use LB0 to control that Led Button, you sadly but probably for good reason can't do gdt.LB0 = gdt.LedButton0 but it's still helpful.

Also if the devs don't want file editing to be done feel free to delete this post, I didn't see anything about doing such when searching it in discussions so I thought it's fine to post. Like xml editing stuff in stormworks.

Sorry for the wall of text and good gadget making.
Shabazza 3 Aug, 2024 @ 6:25am 
Won't you map components to your own variables anyway, to avoid having to write x.y.z.MyCoolComponent in the code later?
I just map those to names i can remember.

Example:
https://ibb.co/zRrSJt4
casperorillian 3 Aug, 2024 @ 8:09am 
Originally posted by Shabazza:
Won't you map components to your own variables anyway, to avoid having to write x.y.z.MyCoolComponent in the code later?
I just map those to names i can remember.
Well, I mean yeah, if you wanna be logical about it.
< >
Showing 1-5 of 5 comments
Per page: 1530 50