PDA

View Full Version : Par5E and Tables



geewaagh
December 4th, 2014, 12:03
I am trying to figure out how to import wandering encounters to the rollable tables in FG. Is there a right way to parse a table to make it work? I have many tables that have over 100 entries so importing line by line via copy paste is painful to say the least.

How would I format the below example and would I put it in the tables.txt file?
1d4 Weather
1 Sunny and warm
2 Raining and cold
3 Foggy and muggy
4 Cloudy and cool

OneSidedDie
December 5th, 2014, 03:29
##;Weather Tables (example)
#!;Weather Table (example)
Roll on the weather table to randomize weather (example)
dice;d4
column;Weather
row;1;1;Sunny and warm
row;2;2;Raining and cold
row;3;3;Foggy and muggy
row;4;4;Cloudy and cool

geewaagh
December 5th, 2014, 15:20
Oneside,

Thanks for the reply! I have pasted your example into my tables.txt but still no love. I get a warning on Parse: table ... Weather Table
Is there a header or something needed in the tables.txt file?

The only contents of my tables.txt file is:

##;Weather Tables
#!;Weather Table
Roll on the weather table to randomize weather
dice;d4
column;Weather
row;1;1;Sunny and warm
row;2;2;Raining and cold
row;3;3;Foggy and muggy
row;4;4;Cloudy and cool

OneSidedDie
December 5th, 2014, 21:43
Nope, that should be it. That is exactly the formating I used on my wild magic table and it works like a charm. You can set a category with #@; but if you don't it just puts it in there without one. I will be home in a few hours and I can help you troubleshoot.

OneSidedDie
December 6th, 2014, 00:52
Just tested it. Yes, you get an error if you leave off the category "#@;" but it still parses fine with no category.

geewaagh
December 6th, 2014, 02:30
OneSided
Added the #@ category fixed my issue with this table and stopped the module from sometimes not writing! Thanks for your help!

BubbaGrim
February 1st, 2017, 04:20
At the expense of once again resurrecting a near dead thread. Why do my tables have little shields next to them and how do I get rid of that?

Zacchaeus
February 1st, 2017, 19:38
Do you mean at the start of each row?

Someone else pointed this out and I hadn't noticed this before. It may be due to changes in the FG client, but I don't know for sure. I don't think there's a solution.

BubbaGrim
February 1st, 2017, 21:47
Yes, it just contains the information in the cell, I would guess it's so you can send the data to a parcel.

BubbaGrim
February 2nd, 2017, 02:49
Okay one more question about tables (if I'm asking too many questions you can just tell me to "<bleep> off and figure this <beep> out for yourself".
Is there a way to put a table inside a piece of equipment or to link to a rollable table?

I can make it work in a spell just not a piece of equipment.

JohnD
February 2nd, 2017, 04:31
That's a good question. Not at a computer with FG right now. What about an item like a Wand of Wonder? Does that have a link to a random table in it?

BubbaGrim
February 2nd, 2017, 05:55
It does, both an image and a table, hmmmm. Back to the testing board.

BubbaGrim
February 2nd, 2017, 06:51
Okay, I kinda figured out a work around, I modify the XML file inside the .MOD file. Not really what I wanted, but it works.

Zacchaeus
February 2nd, 2017, 14:15
Yes, drag the table to the description box of the item.

BubbaGrim
February 2nd, 2017, 16:24
Yes that works too, but I want to be able to do it from within Par5e.

Zacchaeus
February 2nd, 2017, 16:51
Oh, right, sorry. I think you should be able to do a zlink within parse. Just the normal#zl;table;My Table should work. It's possible that this isn't possible for items though, so you'd have to do a bit of trial and error.

BubbaGrim
February 2nd, 2017, 20:59
Par5e handles spells differently than items, you can use line breaks (for the most part) to format your spell description so when you want to line a table you can just drop it into the surrounding text.

##;
Discombobulation Ray
1st-Level Engineer
Components: Gloves
Casting Time: 1 action
When this gadget is equipped, you can use an action to shoot a ray of energy at a target you can see within 50 feet of you. This ray assaults and twists the creature’s mind, spawning delusions and provoking uncontrolled action. The target must roll a Wisdom saving throw. If it succeeds, the ray has no effect. If it fails the saving throw, the target can’t take reactions and must roll 1d10 at the start of each of its turns to determine its behavior for that turn.
#zls;
#zl;table;Discombobulation Ray
#zle;
At the end of each of its turns, the affected creature can make another Wisdom saving throw. The effect ends if the target succeeds on the saving throw or at the end of their third turn after they are targeted by this effect. Once you have used this gadget, its effect must be recharged and cannot be used again until you complete a short or long rest.

However should I try to do something like that with an item because the description is one big block of text

Discombobulation Raygun;0;2 lb.
Discombobulation Raygun.<p><i>Simple complexity gadget schematic</i></p><p><b>Equipment Type:</b> Gloves</p><p><b>Activation Type:</b> 1 action</p><p> When this gadget is equipped, you can use an action to shoot a ray of energy at a target you can see within 50 feet of you. This ray assaults and twists the creature’s mind, spawning delusions and provoking uncontrolled action. The target must roll a Wisdom saving throw. If it succeeds, the ray has no effect. If it fails the saving throw, the target can’t take reactions and must roll 1d10 at the start of each of its turns to determine its behavior for that turn.</p><p><b>See spell of the same name</b></p><p>At the end of each of its turns, the affected creature can make another Wisdom saving throw. The effect ends if the target succeeds on the saving throw or at the end of their third turn after they are targeted by this effect. Once you have used this gadget, its effect must be recharged and cannot be used again until you complete a short or long rest.</p>

doesn't work so well.

Gawd, I would pay money for a proper manual. :p

Zacchaeus
February 2nd, 2017, 21:47
Right, I've finally caught on to what you want. You are talking about a formatted text table - not an actual table. Yes, you are right. Items don't/can't take formatted text so you won't be able to put a table in there.

BubbaGrim
February 2nd, 2017, 21:54
Well, that's not the answer I'd hoped for, but thanks so much for your help.

On to the next project, Magic Items.

BubbaGrim
February 2nd, 2017, 22:59
Oh what a rabbit hole I've fallen into. Technically not a Par5e question but why if I export my item list my magic items go from

17733
to this
17734

So what I'm doing is exporting the items from my current campaign to a new virgin campaign.

Now if I open that module (the exported one) in my current campaign the items all appear as their pre-exported versions.

/boggle

Zacchaeus
February 2nd, 2017, 23:23
The only difference I'm seeing is that you have identification on in the first graphic and off in the second one.

BubbaGrim
February 2nd, 2017, 23:30
Ack, you're right. The virgin campaign I imported it to had "Item Identification" set to off.

/hangs his head in shame.

Thanks again. :o

BubbaGrim
February 8th, 2017, 23:23
Okay, I'm probably losing my mind.
I was building rollable tables that had alchemy raw material items on them and I couldn't figure out how to make it link to the list of raw material, so I dragged and dropped from the list master list to the rollable table (in the FG client). In the process I noticed that I had made a spelling error. Went back to my source code, fixed the error, re-compiled the module with par5e and went back to FG. I close the book, open the book. The spelling mistake is fixed as it should be, but the drag and drop changes I made are still there.

What am I missing?

Edit: Interesting the changes are local to my machine.
Edit: FG creates a XML copy of the module in the folder "moduledb" that the changes are applied to. Hmmmm, mystery solved.

Nylanfs
February 9th, 2017, 04:58
everything is local to your machine, nothing is stored on servers. Also Protip, backup your campaign regularly incase of HD / machine crash. :)

Zacchaeus
February 9th, 2017, 12:39
If you make changes to a module and then open it in a campaign where you have added or amended some part of the module you may have to revert changes in the module in order to see your changes because the campaign db will be overwriting the module.

If you want to create a link in a table in par5e then use the zlink. However use colons as a separator rather than semi colons. So #zl:item:rawmaterial

BubbaGrim
February 18th, 2017, 00:29
Gawd, I'm sorry Zacch. I can't get this to work. Is this one of the broken things with Par5e and I should give up or can you give me a real world code snippet that works?

row;2;2;#zl:item:equipment:Mandrake Root;
is what I wrote and it opens an empty "New Item" when I click on it.

damned
February 18th, 2017, 02:11
Gawd, I'm sorry Zacch. I can't get this to work. Is this one of the broken things with Par5e and I should give up or can you give me a real world code snippet that works?

is what I wrote and it opens an empty "New Item" when I click on it.

