⌨️

GOBs in depth

Creating GOBs

When you select create GOB you will be presented with the follow Wizard screen.
notion image

Fields and meanings

Type
There are currently Two Types Base and Embedded. The distinction is that Base GOB’s will have a unique name and can be referenced by them in your application. Embedded are pieces of Data that can only exist as Parts of another GOB. We will cover this in more Details in the GOB’s section.
Parent
If this GOB inherits properties from another you give it the parent here. For those of you with OO experience you would know this as Inheritance. This can be useful for items like Inventory that may share a lot of common data but various types of objects would need more fields to describe them.
Name
This is the name you use to identify this GOB. This would be something Like “Monster” not a specific monster. A GOB is the category not the instances of data in that category.
Definition Only
For some GOB types we might never want to capture data for them they only server as a base for others to expand from. If you select this option you will never be able to create instance of this GOB only inherit from it with others definitions.
Color Background
When GOB’s are shown in View’s they have a background color. This is where you choose that. This can assist in seeing your data and having a clear understanding of what each item is. This color is universal for al instances of this GOB in any view.
Summary
This is where you can write a summary for the GOB. You can embed data from the gob into the summary more will be expanded on in the GOB section as it’s a log to cover here.
For this Tutorial we have created a Monster GOB as shown below.
notion image

Designing the GOB

Once we have created our GOB we can double click on it in the view and it will open as below.
notion image
As you can see the definition data we set when in the Wizard is at the top under that is a list of properties.
Because this is a Base GOB it will always have one ID type field. This is it’s name in the system. You can change the ID fields name from name to anything you like but you will require one ID field and no more in the GOB.
We can now add fields by clicking the add field button
notion image
I have added 4 new fields to show what they look like.
notion image
We can then give each a name, Type if it’s an array required and how much width we want it to take up when we are viewing it in a list view.
The following types are currently supported
notion image
It’s not obvious immediately but the one type missing here is Option. That because that can be better achieved with a GOB. So for example if you want a monster to have an attack type such as Range, Melee or even more specific things you would create a GOB for those and then link it here.
ℹ️
Some of these options Like array do not function as well as we would like yet. There is a lot of work to do to make them easier to edit in list views and in Views.
notion image
As you can see I have added a few basic fields I would expect to need including AttackType that I can not currently link. I will add that as a GOB and then select it here.
notion image
I have now selected the attack type as GOB type linked to and I have also given it a color for the connection. This color will be used in views when showing the types of attacks.
I have also made the Attack Type an array and changes it’s name to attackTypes to better reflect that it is a collection now a single type now.
Built with Potion.so