PDA

View Full Version : Generating a table in lua



flekhabren
December 16th, 2017, 21:59
I'm using the spanish translation that was posted on here to adjust the 7e display. In particular I've added a skill to a unique era.

In the data_eras.lua that I've modified there is a section to add desc for each skill. It works great except that any <table></table> text just vanishes. Any insight? additionally using the colspan definition caused an error in the code.

Here is an example of the full desc code

["Status"] = { sublabeling=true, base=15, desc="\
<p>This skill measures your character's reputation, professional credentials, social class, prosperity, fame, and even personal honor. Whenever clout or credentials serve as an advantage, your character can use his or her Status skill to influence others by throwing weight around. A successful Status check might convince a bank to make a cash loan or forgive a debt, intimidate a non-player character to grant a favor, convince a vendor to settle for an I.O.U., pressure authorities into keeping a matter quiet, or grant experts special favors because of their fame.</p><p><b>Effects:</b> Following are the results for different degrees of success:</p><p><b>FUMBLE:</b> Your character manages to offend the target. If the target can legally refuse a request or service, he or she does so. If forced to comply, the target will grumble and do the minimum required. The target takes an active dislike to your character, and may attempt to poison others' opinions of him or her.</p><p><b>FAILURE:</b> Your character's credentials do not impress the target. He or she will not grant any special favors, and politely refuse special requests.</p><p><b>SUCCESS:</b> Your character's credentials are deemed sufficient enough for special treatment. The target will grant a single request or provide a favor, so long as the request is legal, poses no risk to the target, and is not too onerous.</p><p><b>SPECIAL:</b> The target is impressed by your character's connections, and goes beyond the call of duty to help. Even onerous favors or requests are granted, or more than one ordinary favor or request is granted. The target will bend rules and take risks in order to curry favor, perhaps even at some personal risk.</p><p><b>CRITICAL:</b> The target is overawed to meet with your character. No request will be denied, and no favor is too small.</p><p><b>System Notes:</b> Status can be an extremely important skill; gamemasters should place caps on beginning character Status of 50% or even lower, unless specific character concepts require a high Status.</p><p>Status only operates within a given area, depending on your character's position: the town wise-woman in a rural hamlet is practically an official, but has little clout in a distant town or city. A noble or monarch, on the other hand, can exert his or her influence in a much wider arena. Using Status outside your character's area of influence is a <i>Difficult</i> action.</p><p>If the gamemaster decides that your character's expertise with a particular skill may influence his or her credentials, your character gains a temporary bonus to his or her Status skill equal to the 1/5 of the applicable skill rating.</p><p><i>For example, a wizard has a Status of 45% and a Knowledge (Arcane) skill rating of 90%. In situations where his or her professional credentials are important, the wizard can add +18% (1/5 of 90%) as a temporary bonus to Status, for a total of 63% when dealing with non-player characters who would be impressed with that expertise in magic.</i></p><p>Exactly who will or won't be impressed by your character's exceptional skill is ultimately up to the gamemaster.</p><p>Status cannot be improved using normal skill experience and improvement rules. The gamemaster should offer Status as a reward for loyal service, daring deeds, or extraordinary merit between scenarios. A single point per adventure is reasonable, with extraordinary deeds or feats increasing the gain to 1D3, 1D4, or possibly even 1D6 points. What goes up can go down: scandals, misdemeanors, and social improprieties erode your character's Status. Unseemly rumors might result in a 1D3% drop, while conviction of a crime could reduce the skill rating by a much more significant amount, appropriate to the original status.</p><p>The gamemaster can also use Status as a way to measure your character's fame, and that of others. When a non-player character first meets your character, the gamemaster may roll against your character's Status to see if the stranger recognizes you. You can do the same thing for prominent non-player characters, to see if your character recognizes them.</p><p><b>Status Skill, Social Status, &amp; Character Wealth</b></p><p>As described in the sections on &quot;Creating a Character&quot; and &quot;Character Professions&quot;, in <b>Chapter Two: Characters</b> in the BRP core rules your character's Status rating can have a huge impact on his or her social standing and wealth. Following are three example tables. These tables assign a social rank and average wealth level based on Status, and places a cap on maximum character wealth. As your character earns Status, his or her position and fortune will likely improve.</p><table><tr><td><i>Status</i></td><td><i>Social Rank</i></td><td><i>Wealth Rating</i></td><td><i>Wealth Cap</i></td></tr><tr><td>1-39</td><td>Lower Class</td><td>Destitute</td><td>Destitute</td></tr><tr><td>40-43</td><td>Lower Middle Class</td><td>Poor</td><td>Average</td></tr><tr><td>44-47</td><td>Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>48-49</td><td>Upper Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>50-75</td><td>Upper Class</td><td>Affluent</td><td>Affluent</td></tr><tr><td>76-95</td><td>Nobility</td><td>Affluent</td><td>Wealthy</td></tr><tr><td>96-00</td><td>Monarchy</td><td>Wealthy</td><td>Wealthy</td></tr><tr><td></td></tr></table><p>Status may also have an effect upon the initial equipment your character begins with. At the gamemaster's discretion, you may make Status rolls to determine if your character begins with better gear than his or her wealth level and profession would indicate. See &quot;Starting Equipment&quot; in <b>Chapter Eight: Equipment</b> in the BRP core rules for more details on this. Any Status rolls made to determine initial equipment are not considered to be during the course of adventure and are not eligible for experience checks.</p>\
",
subskills = {
["Ceresu"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Ceresu. For better or worse.</p>\
"},
["Serecu"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Serecu. For better or worse.</p>\
"},
["Larsan"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Larsan. For better or worse.</p>\
"},
["Disdal"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Disdal. For better or worse.</p>\
"},
["None"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of None. For better or worse.</p>\
"},
["A'shari"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of A'shari. For better or worse.</p>\
"},
["Other"] = { base=15, desc="\
<p>Creat any entry for a country, group, or other large scale entity or group as desired.</p>\
"}
}
},

here is the table portion

<table><tr><td><i>Status</i></td><td><i>Social Rank</i></td><td><i>Wealth Rating</i></td><td><i>Wealth Cap</i></td></tr><tr><td>1-39</td><td>Lower Class</td><td>Destitute</td><td>Destitute</td></tr><tr><td>40-43</td><td>Lower Middle Class</td><td>Poor</td><td>Average</td></tr><tr><td>44-47</td><td>Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>48-49</td><td>Upper Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>50-75</td><td>Upper Class</td><td>Affluent</td><td>Affluent</td></tr><tr><td>76-95</td><td>Nobility</td><td>Affluent</td><td>Wealthy</td></tr><tr><td>96-00</td><td>Monarchy</td><td>Wealthy</td><td>Wealthy</td></tr><tr><td></td></tr></table>

Nickademus
December 16th, 2017, 23:38
The xml of table is fine. Check the text itself to see if it works (if it is a textres).
I'd need to see how you are using the colspan to see if it's right.

flekhabren
December 17th, 2017, 04:55
Thats what I thought but when I load it it just goes away. strange.

Here was the original that would cause an error

["Status"] = { sublabeling=true, base=15, desc="\
<p>This skill measures your character's reputation, professional credentials, social class, prosperity, fame, and even personal honor. Whenever clout or credentials serve as an advantage, your character can use his or her Status skill to influence others by throwing weight around. A successful Status check might convince a bank to make a cash loan or forgive a debt, intimidate a non-player character to grant a favor, convince a vendor to settle for an I.O.U., pressure authorities into keeping a matter quiet, or grant experts special favors because of their fame.</p><p><b>Effects:</b> Following are the results for different degrees of success:</p><p><b>FUMBLE:</b> Your character manages to offend the target. If the target can legally refuse a request or service, he or she does so. If forced to comply, the target will grumble and do the minimum required. The target takes an active dislike to your character, and may attempt to poison others' opinions of him or her.</p><p><b>FAILURE:</b> Your character's credentials do not impress the target. He or she will not grant any special favors, and politely refuse special requests.</p><p><b>SUCCESS:</b> Your character's credentials are deemed sufficient enough for special treatment. The target will grant a single request or provide a favor, so long as the request is legal, poses no risk to the target, and is not too onerous.</p><p><b>SPECIAL:</b> The target is impressed by your character's connections, and goes beyond the call of duty to help. Even onerous favors or requests are granted, or more than one ordinary favor or request is granted. The target will bend rules and take risks in order to curry favor, perhaps even at some personal risk.</p><p><b>CRITICAL:</b> The target is overawed to meet with your character. No request will be denied, and no favor is too small.</p><p><b>System Notes:</b> Status can be an extremely important skill; gamemasters should place caps on beginning character Status of 50% or even lower, unless specific character concepts require a high Status.</p><p>Status only operates within a given area, depending on your character's position: the town wise-woman in a rural hamlet is practically an official, but has little clout in a distant town or city. A noble or monarch, on the other hand, can exert his or her influence in a much wider arena. Using Status outside your character's area of influence is a <i>Difficult</i> action.</p><p>If the gamemaster decides that your character's expertise with a particular skill may influence his or her credentials, your character gains a temporary bonus to his or her Status skill equal to the 1/5 of the applicable skill rating.</p><p><i>For example, a wizard has a Status of 45% and a Knowledge (Arcane) skill rating of 90%. In situations where his or her professional credentials are important, the wizard can add +18% (1/5 of 90%) as a temporary bonus to Status, for a total of 63% when dealing with non-player characters who would be impressed with that expertise in magic.</i></p><p>Exactly who will or won't be impressed by your character's exceptional skill is ultimately up to the gamemaster.</p><p>Status cannot be improved using normal skill experience and improvement rules. The gamemaster should offer Status as a reward for loyal service, daring deeds, or extraordinary merit between scenarios. A single point per adventure is reasonable, with extraordinary deeds or feats increasing the gain to 1D3, 1D4, or possibly even 1D6 points. What goes up can go down: scandals, misdemeanors, and social improprieties erode your character's Status. Unseemly rumors might result in a 1D3% drop, while conviction of a crime could reduce the skill rating by a much more significant amount, appropriate to the original status.</p><p>The gamemaster can also use Status as a way to measure your character's fame, and that of others. When a non-player character first meets your character, the gamemaster may roll against your character's Status to see if the stranger recognizes you. You can do the same thing for prominent non-player characters, to see if your character recognizes them.</p><p><b>Status Skill, Social Status, &amp; Character Wealth</b></p><p>As described in the sections on &quot;Creating a Character&quot; and &quot;Character Professions&quot;, in <b>Chapter Two: Characters</b> in the BRP core rules your character's Status rating can have a huge impact on his or her social standing and wealth. Following are three example tables. These tables assign a social rank and average wealth level based on Status, and places a cap on maximum character wealth. As your character earns Status, his or her position and fortune will likely improve.</p><table><tr><td><i>Status</i></td><td colspan="2"><i>Social Rank</i></td><td><i>Wealth Rating</i></td><td><i>Wealth Cap</i></td></tr><tr><td>1-39</td><td colspan="2">Lower Class</td><td>Destitute</td><td>Destitute</td></tr><tr><td>40-43</td><td colspan="2">Lower Middle Class</td><td>Poor</td><td>Average</td></tr><tr><td>44-47</td><td colspan="2">Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>48-49</td><td colspan="2">Upper Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>50-75</td><td colspan="2">Upper Class</td><td>Affluent</td><td>Affluent</td></tr><tr><td>76-95</td><td colspan="2">Nobility</td><td>Affluent</td><td>Wealthy</td></tr><tr><td>96-00</td><td colspan="2">Monarchy</td><td>Wealthy</td><td>Wealthy</td></tr><tr><td colspan="5"></td></tr></table><p>Status may also have an effect upon the initial equipment your character begins with. At the gamemaster's discretion, you may make Status rolls to determine if your character begins with better gear than his or her wealth level and profession would indicate. See &quot;Starting Equipment&quot; in <b>Chapter Eight: Equipment</b> in the BRP core rules for more details on this. Any Status rolls made to determine initial equipment are not considered to be during the course of adventure and are not eligible for experience checks.</p>\
",
subskills = {
["Ceresu"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Ceresu. For better or worse.</p>\
"},
["Serecu"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Serecu. For better or worse.</p>\
"},
["Larsan"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Larsan. For better or worse.</p>\
"},
["Disdal"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of Disdal. For better or worse.</p>\
"},
["None"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of None. For better or worse.</p>\
"},
["A'shari"] = { base=15, desc="\
<p>This skill represents how well known you are in the country of A'shari. For better or worse.</p>\
"},
["Other"] = { base=15, desc="\
<p>Creat any entry for a country, group, or other large scale entity or group as desired.</p>\
"}
}
},

And again the table portion only

<table><tr><td><i>Status</i></td><td colspan="2"><i>Social Rank</i></td><td><i>Wealth Rating</i></td><td><i>Wealth Cap</i></td></tr><tr><td>1-39</td><td colspan="2">Lower Class</td><td>Destitute</td><td>Destitute</td></tr><tr><td>40-43</td><td colspan="2">Lower Middle Class</td><td>Poor</td><td>Average</td></tr><tr><td>44-47</td><td colspan="2">Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>48-49</td><td colspan="2">Upper Middle Class</td><td>Average</td><td>Average</td></tr><tr><td>50-75</td><td colspan="2">Upper Class</td><td>Affluent</td><td>Affluent</td></tr><tr><td>76-95</td><td colspan="2">Nobility</td><td>Affluent</td><td>Wealthy</td></tr><tr><td>96-00</td><td colspan="2">Monarchy</td><td>Wealthy</td><td>Wealthy</td></tr><tr><td colspan="5"></td></tr></table>