Hedgewars Theme Editor 2

55 replies [Last post]
KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

It's finally here! Completely new, rewritten theme editor! Now cross-platform, easier to use and with language localization support!

We had a Java course recently and it inspired me to use Java to re-make my editor. Java has two advantages over Ruby (which I used previously): it has built-in GUI, so you don't need to install anything and everyone uses Java (or at least, it's more likely that you have Java installed than Ruby interpreter).

____
A list of changes and additions compared to previous editor:

-No more single executable. While idea of having a small, single program, that works locally, is interesting, it's easier to have it in one place.

-Game/user path is saved. Since editor can now have configuration file, it stores game/user path to Hedgewars, which allows for some nice features.

-Language localization support. The editor will automatically make attempt to detect your system language and switch to it. You can of course set the language manually. Currently available are English, Polish, Russian and German, I will need some translators to make new languages.

-Better organized editor tabs. Since Java GUI has all the features you would want, I made a proper tabs, which are also scrollable. Especially customization tab benefited from this, it now even allows for image previews.

-Color depth detection. Editor will warn you if some image has wrong color depth.

-Template loading. Saving game's path allowed to be able to directly copy template images to your theme with a single button click.

-Automatic change detection. Whenever you edit some image in your theme directory, or add something or delete, editor will automatically re-load all image data.

-Pack theme into zip. You can make a .hwp file with a button click and it will automatically pack the theme and any custom music used. Package will appear in PackedThemes directory.

I think that's all.
____
Here are the screenshots for each tab:

Quote:






____
I though some features aren't very important, so I've put them on eventual TODO list:

-Adding more tooltips. There are already here, but we could have more, right?

-Adding more warnings. Warning appears when theme may crash the game. Currently I'm checking everything the old editor checked, but if you encounter new problem, post it here so I can add a warning.

-Safeguard against crashing. Editor will work perfectly (probably) with a proper .cfg file, but wrong one may crash it. However, you can break it in so many ways, that I doubt this feature is needed. If you load a theme, just don't edit it manually.

-Translating file chooser. The current file chooser uses a pre-defined texts, which don't support localization by default. Not sure if that's important, since it's self-explanatory and you use it only once.

-Maybe there could be possibility to preview music from editor, but Java doesn't support .ogg files natively.

___
And some final notes:

-When you run editor for the first time, it will ask you to select path to Hedgewars game directory and your Hedgewars user directory.

-There's no save button. Everything saves automatically every 3 seconds.

-Editor will detect themes in your user Themes directory, but it will only list directories with theme.cfg file. If you want to make a new theme, create directory and make an empty config file there.

____
Editor requires Java Standard Edition 8 to be installed to run it. Old version was tested to be able to run on Debian, it should work on any OS that has Java.
Report any bugs you encounter, and in case of crash, post the crash log.txt that normally appears (when editor crashes, it usually gets "frozen")

Also, if you want to translate the editor to your language, go to Data directory and copy Language_en file and change name to Language_xx, where xx is code of your system language (like en, pl, de etc.). Post your translation files here, so I will add them to the editor.

That's all. Here's the download: http://www.mediafire.com/file/quz3q41yncplae4/HedgewarsThemeEditor2.zip

Have fun!

____
Translation credits:
German - Wuzzy
Russian - ivan866

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

Quote:
It's finally here! Completely new, rewritten theme editor! Now cross-platform, easier to use and with language localization support!

Yes!!!

I just tried it out on GNU/Linux, but it does not seem to work. I invoked it with “java -jar HedgewarsThemeEditor2.jar”. It complains about invalid user and data paths but they always seem to be invalid. What do I enter? I already tried ~/.hedgewars and /usr/share/hedgewars, respectively.

Also, when I have entered the paths as prompted, the console writes this text:

Quote:

Error patrsing gtk-icon-sizes string: ''
Exception in thread "main" java.lang.NullPointerException
at HedgewarsThemeEditor.hasFile(HedgewarsThemeEditor.java:367)
at HedgewarsThemeEditor.createMain(HedgewarsThemeEditor.java:844)
at HedgewarsThemeEditor.createTabs(HedgewarsThemeEditor.java:1238)
at HedgewarsThemeEditor.main(HedgewarsThemeEditor.java:84)

