• Advertisement
HeroGM Advanced Soundboard

Dive into the dimension of dynamic sound with Hero GM!
Free version available! Save 10% on full version with offer code "yeoldeinn"

If I would remake Heroscribe

Discuss other HeroQuest expansion topics that do not fit into the above categories.

Re: If I would remake Heroscribe

Postby Anderas » Tuesday April 23rd, 2019 3:37am

pemcode wrote:HeroScribe uses javax.swing. I edited HeroScribe code with NetBeans IDE 8.2, running on latest Java. I don't think anything is wrong with Swing, and I seriously doubt that Java has any plans to kill support for Swing.

I'm using HeroScribe's XML files for my UE4 HeroQuest game (simulator). My fork just has some small tweaks to the GUI to make the interface faster.

The bigger issue is that HeroQuest XML files are missing the quest text, and the HeroQuest GUI does not support quest text. So I want to extend HeroScribe such that it supports quest text (in the GUI and XML). And maybe Python for game logic.

To clarify, I mean that HeroScribe fork will still be written in Java, but it will allow users to save quest text (in the HeroScribe XML that's also displayed in the HeroScribe GUI) that includes both the actual text and a corresponding Python script. The Python script will be used by my UE4 (Unreal Engine 4) code to execute game logic. However, for simplicity, I may start with simple function calls in the XML, something like:

Code: Select all
<object id="LetterD" left="12.0" top="6.0" rotation="downward" zorder="0.0" />
  <text>The first Hero who searches for treasure will find 84 gold coins in this treasure chest</text>
  \script function="Treasure" arguments="gold, 84" /> forum doesn't let me do < for the word script
</object>


The other reason why this may be better than actual Python is that embedding Python in UE4 requires effort. In fact, for whatever reason, this project https://github.com/20tab/UnrealEnginePython only supports "Windows, MacOSX, Linux and Android"... So custom function calls may be better if it's non-trivial to support Python on all platforms.

To me it seems easier to extend the Java version than rewrite it in Python... But maybe not.

by the way are you planning to use the existing HeroScribe XML format for your Python rewrite?



I think you have a great idea there.
Why don't you take a look at the planned file format?

https://github.com/Anderas2/Heroscribe2 ... est-format

I think we are not too far away from each other. Maybe we stay compatible. :-)


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Yeti
Yeti
 
Posts: 2948
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Advertisement

Make a small donation to Ye Olde Inn!

Donate via Paypal

Every cent received goes toward Ye Olde Inn's maintenance and allows us to continue providing the best resources for HeroQuest and Fantasy Gaming fans.

Re: If I would remake Heroscribe

Postby StratosVX » Tuesday April 23rd, 2019 5:26pm

Back when I had looked at it, I was told by a few of our CS professors and several people in industry that there was another GUI package that was better than Swing and that it wasn't expected that support for Swing would be maintained as a result. Another problem I am hoping we can alleviate is are the issues various people have had getting Heroscribe running on their machines. Theoretically, having the Java virtual machine should mean that the program runs the same on all platforms, but that has definitely not been the case in the past. We are going to try to create installers with Python and hopefully that will eliminate issues people have had.


Rewards:
Zealot Miniatures: Twisting Catacombs Kickstarter Backer
User avatar
Scribe of Heroes
StratosVX
I hate snakes, Jacques...

Ogre
Ogre
 
Posts: 855
Joined: Tuesday November 6th, 2012 12:44am
Location: Utah, USA
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby pemcode » Tuesday April 23rd, 2019 7:37pm

Does 1:1 mean that your Python HeroScribe2 XML will be able to open the unmodified pre-existing HeroScribe XML files? And from there, we can add questtext, notes, wanderingmonster, etc? In that case, maybe I could use your HeroScribe2 file format.

HeroScribe has pre-existing XML files for the standard quests - base, kellar's keep, witchlord, ogre horde, wizards of morcar, dark company, mage of the mirror, frozen horror. My HeroQuest UE4 simulator reads these XML files, see http://mepem.com/pemcode/?p=1020 http://mepem.com/pemcode/?p=717

