PDA

View Full Version : 5E xml mod effects question?



rob2e
September 11th, 2016, 09:11
Looked and looked, couldn't find out this...

What are the parameters and possibilities for the zeroes here:

<id-1>
<public />
<adjustment type="number">0</adjustment>
<duration type="number">0</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">AC: 1</label>
</id-1>


I know the "isgmonly" is for visible (0) or not visible (1)

I assume the "adjustment" and "duration", have to do with the # of MIN, HR, DAY, RND, etc.

Just couldn't figure out what means what or how to code those.

I hope I explained that well enough.

Help?

Zacchaeus
September 11th, 2016, 19:30
<id-00001>
<public />
<duration type="number">5</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">Mage Armor; AC:3</label>
<unit type="string">minute</unit>
</id-00001>

This one is from Mage armor which I set to last for 5 minutes. So I think your answer is that the duration is whatever number is in the duration box. My one has a unit type which yours doesn't have and that sort of fills in the blanks a bit.
Where are you getting your xml from? Mine was just taken from the db.xml from within the campaign.

gqwebb
September 11th, 2016, 19:38
Yes, And thanks for your ultimate sets. They are a wealth of information. Code and otherwise.

rob2e
September 11th, 2016, 19:41
I'm getting my xml from my original creation. But I copied it from a forum posting. Mine only had duration (set at nothing "><") and imgonly. It works, but everything is 0 RND. I want to be able to set the number of rounds or minutes or hours.

When I open a db.xml from a campaign the effects looks like this:

<effects>
<public />
</effects>

So I'm kind of at a loss.

rob2e
September 11th, 2016, 19:47
<unit type="string">minute</unit>


Aha! I think this is my answer...

string, which I'll assume are the full words. minute day hour round... Testing continues.

ThanX Zacchaeus.

rob2e
September 11th, 2016, 19:50
I don't know .xml. The only computer stuff I know is BASIC (what's up 1984?), and a rudimentary understanding of HTML. I'm self-taught on .xml, HTML, .php, Office applications (Excel - I'm crazy with spreadsheets), and everything else. I eventually figure stuff out, it just takes me 10 times longer than anyone with proper training.

Boo me, yet YAY me! Ha!

Trenloe
September 11th, 2016, 20:19
Like anything with FG XML your best bet is to enter a bunch of examples through the FG GUI, save the campaign, and then have a look at the resulting FG XML in the campaign db.xml file.

For example:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=15282

Gives:

<effects>
<public />
<id-00001>
<public />
<duration type="number">1</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">1 Round</label>
</id-00001>
<id-00002>
<public />
<duration type="number">2</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">2 Mins</label>
<unit type="string">minute</unit>
</id-00002>
<id-00003>
<public />
<duration type="number">3</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">3 Hours</label>
<unit type="string">hour</unit>
</id-00003>
<id-00004>
<public />
<duration type="number">4</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">4 Days</label>
<unit type="string">day</unit>
</id-00004>
</effects>

rob2e
September 11th, 2016, 20:21
Ah, thanX much Trenloe! My brain doesn't think to CREATE the problem, then solve it. Cheers!

rob2e
September 11th, 2016, 22:49
Trenloe.

I have the effects exactly as shown, but when I try to create a NEW .mod with those, the minute, hour, day still show as rounds. I tried MIN, HR, DAY, that didn't work either.

Ideas?

15285

rob2e
September 11th, 2016, 23:05
Apparently, FG works with data from a campaign db.xml differently than a module db.xml?

rob2e
September 11th, 2016, 23:31
OK, figured it out. A function of programming to be sure, but here's what was happening.

It DOES in fact work. HOWEVER! If you open the effects, and then you CLOSE and REOPEN the module in the library that has the effects, it changes all the units to RND. Kinda weird. If you close effects and reopen them, then it reverts them back to what they are supposed to be. So as long as the user doesn't close and reopen the library mod, it's fine.

Also, it seems if you open then effects window, THEN load the module it again defaults to RND for everything. Weird. So with a specific order of function, it works. It's too bad you have to know that. I sense frustration among those that don't figure that out.

Oh well... ThanX for helping me with this Zacchaeus and Trenloe.

Trenloe
September 12th, 2016, 05:18
Of course, you could just use the effects exporting extension to create your effects module. Or are you still having issues with that? https://www.fantasygrounds.com/forums/showthread.php?26044-Campaign-Effects-Export-Extension-(CoreRPG-based-rulesets)

When you're having issues with FG changing settings back to RND when opening/closing an effects module do you see an entry for this module in the campaign \moduledb directory that is overwriting the <unit> entry?

rob2e
September 12th, 2016, 14:52
Trenloe, not sure. When using the EXT for exporting effects, this WAS the trouble I was having, it sets everything to 1 RND, but if you close and open the effects window, it fixes it.

I'm no programming guru, but it seems it's not checking some sum, or reverting changes somehow within the program? I don't know.

I look in the \moduledb and there are a bunch of .xml files in there. Nothing jumps out as something that overwrites the <unit> entry. At least I couldn't find it.

Trenloe
September 12th, 2016, 15:00
I look in the \moduledb and there are a bunch of .xml files in there. Nothing jumps out as something that overwrites the <unit> entry. At least I couldn't find it.
The XML file will be the same name as the module. If there's nothing obvious there then it isn't overwriting module data for the campaign.

You're right, it appears to be that opening/closing the module with the effects window opens doesn't update the effects data correctly. Closing and re-opening the effects window populates the data correctly. So FG isn't changing that base data or overwriting it for the campaign, it is just that the effects window only properly reads module data when it is being opened.

You can use the effects export extension fine. You might want to remove the <library> and <lists> section from the exported db.xml so that it doesn't appear in the library.

Any effects module, manually created or using the extension, will have the above mentioned issue - just close the effects window and re-open it to see correct data.

And remember to test your module outside of the campaign you used to create the module.

rob2e
September 12th, 2016, 18:30
Got it.