Add terrain biomes jumping and extensible gathering professions

This commit is contained in:
dingo
2026-09-08 21:54:23 -04:00
parent 141cb9e6b2
commit df7b245ca7
34 changed files with 1895 additions and 184 deletions
+191 -58
View File
@@ -12,6 +12,7 @@ type Protocol struct {
type ContentCatalog struct {
EffectSets []EffectSet `json:"effectSets,omitempty"`
Gathering *GatheringContent `json:"gathering,omitempty"`
Items []ItemDefinition `json:"items"`
RequirementSets []RequirementSet `json:"requirementSets,omitempty"`
Stats ContentStatsRules `json:"stats"`
@@ -29,9 +30,58 @@ type EffectSet struct {
type StatModifier struct {
Flat float64 `json:"flat"`
Percent float64 `json:"percent"`
Skill *string `json:"skill,omitempty"`
Stat string `json:"stat"`
}
type GatheringContent struct {
Biomes []BiomeDefinition `json:"biomes"`
Consumables []GatheringConsumable `json:"consumables"`
Resources []ResourceDefinition `json:"resources"`
Skills []GatheringSkill `json:"skills"`
}
type BiomeDefinition struct {
Color string `json:"color"`
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
Weight int64 `json:"weight"`
}
type GatheringConsumable struct {
Description string `json:"description"`
ID string `json:"id"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Seconds float64 `json:"seconds"`
}
type ResourceDefinition struct {
Amount int64 `json:"amount"`
Biomes []string `json:"biomes"`
Density int64 `json:"density"`
Description string `json:"description"`
ID string `json:"id"`
Model string `json:"model"`
Name string `json:"name"`
Output string `json:"output"`
RequiredLevel int64 `json:"requiredLevel"`
RespawnSeconds float64 `json:"respawnSeconds"`
Seconds float64 `json:"seconds"`
SkillID string `json:"skillId"`
XP int64 `json:"xp"`
}
type GatheringSkill struct {
BaseXP int64 `json:"baseXp"`
Description string `json:"description"`
ID string `json:"id"`
MaxLevel int64 `json:"maxLevel"`
Name string `json:"name"`
XPPerLevel int64 `json:"xpPerLevel"`
}
type ItemDefinition struct {
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
@@ -83,17 +133,37 @@ type TitleEffects struct {
}
type ContentChange struct {
EffectSet *EffectSetDraft `json:"effectSet,omitempty"`
EffectSetIDS []string `json:"effectSetIds,omitempty"`
ExpectedVersion int64 `json:"expectedVersion"`
ID string `json:"id"`
Item *ItemDraft `json:"item,omitempty"`
Op string `json:"op"`
Reason string `json:"reason"`
RequirementSet *RequirementSetDraft `json:"requirementSet,omitempty"`
RequirementSetIDS []string `json:"requirementSetIds,omitempty"`
Stats *ContentStatsRules `json:"stats,omitempty"`
Title *TitleDraft `json:"title,omitempty"`
Biome *BiomeDefinitionDraft `json:"biome,omitempty"`
Consumable *GatheringConsumableDraft `json:"consumable,omitempty"`
EffectSet *EffectSetDraft `json:"effectSet,omitempty"`
EffectSetIDS []string `json:"effectSetIds,omitempty"`
ExpectedVersion int64 `json:"expectedVersion"`
GatheringSkill *GatheringSkillDraft `json:"gatheringSkill,omitempty"`
ID string `json:"id"`
Item *ItemDraft `json:"item,omitempty"`
Op string `json:"op"`
Reason string `json:"reason"`
RequirementSet *RequirementSetDraft `json:"requirementSet,omitempty"`
RequirementSetIDS []string `json:"requirementSetIds,omitempty"`
Resource *ResourceDefinitionDraft `json:"resource,omitempty"`
Stats *ContentStatsRules `json:"stats,omitempty"`
Title *TitleDraft `json:"title,omitempty"`
}
type BiomeDefinitionDraft struct {
Color string `json:"color"`
Description string `json:"description"`
ID *string `json:"id,omitempty"`
Name string `json:"name"`
Weight int64 `json:"weight"`
}
type GatheringConsumableDraft struct {
Description string `json:"description"`
ID *string `json:"id,omitempty"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Seconds float64 `json:"seconds"`
}
type EffectSetDraft struct {
@@ -103,6 +173,15 @@ type EffectSetDraft struct {
Name string `json:"name"`
}
type GatheringSkillDraft struct {
BaseXP int64 `json:"baseXp"`
Description string `json:"description"`
ID *string `json:"id,omitempty"`
MaxLevel int64 `json:"maxLevel"`
Name string `json:"name"`
XPPerLevel int64 `json:"xpPerLevel"`
}
type ItemDraft struct {
Description string `json:"description"`
DropChance float64 `json:"dropChance"`
@@ -121,6 +200,22 @@ type RequirementSetDraft struct {
Requirements []ContentRequirement `json:"requirements"`
}
type ResourceDefinitionDraft struct {
Amount int64 `json:"amount"`
Biomes []string `json:"biomes"`
Density int64 `json:"density"`
Description string `json:"description"`
ID *string `json:"id,omitempty"`
Model string `json:"model"`
Name string `json:"name"`
Output string `json:"output"`
RequiredLevel int64 `json:"requiredLevel"`
RespawnSeconds float64 `json:"respawnSeconds"`
Seconds float64 `json:"seconds"`
SkillID string `json:"skillId"`
XP int64 `json:"xp"`
}
type TitleDraft struct {
Description string `json:"description"`
Effects TitleEffects `json:"effects"`
@@ -151,20 +246,22 @@ type Intent struct {
}
type Snapshot struct {
ChunkKeys []string `json:"chunkKeys"`
Chunks []Chunk `json:"chunks"`
Entities []Entity `json:"entities"`
Message string `json:"message"`
Self Character `json:"self"`
Tick int64 `json:"tick"`
Type string `json:"type"`
UnavailableResources []string `json:"unavailableResources"`
Version int64 `json:"version"`
World WorldInfo `json:"world"`
ChunkKeys []string `json:"chunkKeys"`
Chunks []Chunk `json:"chunks"`
Entities []Entity `json:"entities"`
GatherRisks map[string]GatheringRisk `json:"gatherRisks,omitempty"`
Message string `json:"message"`
Self Character `json:"self"`
Tick int64 `json:"tick"`
Type string `json:"type"`
UnavailableResources []string `json:"unavailableResources"`
Version int64 `json:"version"`
World WorldInfo `json:"world"`
}
type Chunk struct {
Biome string `json:"biome"`
Color *string `json:"color,omitempty"`
Heights []float64 `json:"heights"`
Key string `json:"key"`
Resolution int64 `json:"resolution"`
@@ -175,13 +272,16 @@ type Chunk struct {
}
type Entity struct {
HP float64 `json:"hp"`
ID string `json:"id"`
Kind string `json:"kind"`
MaxHP float64 `json:"maxHp"`
Name string `json:"name"`
Position Vec3 `json:"position"`
State string `json:"state"`
HP float64 `json:"hp"`
ID string `json:"id"`
Kind string `json:"kind"`
MaxHP float64 `json:"maxHp"`
Name string `json:"name"`
Position Vec3 `json:"position"`
RequiredLevel *int64 `json:"requiredLevel,omitempty"`
ResourceID *string `json:"resourceId,omitempty"`
SkillID *string `json:"skillId,omitempty"`
State string `json:"state"`
}
type Vec3 struct {
@@ -190,30 +290,70 @@ type Vec3 struct {
Z float64 `json:"z"`
}
type GatheringRisk struct {
Allowed bool `json:"allowed"`
Damage float64 `json:"damage"`
Destruction float64 `json:"destruction"`
Failure float64 `json:"failure"`
Negative float64 `json:"negative"`
Seconds float64 `json:"seconds"`
}
type Character struct {
ACK int64 `json:"ack"`
AllocatedStats map[string]int64 `json:"allocatedStats"`
CarryWeight float64 `json:"carryWeight"`
Entity Entity `json:"entity"`
Equipment map[string]string `json:"equipment"`
Experience int64 `json:"experience"`
ExperienceToNextLevel int64 `json:"experienceToNextLevel"`
HasKeystone bool `json:"hasKeystone"`
HealthChoices int64 `json:"healthChoices"`
Inventory map[string]int64 `json:"inventory"`
Items []ItemInstance `json:"items"`
Kills int64 `json:"kills"`
Level int64 `json:"level"`
Mana float64 `json:"mana"`
ManaChoices int64 `json:"manaChoices"`
PendingVitalChoices int64 `json:"pendingVitalChoices"`
PlayedSeconds float64 `json:"playedSeconds"`
RemainingSeconds float64 `json:"remainingSeconds"`
Skills map[string]int64 `json:"skills"`
Stamina float64 `json:"stamina"`
StatPoints int64 `json:"statPoints"`
Stats map[string]StatValue `json:"stats"`
Titles []TitleAward `json:"titles"`
ACK int64 `json:"ack"`
AllocatedStats map[string]int64 `json:"allocatedStats"`
CarryWeight float64 `json:"carryWeight"`
Consumables []GatheringConsumable `json:"consumables,omitempty"`
Entity Entity `json:"entity"`
Equipment map[string]string `json:"equipment"`
Experience int64 `json:"experience"`
ExperienceToNextLevel int64 `json:"experienceToNextLevel"`
GatherAttempt int64 `json:"gatherAttempt"`
Gathering map[string]SkillProgress `json:"gathering,omitempty"`
GatheringEffects []TimedGatheringEffect `json:"gatheringEffects,omitempty"`
HasKeystone bool `json:"hasKeystone"`
HealthChoices int64 `json:"healthChoices"`
Inventory map[string]int64 `json:"inventory"`
Items []ItemInstance `json:"items"`
Kills int64 `json:"kills"`
Level int64 `json:"level"`
Mana float64 `json:"mana"`
ManaChoices int64 `json:"manaChoices"`
PendingVitalChoices int64 `json:"pendingVitalChoices"`
PlayedSeconds float64 `json:"playedSeconds"`
RemainingSeconds float64 `json:"remainingSeconds"`
Skills map[string]int64 `json:"skills"`
StackNames map[string]string `json:"stackNames,omitempty"`
Stamina float64 `json:"stamina"`
StatPoints int64 `json:"statPoints"`
Stats map[string]StatValue `json:"stats"`
Titles []TitleAward `json:"titles"`
}
type SkillProgress struct {
EffectiveLevel int64 `json:"effectiveLevel"`
Experience StatValue `json:"experience"`
Level int64 `json:"level"`
LevelValue StatValue `json:"levelValue"`
Name string `json:"name"`
Speed StatValue `json:"speed"`
XP int64 `json:"xp"`
XPToNextLevel int64 `json:"xpToNextLevel"`
Yield StatValue `json:"yield"`
}
type StatValue struct {
Base float64 `json:"base"`
Final float64 `json:"final"`
Flat float64 `json:"flat"`
Percent float64 `json:"percent"`
}
type TimedGatheringEffect struct {
ExpiresAt float64 `json:"expiresAt"`
Modifiers []StatModifier `json:"modifiers"`
Name string `json:"name"`
Source string `json:"source"`
}
type ItemInstance struct {
@@ -229,13 +369,6 @@ type ItemInstance struct {
Weight float64 `json:"weight"`
}
type StatValue struct {
Base float64 `json:"base"`
Final float64 `json:"final"`
Flat float64 `json:"flat"`
Percent float64 `json:"percent"`
}
type TitleAward struct {
Description string `json:"description"`
EarnedAt string `json:"earnedAt"`