PDA

View Full Version : Help Runtime Error



Dep200
November 6th, 2017, 19:01
Hi all,

Need some help with the following error:

Runtime Error :desktop: Unable to create window with invalid class (referenceskill: reference.skill.appraise@TES Basic Rules:

I am working on my own set of rules and trying to put my own library together.

I spent time looking at the xmls provided in FG to try and figure it out.

this is the section causing the issue.

<lists static="true">
<skills>
<name type="string">Skills</name>
<index>
<appraise>
<listlink type="windowreference">
<class>referenceskill</class>
<recordname>reference.skills.appraise@TES Basic Rules</recordname>
</listlink>
<name type="string">Appraise</name>
</appraise>
</index>
</skills>
</lists>

Moon Wizard
November 6th, 2017, 19:21
The message is saying that the “referenceskill” window referenced in your link to display the record does not exist in the ruleset you are using.

Cheers,
JPG

Dep200
November 6th, 2017, 19:54
Moon,

Thanks so much. I guess I have some more working figuring out the ruleset side. Once I loaded it under the existing 3.5E ruleset it worked.

Dep

Dep200
November 6th, 2017, 21:26
Moon Wizard

Quick question it works in the 3.5 ruleset but does not work in the CoreRPG ruleset. How can I get to work there?

Dep

Moon Wizard
November 6th, 2017, 22:28
There is no concept of a skill record in CoreRPG, because that is a concept that is specific to each game system, and thus the skill record data structures are unique to each game system.

If you just want to create a link to a generic text reference record, you would use a display class of "referencetext", which only has the fields "name" (string) and "text" (formatted text).

Regards,
JPG

damned
November 6th, 2017, 22:45
Hey Dep200 as a quick aside - have you checked out MoreCore to see if it might be a good platform for your game.

Dep200
November 7th, 2017, 15:53
Damned,

Thanks, I have not and have not heard of it. Is that a community ruleset?

Moon,

I was looking through the developers page on the wiki and found information on windows. Is it possible define the window in the current xml document?

Thanks guys

Dep.

LordEntrails
November 7th, 2017, 15:57
Thanks, I have not and have not heard of it. Is that a community ruleset?

Yes, https://www.fantasygrounds.com/forums/showthread.php?34860-MoreCore-Ruleset

Dep200
November 7th, 2017, 16:03
Morecore looks great. However, I must be blind where is the link to get those extensions. I definitely what to give it a try.

Thanks Dep

Disregard found it thanks

Dep200
November 7th, 2017, 16:11
Ok just did a quick test I am still getting the same runtime error about loading the window. I have to do look a little more when I have more time thanks


Dep

Moon Wizard
November 7th, 2017, 22:21
Defining any sort of new UI requires you to either build a ruleset, or write an extension to modify an existing ruleset. The modules only contain data.

What are you trying to do?

* If you just want to display the skill text via a link, then you should use the "referencetext" display class I mentioned above. This just requires some small modification to your existing XML module data.

* If you want skills to do something different (such as, add to certain area of character sheet when dropped), then you would need to write a ruleset/extension to define how your data should be displayed, and what interactions they have with each other. This requires some programming/scripting.

Regards,
JPG

damned
November 8th, 2017, 04:01
MoreCore wont solve your issue. There are three ways to solve your issue.
Use the 3.5e/PF ruleset.
Build your own ruleset on top of 3.5e
Make an extension to load all the same fields onto CoreRPG or MoreCore

If they arent palatable then step back and have a look at how MoreCore works and can you tweak how you put together your NPCs (etc) so that they use the MoreCore features (which really do have a lot of flexibility).

Trenloe
November 8th, 2017, 04:46
Some information here: https://www.fantasygrounds.com/forums/showthread.php?19033-Modifying-the-3-5e-PFRPG-ruleset

Dep200
November 8th, 2017, 12:16
Hi guys,

I guess i should have lead with this, my sincerest apologies, back in 2015, I discovered TESV Skyrim and enjoyed the hell out of it. So I started to adopt it to a table top pen and paper RPG. I had to make some concessions to get it to work and not over complicate it. I wanted to keep it simple. Well I have messed with FG off an on for some time. So recently I started messing with the idea of taking what I created and tying to get it to work in FG. I can put everything I created in the Notes section on FG but I do not want an overly large note section. So I started trying to make a Data Module, everything is going great until this error. I am trying not to be bothering here by looking through the current ruleset included in FG to see if I can find the issue and adopt. Be looking on the Developers page of the wiki to see if I can find what I want. Trying now to find some tutorials on making or changing a ruleset. I coped the CoreRPG ruleset and renamed it TESRuleset. I have spent a lot of time the last couple of days looking through the 3.5E rule set to find the scripts I need to create the windows I want. The last time I worked with scripting was back when Mechwarrior 3 came out. So my knowledge on scripting is nill. So any help you can provide is greatly appreciated.

Thanks
Dep

damned
November 8th, 2017, 12:26
Its not that simple...
That thread that Trenloe pointed you too is what you will want to knuckle down and work your way through.
If you are not a programmer (Im not) it can take you a lot of time and frustration before things start to click.

But rolling back...
What are the core mechanics of you game?
Are they similar to D&D 3.5e? Or something else?
If they are similar to an existing game system then see if you can live with using that game system as is.
Otherwise extend that ruleset so that you have the leaset amount of things to do...

Coding in XML and LUA is a real experience...
Get a good text editor - I use notepad++ but there are lots of good ones available - and learn to use the find in files feature.
You will find that most things draw elements from at least two different files so you have to track all of those back and understand each of them when you change or duplicate something.

Otherwise if your system isnt like any of these... seriously, try MoreCore...
https://www.youtube.com/playlist?list=PLsgd1zJLdiKW3HysWZRsX4cqFlcerBvW3

Dep200
November 12th, 2017, 12:08
Hey Damned,

Sorry been a work, the basic mechanics is a d20, that is the only dice you roll nothing else. I'm going to be working through what Trenloe posted and see what I can come up. I have taken a much longer look at MoreCore and I do like what I see so I'll be working through that as well. Is there a Lexicon for the XML that FG uses? I do you Notepad++ and really like it.

Thanks
Dep

Dep200
November 12th, 2017, 15:30
Moon,

How do I do the "referencetext" display class? Been searching for an example but can not seem to find I find. I found what I believe is the XML Lexicon for FG but it does not show this.

Thanks
Dep

Trenloe
November 12th, 2017, 15:48
How do I do the "referencetext" display class? Been searching for an example but can not seem to find I find.
The key thing to development in FG is to extract the ruleset files to somewhere outside of the FG data directory and use a text editor that has "Find in files" functionality. See step 3 here: https://www.fantasygrounds.com/forums/showthread.php?19033-Modifying-the-3-5e-PFRPG-ruleset

This will allow you to search in the ruleset/s you're using to find XML definitions, etc.. Your first and foremost place for finding out up-to-date information for XML definitions etc. is the ruleset code itself.

damned
November 12th, 2017, 21:03
Most things that you will want to do have been done before or there are similar examples that can be adjusted.
Find what you are looking to do or modify in an existing ruleset and use the "find in files" as Trenloe suggests to find that examples code and everywhere its linked to and from and go from there.

Dep200
November 15th, 2017, 12:09
Hey all,

Thanks for the help, I did the find in files and found the xml (record_skill.xml) that defines the window class for skills, however, when I place the xml in the the files i am using i.e. the same location I found it in 3.5E, campaign folder in the campaign folder of the ruleset I am working with, which in this case is a modification based on CoreRPG, I still get the same error, I am wondering now if I am missing a .lua script.

Thanks for all the help and the patience you all are having with me.

Dep

damned
November 15th, 2017, 12:35
Are there lua scripts being called from that file?
Have you done a find in files on the record type names used in that file? They are templates and can have lua scripts attached to them in another file.
For example link_record_header has an associated template and that incudes linkcontrol which has an associated template which includes windowreferencecontrol - ok, so no script here but just to highlight that you have to follow the trail deeper at times to see what each thing actually is and what it does.

Trenloe
November 15th, 2017, 15:39
I did the find in files and found the xml (record_skill.xml) that defines the window class for skills, however, when I place the xml in the the files i am using i.e. the same location I found it in 3.5E, campaign folder in the campaign folder of the ruleset I am working with, which in this case is a modification based on CoreRPG, I still get the same error
You need to tell FG to load the XML file. Just putting it in a directory within the ruleset won't do anything (as you're finding). Look at the base.xml file in any ruleset - you'll see it has a number of <includefile> entries - each telling FG to load a specific XML file.

Dep200
November 16th, 2017, 11:33
Hey all,

That was the last few pieces I needed to get it working like I wanted. Thank you so very much for all your help. The windows are loading just like I wanted. Now just to fine tune it all and get all my information loaded into a mod file. You all are awesome.

Thanks
Dep

Bidmaron
November 16th, 2017, 13:17
Glad you got it worked out.