[Concept] GUI program for writing definitions

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply

Could this be helpful?

yes
6
60%
no
0
No votes
maybe
4
40%
depends on if it is translated into my language
0
No votes
 
Total votes: 10

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

[Concept] GUI program for writing definitions

Post by FreeER »

Factorio Description Designer.zip
compiled concept and source
(31.6 KiB) Downloaded 252 times
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 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) :lol:
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)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by ficolas »

It took to me to learn java at that level much more than 12 days xD I didnt do it often (taking the comp to read tuts)

Poll: Yes,

Its a good idea, but I think that I still will like to do it "by hand"

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [Concept] GUI program for writing definitions

Post by slpwnd »

Not sure what I am doing wrong. This is what I get:

java -jar FDD.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: factorioDescriptionDesigner/FactorioDescriptionDesigner : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

Could it be a wrong version of Java?

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by MF- »

Looks like that. Are you really running java 5 ? (java 6 support is scheduled to be dropped by minecraft...)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [Concept] GUI program for writing definitions

Post by slpwnd »

Actually my java version is "1.6.0_41"

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by FreeER »

ah, I have 1.7, I suppose I should find out how to make it backwards compatible however :)
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by SilverWarior »

Yes for this program to work you need to upgrade to 1.7 (1.7.21 is latest version out) of Java.
Prior upgrading to version 1.7.x I strongly removing older 1.6.x version of Java becouse instaler doesn't upgrade 1.6.x to 1.7.x but just instals 1.7.x bbesides existing 1.6.x. And when you try to runn any programs they will always try to run in 1.6.x and not in 1.7.x.
Also note that if you want support for running 64 bit java applications you also need 64 bit Java instaled.
Minecraft requires 64 bit Java for use of farthest view distance.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by MF- »

That's true, 64bit java had a big performance impact on minecraft, it allowed me to up the viewing distance by one.
(So did sytemwide liblwjgl instead of the shipped one, which suffers from keys getting stuck)
Openjdk was fine for everything so far and lacked all the recent sun-java security issues they took so preposterous time to patch.

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [Concept] GUI program for writing definitions

Post by slpwnd »

So Java 1.7.x is not supported on Snow Leopard Mac OSX. I will look if there is some workaround for this.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by FreeER »

Okay, so here's a version (not too much changed though) that should work with java 1.6. I had to go download 1.6 from filehippo to test :)
FDD 1.6.zip
jre 1.6 compatible (I hope lol)
(31.72 KiB) Downloaded 226 times
Still a good bit of work for me to do on it
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by ficolas »

I have an idea that in my opinion can be really usefull because is something that I hate to make.
Make a peogram to make th GUI menus without needing to write te code, that could be really usefull.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by FreeER »

ficolas wrote:I have an idea that in my opinion can be really usefull because is something that I hate to make.
Make a peogram to make th GUI menus without needing to write te code, that could be really usefull.
what do you mean by the GUI menus? like the menu bar at the top of the window and the file->save type menu buttons? well, this is honestly the first GUI program I've ever made but I suppose I could always simply copy the source code for those into a file lol, why go to the trouble of making a program that's basically copy/paste with a little label editing built in?

If you mean to create the entire GUI then...have you not seen the eclipse window builder? Here's a picture in case you haven't...
eclipse-window builder.png
eclipse-window builder.png (114.8 KiB) Viewed 8851 times
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [Concept] GUI program for writing definitions

Post by drs9999 »

I guess he want a program that will help you to create in-game UIs in an easier way than it is atm.

A program like the window builder plugin that does all the (hard "low-level") work for you. You just have to arrange the needed items and do not worry about the coding.

If I interprete it wrong then I suggest it, otherwise +1 to ficolas idea an +10 for the guy/gal who will try to create it :D

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: [Concept] GUI program for writing definitions

Post by ficolas »

FreeER wrote:
ficolas wrote:I have an idea that in my opinion can be really usefull because is something that I hate to make.
Make a peogram to make th GUI menus without needing to write te code, that could be really usefull.
what do you mean by the GUI menus? like the menu bar at the top of the window and the file->save type menu buttons? well, this is honestly the first GUI program I've ever made but I suppose I could always simply copy the source code for those into a file lol, why go to the trouble of making a program that's basically copy/paste with a little label editing built in?

If you mean to create the entire GUI then...have you not seen the eclipse window builder? Here's a picture in case you haven't...
eclipse-window builder.png
I was talking about factorio GUIs, because they are easy to make but really awfull if it needs to be big.

Post Reply

Return to “Modding discussion”