PDA

View Full Version : Trying to figure out how to do something, if possible, in tables, ideas please?



ChipDancer
August 29th, 2021, 17:35
Essentially, what I am trying to do is when generating treasure I am seeing artifacts that may or may not be normal, but the one in particular that I want to try and figure out is magic weapon/armor generation.

What happens is I will see in the list of items generated in the parcel a [+1] for example, then maybe a [+1 Weapon] for example on another line, then say [Warhammer] on yet another line, and finally say [Flaming] on yet another line. In short four separate line items often no where near one another as the parcel list is alpha-numeric.

So my question is as follows: Is there any means to format the output so that all the above is populate in one line item? I'm not asking for it to generate the actual weapon item complete with enchantments and all ready to be dragged over to a character sheet, just to have all the line items in one handy text description please. I'm perfectly fine with manually creating the weapon/armor, but on some list it's just so chaotic seeing three or more items generated that have all these other line items on the list with no idea which belongs to which.

A concatenate operator would be nice, but I'm not aware of FGU having such operations.

Ideas please and thanks in advance!

(^_^)

ChipDancer

Zacchaeus
August 29th, 2021, 17:56
Use a story template and you can output everything to one line. If I am understanding what you want correctly you'll need a table for the weapons, another to generate a bonus or not, another to add anything like Flaming etc. You can then ask the template to output in a line [Weapon],[bonus],[thing] and it will produce something like Longsword, +1, Flaming. You could also change the output to a story entry which will be neater than output to chat.

You can only output complete things that exist to a treasure parcel. You can't create something in a treasure parcel that doesn't exist. At least not from different sources.

ChipDancer
August 30th, 2021, 19:07
Zacchaeus and anyone else reading,

To clarify, here is a pic of a single item to show how it is currently appearing:

48941

This is fine if it were just that single item, but when rolling out a large encounter parcel or a shop's inventory it becomes a pain.

What I'd like to know if it is possible to get all the results on a single line item, instead of scattered about the parcel list? A concatenate operator would make this work, if such operators exist in the tables.

Thanks in advance,

ChipDancer

superteddy57
August 30th, 2021, 19:24
Would need a really big extension. The parcel system pipes into many different systems and it's separated to help facilitate the difference between the currency of the ruleset and it's items. So combining the two windows would impede those systems and need a rewrite to work with a single list setup. You can see a bit of it with ItemManager, PartyManager, and the script code for parcels. There may be other things interacting with it, but wanted to share where most of the changes would need to take place.

LordEntrails
August 30th, 2021, 20:09
I would suggest you look at some resources form JimSocks. His Content Generator from 2020 is pretty impressive. Then take a look at his more recent tutorials on tables and Story Templates, he had contributes to some of the recent code changes that have added quite a bit of functionality to core FG in this area. If it can be done, he's probably the best source for an approach. (Note, Mr Z and SuperTeddy are great too, I'm just not sure they are as familiar as Jim who made the recent updates.)

ChipDancer
August 30th, 2021, 20:18
LordEntrails,

All you guys are great!!!

I actually have already been spending a lot of time with JimSock's generators, which have allowed me to do some really incredible things, especially when using tables to generate story details, but it's a huge amount of data to go through, so the process is slow, but it has definitely influenced me into using more tables for generating details during my prep! :)

If JimSocks has any feedback it would sure be most welcome! :)

Thanks in advance to all,

ChipDancer

Zacchaeus
August 30th, 2021, 21:09
The Content Generator uses story templates to generate its data. As I said above you can do what you want using a story template but you can't create an item in a treasure parcel. No matter how you use tables (or story templates) you can't actually create an item in a parcel. Even using story templates you can't actually create an item - you can only create sentence strings. An item can only be added to a treasure parcel that actually exists - so if you have a +1 flaming longsword as an item then you can include it in the parcel. But you cannot manufacture a +1 flaming longsword from disparate tables and add it to a parcel. The best you can do with tables or story templates is create a sentence or a string of words.

ChipDancer
August 30th, 2021, 21:39
Zacchaeus,

That is exactly what I am trying to do sir! Not create a item, but just a sentence or string on a single line! :)

ChipDancer

damned
August 31st, 2021, 01:28
Story Templates.

ChipDancer
August 31st, 2021, 03:29
How is a story template going to help me?

Seems like more work if I'm generating a shops inventory; I just want to figure out how to get the tables to output into a single line for items like enchanted weapons and armor. :)

ChipDancer

damned
August 31st, 2021, 04:02
You wrote:


That is exactly what I am trying to do sir! Not create a item, but just a sentence or string on a single line!

As per Zacchaeus - the answer is Story Template

If you want to create Items you will need to write code as alluded to by superteddy57

Lo Zeno
August 31st, 2021, 09:45
How is a story template going to help me?

Seems like more work if I'm generating a shops inventory; I just want to figure out how to get the tables to output into a single line for items like enchanted weapons and armor. :)

ChipDancer

https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996640973/Using+Story+Templates+to+Create+Random+Stories

This has all the instructions, have a look.