[Concept] GUI program for writing definitions
Posted: Sun Jun 09, 2013 8:40 pm
immediate need for FDD to update as well).
The basic idea is to create a program (in java since I wanted an easy way to make it cross-platform and I felt like learning java lol) that will allow both new and more experienced modders of Factorio to quickly and easily create the item/entity/tech/recipe definitions/descriptions through a gui rather than manually writing the files out theirselves.
I'm not sure how long it would take me to actually make this functional since I started learning java about 12 days ago but the major time factor right now is me learning how to use a JTree and then (more importantly) importing the lua code from a file for the program to use Obviously I could hard code the strings needed for each entity/etc., but then I'd have to do the same for anytime something new is added to Factorio.
As of right now I have a basic layout for it I've been using eclipse and the window builder that eclipse came with for the GUI (much much easier than learning how to actually code the gui to place everything where it looks half way presentable lol). The basic layout idea is that you have a JTree (collapsable list) on the left side, which contains the descriptions currently in the loaded file (blank if you are creating a new description file). When you load a file clicking on a node in the tree would open that particular definition in the code editor on the right and change the center of the gui to display slider/checkboxes etc to allow new modders to easily set everything and see the code update on the right. For the experienced modders this would hopefully be faster than finding and copy/pasting the code from another mod (typically base for me) into theirs and modifying it, or having typos if they didn't copy and paste.
If you know java the source code is obviously FactorioDescriptionDesigner.java. Um, note that I apologize for the disordered mess that the source code is in...
Using the window builder with eclipse it seems to have inserted gui code simply wherever the cursor was in the source view so it was a mess before I realized it while I was checking back and forth to try to learn a bit of the gui code. I'd thought to clean it up before releasing, but I decided that now that I have a basic idea for the layout I'd ask if anyone actually liked the concept and or had tips for improving it (like I said, I started learning java less than two weeks ago). If you have a good idea on loading the list of entities/items and the code for each that would be even better And while I'm sure this might be easier if done in lua or c/c++ I've no idea how to start creating a gui with those that wouldn't take me a month just to understand the gui library so...
btw, the readme in the zip is pretty much this post (except that I proof read this post a few more times than I did th readme...oh well)
Anyways this has gotten long enough so...let me know what you think either in a comment or there should be a poll above (btw, the only language I know is English so if someone wants it in another language...I'm not sure how to go about doing that)
If you have java installed and want to see the concept in all of it's GUI glory (ha!) you should be able to simply run FDD.jar. All of the text files are my initial idea to prevent hardcoding the changes to descriptions (that way when a Factorio update happens there is no The basic idea is to create a program (in java since I wanted an easy way to make it cross-platform and I felt like learning java lol) that will allow both new and more experienced modders of Factorio to quickly and easily create the item/entity/tech/recipe definitions/descriptions through a gui rather than manually writing the files out theirselves.
I'm not sure how long it would take me to actually make this functional since I started learning java about 12 days ago but the major time factor right now is me learning how to use a JTree and then (more importantly) importing the lua code from a file for the program to use Obviously I could hard code the strings needed for each entity/etc., but then I'd have to do the same for anytime something new is added to Factorio.
As of right now I have a basic layout for it I've been using eclipse and the window builder that eclipse came with for the GUI (much much easier than learning how to actually code the gui to place everything where it looks half way presentable lol). The basic layout idea is that you have a JTree (collapsable list) on the left side, which contains the descriptions currently in the loaded file (blank if you are creating a new description file). When you load a file clicking on a node in the tree would open that particular definition in the code editor on the right and change the center of the gui to display slider/checkboxes etc to allow new modders to easily set everything and see the code update on the right. For the experienced modders this would hopefully be faster than finding and copy/pasting the code from another mod (typically base for me) into theirs and modifying it, or having typos if they didn't copy and paste.
If you know java the source code is obviously FactorioDescriptionDesigner.java. Um, note that I apologize for the disordered mess that the source code is in...
Using the window builder with eclipse it seems to have inserted gui code simply wherever the cursor was in the source view so it was a mess before I realized it while I was checking back and forth to try to learn a bit of the gui code. I'd thought to clean it up before releasing, but I decided that now that I have a basic idea for the layout I'd ask if anyone actually liked the concept and or had tips for improving it (like I said, I started learning java less than two weeks ago). If you have a good idea on loading the list of entities/items and the code for each that would be even better And while I'm sure this might be easier if done in lua or c/c++ I've no idea how to start creating a gui with those that wouldn't take me a month just to understand the gui library so...
btw, the readme in the zip is pretty much this post (except that I proof read this post a few more times than I did th readme...oh well)
Anyways this has gotten long enough so...let me know what you think either in a comment or there should be a poll above (btw, the only language I know is English so if someone wants it in another language...I'm not sure how to go about doing that)