What does the XML look like for that entry in the par5ed file?

BubbaGrim
February 18th, 2017, 02:29
It generates something that looks like:

<class>item</class>
<recordname>[email protected] 2</recordname>
when what I want is:

<class>reference_equipment</class>
<recordname>[email protected] 2</recordname>

I can fix it in the XML file using copy and paste, but there has to be a more elegant solution.

edit: the quoted text adds a space in Alchemy where there isn't one

BubbaGrim
February 18th, 2017, 02:34
More weirdness

dice;2d6
generates

1d11+1

Cool, figured out that one, Par5e expects dice;d6,d6

damned
February 18th, 2017, 03:15
It generates something that looks like:

when what I want is:


I can fix it in the XML file using copy and paste, but there has to be a more elegant solution.

edit: the quoted text adds a space in Alchemy where there isn't one

its quite possible that with the 3.2 game updates that the format has changed. A global find replace at the end of the parse will fix if that is the case.
why do you think there has to be a more elegant solution? the par5e tool is static now - it will not receive any more updates but FG is continuing to evolve. once formats change then par5e will become less and less useful.
you do have other options - you can add the items directly into FG or you can do it by hand (which is how many of the content developers did and still do their work).

i apologise that this post sounds condescending - its not meant to be even though it probably looks/reads like it is.
just about everything that par5e can do can be done with other tools today, so if you dont want to manually find/replace the xml you should look at those other methods.

BubbaGrim
February 18th, 2017, 03:30
For me the more elegant solution is write the source code and hand it off to the compiler. Tweaking the output adds another step to the work-flow, I understand that Par5e is dead from your perspective but for some of us it's the goto tool and we're trying to limp along as best we can.

You speak of other tools, other than editing the xml file, can you point me in their direction?

damned
February 18th, 2017, 03:35
For me the more elegant solution is write the source code and hand it off to the compiler. Tweaking the output adds another step to the work-flow, I understand that Par5e is dead from your perspective but for some of us it's the goto tool and we're trying to limp along as best we can.

You speak of other tools, other than editing the xml file, can you point me in their direction?

kp9911 has built a very useful alternate tool
Ikael has built a tool for creating reference manuals (it is Savage Worlds based but a 1 min edit will make the file work in other rulests
All equipment and NPCs etc etc can all be done within FG

And no par5e isnt dead from my perspective - I still create stuff in it but I have to accept its limitations and make additional modifications to it afterwards.
Im working in CoreRPG stuff as well so many more manual edits to make.

BubbaGrim
February 18th, 2017, 03:44
I guess I'm learning the limitations of Par5e, I've read through 200+ pages of web forum so I guess I'm not the only one struggling.
Thanks so much for your time. :)

damned
February 18th, 2017, 04:30
I guess I'm learning the limitations of Par5e, I've read through 200+ pages of web forum so I guess I'm not the only one struggling.
Thanks so much for your time. :)

So Par5e has always had the limitation of accepting only valid input - I know that sounds pretty stupid but the vast, vast majority of the par5e threads are issues with people putting data in with errors
The more newer limitations are going to have more of an impact over time and they are to do with FGs constant evolution occasionally changing the format or structure of something
If you work well with the par5e concept continue using it and setup a couple of find/replace pairs (maybe setup some macros) and it will still be good for some time

Zacchaeus
February 18th, 2017, 12:02
Gawd, I'm sorry Zacch. I can't get this to work. Is this one of the broken things with Par5e and I should give up or can you give me a real world code snippet that works?
row;2;2;#zl:item:equipment:Mandrake Root;

is what I wrote and it opens an empty "New Item" when I click on it.

You have too much information. The syntax is zl:item:Mandrake Root. The way you have it is that FG is looking for an item called equipment which obviously doesn't exist. Everything in the equipment list is an 'item'

BubbaGrim
February 18th, 2017, 18:54
Sorry Zacch, I tried that one too. In fact by the time I posted I'd tried every combination I could think of. :p
Near as I can tell Par5e isn't putting out what FG 3.2.x is expecting

#zl:item:Mandrake Root
generates

<id-00001>
<resultlink type="windowreference">
<class>item</class>
<recordname>[email protected]</recordname>
</resultlink>
<result type="string">Mandrake Root</result>
</id-00001>
but what actually works is if I change the xml file to