After that, I just get the main tab with path selections but nothing else, so this program is basically broken for me.

Final notes:

Quote:
-There's no save button. Everything saves automatically every 3 seconds.

I don't think this is a good idea since this will also automatically overwrite everything. If you do something stupid, then 6 seconds later the program crashes, then the stupid change is already saved!
I would be fine with a autosave function but not with auto-overwrite.

Quote:
-Translating file chooser. The current file chooser uses a pre-defined texts, which don't support localization by default. Not sure if that's important, since it's self-explanatory and you use it only once.

For me, the file chooser is translated properly into my system language. Maybe this means Java itself already provides translations and this is just an issue with your own Java configuration instead of the program.

Oh, and could you please “officially” release the program as free software (in source code form)? That would be nice.
You might also consider using a distributed version control system later on, it really helps you keeping track and it will help you a lot if you need to revert something because you did something stupid.

nemo
nemo's picture
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 2009-01-28
Posts: 1600

Plus if open source, Wuzzy could submit a patch for keeping backups on autosave in incremented timestamp checkpoints or something ☺

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

I'm not sure about releasing the source code, you might get a heart attack when you see it XD

I don't know how paths work on other systems, I hope it's not too much different than on Windows. I mean, when program tries to validate the game directory, it checks for "Data" and then for "Graphics" directories, and when checking user path it looks for "Data", "Teams" and "Demos". I've just chosen few random folders that should appear in every Hedgewars directory. Unless it's different on other systems?

I might just test it on my Debian, but I'll need to install Hedgewars there T_T

As for file chooser, I'm not sure what's the fault here, because my Java correctly detects system language for all other texts. Maybe I'll just hope no one else will have this problem...

And the save system... it creates a backup in case it will crash during saving, so at least config files should be safe from corruption. I don't know what "stupid thing" you could do that would break your theme, other than accidentally removing the object, which would result in redoing it's rectangles.
But if it's really a problem, any suggestions for a better system? What did you mean by "autosave not auto-overwrite"?

EDIT:
I might also know what caused your crash, Wuzzy. I forgot to check if File is directory, when looking for theme.cfg. Again, on Windows there are only directories in Themes, sooo...

btw, where is Hedgewars located on Debian?

nemo
nemo's picture
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 2009-01-28
Posts: 1600

Most common platform incompatibility w/ unix is case sensitivity.
It doesn't help that we are wildly inconsistent in our casing under Data ☹

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Ok, I installed the game on Debian and managed to find the files.
The editor works for me, here's the proof: http://i.imgur.com/sXr2BDb.png

You can also notice one terrible thing on that screenshot: the ? symbols. Apparently, Linux and Windows use some different encoding, so my translation will work only on one of these systems T_T
Unless I find a solution for this, I'll probably have to make translations be dependent on system too. Oh, well...

Anyways, since your game crashed Wuzzy, it means that you provided the correct paths. Program then runs into a series of possible crashes, the most important one is fixed in rc2 (explained in my previous post). Other ones happen when there's no Theme or Music directory in Data. I'll fix this tomorrow, but for now, you should be able to run the editor properly.

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

Quote:
I'm not sure about releasing the source code, you might get a heart attack when you see it XD

It's okay. Everyone has to start as a newbie at some moment. I won't shame you for your current coding skills. Besides, I can probably see your source code anyways by decompiling the Java archive, but I haven't done so. I just ask you to officially release it as free software to settle all possible doubts. It's more a formality really.

Quote:
I don't know how paths work on other systems, I hope it's not too much different than on Windows. I mean, when program tries to validate the game directory, it checks for "Data" and then for "Graphics" directories, and when checking user path it looks for "Data", "Teams" and "Demos". I've just chosen few random folders that should appear in every Hedgewars directory. Unless it's different on other systems?

Brief introduction into directories on Linux and similar systems:
First of all, it is not so much different. It's hierarchical like on Windows.

Directories are seperated by a slash (not a backslash). There is only one directory tree, starting at “/”, called the “root directory”, and everything will go down from there, like a tree. There are no “disk letters” as starting points. Oh, and everything is case-sensitive. Example directory name: “/home/wuzzy”. Of course, there is a bit more to it, search for yourselves to learn the entire truth.

