PDA

View Full Version : Question about a choosing field from YOUTUBE tutorial



Amatiste
July 15th, 2020, 23:30
Damned,

I was working from your youtube video https://www.youtube.com/watch?v=R_CulFJYs-M&t=1346s. When i got to the part where you makinga choose button, I ran into a problem. I have followed your code, and checked it a few times, I have also made sure the paths are intact and all folders are there. But when i load the sheet, while all fields are in place, even the button is there, but the button doesn't show "choose" nor does it allow any selections. Here is my screenshot of the button area. 37734. Is there something I am missing?

damned
July 16th, 2020, 00:46
great stuff Amatiste

Most likely you havent created the string resource entries.

<string name="char_label_clan">CLAN</string>
<string name="char_label_title">TITLE</string>
<string name="char_label_liege">LIEGE</string>
<string name="char_label_shaman">Shaman</string>
<string name="char_label_warleader">Warleader</string>
<string name="char_label_counsel">Counsellor</string>
<string name="char_label_none">None</string>
<string name="char_label_choose">Choose</string>

Amatiste
July 16th, 2020, 00:51
great stuff Amatiste

Most likely you havent created the string resource entries.

<string name="char_label_clan">CLAN</string>
<string name="char_label_title">TITLE</string>
<string name="char_label_liege">LIEGE</string>
<string name="char_label_shaman">Shaman</string>
<string name="char_label_warleader">Warleader</string>
<string name="char_label_counsel">Counsellor</string>
<string name="char_label_none">None</string>
<string name="char_label_choose">Choose</string>

I have. Even checked it's syntax. I even went back through the video twice to make sure I have everything in place.

damned
July 16th, 2020, 01:19
Ok so the template itself should look like:

<root>

<template name="title_cycler">
<button_stringcycler>
<parameters>
<labelsres>char_label_shaman|char_label_warleader|char_label_ counsel|char_label_none</labelsres>
<values>Shaman|Warleader|Counsellor|None</values>
<initialvalue>Choose</initialvalue>
<defaultlabelres>char_label_choose</defaultlabelres>
</parameters>
</button_stringcycler>
</template>

</root>

Amatiste
July 16th, 2020, 01:49
Ok so the template itself should look like:

<root>

<template name="title_cycler">
<button_stringcycler>
<parameters>
<labelsres>char_label_shaman|char_label_warleader|char_label_ counsel|char_label_none</labelsres>
<values>Shaman|Warleader|Counsellor|None</values>
<initialvalue>Choose</initialvalue>
<defaultlabelres>char_label_choose</defaultlabelres>
</parameters>
</button_stringcycler>
</template>

</root>

That was it. I had <labelres> instead of <labelsres> Problem with reading off YouTube :)

Thanks Damned! If I have any other problems with this I'll put here. Is there a reference for acceptable xml tags for FG?

damned
July 16th, 2020, 02:00
https://www.fantasygrounds.com/refdoc/

Amatiste
July 21st, 2020, 23:43
Damned, another issue. I finished the video, got just about everything working, but the stats dont reset until I hit none or choose. So as I go thru the various titles, they just keep changing, based on what the prior title gives you. You said in the video that it resets to the old stats, but you didn't really explain what line did that. Can you tell me what line resets the old stat values? I feel im missing something :confused:

I figured out a solution. :)

damned
July 22nd, 2020, 05:16
Hi Amatiste

I may have misspoke or there may be a misunderstanding.
What happens is as it cycles it takes off the adjustments that the previous Title should have applied and then it applies the new Titles adustments.
Now at about the same time as I did that example the great Moon Wizard added the ability to go backwards on Cyclers and my script did NOT take that into account at all.
It only works cycling through in the forward direction.
If you had cycled all the way through you shoudl end up with the original stats providing you didnt cycle backwards at any point.

Amatiste
July 23rd, 2020, 19:23
Yeah, it would cycle to normal when i would go all the way through. I guess i thought each of the titles provided that bonus, like races do. I didn't think of them subtracting and adding what the prior one did. So I wrote something in to revert back to the original scores :)

BTW, i am starting the Theme extension video now. Do you have those graphic files somewhere?

damned
July 24th, 2020, 00:48
Hi Amatiste,

The extension was never meant to be used for real. It was primarily to show some approaches to FG programming and how to find what you want to edit etc.
I am positive there are better ways to do some of the programming stuff for sure!

Which video exactly? There are a few.

Amatiste
July 24th, 2020, 02:06
Hello! Its the Fantasy Grounds Theme Tutorial with the female elf on the thumbnail from 2018. I just found some files. I am kinda interested in Gimp. Graphics was one of mt favourite classes, and I use paintshop pro usually. Curious about something. In the video, you have the desktop at 1598x1096. I cracked open some of the simple themes i have, and they are 512x612. Is there a reason you used so big?

Sorry if I keep bugging you :) I am just trying to really dive into this during the pandemic stay at home orders, and the took most of teh coding classes off the College event list.

damned
July 24th, 2020, 02:15
Please ask questions. The point of the videos is to help people learn and Im pleased anytime someone asks questions.

That theme was made from images provided to me by someone here. Raddu maybe? Anyway - I would never have chosen those images but they are what we had to work with.

If you look at the nine slices video https://www.youtube.com/watch?v=ZLM0qMsNybg as well you will get a better idea why the base image size might be what it is. Nine slices does not require you to use all nine slices and that can have a big effect but mostly its the image source.

If your image is a perfectly tiling middle slice you could go as low as 400x400 - technically you could go much smaller but there will be an overhead as it draws and redraws with small tiles.

Amatiste
July 24th, 2020, 02:33
Thanks, Damned. As soon as I am finished with your video, ill check that out. :)