<id-00001>
<resultlink type="windowreference">
<class>reference_equipment</class>
<recordname>[email protected]</recordname>
</resultlink>
<result type="string">Mandrake Root</result>
</id-00001>

It looks like, as per damned's suggestions, I'll do the bulk of the work in Par5e and tweak the output with Notepad++.

But I do appreciate your help. Thanks so much. :)

Now does anyone know how to use ";" without Par5e thinking it's an EOL character?

Zacchaeus
February 18th, 2017, 22:31
Looking at the changelog the zlinks for tables were introduced a good while ago and are in the public version of par5e. It would seem however that FG has moved on and the output from par5e in this respect no longer functions.

BubbaGrim
February 18th, 2017, 22:52
Is it any wonder we have no hair? lol

El Condoro
February 19th, 2017, 12:15
It was mentioned back on page 1 of this thread but the link shields that get added into a Par5e imported table are a problem when using story templates: they can't be used for inline text as the format of the link requires a new line each time.

I had a table of names imported this way and using something like "The tavern is called [Tavern Name]" would return [Tavern Name] on its own line.

Is there a way to remove the links en masse rather than one at a time (right-click, delete) like I did? Or better yet, not have them when table data is imported?

kp9911
February 19th, 2017, 17:30
I think I can add this functionality to my own parser, I seem to have forgotten that tables can contain links as well *smh*

Zacchaeus
February 19th, 2017, 22:15
It was mentioned back on page 1 of this thread but the link shields that get added into a Par5e imported table are a problem when using story templates: they can't be used for inline text as the format of the link requires a new line each time.

I had a table of names imported this way and using something like "The tavern is called [Tavern Name]" would return [Tavern Name] on its own line.

Is there a way to remove the links en masse rather than one at a time (right-click, delete) like I did? Or better yet, not have them when table data is imported?

Unfortunately the public version of par5e is falling behind a bit now. Much has changed with the way FG handles a lot of things with v 3.2.x so I'n afraid that speed bumps such as this are inevitable.

El Condoro
February 20th, 2017, 06:07
That's OK. As long as I'm not missing some super-easy technique that would save me hours. :)

kp9911
February 20th, 2017, 06:19
That's OK. As long as I'm not missing some super-easy technique that would save me hours. :)

Can you give me an example of what output you're looking to get?

El Condoro
February 20th, 2017, 06:31
I think I can add this functionality to my own parser, I seem to have forgotten that tables can contain links as well *smh*

I just tried parsing with this and the links are added by default here, too. It must be something in the import process.

El Condoro
February 20th, 2017, 06:35
Can you give me an example of what output you're looking to get?

17986
By default they come in as the first 2. I don't want the shields/dragons links.

kp9911
February 20th, 2017, 06:53
I just tried parsing with this and the links are added by default here, too. It must be something in the import process.

Lol I had no idea that the table would display links in my parser, it seems to have become a salient feature then.

Can you please give me some of the input data you used?

El Condoro
February 20th, 2017, 07:33
PM sent

havvokk1122
May 23rd, 2017, 18:58
does anyone know how to link equipment into the rollable tables? ive tried every form of syntax i can think of and its not linking. the best i get is they window cannot be opened or found

Zacchaeus
May 23rd, 2017, 20:08
does anyone know how to link equipment into the rollable tables? ive tried every form of syntax i can think of and its not linking. the best i get is they window cannot be opened or found

Answered elsewhere. Mo need to spam everything with the same question; once will do.

Rujusu
June 21st, 2017, 07:51
So just a quick question. I think I am making a simple mistake somewhere. So I am trying to make a random encounter table then linking it in to my story.txt
Text in tables.txt:
#@;Test

##;Wild Encounter
#!;Wild Encounter
Roll for Random Encounter
dice;d12
column;Day Roll;Night Roll;Result
row;1;1-2;1-3;Stirges (1d8 + 2)
row;2;-;4;Ghouls (1d4 + 1)
row;3;3-4;-;Ogre;(1)
row;4;5-6;5;Goblins;(1d6 + 3)
row;5;7-8;6;Hobgoblins (1d4 + 2)
row;6;9-10;7-8;Orcs (1d4 + 2)
row;7;11;9-10;Wolves (1d4 + 2)
row;8;12;11-12;Owlbear (1)