That having said, on my machine, both the user directory and the data directory have all the directories you have asked for, so I don't understand what is wrong. Sad Smiley

And no, as far I know there are no differences in Hedgewars directory structure based on OS.

But what IS important is to make sure every file has the correct case-sensitive name, even on Windows. Since the theme files must be re-usable on GNU/Linux and so on.

Quote:
btw, where is Hedgewars located on Debian?

Hedgewars data files are installed in /usr/share/games/hedgewars under Debian.

Learn how to use apt-cache to get a list of all installed files for any Debian package. Or use Syntaptic, it is an easy-to-use frontend for apt-get. Or maybe find a better tool, I don't know.

Quote:
Again, on Windows there are only directories in Themes, sooo...

Oh, in my personal Themes directory there is a lot of crap besides directories. Basically a lot of Zip files I have put into there by myselves to install new themes and I was too lazy to delete them. Hedgewars just ignores this garbage and so should your program. I bet many users are too lazy to delete those Zip files. So you cannot assume the Themes directory only contains directories but not other files.

Quote:

And the save system... it creates a backup in case it will crash during saving,

Backups are a good idea. I think there is not much else to worry about.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

lol, looks like I got ninja'd. Read my previous post.

nemo
nemo's picture
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 2009-01-28
Posts: 1600

wrt encoding... http://utf8everywhere.org Smile

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

rc-3 is out!

The editor will now create Theme and Music directories in your user path, if they don't exist.
UTF-8 is now the official encoding of the translations and I managed to force it on Windows.
I fixed Polish translation regarding the above and some other minor stuff.
There's also an old icon used for the editor.

Also, I included the source file, it's in Data folder. But keep in mind that I didn't write this program with intention of sharing the code. You can do whatever you want with it, but don't say I didn't warn you when you look inside :P

nemo
nemo's picture
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 2009-01-28
Posts: 1600

yay wrt utf8. for one thing it is the standard hedgewars encoding too, so things wouldn't load too well without it.

but also for all the reasons on their website too :p

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

I made a German translation for rc3:
http://lpaste.net/raw/155573

License: WTFPL

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Wuzzy allegedly wrote:

I made a German translation for rc3:

Seems legit Big Grin Included it, thanks!

EDIT:
Wow, I just fixed a very stupid bug :o
Editor checks size of some images, because they crash game if their height is too small. But when image is non-customized, it will instead display the "No preview" image. And in one case, it's size was checked and produced false error warning D:
/EDIT

btw, did anyone do some more testing? Tried making a theme or maybe breaking the editor in some obvious way? Is it ready to remove the "rc" thing?

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

No, it is not ready. There is still some work to do. I have not tested much yet, but this is what I found:

Some bugs I found quickly:

  • The program crashes if is started with the Settings file is missing. IMO the program should be able to restore the Settings file on its own by filling in defaults; maybe this situation should be treated as if the program was started the first time
  • If you change the game path or user path, the shown path does not seem to be updated properly
  • The program greets you with an error message at the first start because the user or game paths are “incorrect”. But in fact, they just have never been specified. The dialogs should be a bit different for the first program start
  • Related to the previous bug: There is no way to exit the program normally if the user is not able to find a valid path since it is stick in an endless loop of Query path → Abort → Invalid path → Query path → …
  • Music selection does not always recognize custom music. I guess the problem here is that it does not find music stored in HWP files? I suggest to make this a combo box rather than a strict list box. The combo box should contain all music files the program found on its own, BUT the user should be allowed to enter a custom music file name anyways

User interface issues:

  • The window titles of the path selection menu should be something like “Choose game path” or “Choose user path” instead of just “Choose path”
  • I have no idea what “Pack theme” does. Maybe add a tooltip or make the button text more descriptive. If it creates some file somewhere, there should be an indication of where the file has gone