For HeroQuest UE4, some sort of script tag will also be needed to allow quest-specific code. My previous comment gives a simple example (Treasure gold 84) that basically just references function calls implemented in HeroQuest UE4 C++ game code (not as part of the XML file). Obviously scripting as part of the XML file would be more flexible, but a lot more effort to support it.
please contact me if you have significant skill + time to help with HeroQuest for UE4: http://mepem.com/pemcode/?cat=14
pemcode

Skeleton
Skeleton
 
Posts: 27
Joined: Tuesday May 1st, 2018 12:49am
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby Anderas » Wednesday April 24th, 2019 1:14am

So we add a <pemscript> tag? :D
<pemscript>treasure "potion of speed" "short sword" trapped 1BP findable</pemscript>

It would be a basic text tag right?
I think about using feedparser or something similar to clean up the xml files that you receive from an untrusted source. So it really has to stay basic to avoid being cleaned away.


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Yeti
Yeti
 
Posts: 2948
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Re: If I would remake Heroscribe

Postby pemcode » Wednesday April 24th, 2019 2:21am

pemscript haha :D. I think it would be a child of <object id="LetterC"> such as:
Code: Select all
<object id="LetterC" left="8.0" top="3.0" rotation="downward" zorder="0.0" />
  <pemscript function="Treasure" arguments="gold, 50"/>
<object id="LetterC" left="8.0" top="3.0" rotation="downward" zorder="0.0" function="Treasure" arguments="50 gold" />

Or maybe it would be associated with LetterC based on (left, top) eg:
Code: Select all
<pemscript function="Treasure" arguments="gold, 50" left="8.0" "top=3.0" />

To edit pemscript in HeroScribe2 GUI, user can click LetterC in the GUI. Or user can click the description. GUI needs a way to edit pemscript, and to save/load from file.
Also, pemscript I think it's simpler to use XML attributes such as function="Treasure" arguments="gold, 50"
However, for an initial version you can literally just have the editor accept a text string and the user types in whatever for pemscript. That way you can implement GUI and save/load for pemscript.
Then we can worry latter about the details... I think it may be necessary to go through each map's quest text to understand what format is really needed.

...

I think the following goals are reasonable:
1) HeroScribe Pem's Fork can open any HeroScribe2 XML file... it will just ignore the questtext etc stuff
2) HeroScribe2 can open any HeroScribe XML file... it will just use default for questtext etc stuff

...

If you want to make it easy for people to try out your code, I think you should...

1) fix this error:
Code: Select all
$ C:\Programs\python-3.4.1-x64\python.exe src\HeroScribe.py
Traceback (most recent call last):
  File "src\HeroScribe.py", line 21, in <module>
    from src.heroscribe.helper.OS_Helper import OS_Helper
ImportError: No module named 'src'

If I replace src.heroscribe etc with heroscribe, then it gets past this error...

2) maybe README should have directions on how to install panda
Code: Select all
$ C:\Programs\python-3.4.1-x64\python.exe src\HeroScribe.py
Traceback (most recent call last):
  File "src\HeroScribe.py", line 23, in <module>
    from heroscribe.Preferences import Preferences
  File "B:\Pem_Files\Pem_Code\UnrealEngine\HeroScribe2\src\heroscribe\Preferences.py", line 21, in <module>
    from pandas import read_excel
ImportError: No module named 'pandas'


...

I think someone is going to literally have to manually transcribe the quest text for every quest? I tried OCR'ing PDFs with PDF-XChange but accuracy was really bad. The other HeroQuest PDFs I found lack text or are password protected from copying the text.
please contact me if you have significant skill + time to help with HeroQuest for UE4: http://mepem.com/pemcode/?cat=14
pemcode

Skeleton
Skeleton
 
Posts: 27
Joined: Tuesday May 1st, 2018 12:49am
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby Anderas » Wednesday April 24th, 2019 2:48am

Try Google keep. They have a really good OCR.

Pandas is a comfortable table data editing module. Try

Pip install pandas

I will add a remark to the read me, yes. Pynstaller will hopefully resolve all dependencies in the end.

All my modules currently have src as base folder... Yes maybe one could go one folder deeper. I imagine the .bat or the .exe sitting right on top of the folder structure and defining the base folder.


Rewards:
Hosted a Play-by-Post game. Played a turn in a Play-by-Post game. Created a Hot Topic. Participated in four (4) Miniature Exchanges. Participated in a Miniature Exchange. Zealot Miniatures: Twisting Catacombs Kickstarter Backer Destroyed a Zombie! Encountered a menacing Chaos Warlock!
User avatar
Anderas
NOT Andreas!

