Add Documentation for G#30
Conversation
GauntletGames-2086
left a comment
There was a problem hiding this comment.
Overall nice, just some style issues.
Additional notes:
- I don't really like how all of the functions are haphazardly thrown in with the other field documentation. It would be easier to document if they were in a separate section (along with being able to specify params and return values).
| ## The Highlights | ||
|
|
||
| - `G.E_MANAGER` is the [event manager](https://github.com/Steamodded/smods/wiki/Guide-%E2%80%90-Event-Manager). | ||
| - `G.P_CENTERS` holds the definitions for jokers, consumables, vouchers, decks, enhancements, editions, and boosters. It is indexed with the object's key. For example, `G.P_CENTERS.c_strength` is the definition for Strength. |
There was a problem hiding this comment.
"Definition" isn't really consistent with how SMODS refers to these objects. Generally they're referred to as "centers". This wording should stay consistent.
There was a problem hiding this comment.
Referring to these as centers is confusing, we should say they're centers but also clarify
(This conversation also applies to G.P_SEALS and a bunch of other G. fields)
There was a problem hiding this comment.
hmm yeah makes sense.
There was a problem hiding this comment.
Maybe have a FAQ with "What the heck is a Center?"
There was a problem hiding this comment.
I believe the "P_" prefix indicates that these are prototype centers (as opposed to the ones you interact with during a game, which are created from these prototypes).
There was a problem hiding this comment.
I believe the "P_" prefix indicates that these are prototype centers (as opposed to the ones you interact with during a game, which are created from these prototypes).
That's not quite true. Evaluate G.jokers.cards[1].config.center == G.P_CENTERS.j_joker, e.g., and you'll find it can be true. The centers are prototypes (in the same sense as Javascript prototypes), but there don't exist non-prototype centers, only cards (vouchers, etc.) which reference a center to use as a prototype.
| ## The Highlights | ||
|
|
||
| - `G.E_MANAGER` is the [event manager](https://github.com/Steamodded/smods/wiki/Guide-%E2%80%90-Event-Manager). | ||
| - `G.P_CENTERS` holds the definitions for jokers, consumables, vouchers, decks, enhancements, editions, and boosters. It is indexed with the object's key. For example, `G.P_CENTERS.c_strength` is the definition for Strength. |
There was a problem hiding this comment.
Referring to these as centers is confusing, we should say they're centers but also clarify
(This conversation also applies to G.P_SEALS and a bunch of other G. fields)
|
This is really long. some good organization here will go a long way, but we can discuss that later, it's good to have this |
| * [Mod functions](https://github.com/Steamodded/smods/wiki/Mod-functions) | ||
| * [UI Structure](https://github.com/Steamodded/smods/wiki/UI-Guide) | ||
| * [Utility Functions](https://github.com/Steamodded/smods/wiki/Utility) | ||
| * [All About G](https://github.com/Steamodded/smods/wiki/G) |
There was a problem hiding this comment.
Not quite sure I like this name (it's not immediately obvious this is a variable)
There was a problem hiding this comment.
I'll wrap it in backticks, then.
G and G.GAME have a lot of useful attributes, and a lot of really weird ones too. This should help new modders discover what they're for.