Suggestion:

  • At the first start, the program should try to auto-detect the Hedgewars directory. On GNU/Linux and Mac OS, the user path is always at $HOME/.hedgewars (replace $HOME with the user's home directory). On Windows,

Remember: I use this on GNU/Linux. Also I did not make a lot of testing, I found those issues pretty early. Maybe I'll do a more serious testing later.

EDIT: Another bug found!
If you select no music, the theme editor will save it literally as “music = -none-”. This is clearly wrong, the editor should remove the line from theme.cfg, actually.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

rc6 is out!!!!!11

Changelog:
-You can specify your own music for theme, in case it's in some .hwp file and not detected by editor. However, this music won't be packed, when you use "Pack theme"
-When packing theme, existing package will be overwritten
-When music is set to -none-, no music setting will appear in theme config
-Music is set to -none- at start when music setting is not present
-Music and PackTheme got their tooltips
-Dialog box appears when packing theme, displaying package name and informing if some music was packed too.
-You can now cancel if the path error appears, to close the editor.
-When validating game path, editor now looks for Fonts instead of Graphics.
-Path is now updated when changing it.
-Editor now comes without a settings file, which causes it to create default settings.
-Upon creating default settings, editor will try to use default Hedgewars paths.
-When you have to set the game/user path for the first time, message is different.
-If some malicious user (XD) deletes the PackedThemes dir, editor will create it automatically.

-New/changed lines for translation:
selectPath, selectPath2, packSuccess, musicIncluded, packageCreated, success, packThemeTooltip, musicTooltip, noPath, gamePathFirstTime, userPathFirstTime

Also a question: which game path is "more default" for Linux: /usr/share/hedgewars or /usr/share/games/hedgewars?

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

Quote:
Also a question: which game path is "more default" for Linux: /usr/share/hedgewars or /usr/share/games/hedgewars?

I don't know. Based on popularity, I'd say /usr/share/games/hedgewars because this is used by Debian. But other distributions use /usr/share/hedgewars.

I suggest to try both, if you find something in either, use it as the game path automatically, if not, query the user.

I still haven't gotten around to seriously test this application, maybe later.

But I think it is really annoying to know that the program auto-saves the theme all the time. This means, you just open a random theme and the program almost instantly overwrites it! This is clearly not good. Also, the theme.bak file is not a solution, it seems it is also overwritten if you open the theme a second time. My main concern is data loss because the user changed some value but did not intend to do so.
I think the whole saving thing should be redesigned to be less “destructive”, but I haven't come up with a good concept for now.

Updated Language_de file: http://lpaste.net/raw/156960

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

I just released rc7
-Editor will now look both for /usr/share/hedgewars and /usr/share/games/hedgewars game path.
-Updated German translation.

Also, I need to know following default values:
-flakes (all values)
-clouds
-all colors

For now, editor will have default water colors from water images, but I don't know the opacity. These values will be used when certain keys don't appear in config file, so I have to initialize them somehow. It'd be better than go with zeros for everything.

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

Does your GUI tooltik allow for “special values” in spinboxes? I.e. that one value is considered special and displayed in a different way, such as “(none)” or “N/A” but internally stored as -1? Qt does this, I don't know if this works with Java.

Your program should definitely allow in the GUI to “specify” unspecified values, for using the default. This is needed to represent the absense of a value in theme.cfg, implying the default. What you should not do is to simply write the “default” value explicitly into theme.cfg; since the defaults may change in the future.

Here are the default values (images found in data directory):

  • Clouds: Data/Graphics/Clouds.png
  • Sudden Death clouds: Data/Graphics/SuddenDeath/SDClouds.png
  • Flakes: No flakes are used by default
  • Sudden Death flakes: Data/Graphics/SuddenDeath/SDFlake.png (but I don't know the other flake values)
  • Colors: Shit, I don't know! Sad Smiley Maybe ask nemo in chat for this

Also read these pages:
http://hedgewars.org/kb/ThemeFiles
http://hedgewars.org/kb/Theme

EDIT: I have updated the Theme page, it now shows all the default values for theme.cfg. Note that some default values are pretty bad, for example, default for water-top and water-bottom are 0,0,0 (black), which is pretty useless.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

I'd need the default values, so all spinboxes and color choosers start with them. But maybe it's not that important if you could just remove the keys. These values are there to be modified anyways.
(EDIT: just noticed you added them)
(EDIT2: actually, why water values are 0, not matching the BlueWater instead?)

But as for setting the values, the best way to support special values is probably extending the default class and modify it myself. Maybe with spinboxes it wouldn't be that hard, but color choosers... I can also hack everything with reflection, but both these ways sound like they'd take too much time and obscure the code even more (assuming I still wouldn't split it into files XD)

Other possibility is to add the checkbox for these values, which would remove the key from confing. I did this in the first editor and now I can even easily disable the blocked values. Would the checkboxes work?

Wuzzy
Wuzzy's picture
User offline. Last seen 2 days 11 hours ago. Offline
Joined: 2012-06-20
Posts: 936

Yes, checkboxes would be a nice, clean and simple to do this.
As far I know literally everything in theme.cfg is optional.

Quote:
(EDIT2: actually, why water values are 0, not matching the BlueWater instead?)

Nemo told me it was probably an oversight. I have filed an issue for this: http://issues.hedgewars.org/show_bug.cgi?id=28

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

IT'S OUT! RC8 IS OUT!!!1

Changelog:
-You can no longer set object number to 0
-Fix: you can now change amount of objects/sprays per map.
-Fixed editor crash, which happened when object had no rectangles.
-Fixed making rectangles and rectangles overall.
-Theme icon is updated when changing it.
-Editor will now detect when adding new music.
-All settings/colors got a checkbox, that will remove the key from config when unchecked.
-^ these checkboxes are unchecked when there's no related key while loading.
-Because of checkboxes, you can no longer set SD clouds/flakes to -1
-Transparency sliders for sky and border colors are now completely hidden (don't ask how I achieved it pls)
-There's a new crash-warning when object has no covered rectangles.
-Objects with no rectangles are now saved as "other".
-There's now a nifty separator after "Pack theme" button.

-New lines for translation: checkboxTooltip, rectangleWarning
-These lines were removed: cloudsNumberTooltip, flakesNumberTooltip

__
I was also going to add a possibility to zoom with mouse wheel, but I was too lazy.
Anyways, it's kind of unfortunate that the editor just got eight "release-candidate" and some of them have really lengthy changelogs. Oh, well...

ivan866
ivan866's picture
User offline. Last seen 17 weeks 5 days ago. Offline
Joined: 2016-02-23
Posts: 45

To make it work I had to copy Music directory from Hedgewars dir to my User dir.
I cannot figure out how to make Sprays and Objects tabs show something.

Here is the Russian translation: Language_ru

The most time consuming phase of making a theme is calibrating sky colors with water, and making it have enough contrast with land texture. And also resizing objects to be in harmonic scale with all others, because it is difficult to imagine how they look on sky and on landscape.
So, a live preview function of generated map will be nice!

F8 is for bungee.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

The music problem is caused by missing Music directory in your user. I forgot to check that.

To use Sprays/Objects, go to Customization tab and move images from Other to their respective list.

As for map preview, it requires advanced graphic operations to paint texture on non-flat terrain. Also I'd have to generate the map to place objects etc. so that's too complicated to me.
My way to test theme is having Hedgewars running in the background with set map/theme/teams and basic stuff, so I can just click start to see preview. Whatever you change in theme will be visible after starting your map, but you might want to disable menu music, because it gets annoying after a hour Big Grin

Also, thanks for translation! I'll try to make an update today.

EDIT: Done!
rc9 changelog:
-Russian translation
-When there's no Music in user data directory, it will be created automatically
-Max number of 'objects per map' is now 32

Also, German translation needs update. I marked lines that need change with #, so they are easy to find.

ninija edit:
I uploaded wrong file. Fixed now, with additional change.

ivan866
ivan866's picture
User offline. Last seen 17 weeks 5 days ago. Offline
Joined: 2016-02-23
Posts: 45

KoBeWi allegedly wrote:

requires advanced graphic operations to paint texture on non-flat terrain

You kidding? Use java.awt.Graphics.setClip(Shape clip)

KoBeWi allegedly wrote:

have to generate the map

Don't bother with randomizing landscape shape. Just place an ellipse on top of the water and paint it with LandTex. Then another one with LandBackTex. And place one Object of each, respecting the visiblerect geometry. Clouds, water, Sky, flakes - all static.
All these would lessen the needed times to relaunch the game in order to test the theme.

Please add Water opacity. You should also set an upper limit for Object quantity - it is 32 in current Hedgewars version. I already think this editor gonna be really useful. I will use it for my next theme. Good work!

F8 is for bungee.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

ivan866 allegedly wrote:
And place one Object of each, respecting the visiblerect geometry.

That's what I meant by "generating". I'd need to calculate positions, spacing and all. Sounds like a lot of work. But maybe it will turn out not that much, like a lot of stuff I've done.
(also, my Hedgewars loads in 2 seconds)

ivan866 allegedly wrote:

Please add Water opacity.

It's already there - modify the alpha value of water color. I even linked alpha values of upper and lower water, so they are always the same.

ivan866 allegedly wrote:
You should also set an upper limit for Object quantity - it is 32 in current Hedgewars version.

Good to know.

ivan866
ivan866's picture
User offline. Last seen 17 weeks 5 days ago. Offline
Joined: 2016-02-23
Posts: 45

Theme visualization tool for Windows:

HedgewarsThemeViewer.zip on GitHub

Set path to Hedgewars dir in settings.xml first!

F8 is for bungee.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

What is it exactly? D:

ivan866
ivan866's picture
User offline. Last seen 17 weeks 5 days ago. Offline
Joined: 2016-02-23
Posts: 45

Gonna be theme viewer and config editor.

F8 is for bungee.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

Sorry... i want to ask how to use if Sad Smiley
idk how to run it,,, requirement ? Aplication Needed ? Better brains for me ?
just dunno to run it,,, please tell me Smile
(C'mon,,, who more stupid than me ?)

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Install Java 8 (https://www.java.com/) and run the .jar file.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

KoBeWi allegedly wrote:

... and run the .jar file.

which one ?

EDIT :

Ah !
I think it must be extracted
Thanks Big Grin
Not paying attention about the zip.

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

Sorry :'(

i do not know the right how to open it or can't ???

what i have try :

first,,,
i run it with Java (run the jar)
but, something like command promt come (black background, sure you know it, idk the name maybe ?) for a sec then gone,,, nothing happened

second
I Extract it then run "HedgewarsThemeEditor2" executable jar file in it,,,
here what i've got :
https://www.dropbox.com/s/v6kj8i0onab7a8v/Hedgewars%20Editor%202_Error1.bmp?dl=1
have pick the path it asked,,, but nothing happened,,,

XXX DEAD END FOR ME XXX

can someone please help me ???

|{

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

UMK, it doesn't look like an error, rather, your theme directory is empty. Go to "user path/data/Themes" and place your themes there, so editor will detect them. It scans this directory and lists every folder containing theme.cfg
(Looks like I should add a way to create a theme from within editor)

Also, pls don't put screenshots on Dropbox, because I have to download them to display ;_;

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

wow,,,
this not an error problem,,,
its about how dumb is me :-

yikes ! is my Mind go somewhere else ?
not look that way though,,,

and about Put Screenshot on Dropbox,,, its really my mistakes
i put it as link (lolz)

sorry Big Grin and thank you :DD

EDIT :

Uh,,, you putting Screenshot with links too ;_:

|{

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

UltiMaxKom allegedly wrote:
Uh,,, you putting Screenshot with links too ;_:
Yeah, but they are on Imgur. If you click the link, image will show in your browser rather than download on your drive.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

KoBeWi allegedly wrote:

UltiMaxKom allegedly wrote:
Uh,,, you putting Screenshot with links too ;_:
Yeah, but they are on Imgur. If you click the link, image will show in your browser rather than download on your drive.

right,,,
hehe,,, better one Big Grin

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

1.0 is out!

Changelog:
-redirected exceptions to crash log.txt

That's one change, but previously when error happened, the editor would became unresponsive, without any message. And I suspect that it could sometimes corrupt theme file.
Now if the editor hangs and something appears in crash log, you can send me it's contents, so I'll investigate and hopefully fix it.

Lyberta
Lyberta's picture
User offline. Last seen 21 hours 7 min ago. Offline
Joined: 2016-09-10
Posts: 167

What's the license for this? No license means "all rights reserved".

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

How about when i ask,,, is this the problem of me ??? if it is,,, then this should be answered from me with "Right Answer"

i think this started from the Erased Theme.cfg right ? from my massage ? idk,,, just ask if not Big Grin

]{

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

FaTony allegedly wrote:
What's the license for this? No license means "all rights reserved".
Ah, really? Does putting a note on this topic count or I have to put the license into download?

UltiMaxKom allegedly wrote:
i think this started from the Erased Theme.cfg right ? from my massage ?
Well, your message made me update the editor, but the crashes were annoying when I was using the editor too. It didn't clear my themes, but it randomly froze while being opened and I couldn't see why. Now I can make it more stable.

Lyberta
Lyberta's picture
User offline. Last seen 21 hours 7 min ago. Offline
Joined: 2016-09-10
Posts: 167

It's suggested to put a LICENSE or COPYING file somewhere visible with the text of the license.

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

OK, updated to 1.0a:
-Added LICENSE file

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

hmmm,,, do all my work need a license ??? then i need to erase them all :C

just kidding Big Grin ,,, but the question is quit "Non-Kidding-Purpose"
i mean,,, really ??? the pack need license ???
because its in "Hwp Package" which nobody should look inside for nice trip, cause it fill only datas ? maybe nobody curious about what is inside my pack,,,

]{

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

Lyberta
Lyberta's picture
User offline. Last seen 21 hours 7 min ago. Offline
Joined: 2016-09-10
Posts: 167

UltiMaxKom allegedly wrote:

hmmm,,, do all my work need a license ???

https://en.wikipedia.org/wiki/Copyright
https://en.wikipedia.org/wiki/Berne_Convention

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

I'm in process of refactoring the editor. What I did originally, was putting everything in one file. There was only one class and all classes were static classes within this class. Pretty much everything was static. Call it lazy programming XD

With 0.9.23 around the corner (hehe), I'm going to add support for new theme features. I don't really need to clean the code to do this, but it will make it easier to add new features in the future and fix some bugs. The interface is going to be cleaner with some new stuff, like packing multiple themes maybe or something. Also, the source will become usable, because it's so obscure right now that sharing it was useless XD

Anyways, this will probably take time, and I won't have much time in coming days, but it's not like I have to hurry ¯\_(ツ)_/¯ (water animation for example doesn't work anyways on Windows yet, so whatever)

btw, did I say that I hate Java? ¬_¬

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

"Call it lazy programming" <- Oh, this one is my hobby too xD

Anyway, I requesting the Editor is simplified while it can be used for anything around theme making, also the Auto-Save is quite 'Savage' (for the last time I use Theme Editor 2), it can wipe our your safe save (wut?) and overwriting it with something you don't want to put in (in this case, overwriting with something that make you crash)...

Annndd, why don't you hurry =C ? I need your Theme Editor 2 x)
HURRY UP YOU **********!!! (I mean I love you ^^)

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Well, actually, I have an idea how to tweak the auto-save feature to make it save only when changes are done (most importantly - it won't need much work). Also, adding save button and making auto-save optional might come too.
I'm going to fix the non-accurate ruler in object edit and, if everything goes well, add zoom with mouse wheel.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

Nah! This what I've waiting for :O

Auto-Save tweak, Save Button, Push Auto-Save aside as an bonus option, Ruler, and Zoom flexibility just make this even greater >_< !!!
Nothing more to be requested (atm?)
Just waiting for further news from you...

Okay, I'll wait for your Theme Editor =))
Hedgewarriors, brace yourself for KoBeWi's Theme Editor 3!

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Eh, I wouldn't call it Theme Editor 3, because it mostly uses the same code, but rearranged to be more... friendly. Maybe Theme Editor 2 v2.

Also, I can take feature requests if there's something else you'd want.

EDIT:
Small progress update. I was able to break down the source into multiple files. Instead of one file with 2k lines, it's now 9 files 200-300 lines. That's more manageable, but dividing it was hell, as I don't use Eclipse (call me a hipser, but I'm always programming in SciTE). Anyways, I'll now look on how can I add something new.

EDIT2:

┬┴┬┴┤ ͜ʖ ͡°) ├┬┴┬┴

EDIT3:

IMPORTANT QUESTION!

Any ideas where to put save button? It would be convenient if it was globally available, but I'm not sure where to put it. Would it be ok if it was in the first tab? You'd have to switch each time if you wanted to save, but it wouldn't break the interface at least.

EDIT4:

For now I went with save button in first tab.
Also, this is how packing themes looks like now:

Changelog has 19 lines so far.

EDIT5:

Would be stupid to add save button without this thing:

KoBeWi
KoBeWi's picture
User offline. Last seen 8 hours 59 min ago. Offline
Joined: 2010-12-25
Posts: 419

Hedgewars Theme Editor 2 v.2.0 released!

Changelog:
-source code has been refactored
-auto-save now saves every second, but only if something has changed
-editor gets a credit in theme.cfg
-removed empty line at the end of theme.cfg //disabled for now because of bug in alpha
-there's an error message when crash occurs
-added amRubber to custom image list
-theme icons are now shown in selection tab
-you can create new themes from within editor
-theme.bak is no longer packed
-any theme subdirectories aren't packed anymore
-object edit: fixed precision of drawing guides
-object edit: you can now zoom with mouse wheel
-object edit: clicking middle mouse button now resets the view
-object edit: fixed background
-object edit: you can now draw rectangles in up-left direction
-support for water animation
-support for objects on water
-removed warning about no rectangles in object
-there's now a save button and you can disable auto-save
-you can now pack multiple themes at once
-getting a template doesn't reload whole tab anymore
-loading theme with missing object/spray images no longer crash

Out of planned features, only two didn't make it in:
-music preview -> pretty useless and requires third-party libriaries to make
-theme preview -> too much work, maybe in the future

These are new lines added to translation:
http://lpaste.net/1997270053040422912
First two are from previous version, because German wasn't updated.
Also, in Russian translation, languageName should be name in Russian, not in English.

I'll update the screenshots later, because it's 2:14 AM D:

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 days 10 hours ago. Offline
Joined: 2016-06-26
Posts: 321

Ohhhhhh AWESOME ;O !!!

This what The Hedgewars Squad have waiting for!
After these years Shocking

Hey, anyway
Congratulations for your finished Hedgewars Theme Editor 2 v.2.0 Big Grin!
Also Congratulations for being the user with post that is a Hot Thread in General Discussion without more than two pages that win the most replied post EVER ;o !!! lol, actually you are the on The First Place and The Second Place at the same time xD Double Winner!

Your Hedgewars Theme Editor 1 and 2 being the most replied post with no more than two pages in General Discussion Big Grin
Well, I just explore our Forum for awhile before replying this x)
[ lol so descriptive ]

I want to ask this after reading Hedgewars Theme Editor "2 v.2.0" and make a question pop up
Why call it "HTE 2 v.2.0" ? It should be either "HTE 2" or instead "HTE v2" or "HTE 2.1" or "HTE 3" or the best for me is "HTE v2.1"
It seems convoluted when combine 2 with version 2.0 -> "2 v.2.0"
Which one tell the version? I bad in English so, um
idk why =/ just sounds odd for me
IMHO

BUT BUT BUT!
It wasn't a problem after all
Just curious Smile

Blurp, I'm coming to reply not because to asking that thing
But I want to ask, where the download link D; ?
I have do "That's all. Here's the download: https://www.dropbox.com/s/rkstvr5iicglkw2/HedgewarsThemeEditor2.zip?dl=1"
But get Traffic Error thingy in Dropbox (saying the user who own it has reach its traffic limit)
And idk what is it =/
I bet its my fault, derp

Hey KoBeWi:
So sorry for my comments here D:
I scroll down and see so many comment of mine here D_D
Sorry for that =[
So ugly...

Anyway, cheers up for the release Big Grin !!!
You're Best Hedgewarriors OF THE YEAR FOR ME! ^^
Even I think I won't really use HTE 2 v2.0 remembering I'm bad at it and its a big time =/ idk
And again, cheers! ( <- another silly behavior )
Hedgewars Theme Editor 2 v.2.0 coming, brace yourself

I love this quote :
[ "I'd rather be an optimist and a fool than a pessimist and right." -Albert Einstein ]

Copyright © 2004-2017 Hedgewars Project. All rights reserved. [ contact ]