Yeti
Yeti
 
Posts: 2948
Images: 33
Joined: Saturday September 20th, 2014 7:02am
Forum Language: British English
Evil Sorcerer: Morcar
Hero:
Usergroups:
Adventurers' Guild Group Member Artists Group Member
Champion Group Member

Re: If I would remake Heroscribe

Postby StratosVX » Wednesday April 24th, 2019 1:43pm

pemcode wrote:If you want to make it easy for people to try out your code, I think you should...

1) fix this error:
Code: Select all
$ C:\Programs\python-3.4.1-x64\python.exe src\HeroScribe.py
Traceback (most recent call last):
  File "src\HeroScribe.py", line 21, in <module>
    from src.heroscribe.helper.OS_Helper import OS_Helper
ImportError: No module named 'src'

If I replace src.heroscribe etc with heroscribe, then it gets past this error...


I had an issue with this as well. Just move the Heroscribe.py file up one level in the folder structure.

pemcode wrote:2) maybe README should have directions on how to install panda
Code: Select all
$ C:\Programs\python-3.4.1-x64\python.exe src\HeroScribe.py
Traceback (most recent call last):
  File "src\HeroScribe.py", line 23, in <module>
    from heroscribe.Preferences import Preferences
  File "B:\Pem_Files\Pem_Code\UnrealEngine\HeroScribe2\src\heroscribe\Preferences.py", line 21, in <module>
    from pandas import read_excel
ImportError: No module named 'pandas'


Google. That's all I do when I need to see the syntax for installing modules I need.


pemcode wrote:I think someone is going to literally have to manually transcribe the quest text for every quest? I tried OCR'ing PDFs with PDF-XChange but accuracy was really bad. The other HeroQuest PDFs I found lack text or are password protected from copying the text.

Give me a couple of days (and maybe shoot me a reminder) to look into this. I might be able to get text copied out of the files.


Rewards:
Zealot Miniatures: Twisting Catacombs Kickstarter Backer
User avatar
Scribe of Heroes
StratosVX
I hate snakes, Jacques...

Ogre
Ogre
 
Posts: 855
Joined: Tuesday November 6th, 2012 12:44am
Location: Utah, USA
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby pemcode » Thursday April 25th, 2019 3:19am

I made a symbolic link (mklink HeroScribe.py src\HeroScribe.py).
I installed Python37 x64 then ran (python.exe -m pip install pandas), ditto for sortedcontainers, PyQt5, --upgrade pip, xlrd
I commented out Read() because it gave an error missing file Sample.xml

I'm able to open the GUI:
gui.png

And as a comparison, here is HeroScribe fork:
heroscribe.png

Well at this point I think adding functionality to HeroScribe fork seems easier, but if you continue on the Python rewrite, I'll be excited to see the progress, and I'll especially be interested to use quest text and pemscript when that's available.
You do not have the required permissions to view the files attached to this post.
please contact me if you have significant skill + time to help with HeroQuest for UE4: http://mepem.com/pemcode/?cat=14
pemcode

Skeleton
Skeleton
 
Posts: 27
Joined: Tuesday May 1st, 2018 12:49am
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby pemcode » Wednesday May 22nd, 2019 1:46am

I'm tentatively planning to use Lua (instead of Python) as the HeroScribe XML extension.
please contact me if you have significant skill + time to help with HeroQuest for UE4: http://mepem.com/pemcode/?cat=14
pemcode

Skeleton
Skeleton
 
Posts: 27
Joined: Tuesday May 1st, 2018 12:49am
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

Re: If I would remake Heroscribe

Postby pemcode » Saturday May 25th, 2019 5:19am

I think just adding quest text to the existing HeroScribe (XML and GUI) would be really useful... Both for my video game port, but also in general.
please contact me if you have significant skill + time to help with HeroQuest for UE4: http://mepem.com/pemcode/?cat=14
pemcode

Skeleton
Skeleton
 
Posts: 27
Joined: Tuesday May 1st, 2018 12:49am
Forum Language: English (United States)
Evil Sorcerer: Zargon
Hero:
Usergroups:
Champion Group Member

PreviousNext

Return to Other Expansion Topics

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests