Page 1 of 4

HeroScribe source code

PostPosted: April 15th, 2016, 7:42 am
by Count Mohawk
This topic was moved from General Heroquest Discussion on 7/22/16.]

Is the source code for HeroScribe available for download anywhere? I can think of a couple of improvements I wouldn't mind making to the program. (Of course, then I would have to actually learn Java...)

Re: HeroScribe source code

PostPosted: April 15th, 2016, 11:30 am
by Anderas
derfel@heroscribe.org is worth a try, i guess. i don't know how active he still is...
other than that, maybe you can try to open that source.tar.gz that is to be found in the installation folder of Heroscribe?

Re: HeroScribe source code

PostPosted: April 15th, 2016, 9:18 pm
by StratosVX
Count Mohawk wrote:Is the source code for HeroScribe available for download anywhere? I can think of a couple of improvements I wouldn't mind making to the program. (Of course, then I would have to actually learn Java...)

This is something that I, too, have wanted to do. Mostly to make it easier to import files. However, with school and work, it will likely be a while before I can do this as I need to learn Java too. If you do take this on, might you be willing to hear a couple of ideas I have?

Anderas wrote:derfel@heroscribe.org is worth a try, i guess. i don't know how active he still is...

I sent him an email well over a year ago asking for assistance on some problems I was having with HS but have never heard back. He may have gotten too busy with other things to deal with it, but I'd say it's still worth a shot.

Re: HeroScribe source code

PostPosted: April 18th, 2016, 4:31 pm
by Count Mohawk
Anderas wrote:other than that, maybe you can try to open that source.tar.gz that is to be found in the installation folder of Heroscribe?

duhhhhhhhh. of course that's the source code. kids, this is what happens when you get up too early in the morning. :zombie: :zombie: :zombie:

StratosVX wrote:This is something that I, too, have wanted to do. Mostly to make it easier to import files. However, with school and work, it will likely be a while before I can do this as I need to learn Java too. If you do take this on, might you be willing to hear a couple of ideas I have?

I make no promises as of this time, but this is as good a thread as any to compile a HeroScribe "wish list" of additional features. Whenever I make some form of notable progress, I'll be sure to post an update. So far, all I've done is download a Java editor - the freeware "Eclipse" seems sufficiently functional, although almost anything should fit the bill considering we're making plans to modify a twelve-year-old program.

Re: HeroScribe source code

PostPosted: April 19th, 2016, 1:05 pm
by StratosVX
I'm happy to help too if I can get the time to learn Java between work and school. I just purchased some videos through Stack Social last week on Java. Here's the basics of what I wanted to change (keep in mind I don't know how feasible some of this is):

1) All icons/maps have vector and raster versions in the folders. Which means that whenever you make an icon, you have to make three versions of that icon for HS - the vector, the sample, and the raster version that is what you see when you lay out maps in HS. I wanted to see if I could get it to only need the vector version and it would then convert it to raster if you wanted to export a png. This would eliminate work for anyone wanting to make icons/maps.

2) Importing icons is a royal pain right now. Whitebeard was able to get his to import correctly, I still cannot get mine to. I wanted to see if I could make the import process easier. After the icon is created, I wanted to make an import section where you would say what classification it is (monster, all-in-one monster, hero, room, etc.), what the name of the icon should be as it will appear in HS, then you tell HS what the dimensions are (1x1, 2x3). In my mind, that's all that should be necessary to import icons. Let the program do the rest of the work. This part should actually be very feasible. The icons would still need to be made correctly, this step should just be writing the data to the xml file and copying the icon to the right location.

3) Importing maps is a longer process than it needs to be too. The import process would be similar to the icon import process. Tell HS what the name is, what the dimensions of the map are, then (this is the part of this step that may not be feasible) HS would show you the map and you would select the squares that are considered corridors (if this is something you care about).

Overall I think HS is good for what it does. These are the main areas where I think it could be improved. Also, I didn't realize HS was 12 years old. Wow!

Re: HeroScribe source code

PostPosted: April 19th, 2016, 7:43 pm
by whitebeard
Never ceases to amaze me how a small community can get projects done. Good luck guys!

@Stratos: Did you try upgrading the Cairo Ghostscript? It looked like this was a free app download for the mac. It should make your output match mine.

I have a large volume of icons I need for my ForestOld quests. I will likely write a script that fixes the postscript files and we can maintain it for each new version if we need to. In the script we could also replace every color with a brightness in any single color channel > 80f with black. And all others with white, thereby automating the EU conversion. It may also be possible to automate the .png generation. Then we share the script instead of writing a lot of new code.

Re: HeroScribe source code

PostPosted: April 20th, 2016, 12:59 am
by Anderas
PNG isn't complicated, luckily.
We could keep the current organization of Heroscribe folders, but allow to input high definition PNG as well. Heroscribe would make a low version of the PNG and a vector conversion via a random online image vectoriser. So far my dream. :D

The second page, for the quest notes, I would specifically exclude it. Open office and word are so much better to do this part.

Inputting g a Hero group and calculating the difficulty would be nice. Four standard groups with 2,3,4,5 dice each, plus a self generated group?
He could as well adjust the difficulty to a given value and a given group by removing or adding a monster here and there.... but that would be the high art.

Re: HeroScribe source code

PostPosted: April 20th, 2016, 7:09 am
by StratosVX
whitebeard wrote:@Stratos: Did you try upgrading the Cairo Ghostscript? It looked like this was a free app download for the mac. It should make your output match mine.

I checked the app store and nothing came up. I also found a site that showed me the command to do it through terminal, which I did but haven't re-exported any icons to see if it worked yet. I'm coming up on finals in school and working almost full-time hours so I don't have much free time right now. Also, I'm not sure if my computer is getting ready to go out on me or if I just really need to reformat and start over. It's acting very strangely and I've been planning on reformatting as soon as I get one last project done. Once I get some free time, that will take priority. I had to have the logic board replaced back in January and it hasn't acted right since then, even though the tech says everything checks out normal now.

Re: HeroScribe source code

PostPosted: September 10th, 2018, 4:42 am
by Anderas
It's driving me mad.

If you want to add symbols to heroscribe, you need to apply all kinds of mad transformations to the original eps file, and up until now I was not able to convince him afterwards to accept the icon for pdf making.

If I make a pdf via ghostscript it works, via heroscribe it doesn't. :barbarian: :zombie:

Had some exchange with Stratos to make this work... I even had contact with Martin Weber from Autotrace. Now I have written something that automatically traces icons to make eps.

However from having an EPS to getting Heroscribe to accept it is madness. Autotrace works best with high resolution images, heroscribe wants them in 17 pt size for a standard monster.

Then you need to shift the coordinate system zero to the middle of the eps picture - that works - but then Heroscribe rejects to make pdf files from it. :gargoyle:

Re: HeroScribe source code

PostPosted: September 10th, 2018, 12:10 pm
by StratosVX
That sucks. I thought you might have been right on the verge of success. Honestly, this may be an issue we will have unless HS is rewritten. I looked at the HS code a while back (couple of years ago) and if I remember right, it looked like it was using outdated commands. I had planned on trying to rewrite it using modern methods, but never had time. Plus, I'm more familiar with C++ than Java, so I need some extra time to go through Java to see what methods are out there.