alexander-novo / Boardgame-Toolkit

A boardgame toolkit and remote play environment for Senior Projects at UNR
0 stars 0 forks source link

R11 - Add data to tags #29

Closed alexander-novo closed 3 years ago

alexander-novo commented 3 years ago

R11 - The toolkit shall allow developers to assign data (such as numerical values, character strings, and other assets/regions) to individual tags in a project to be used in rules.

Depends on #28.

When a tag is selected from the global pool, a list of "properties" will appear in its sidebar editor. Each property has an editable name and a dropdown for type between things like "number", "boolean", "string", etc. There is also an option for a "tag" type (more on that later) where a user can associate this property with a specific tag. There is a button for making a new property in the list.

When an asset/collection/region is selected, it will have a new dropdown menu under the standard "Asset/Collection/region info" menu for all of the properties of the tags it is tagged with. Each property displays the name (not editable this time), which tag it is coming from, and an editable value field. If the type of the property is a tag, the value can be any object which is tagged with that tag.

The inspiration for the "tag" type is as follows: in Monopoly, many spaces are "property" spaces and each property space has an associated "property card" asset (and vice versa). This is similarly how railroad and utility space work, however the exact rules for those spaces and cards differ. See these examples of property cards and railroad cards below:

image image

Note how the rent structures differ. As well, how you purchase these cards also differs. However, you might want them all in the same collection ("Unpurchased properties" for instance). In this case, you would create 4 tags - "Property Card", "Property Space", "Railroad Card", and "Railroad Space". Each card tag would have properties for the rent structure of that card and a "tag" property which only accepts a region tagged with the respective space tag. Then each space tag would have a "tag" property which only accepts an asset with the corresponding card tag. In this way, when a player lands on a space, the rules could switch between the tag type, then find the card associated with the space, and then ask for rent based on the tag information from the card.

alexander-novo commented 3 years ago

Done except for the 'tag' data type.