Comments start with // and nothing after this is processed.
Semicolons are not necessary but acceptable at the end of every line.
The @ symbol starts a label.
Labels are @blueprint, @mod, @factory, @base, @modList, @tag, @property, and @end.
The labels @blueprint, @mod, or @factory start a blueprint and declare the type
of blueprint. @blueprint is the base blueprints. @mod is something that builds
off another blueprint. @factory generates random combinations of blueprints and mods.
The labels @base and @modList are only acceptable in factories. They hold what blueprints it can start
from and what mods to apply respectively.
The label @tag holds the descriptive tags for the blueprint for grouping them together.
The label @property holds the properties specific to the item.
Nothing is processed after the @end tag
@blueprint Example
@tag item
@tag basic
@property name = "Some Item"
@property value = 1
@end
@mod OfWhoopButt
@property name = (strcat &source.name " of Whoop Butt")
@property damage = (* &source.damage 2.3)
@property value = (+ &source.value 120)
@end
@factory MagicalWeapon
@base (pickOne (BPT: weapon))
@modList (list (pickOne (MOD: itemPrefix)) (pickOne (MOD: itemSuffix)))
@property value = (* &source.value 1.2)
@end
I plan to evaluate properties. The Dictionary of properties isn't directly public. Instead they are accessible through a range of methods that parse the evaluated value of the property for the proper data type. If they start with a ", they are strings. If they start with a number, they are doubles. If they start with a (, they are functions.
(rrand 10 15) returns an integer between param1 and param2
(rand 10 15) returns a double between param1 and param2
(list Fire PointedStick Spear) returns a list of the parameters
(pickOne (list PointedStick Spear)) returns one of the items in a list
(BPT: weapon primitive) returns a list of items that are weapons and are primitive
(MOD: !primitive) returns a list of mods that are not primitive
(FAC: !weapon !primitive) returns a list of factories that are not weapons and are not primitive
(strcat &source.name " of Whoop Butt") returns the two parameter strings combined, uss. used in mods
$source refers to the modded bpt and name is a parameter
(* &source.damage 2.3) returns the two parameters multiplied
(/ &source.hilarity .1) returns the two parameters divided
(+ &source.value 120) returns the two parameters added
(- &source.impressiveness 120) returns the two parameters subtracted
I will therefore be able to use tags and generators to find specific items that are appropriate to the situation. I intend to combine this system with the idea suggested
@blueprint RoomExample
@tag room
@tag dungeon
@property width = (rrand 3 5)
@property height = (rrand 3 5)
**magic way to show contents**
@end
As is obvious, I am not sure how I want to represent contents that can expand and contract. I could try and make an array for each size, but that defeats the purpose of this. I like squidi.net's way of using struts, springs, and collapsing sections to represent a room conceptually. However, I am not sure how this could translate into code. Any ideas people? I need to be able to add an 2D array of the items and their connections between them, but I am not sure what the best way to approach this is.