config

package
v0.4.0-beta5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Koolo      *KooloCfg
	Characters map[string]*CharacterCfg
	Version    = "dev"
)

Functions

func CreateFromTemplate added in v0.4.0

func CreateFromTemplate(name string) error

func GetCurrentDisplayScale added in v0.4.0

func GetCurrentDisplayScale() float64

func Load

func Load() error

Load reads the config.ini file and returns a Config struct filled with data from the ini file

func ReplaceGameSettings added in v0.4.0

func ReplaceGameSettings() error

func ValidateAndSaveConfig added in v0.4.0

func ValidateAndSaveConfig(config KooloCfg) error

Types

type CharacterCfg added in v0.4.0

type CharacterCfg struct {
	MaxGameLength int    `yaml:"maxGameLength"`
	Username      string `yaml:"username"`
	Password      string `yaml:"password"`
	Realm         string `yaml:"realm"`
	CharacterName string `yaml:"characterName"`
	Health        struct {
		HealingPotionAt     int `yaml:"healingPotionAt"`
		ManaPotionAt        int `yaml:"manaPotionAt"`
		RejuvPotionAtLife   int `yaml:"rejuvPotionAtLife"`
		RejuvPotionAtMana   int `yaml:"rejuvPotionAtMana"`
		MercHealingPotionAt int `yaml:"mercHealingPotionAt"`
		MercRejuvPotionAt   int `yaml:"mercRejuvPotionAt"`
		ChickenAt           int `yaml:"chickenAt"`
		MercChickenAt       int `yaml:"mercChickenAt"`
	} `yaml:"health"`
	Bindings struct {
		OpenInventory       string `yaml:"openInventory"`
		OpenCharacterScreen string `yaml:"openCharacterScreen"`
		OpenSkillTree       string `yaml:"openSkillTree"`
		OpenQuestLog        string `yaml:"openQuestLog"`
		Potion1             string `yaml:"potion1"`
		Potion2             string `yaml:"potion2"`
		Potion3             string `yaml:"potion3"`
		Potion4             string `yaml:"potion4"`
		ForceMove           string `yaml:"forceMove"`
		StandStill          string `yaml:"standStill"`
		SwapWeapon          string `yaml:"swapWeapon"`
		Teleport            string `yaml:"teleport"`
		TP                  string `yaml:"tp"`
		CTABattleCommand    string `yaml:"CTABattleCommand"`
		CTABattleOrders     string `yaml:"CTABattleOrders"`

		// Class Specific bindings
		Sorceress struct {
			Blizzard     string `yaml:"blizzard"`
			StaticField  string `yaml:"staticField"`
			FrozenArmor  string `yaml:"frozenArmor"`
			FireBall     string `yaml:"fireBall"`
			Nova         string `yaml:"nova"`
			EnergyShield string `yaml:"energyShield"`
		} `yaml:"sorceress"`
		Paladin struct {
			Concentration string `yaml:"concentration"`
			HolyShield    string `yaml:"holyShield"`
			Vigor         string `yaml:"vigor"`
			Redemption    string `yaml:"redemption"`
			Cleansing     string `yaml:"cleansing"`
		} `yaml:"paladin"`
	} `yaml:"bindings"`
	Inventory struct {
		InventoryLock [][]int `yaml:"inventoryLock"`
		BeltColumns   struct {
			Healing      int `yaml:"healing"`
			Mana         int `yaml:"mana"`
			Rejuvenation int `yaml:"rejuvenation"`
		} `yaml:"beltColumns"`
	} `yaml:"inventory"`
	Character struct {
		Class         string `yaml:"class"`
		CastingFrames int    `yaml:"castingFrames"`
		UseMerc       bool   `yaml:"useMerc"`
	} `yaml:"character"`
	Game struct {
		ClearTPArea   bool                  `yaml:"clearTPArea"`
		Difficulty    difficulty.Difficulty `yaml:"difficulty"`
		RandomizeRuns bool                  `yaml:"randomizeRuns"`
		Runs          []string              `yaml:"runs"`
		Pindleskin    struct {
			SkipOnImmunities []stat.Resist `yaml:"skipOnImmunities"`
		} `yaml:"pindleskin"`
		Mephisto struct {
			KillCouncilMembers bool `yaml:"killCouncilMembers"`
			OpenChests         bool `yaml:"openChests"`
		} `yaml:"mephisto"`
		Tristram struct {
			ClearPortal       bool `yaml:"clearPortal"`
			FocusOnElitePacks bool `yaml:"focusOnElitePacks"`
		} `yaml:"tristram"`
		Nihlathak struct {
			ClearArea bool `yaml:"clearArea"`
		} `yaml:"nihlathak"`
		Baal struct {
			KillBaal bool `yaml:"killBaal"`
		} `yaml:"baal"`
		TerrorZone struct {
			FocusOnElitePacks bool          `yaml:"focusOnElitePacks"`
			SkipOnImmunities  []stat.Resist `yaml:"skipOnImmunities"`
			SkipOtherRuns     bool          `yaml:"skipOtherRuns"`
			Areas             []area.Area   `yaml:"areas"`
		} `yaml:"terrorZone"`
		Leveling struct {
			EnsurePointsAllocation bool `yaml:"ensurePointsAllocation"`
			EnsureKeyBinding       bool `yaml:"ensureKeyBinding"`
		} `yaml:"leveling"`
	} `yaml:"game"`
	Companion struct {
		Enabled          bool   `yaml:"enabled"`
		Leader           bool   `yaml:"leader"`
		LeaderName       string `yaml:"leaderName"`
		Attack           bool   `yaml:"attack"`
		GameNameTemplate string `yaml:"gameNameTemplate"`
		GamePassword     string `yaml:"gamePassword"`
	} `yaml:"companion"`
	Gambling struct {
		Enabled bool        `yaml:"enabled"`
		Items   []item.Name `yaml:"items"`
	} `yaml:"gambling"`
	Runtime struct {
		CastDuration time.Duration
		Rules        []nip.Rule
	}
}

type KooloCfg added in v0.4.0

type KooloCfg struct {
	FirstRun          bool `yaml:"firstRun"`
	UseCustomSettings bool `yaml:"useCustomSettings"`
	Debug             struct {
		Log       bool `yaml:"log"`
		RenderMap bool `yaml:"renderMap"`
	} `yaml:"debug"`
	LogSaveDirectory string `yaml:"logSaveDirectory"`
	D2LoDPath        string `yaml:"D2LoDPath"`
	D2RPath          string `yaml:"D2RPath"`
	Discord          struct {
		Enabled   bool   `yaml:"enabled"`
		ChannelID string `yaml:"channelId"`
		Token     string `yaml:"token"`
	} `yaml:"discord"`
	Telegram struct {
		Enabled bool   `yaml:"enabled"`
		ChatID  int64  `yaml:"chatId"`
		Token   string `yaml:"token"`
	}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL