Skip to content

Add Documentation for G#30

Merged
english5040 merged 6 commits into
Steamodded:masterfrom
BakersDozenBagels:g-documentation
Oct 19, 2025
Merged

Add Documentation for G#30
english5040 merged 6 commits into
Steamodded:masterfrom
BakersDozenBagels:g-documentation

Conversation

@BakersDozenBagels
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member

@GauntletGames-2086 GauntletGames-2086 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread G.md Outdated
## 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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Definition" isn't really consistent with how SMODS refers to these objects. Generally they're referred to as "centers". This wording should stay consistent.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe have a FAQ with "What the heck is a Center?"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread G.md Outdated
Comment thread G.md Outdated
Comment thread G.md Outdated
Comment thread G.md Outdated
Comment thread G.md Outdated
Comment thread G.md Outdated
Comment thread G.md Outdated
## 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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread G.md Outdated
@english5040
Copy link
Copy Markdown
Collaborator

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

Comment thread _Sidebar.md Outdated
* [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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure I like this name (it's not immediately obvious this is a variable)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll wrap it in backticks, then.

@english5040 english5040 merged commit af137fd into Steamodded:master Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants