├── .gitignore ├── go.mod ├── definitions ├── 15-Hiro-Stats.json ├── 13-Hiro-Incentives.json ├── 03-Hiro-Base.json ├── 06-Hiro-Leaderboards.json ├── 04-Hiro-Tutorials.json ├── 08-Hiro-Energies.json ├── README.md ├── _02-Hiro-Rewards.json ├── 16-Hiro-Auctions.json ├── 07-Hiro-Inventory.json ├── 12-Hiro-Event-Leaderboards.json ├── 11-Hiro-Unlockables.json ├── 17-Hiro-Streaks.json ├── 09-Hiro-Economy.json ├── 14-Hiro-Progressions.json ├── 18-Hiro-Challenges.json ├── 10-Hiro-Achievements.json ├── _01-Hiro-Reward.json └── 05-Hiro-Teams.json ├── buf.gen.yaml ├── .editorconfig ├── buf.yaml ├── .golangci.yml ├── schemas ├── README.md ├── 04-Hiro-Tutorials.json ├── 03-Hiro-Base.json ├── 06-Hiro-Leaderboards.json ├── 15-Hiro-Stats.json ├── 08-Hiro-Energy.json ├── 13-Hiro-Incentives.json ├── 02-Hiro-Rewards.json ├── 17-Hiro-Streaks.json ├── 07-Hiro-Inventory.json ├── 18-Hiro-Challenges.json ├── 11-Hiro-Unlockables.json ├── 12-Hiro-Event-Leaderboards.json ├── 16-Hiro-Auctions.json ├── 10-Hiro-Achievements.json ├── 14-Hiro-Progressions.json ├── 09-Hiro-Economy.json ├── 01-Hiro-Reward.json └── 05-Hiro-Teams.json ├── .github └── workflows │ └── golangci-lint.yml ├── tools.go ├── go.sum ├── personalizer.go ├── stats.go ├── leaderboards.go ├── reward_mailbox.go ├── publisher.go ├── tutorials.go ├── README.md ├── streaks.go ├── energy.go ├── incentives.go ├── progression.go ├── personalizer_storage_nakama.json ├── inventory.go ├── achievements.go ├── unlockables.go ├── challenge.go ├── auctions.go ├── event_leaderboards.go ├── LICENSE ├── personalizer_storage.go └── economy.go /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | .idea/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/heroiclabs/hiro 2 | 3 | go 1.25.0 4 | 5 | require ( 6 | github.com/heroiclabs/nakama-common v1.44.0 7 | google.golang.org/protobuf v1.36.8 8 | ) 9 | -------------------------------------------------------------------------------- /definitions/15-Hiro-Stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "whitelist": [ 3 | "strength", 4 | "constitution", 5 | "dexterity", 6 | "wisdom", 7 | "intellect" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | managed: 3 | enabled: true 4 | plugins: 5 | - remote: buf.build/protocolbuffers/go:v1.34.2 6 | out: . 7 | opt: 8 | - paths=source_relative 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # See format at editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.go] 13 | indent_style = tab 14 | 15 | [*.{yml,yaml,json}] 16 | indent_size = 4 17 | -------------------------------------------------------------------------------- /buf.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | breaking: 3 | use: 4 | - FILE 5 | lint: 6 | use: 7 | - STANDARD 8 | except: 9 | - PACKAGE_DIRECTORY_MATCH 10 | - PACKAGE_VERSION_SUFFIX 11 | modules: 12 | - path: . 13 | name: buf.build/heroiclabs/hiro 14 | excludes: 15 | - vendor 16 | - node_modules 17 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | run: 2 | # Enables skipping of directories: 3 | # - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ 4 | skip-dirs-use-default: true 5 | skip-dirs: 6 | - internal/gopher-lua 7 | - internal/cronexpr 8 | 9 | linters: 10 | enable: 11 | - gofmt 12 | 13 | linters-settings: 14 | gofmt: 15 | simplify: false 16 | -------------------------------------------------------------------------------- /schemas/README.md: -------------------------------------------------------------------------------- 1 | schemas 2 | ======= 3 | 4 | This folder contains a list of schema validator definitions for Satori. 5 | 6 | ## Usage 7 | 8 | Schemas must be loaded in order based on the numbering in their file name prefixes. 9 | 10 | Schema naming must follow the file names but without the number prefix: `01-Hiro-Base` must be used to define a schema validator named `Hiro-Base`, for example. 11 | -------------------------------------------------------------------------------- /definitions/13-Hiro-Incentives.json: -------------------------------------------------------------------------------- 1 | { 2 | "incentives": { 3 | "incentive1": { 4 | "type": 1, 5 | "name": "Incentive One", 6 | "description": "Description of the first incentive", 7 | "max_claims": 100, 8 | "max_global_claims": 500, 9 | "max_recipient_age_sec": 3600, 10 | "max_concurrent": 10, 11 | "expiry_duration_sec": 86400 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /definitions/03-Hiro-Base.json: -------------------------------------------------------------------------------- 1 | { 2 | "rate_app_smtp_addr": "smtp.gmail.com", 3 | "rate_app_smtp_username": "email@domain.com", 4 | "rate_app_smtp_password": "password", 5 | "rate_app_smtp_email_from": "gamename-server@mygamecompany.com", 6 | "rate_app_smtp_email_from_name": "My Game Company", 7 | "rate_app_smtp_email_subject": "RateApp Feedback", 8 | "rate_app_smtp_email_to": "gamename-rateapp@mygamecompany.com", 9 | "rate_app_smtp_port": 12345, 10 | "rate_app_template": "