¿ªÔÆÌåÓý


Re: New question and thank you

 

¿ªÔÆÌåÓý

Break it where you want and put an underscore:

Name: [Name]<br>Age: [Age]<br>

_Race: [Race]

?

Scott

From: [email protected] <[email protected]> On Behalf Of jimmyflowers1 via groups.io
Sent: Thursday, February 4, 2021 07:54
To: [email protected]
Subject: [TableSmith] New question and thank you

?

Thanks to those who responded yesterday. I got what I needed and I appreciate it!

Next question . . .?

I know how to make new lines appear in the output, but how can I add a new line in the file itself for ease of reading?

For example, say I have a series of things like this . . .

Name: [Name]<br>Age: [Age]<br>Race: [Race] etc. and it just keeps going. Is there a way to break that up into multiple lines in the file as well as the output?


Re: New question and thank you

 

If you mean "in the table (.tab) file" then you use an underscore as the first character in a line to indicate that it's a continuation of the previous line. Thus

1,[Name]<br>
_Age: [Age]<br>
_Race: [Race]<br>
_Favorite Color [FavColor]<br>

is treated as a single line by Tablesmith.

Erol K. Bayburt
ErolB1@...

On 2/4/2021 8:54 AM, jimmyflowers1 via groups.io wrote:
Thanks to those who responded yesterday. I got what I needed and I appreciate it!
Next question . . .
I know how to make new lines appear in the output, but how can I add a new line in the file itself for ease of reading?
For example, say I have a series of things like this . . .
Name: [Name]<br>Age: [Age]<br>Race: [Race] etc. and it just keeps going. Is there a way to break that up into multiple lines in the file as well as the output?
_._,_._,_
------------------------------------------------------------------------


New question and thank you

 

Thanks to those who responded yesterday. I got what I needed and I appreciate it!

Next question . . .?

I know how to make new lines appear in the output, but how can I add a new line in the file itself for ease of reading?

For example, say I have a series of things like this . . .

Name: [Name]<br>Age: [Age]<br>Race: [Race] etc. and it just keeps going. Is there a way to break that up into multiple lines in the file as well as the output?


Re: Random number between two numbers in range

 

¿ªÔÆÌåÓý

Create a variable -Val1

Set the Value of Val1

Test the Value to a maximum.

?

%Val1%,0

|Val1={Dice~1d1500+500}|

{If~%Val%1>999?999,%Val1%}

?

Something like this should do what you want.

?

?

?

From: [email protected] <[email protected]> On Behalf Of jimmyflowers1 via groups.io
Sent: Wednesday, February 3, 2021 06:52
To: [email protected]
Subject: [TableSmith] Random number between two numbers in range

?

I have a table with various values on each item in the table list. For example, 500-2000, 2000-5000, 5000-10000, etc.

Is there some syntax I can use to basically say pick a random number between 500 and 2000? I've managed to get some of the values by doing 1dX+Y, but the problem I run into is when the value exceeds that and I can't put a cap on it. Any suggestions??


Re: Random number between two numbers in range

 

You can get clever with 1dX+Y, e.g.
{Dice~1d1501+499} will give 500-2000

It's a "fencepost problem." The count of 500 to 2000 is 1501 rather than 1500. Likewise 2000-5000 has a count of 3001 rather than 3000, and 5000-10000 has a count of 5001 rather than 5000.

Erol K. Bayburt
ErolB1@...

On 2/3/2021 7:51 AM, jimmyflowers1 via groups.io wrote:
I have a table with various values on each item in the table list. For example, 500-2000, 2000-5000, 5000-10000, etc.
Is there some syntax I can use to basically say pick a random number between 500 and 2000? I've managed to get some of the values by doing 1dX+Y, but the problem I run into is when the value exceeds that and I can't put a cap on it. Any suggestions?


Random number between two numbers in range

 

I have a table with various values on each item in the table list. For example, 500-2000, 2000-5000, 5000-10000, etc.

Is there some syntax I can use to basically say pick a random number between 500 and 2000? I've managed to get some of the values by doing 1dX+Y, but the problem I run into is when the value exceeds that and I can't put a cap on it. Any suggestions??


Re: Name table resources?

 

Depends on the system, and name styles you are after.

D&D has Xanathar's Guide, which gives loads of tables on names for different races. I have converted most of them to TS, some (Gnomes) and others had no need.? I can give you copies of them if you want.? I also have made some other ones like Elf name and clan from the other tables.

But I can easily give you my name tables if you want.? Let me know.


Re: Name table resources?

 

Generating syllables can be tricky: a good place to start is among conlang (constructed languages) sites.? Here are a few links that might help:


http://billposer.org/Software/WordGenerator.html


Re: Simple variable addition/incrementation

 

I suspect you are calling the Start routine just once per output line, like this

?

# iterable-test

%Room%,1

:Start

1,%Room% [Generate]. |Room+1|

;Generate

1,There's a goblin here

1,You see a mimic poorly imitating a horse

1,One lonely tree stands near an oasis

1,Something wonderful is happening: XYZ


Therefore the |Room+1| call is only made once as well: the next call to Start re-initializes %Room%,1
You need to put the output line inside a Loop construct--something like this:

# iterable-test

#

%Room%,1

?

:Start

1,{Loop~3,%Room%. [Generate]. |Room+1|{CR~}}

_{Line~left,100}

?

;Generate

1,There's a goblin here

1,You see a mimic poorly imitating a horse

1,One lonely tree stands near the oasis

?

1,Something wonderful is happening: Ta-Da!!!


Now the Room variable will be incremented each time through the loop.


Re: Simple variable addition/incrementation

 

¿ªÔÆÌåÓý

Glad I could help.

?

Sent from for Windows 10

?

From: stevens.noah1@...
Sent: Tuesday, December 8, 2020 9:50 AM
To: [email protected]
Subject: Re: [TableSmith] Simple variable addition/incrementation

?

A follow-up! My problem was resolved. Thanks so much - here is an example of the last few rooms of Megadungeon Level 1. I guess the number of rooms is arbitrary but this was input as 100 - thanks again! I think the next step will be to add thematic zones that add similar descriptors to a small set of rooms in a row - easier now I've figured out this vexing issue. Cheers!

95. Dire Bat, an idol of Demogorgon, and hidden treasure antique coins worth 1577 GP .
96. Slight updraft air, here. There is also a bloodstain.
97. There is an access hatch to the level's subsurface maintenance area and hidden Scroll of Spells (1), here.
98. A Lightning Bolt, forcing a DC 14 Dexterity save or 22 damage that is activated by brainwave detector keeps the 244 GP safeguarded.
99. There are 2 Dwarf Warriors and a weapon rack in this room.
100. The room has a Sonic Glyph, forcing a DC 15 Constitution save or deafness for 4 turns that is activated by brainwave detector. The trap is attached to a stairs up.

?


Re: Simple variable addition/incrementation

 

A follow-up! My problem was resolved. Thanks so much - here is an example of the last few rooms of Megadungeon Level 1. I guess the number of rooms is arbitrary but this was input as 100 - thanks again! I think the next step will be to add thematic zones that add similar descriptors to a small set of rooms in a row - easier now I've figured out this vexing issue. Cheers!

95. Dire Bat, an idol of Demogorgon, and hidden treasure antique coins worth 1577 GP .
96. Slight updraft air, here. There is also a bloodstain.
97. There is an access hatch to the level's subsurface maintenance area and hidden Scroll of Spells (1), here.
98. A Lightning Bolt, forcing a DC 14 Dexterity save or 22 damage that is activated by brainwave detector keeps the 244 GP safeguarded.
99. There are 2 Dwarf Warriors and a weapon rack in this room.
100. The room has a Sonic Glyph, forcing a DC 15 Constitution save or deafness for 4 turns that is activated by brainwave detector. The trap is attached to a stairs up.


Re: Simple variable addition/incrementation

 

It's in the main code, part of ;Start (I think it's the only non-randomized-text code, except for a Level-dependent variable.

Thanks - I will implement a parameter with requested number of rooms rather than doing it the old-fashioned way. A good lesson. I'm brute-forcing it?


Re: Simple variable addition/incrementation

 

Yes, I am running the code from the "iterations" box! Does this restart the code from the beginning each time? It did not occur to me that this was the case, but it would tidily explain the trouble I am having.

I will implement a while loop - it might easily solve another issue I am having. I'll include a parameter for the number of requested rooms.

Whew! Thanks!


Re: Simple variable addition/incrementation

 

¿ªÔÆÌåÓý

The first question I thought of ¡­ is this a Loop / While / If operation or are you running the table x number of times from the box in the upper left corner?

?

Vance

?

Sent from for Windows 10

?

From: ErolB1 via groups.io
Sent: Monday, December 7, 2020 9:18 PM
To: [email protected]
Subject: Re: [TableSmith] Simple variable addition/incrementation

?

T

?


Re: Simple variable addition/incrementation

 

This needs more context. What calls the group that has the line you gave?

As a wild guess, are you resetting %Room% anywhere?

Erol K. Bayburt
ErolB1@...

On 12/7/2020 8:09 PM, stevens.noah1@... wrote:
Hey all!
I'm having a devil of a time with my dungeon generator. A very simple incremental room number descriptor seems beyond my feeble powers.
Here's the code, please tell me what I'm doing incorrectly. I just wish the next room to be generated to have the room number increased by 1
1,%Room%. [RandomContents]. |Room+1|
what I get is just the same numbered room, i.e. Room 1
like so:
1. There are *2 Dimensional Shambler* and an oven in this room.
1. *2 Vegepygmy Warriors* guard
/<reg1://NMS_BetterDunjonCorp.Treasure>A Magnesium makuta, worth 800
gold coins <reg2://NMS_ExpandedJewelry.Start>/. The treasure is loose.
1. This is a food-supply store room, with a few scroungeable rations
and some potable water..
I've declared Room with the default of 1 above the ;Start code
I'm new to more advanced (even basic!) scripting of Tablesmith aside from pure text generation - any help would be appreciated!


Simple variable addition/incrementation

 

Hey all!

I'm having a devil of a time with my dungeon generator. A very simple incremental room number descriptor seems beyond my feeble powers.

Here's the code, please tell me what I'm doing incorrectly. I just wish the next room to be generated to have the room number increased by 1


1,%Room%. [RandomContents]. |Room+1|

what I get is just the same numbered room, i.e. Room 1

like so:

1. There are 2 Dimensional Shambler and an oven in this room.

1. 2 Vegepygmy Warriors guard A Magnesium makuta, worth 800 gold coins. The treasure is loose.

1. This is a food-supply store room, with a few scroungeable rations and some potable water..

I've declared Room with the default of 1 above the ;Start code
I'm new to more advanced (even basic!) scripting of Tablesmith aside from pure text generation - any help would be appreciated!?

?


Re: character encoding

 

Good to know!




©\©\©\©\©\©\©\ Original Message ©\©\©\©\©\©\©\

On Friday, December 4, 2020 10:27 AM, ErolB1 via groups.io <ErolB1@...> wrote:

For what it's worth, converting (a copy of) the .tab file from utf8 to
1252 (ansi-latin 1) so that curly quotes show properly when using the
1252 code page gives a table that produces TableSmith output with the
curly quotes displayed correctly.

Erol K. Bayburt
ErolB1@...

On 12/4/2020 9:23 AM, Bruce Gulke via groups.io wrote:

Hey, Erol -
There's no encoding setting for HTML in TableSmith (never really came up as in issue in the past). I did recall looking at allowing some sort of custom header as an advanced feature, but I just looked through the code and didn't see anything for that, so either it was never implemented or it didn't make it over in the transition from version 4 to 5.
I don't know that your workaround is the only option, but a config setting isn't available. You could maybe try outputting to Text rather than HTML, though I don't know that would make a difference.
Bruce
©\©\©\©\©\©\©\ Original Message ©\©\©\©\©\©\©\
On Wednesday, December 2, 2020 7:42 PM, ErolB1 via groups.io ErolB1@... wrote:

My table files are all utf-8 (no BOM), and some of them have curly
quotes. These quotes show fine in Notepad++, but the Tablesmith results
window gives garbage characters associated with a wrong code page.
The right-click menu / encoding submenu shows "Western European
(Windows)" followed by "Unicode UTF 8)" with the Unicode menu entry
dotted.
Is there a configuration setting for "utf8 and only utf8" in Tablesmith,
or is the only work-around to replace the curly quotes in the table
files with straight quotes?

Erol K. Bayburt
ErolB1@...


Re: character encoding

 

For what it's worth, converting (a copy of) the .tab file from utf8 to 1252 (ansi-latin 1) so that curly quotes show properly when using the 1252 code page gives a table that produces TableSmith output with the curly quotes displayed correctly.

Erol K. Bayburt
ErolB1@...

On 12/4/2020 9:23 AM, Bruce Gulke via groups.io wrote:
Hey, Erol -
There's no encoding setting for HTML in TableSmith (never really came up as in issue in the past). I did recall looking at allowing some sort of custom header as an advanced feature, but I just looked through the code and didn't see anything for that, so either it was never implemented or it didn't make it over in the transition from version 4 to 5.
I don't know that your workaround is the only option, but a config setting isn't available. You could maybe try outputting to Text rather than HTML, though I don't know that would make a difference.
Bruce
©\©\©\©\©\©\©\ Original Message ©\©\©\©\©\©\©\
On Wednesday, December 2, 2020 7:42 PM, ErolB1 via groups.io <ErolB1@...> wrote:

My table files are all utf-8 (no BOM), and some of them have curly
quotes. These quotes show fine in Notepad++, but the Tablesmith results
window gives garbage characters associated with a wrong code page.

The right-click menu / encoding submenu shows "Western European
(Windows)" followed by "Unicode UTF 8)" with the Unicode menu entry
dotted.

Is there a configuration setting for "utf8 and only utf8" in Tablesmith,
or is the only work-around to replace the curly quotes in the table
files with straight quotes?

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Erol K. Bayburt
ErolB1@...


Re: character encoding

 

Outputting as text doesn't help.

My guess is that it's a problem in the engine, where it reads in text from the table file as ISO-8859-1/Windows-1252 and so reads (eg) a utf-8 close single quote as ?€? This is then propagated to the output window and the temp htmp file.

Erol K. Bayburt
ErolB1@...

On 12/4/2020 9:23 AM, Bruce Gulke via groups.io wrote:
Hey, Erol -
There's no encoding setting for HTML in TableSmith (never really came up as in issue in the past). I did recall looking at allowing some sort of custom header as an advanced feature, but I just looked through the code and didn't see anything for that, so either it was never implemented or it didn't make it over in the transition from version 4 to 5.
I don't know that your workaround is the only option, but a config setting isn't available. You could maybe try outputting to Text rather than HTML, though I don't know that would make a difference.
Bruce
©\©\©\©\©\©\©\ Original Message ©\©\©\©\©\©\©\
On Wednesday, December 2, 2020 7:42 PM, ErolB1 via groups.io <ErolB1@...> wrote:

My table files are all utf-8 (no BOM), and some of them have curly
quotes. These quotes show fine in Notepad++, but the Tablesmith results
window gives garbage characters associated with a wrong code page.

The right-click menu / encoding submenu shows "Western European
(Windows)" followed by "Unicode UTF 8)" with the Unicode menu entry
dotted.

Is there a configuration setting for "utf8 and only utf8" in Tablesmith,
or is the only work-around to replace the curly quotes in the table
files with straight quotes?

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Erol K. Bayburt
ErolB1@...


Re: character encoding

 

Hey, Erol -

There's no encoding setting for HTML in TableSmith (never really came up as in issue in the past). I did recall looking at allowing some sort of custom header as an advanced feature, but I just looked through the code and didn't see anything for that, so either it was never implemented or it didn't make it over in the transition from version 4 to 5.

I don't know that your workaround is the only option, but a config setting isn't available. You could maybe try outputting to Text rather than HTML, though I don't know that would make a difference.

Bruce



©\©\©\©\©\©\©\ Original Message ©\©\©\©\©\©\©\

On Wednesday, December 2, 2020 7:42 PM, ErolB1 via groups.io <ErolB1@...> wrote:

My table files are all utf-8 (no BOM), and some of them have curly
quotes. These quotes show fine in Notepad++, but the Tablesmith results
window gives garbage characters associated with a wrong code page.

The right-click menu / encoding submenu shows "Western European
(Windows)" followed by "Unicode UTF 8)" with the Unicode menu entry
dotted.

Is there a configuration setting for "utf8 and only utf8" in Tablesmith,
or is the only work-around to replace the curly quotes in the table
files with straight quotes?

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Erol K. Bayburt
ErolB1@...