this to link
Text in the story.txt:
#zl;table;Wild Encounter

Zacchaeus
June 21st, 2017, 08:29
You have given us a scenario but not told us what the problem is.

I do see a good few errors in the table; the rows should be row;1;1; row;2;2; etc

EDIT: Ok looked a little harder. I don't think you are understanding how tables work. The row is the dice roll; so if you want a dice roll of 8-10 then your row needs to be row;8;10;.
At the moment your table won't work because you don't have the range of the dice roll on each row. See this wiki article (http://www.fantasygrounds.com/wiki/index.php/Tables) on how to set up a random encounter table. It does it in FG of course but you'll see the principle.

kp9911
June 21st, 2017, 09:07
Try splitting the day table and the night table instead of having it as one table.

Myrdin Potter
July 4th, 2017, 00:09
In order to par5e (or kp9911's parser) , I will need a formatted text file first?

So I need to make a 1,000 item list and insert the formatting:

row;1;1; text
.
.
row;1000;1000; text

for all 1,000 rows?

or just the raw text file? With the numbers? Without the numbers?

If I need the row;x;y; format, then I need to figure out the best way to insert that into a text file. Maybe I can use excel and cut and paste, I am quick in excel ...

Zacchaeus
July 4th, 2017, 00:27
Yes you will need 1000 rows 1;1,2;2 etc etc. Excel sounds like a plan to get the numbers in. Or just copy paste from the PDF. You can use things like column select in notepad to insert the semi colons (hold CTRL and drag to select then just type in the semi colons into hundreds of rows all at once).

Myrdin Potter
July 4th, 2017, 00:58
This will take some formatting gymnastics. Cutting and pasting from the PDF gives

1
text
2
text

At least if I cntrl-J I get

1 text 2 text

Text can be guard or guard (old man with a limp) so I cannot just delineate on space.

Myrdin Potter
July 4th, 2017, 05:21
Format like this?

##; Table 1-8
dice; d1000
column; Patrons
row; 01 ; 01 ; Abbot (Asian-style monk)
row; 02 ; 02 ; Abbot (heretic)
etc for all 1000?

Or all the spaces between ; and the next character going to cause issues?

kp9911
July 4th, 2017, 08:05
Format like this? *snip* Or all the spaces between ; and the next character going to cause issues?

Try this out.


#@;{Category Name}
##;Table 1-8
#!;{Table Description}
column;Patrons
dice;d1000
row;1;1;Abbot (Asian-style monk)
row;2;2;Abbot (heretic)

Myrdin Potter
July 4th, 2017, 15:27
Because this thread may come up in a search:

Because I am a stubborn sob and can google and keep pounding at it, this is what I did.

I first copied the text for the table in the PDF into a story entry and used cntrl-j to get rid of the extra lf and then added in the right lf manually. This can be done easier in Notepad++ but it went quick.

I then copied it into Excel as text and made the 01 into 1 until 09 was 9 (manually).

I then used the method here:

https://answers.microsoft.com/en-us/...1-2c27ccae7eb1

to make the numbers in one column and the text in the next.

I then inserted all the row and ; needed in columns in excel

I cut and paste into notepad++.

Cutting and pasting added a extra space for each column.

I made a macro, with del and down arrow. I ran it the right number of times as the number count increased (1's and 10's and 100's).

With no more spaces after the ;, I inserted the mark-up up top.

I ran through par5e.

It par5ed.

I copied the table into the development campaign from the module.

Yay?

Goodnight.

Better ways to do this are sought after now ...

Myrdin Potter
July 4th, 2017, 17:18
And, as a note, all the manually created tables I made are working fine but the par5e table inserts a link (little shield) with the result. I have absolutely no idea why that is the case and it has been identified a few times and I think it is a known bug.

I also have to test if the .mod is not there if I copied properly.

kp9911
July 4th, 2017, 17:27
Those little shields correspond to reference type of pages for the entries. It may not have been a requirement, but when it comes to linking other details in the table it sure comes in handy.

Myrdin Potter
July 4th, 2017, 17:33
Maybe, but when the destination is a story template and it is the only link on the whole page it stands out like a sore thumb. I don't like it.

El Condoro
July 5th, 2017, 14:58
I had the same problem with literally thousands of entries in PAR5E imported tables. I went through all of them over many nights right-clicking, Remove link. RSI be damned! I wanted those story templates to look good, too.

kp9911
July 6th, 2017, 14:21
I had the same problem with literally thousands of entries in PAR5E imported tables. I went through all of them over many nights right-clicking, Remove link. RSI be damned! I wanted those story templates to look good, too.

Manually editing the xml was not in the books? Ill defiantly try and get this sorted out in my parser. I still wonder though as to why its such a problem for you guys lol. Is it OCD or is it something thats affecting the tables or something.

El Condoro
July 6th, 2017, 14:27
I concatenate text from tables into sentences. "The name of the town is [Town Name] and it is ruled by a [Ruler Title]", for example.

It would look like:
"The name of the town is
[Link] Name of town
and it is ruled by a
[Link] duke."

Not ideal.

kp9911
July 6th, 2017, 16:17
I concatenate text from tables into sentences. "The name of the town is [Town Name] and it is ruled by a [Ruler Title]", for example.

It would look like:
"The name of the town is
[Link] Name of town
and it is ruled by a
[Link] duke."

Not ideal.


Ah I can see the issue here.

Zacchaeus
July 6th, 2017, 18:02
I concatenate text from tables into sentences. "The name of the town is [Town Name] and it is ruled by a [Ruler Title]", for example.

It would look like:
"The name of the town is
[Link] Name of town
and it is ruled by a
[Link] duke."

Not ideal.

That's not really how you should use that (if the idea is to construct a sentence). See this video (https://www.fantasygrounds.com/forums/showthread.php?37400-Video-on-Story-Templates) on how you can construct sentences using templates.

kp9911
July 7th, 2017, 07:42
That's not really how you should use that (if the idea is to construct a sentence). See this video (https://www.fantasygrounds.com/forums/showthread.php?37400-Video-on-Story-Templates) on how you can construct sentences using templates.

OOO I totally forgot about these templates, time to add another module to the parser! Man this application is getting huge in a very subtle way. I like it!

El Condoro
July 7th, 2017, 10:08
Yes, the template sheets are great for so many things. I have got mine to work really well (I think). 19725. The difference between the [Table] and <Table> is that the former is used to call a roll from a table while the second is to use the result. If [Table] is used again it makes another roll but <Table> returns the first called roll.

Zacchaeus
July 7th, 2017, 11:11
Yes, the template sheets are great for so many things. I have got mine to work really well (I think). The difference between the [Table] and <Table> is that the former is used to call a roll from a table while the second is to use the result. If [Table] is used again it makes another roll but <Table> returns the first called roll.

Indeed. The bit in square brackets is stored and can be retrieved with the angle brackets. The trick is not to use square brackets in your conversations only the angled brackets. So, like you saw on that video (assuming you watched it) the first part of your template is just a list of things that you want to produce from the tables. So it looks like this
Name: [Name Table]
Age:[Age table]
Race: [Race Table]
Hair:[Hair Table] etc

Then your sentence is simply
Before you is <Name Table> who is a <Age Table> year old <Race Table> with <Hair Table> hair

The PCs are only going to see the conversation bit so your template doesn't need to be all that tidy really; the important bit is the speech bubble.

El Condoro
July 7th, 2017, 11:25
I certainly get what you're saying. I am just trying to conserve sheet space because I have to look at it even if the players don't. :)

kp9911
July 7th, 2017, 13:41
These are some amazing additions to the tool, cant wait to play around with it, the first thing that came to my mind was to prep the tarrot card reading for CoS that I will be running next month :D

Zacchaeus
July 7th, 2017, 17:40
These are some amazing additions to the tool, cant wait to play around with it, the first thing that came to my mind was to prep the tarrot card reading for CoS that I will be running next month :D

I already added a Story Template to do the Tarot reading in CoS (https://www.fantasygrounds.com/forums/showthread.php?34962-5e-Module-Updates&p=312783&viewfull=1#post312783) if that's what you mean.

kp9911
July 7th, 2017, 18:26
I already added a Story Template to do the Tarot reading in CoS (https://www.fantasygrounds.com/forums/showthread.php?34962-5e-Module-Updates&p=312783&viewfull=1#post312783) if that's what you mean.

I meant make my own lol. I like to play around with the information a lot and weave in a lot more story content so I prefer to parse my own modules for this reason.