Documentation
¶
Index ¶
- Constants
- Variables
- func ColorInPalette(color color.Color, palette color.Palette) bool
- func ConvertToBIFL(r io.ReadSeeker, w io.WriteSeeker) error
- func Decompress(pCompressedData []uint32, Do2bitMode bool, XDim uint32, YDim uint32, ...)
- func DecompressBlockDXT1Internal(block []uint8, img *image.RGBA, pt image.Point)
- func DecompressBlockDXT5Internal(blockStorage []uint8, img *image.RGBA, pt image.Point)
- func GetModulationValue(x uint32, y uint32, Do2bitMode bool, ModulationVals [8][16]uint32, ...)
- func InterpolateColours(ColourP [4]uint32, ColourQ [4]uint32, ColourR [4]uint32, ColourS [4]uint32, ...)
- func LIMIT_COORD(Val, Size uint32, AssumeImageTiles bool) uint32
- func NewPVRTexture(r io.ReadSeeker) (*tisPvrTexture, error)
- func NewPathScanner(path string, mode int) svgPathScanner
- func OpenEff(r io.ReadSeeker) (*ItmEffect, *EffEffect, error)
- func RepackageBiff(keyFile io.ReadSeeker, bifIn io.ReadSeeker, filesPath string, ...) error
- func TwiddleUV(YSize uint32, XSize uint32, YPos uint32, XPos uint32) uint32
- func Unpack5554Colour(pBlock []uint32, ABColours *[2][4]uint32)
- func UnpackModulations(pBlock []uint32, Do2bitMode bool, ModulationVals *[8][16]uint32, ...)
- type Area
- type AreaActor
- type AreaAmbient
- type AreaAnimation
- type AreaContainer
- type AreaDoor
- type AreaEntrance
- type AreaHeader
- type AreaItem
- type AreaMapNote
- type AreaProjectileTrap
- type AreaRegion
- type AreaRestEncounter
- type AreaSong
- type AreaSpawnPoint
- type AreaTiledObject
- type AreaVariable
- type AreaVertex
- type BG
- type BIF
- type Bam
- func (bam *Bam) ExpandAndCenterImages()
- func (bam *Bam) MakeBam(wRaw io.Writer) error
- func (bam *Bam) MakeBamd(output string, name string, mirror bool, offset_x int, offset_y int)
- func (bam *Bam) MakeGif(outputPath string, name string) error
- func (bam *Bam) MakeSpriteSheet(imgWriter io.Writer, jsonWriter io.Writer)
- func (bam *Bam) RebuildSequencesAndDropFrames()
- func (bam *Bam) WriteJson(w io.Writer) error
- type BamCHeader
- type BamCycle
- type BamFrame
- type BamFrameV2
- type BamHeader
- type BamHeaderV2
- type BamMosaicQuad
- type BamSequence
- type CHU
- type CRE
- type Component
- type CreEquipment
- type CreHeader
- type CreItem
- type CreItemHeader
- type CreKnownSpell
- type CreMemorizedSpell
- type CreMemorizedSpellLevel
- type DLG
- type DlgState
- type DlgTransition
- func (trans *DlgTransition) AddCompleteQuest() bool
- func (trans *DlgTransition) AddQuest() bool
- func (trans *DlgTransition) HasAction() bool
- func (trans *DlgTransition) HasJournal() bool
- func (trans *DlgTransition) HasText() bool
- func (trans *DlgTransition) HasTrigger() bool
- func (trans *DlgTransition) RemoveQuest() bool
- func (trans *DlgTransition) TerminatesDialog() bool
- type DynamicFlagsJson
- type EffEffect
- type EffHeader
- type ErrSyntax
- type File
- type IDS
- type ITM
- type ItmEffect
- type ItmHeader
- type JsonWed
- func (jw *JsonWed) Export(name string, dir string) error
- func (jw *JsonWed) GenerateWallPolys() ([]wedPolygon, []wedVertex, []uint16, []wedWallGroup)
- func (jw *JsonWed) ImportDoors(wed *Wed)
- func (jw *JsonWed) ImportOverlays(wed *Wed) error
- func (jw *JsonWed) ImportWalls(wed *Wed)
- func (jw *JsonWed) ToJson() (string, error)
- func (jw *JsonWed) ToWed() (*Wed, error)
- type KEY
- func (key *KEY) Explode(dir string) error
- func (key *KEY) ExtToType(ext string) int
- func (key *KEY) GetBifId(bifPath string) int
- func (key *KEY) GetBifPath(bifId uint32) (string, error)
- func (key *KEY) GetFilesByType(ext int) []string
- func (key *KEY) GetResourceName(biffId uint32, resourceId uint32) (string, error)
- func (key *KEY) OpenFile(name string) ([]byte, error)
- func (key *KEY) Print()
- func (key *KEY) TypeToExt(ext uint16) string
- func (key *KEY) Validate() error
- type Log
- type LongString
- type MedianCutQuantizer
- type Resref
- type SPL
- type STO
- type Section
- type Signature
- type SplAbility
- type SplHeader
- type StoCures
- type StoDrinks
- type StoHeader
- type StoItemTypes
- type StoItems
- type SvgFile
- type SvgGroup
- type TLK
- func (t *TLK) AddString(stringId int, str string, sound string)
- func (t *TLK) ConvertToUTF8(w io.WriteSeeker) error
- func (t *TLK) Entry(stringId int) (*tlkEntry, error)
- func (t *TLK) GetStringCount() int
- func (t *TLK) SetCodepage(codepage string)
- func (t *TLK) String(stringId int) (string, error)
- func (t *TLK) Write(w io.WriteSeeker) error
- func (t *TLK) WriteJson(w io.WriteSeeker) error
- type Tis
- type TlkJson
- type Version
- type Wed
Constants ¶
const ( BUTTON_FLAGS_LEFTALIGN = 0x01 BUTTON_FLAGS_RIGHTALIGN = 0x02 BUTTON_FLAGS_TOPALIGN = 0x04 BUTTON_FLAGS_BOTTOMALIGN = 0x08 BUTTON_FLAGS_USEREFPT = 0x10 BUTTON_FLAGS_LOWERCASELABEL = 0x20 BUTTON_FLAGS_NOWORDWRAP = 0x40 )
const ( IDS_UNKNOWN = iota IDS_OBJECT IDS_ACTION IDS_STRING IDS_POINT IDS_INT )
const ( TEXT_PRESENT = 1 SOUND_PRESENT = 2 TOKEN_PRESENT = 4 )
const BLK_X_2BPP uint32 = 8 // dimensions for the two formats
const BLK_X_4BPP uint32 = 4
const BLK_X_MAX uint32 = 8 // Max X dimension for blocks
const BLK_Y_SIZE uint32 = 4 // always 4 for all 2D block types
const DXT_MIN_TEXHEIGHT uint32 = 4
const DXT_MIN_TEXWIDTH uint32 = 4
const ETC_MIN_TEXHEIGHT uint32 = 4
const ETC_MIN_TEXWIDTH uint32 = 4
const (
NUM_ATTACK_TYPES = 6
)
const PT_INDEX uint32 = 2 // The Punch-through index
****************************************************************************
- defines and consts ****************************************************************************
const PVRTC2_MIN_TEXHEIGHT uint32 = 8
const PVRTC2_MIN_TEXWIDTH uint32 = 16
const PVRTC4_MIN_TEXHEIGHT uint32 = 8
const PVRTC4_MIN_TEXWIDTH uint32 = 8
const PVRTEX_ALPHA uint32 = (1 << 15) // v2.1 is there transparency info in the texture
const PVRTEX_BUMPMAP uint32 = (1 << 10) // has normals encoded for a bump map
const PVRTEX_CUBEMAP uint32 = (1 << 12) // is a cubemap/skybox
const PVRTEX_FALSEMIPCOL uint32 = (1 << 13) // are there false coloured MIP levels
const PVRTEX_IDENTIFIER uint32 = 0x21525650 // the pvr identifier is the characters 'P','V','R'
const PVRTEX_MIPMAP uint32 = (1 << 8) // has mip map levels
const PVRTEX_PIXELTYPE uint32 = 0xff // pixel type is always in the last 16bits of the flags
const PVRTEX_TILING uint32 = (1 << 11) // is bordered for tiled pvr
const PVRTEX_TWIDDLE uint32 = (1 << 9) // is twiddled
const PVRTEX_V1_HEADER_SIZE uint32 = 44 // old header size was 44 for identification purposes
const PVRTEX_VERTICAL_FLIP uint32 = (1 << 16) // v2.1 is the texture vertically flipped
const PVRTEX_VOLUME uint32 = (1 << 14) // is this a volume texture
Variables ¶
var DisableTwiddlingRoutine int = 0
!***********************************************************************
@Function TwiddleUV @Input YSize Y dimension of the texture in pixels @Input XSize X dimension of the texture in pixels @Input YPos Pixel Y position @Input XPos Pixel X position @Returns The twiddled offset of the pixel @Description Given the Block (or pixel) coordinates and the dimension of the texture in blocks (or pixels) this returns the twiddled offset of the block (or pixel) from the start of the map. NOTE the dimensions of the texture must be a power of 2
************************************************************************
Functions ¶
func ConvertToBIFL ¶
func ConvertToBIFL(r io.ReadSeeker, w io.WriteSeeker) error
func Decompress ¶
func Decompress(pCompressedData []uint32, Do2bitMode bool, XDim uint32, YDim uint32, AssumeImageTiles bool, pResultImage []uint8)
!***********************************************************************
@Function Decompress @Input pCompressedData The PVRTC texture data to decompress @Input Do2BitMode Signifies whether the data is PVRTC2 or PVRTC4 @Input XDim X dimension of the texture @Input YDim Y dimension of the texture @Input AssumeImageTiles Assume the texture data tiles @Modified pResultImage The decompressed texture data @Description Decompresses PVRTC to RGBA 8888
************************************************************************
func GetModulationValue ¶
func GetModulationValue(x uint32, y uint32, Do2bitMode bool, ModulationVals [8][16]uint32, ModulationModes [8][16]uint32, Mod *uint32, DoPT *uint32)
!***********************************************************************
@Function GetModulationValue @Input x @Input y @Input Do2bitMode @Input ModulationVals @Input ModulationModes @Input Mod @Input DoPT @Description Get the modulation value as a numerator of a fraction of 8ths
************************************************************************
func InterpolateColours ¶
func InterpolateColours(ColourP [4]uint32, ColourQ [4]uint32, ColourR [4]uint32, ColourS [4]uint32, Do2bitMode bool, x uint32, y uint32, Result *[4]uint32)
!***********************************************************************
@Function InterpolateColours @Input ColourP @Input ColourQ @Input ColourR @Input ColourS @Input Do2bitMode @Input x @Input y @Modified Result @Description This performs a HW bit accurate interpolation of either the A or B colours for a particular pixel. NOTE: It is assumed that the source colours are in ARGB 5554 format - This means that some "preparation" of the values will be necessary.
************************************************************************
func LIMIT_COORD ¶
func NewPVRTexture ¶
func NewPVRTexture(r io.ReadSeeker) (*tisPvrTexture, error)
func NewPathScanner ¶
func RepackageBiff ¶
func RepackageBiff(keyFile io.ReadSeeker, bifIn io.ReadSeeker, filesPath string, bifOutPath string) error
func Unpack5554Colour ¶
!***********************************************************************
@Function Unpack5554Colour @Input pBlock @Input ABColours @Description Given a block, extract the colour information and convert to 5554 formats
************************************************************************
func UnpackModulations ¶
func UnpackModulations(pBlock []uint32, Do2bitMode bool, ModulationVals *[8][16]uint32, ModulationModes *[8][16]uint32, StartX uint32, StartY uint32)
!***********************************************************************
@Function UnpackModulations @Input pBlock @Input Do2bitMode @Input ModulationVals @Input ModulationModes @Input StartX @Input StartY @Description Given the block and the texture type and it's relative position in the 2x2 group of blocks, extract the bit patterns for the fully defined pixels.
************************************************************************
Types ¶
type Area ¶
type Area struct {
AreaHeader
Actors []AreaActor `json:"actors"`
Regions []AreaRegion `json:"regions"`
SpawnPoints []AreaSpawnPoint `json:"spawn_points"`
Entrances []AreaEntrance `json:"entrances"`
Containers []AreaContainer `json:"containers"`
Items []AreaItem `json:"items"`
Vertices []AreaVertex `json:"vertices"`
Ambients []AreaAmbient `json:"ambients"`
Variables []AreaVariable `json:"variables"`
ExploredBitmasks []byte `json:"explored_bitmasks"`
Doors []AreaDoor `json:"doors"`
Animations []AreaAnimation `json:"animations"`
MapNotes []AreaMapNote `json:"map_notes"`
TiledObjects []AreaTiledObject `json:"tiled_objects"`
Traps []AreaProjectileTrap `json:"traps"`
Songs AreaSong `json:"songs"`
RestInterruptions AreaRestEncounter `json:"rest_interruptions"`
Filename string `json:"-"`
}
type AreaActor ¶
type AreaActor struct {
Name LongString `json:"name"`
CurrentX uint16 `json:"current_x"`
CurrentY uint16 `json:"current_y"`
DestX uint16 `json:"dest_x"`
DestY uint16 `json:"dest_y"`
Flags uint32 `json:"flags"`
Type uint16 `json:"type"`
FirstResSlot byte `json:"first_res_slot"`
AlignByte byte `json:"align_byte"`
AnimationType uint32 `json:"animation_type"`
Facing uint16 `json:"facing"`
AlignWord uint16 `json:"align_word"`
ExpirationTime uint32 `json:"expiration_time"`
HuntingRange uint16 `json:"hunting_range"`
FollowRange uint16 `json:"follow_range"`
TimeOfDayVisible uint32 `json:"time_of_day_visible"`
NumberTimesTalkedTo uint32 `json:"number_times_talked_to"`
Dialog Resref `json:"dialog"`
OverrideScript Resref `json:"override_script"`
GeneralScript Resref `json:"general_script"`
ClassScript Resref `json:"class_script"`
RaceScript Resref `json:"race_script"`
DefaultScript Resref `json:"default_script"`
SpecificScript Resref `json:"specific_script"`
CreatureData Resref `json:"creature_data"`
CreatureOffset uint32 `json:"creature_offset"`
CreatureSize uint32 `json:"creature_size"`
Unused [32]uint32 `json:"unused"`
}
type AreaAmbient ¶
type AreaAmbient struct {
Name LongString `json:"name"`
CoordinateX uint16 `json:"coordinate_x"`
CoordinateY uint16 `json:"coordinate_y"`
Range uint16 `json:"range"`
Alignment1 uint16 `json:"alignment1"`
PitchVariance uint32 `json:"pitch_variance"`
VolumeVariance uint16 `json:"volume_variance"`
Volume uint16 `json:"volume"`
Sounds [10]Resref `json:"sounds"`
SoundCount uint16 `json:"sound_count"`
Alignment2 uint16 `json:"alignment2"`
Period uint32 `json:"period"`
PeriodVariance uint32 `json:"period_variance"`
TimeOfDayActive uint32 `json:"time_of_day_active"`
Flags uint32 `json:"flags"`
Unused [16]uint32 `json:"unused"`
}
type AreaAnimation ¶
type AreaAnimation struct {
Name LongString `json:"name"`
CoordX uint16 `json:"coord_x"`
CoordY uint16 `json:"coord_y"`
TimeOfDayVisible uint32 `json:"time_of_day_visible"`
Animation Resref `json:"animation"`
BamSequence uint16 `json:"bam_sequence"`
BamFrame uint16 `json:"bam_frame"`
Flags uint32 `json:"flags"`
Height int16 `json:"height"`
Translucency uint16 `json:"translucency"`
StartFrameRane uint16 `json:"start_frame_rane"`
Probability byte `json:"probability"`
Period byte `json:"period"`
Palette Resref `json:"palette"`
Unused uint32 `json:"unused"`
}
type AreaContainer ¶
type AreaContainer struct {
Name LongString `json:"name"`
CoordX uint16 `json:"coord_x"`
CoordY uint16 `json:"coord_y"`
Type uint16 `json:"type"`
LockDifficulty uint16 `json:"lock_difficulty"`
Flags uint32 `json:"flags"`
TrapDetectionDifficulty uint16 `json:"trap_detection_difficulty"`
TrapRemovalDifficulty uint16 `json:"trap_removal_difficulty"`
ContainerTrapped uint16 `json:"container_trapped"`
TrapDetected uint16 `json:"trap_detected"`
TrapLaunchX uint16 `json:"trap_launch_x"`
TrapLaunchY uint16 `json:"trap_launch_y"`
BoundingTopLeft uint16 `json:"bounding_top_left"`
BoundingTopRight uint16 `json:"bounding_top_right"`
BoundingBottomRight uint16 `json:"bounding_bottom_right"`
BoundingBottomLeft uint16 `json:"bounding_bottom_left"`
ItemOffset uint32 `json:"item_offset"`
ItemCount uint32 `json:"item_count"`
TrapScript Resref `json:"trap_script"`
VertexOffset uint32 `json:"vertex_offset"`
VertexCount uint16 `json:"vertex_count"`
TriggerRange uint16 `json:"trigger_range"`
OwnedBy LongString `json:"owned_by"`
KeyType Resref `json:"key_type"`
BreakDifficulty uint32 `json:"break_difficulty"`
NotPickableString uint32 `json:"not_pickable_string"`
Unused [14]uint32 `json:"unused"`
}
type AreaDoor ¶
type AreaDoor struct {
Name LongString `json:"name"`
DoorID Resref `json:"door_id"`
Flags uint32 `json:"flags"`
OpenDoorVertexOffset uint32 `json:"open_door_vertex_offset"`
OpenDoorVertexCount uint16 `json:"open_door_vertex_count"`
ClosedDoorVertexCount uint16 `json:"closed_door_vertex_count"`
CloseDoorVertexOffset uint32 `json:"close_door_vertex_offset"`
OpenBoundingLeft uint16 `json:"open_bounding_left"`
OpenBoundingTop uint16 `json:"open_bounding_top"`
OpenBoundingRight uint16 `json:"open_bounding_right"`
OpenBoundingBottom uint16 `json:"open_bounding_bottom"`
ClosedBoundingLeft uint16 `json:"closed_bounding_left"`
ClosedBoundingTop uint16 `json:"closed_bounding_top"`
ClosedBoundingRight uint16 `json:"closed_bounding_right"`
ClosedBoundingBottom uint16 `json:"closed_bounding_bottom"`
OpenBlockVertexOffset uint32 `json:"open_block_vertex_offset"`
OpenBlockVertexCount uint16 `json:"open_block_vertex_count"`
ClosedBlockVertexCount uint16 `json:"closed_block_vertex_count"`
ClosedBlockVertexOffset uint32 `json:"closed_block_vertex_offset"`
HitPoints uint16 `json:"hit_points"`
ArmorClass uint16 `json:"armor_class"`
OpenSound Resref `json:"open_sound"`
ClosedSound Resref `json:"closed_sound"`
CursorType uint32 `json:"cursor_type"`
TrapDetectionDifficulty uint16 `json:"trap_detection_difficulty"`
TrapRemovalDifficulty uint16 `json:"trap_removal_difficulty"`
DoorIsTrapped uint16 `json:"door_is_trapped"`
TrapDetected uint16 `json:"trap_detected"`
TrapLaunchTargetX uint16 `json:"trap_launch_target_x"`
TrapLaunchTargetY uint16 `json:"trap_launch_target_y"`
KeyItem Resref `json:"key_item"`
DoorScript Resref `json:"door_script"`
DetectionDifficulty uint32 `json:"detection_difficulty"`
LockDifficulty uint32 `json:"lock_difficulty"`
WalkToX1 uint16 `json:"walk_to_x1"`
WalkToY1 uint16 `json:"walk_to_y1"`
WalkToX2 uint16 `json:"walk_to_x2"`
WalkToY2 uint16 `json:"walk_to_y2"`
NotPickableString uint32 `json:"not_pickable_string"`
TriggerName LongString `json:"trigger_name"`
Unused [3]uint32 `json:"unused"`
}
type AreaEntrance ¶
type AreaEntrance struct {
Name LongString `json:"name"`
CoordX uint16 `json:"coord_x"`
CoordY uint16 `json:"coord_y"`
Orientation uint16 `json:"orientation"`
Unused [66]byte `json:"unused"`
}
type AreaHeader ¶
type AreaHeader struct {
Signature Signature `json:"signature"`
Version Version `json:"version"`
AreaWed Resref `json:"area_wed"`
LastSaved uint32 `json:"last_saved"`
AreaFlags uint32 `json:"area_flags"`
AreaNorth Resref `json:"area_north"`
AreaNorthFlags uint32 `json:"area_north_flags"`
AreaEast Resref `json:"area_east"`
AreaEastFlags uint32 `json:"area_east_flags"`
AreaSouth Resref `json:"area_south"`
AreaSouthFlags uint32 `json:"area_south_flags"`
AreaWest Resref `json:"area_west"`
AreaWestFlags uint32 `json:"area_west_flags"`
Areatype uint16 `json:"areatype"`
Rainprobability uint16 `json:"rainprobability"`
SnowProability uint16 `json:"snow_proability"`
FogProbability uint16 `json:"fog_probability"`
LightningProbability uint16 `json:"lightning_probability"`
WindSpeed uint16 `json:"wind_speed"`
ActorsOffset uint32 `json:"actors_offset"`
ActorsCount uint16 `json:"actors_count"`
RegionCount uint16 `json:"region_count"`
RegionOffset uint32 `json:"region_offset"`
SpawnPointOffset uint32 `json:"spawn_point_offset"`
SpawnPointCount uint32 `json:"spawn_point_count"`
EntranceOffset uint32 `json:"entrance_offset"`
EntranceCount uint32 `json:"entrance_count"`
ContainerOffset uint32 `json:"container_offset"`
ContainerCount uint16 `json:"container_count"`
ItemCount uint16 `json:"item_count"`
ItemOffset uint32 `json:"item_offset"`
VertexOffset uint32 `json:"vertex_offset"`
VertexCount uint16 `json:"vertex_count"`
AmbientCount uint16 `json:"ambient_count"`
AmbientOffset uint32 `json:"ambient_offset"`
VariableOffset uint32 `json:"variable_offset"`
VariableCount uint32 `json:"variable_count"`
TiledObjectFlagOffset uint16 `json:"tiled_object_flag_offset"`
TiledObjectFlagCount uint16 `json:"tiled_object_flag_count"`
Script Resref `json:"script"`
ExploredSize uint32 `json:"explored_size"`
ExploredOffset uint32 `json:"explored_offset"`
DoorsCount uint32 `json:"doors_count"`
DoorsOffset uint32 `json:"doors_offset"`
AnimationCount uint32 `json:"animation_count"`
AnimationOffset uint32 `json:"animation_offset"`
TiledObjectCount uint32 `json:"tiled_object_count"`
TiledObjectOffset uint32 `json:"tiled_object_offset"`
SongEntriesOffset uint32 `json:"song_entries_offset"`
RestInterruptionsOffset uint32 `json:"rest_interruptions_offset"`
AutomapOffset uint32 `json:"automap_offset"`
AutomapCount uint32 `json:"automap_count"`
ProjectileTrapsOffset uint32 `json:"projectile_traps_offset"`
ProjectileTrapsCount uint32 `json:"projectile_traps_count"`
RestMovieDay Resref `json:"rest_movie_day"`
RestMovieNight Resref `json:"rest_movie_night"`
Unknown [56]byte `json:"unknown"`
}
type AreaMapNote ¶
type AreaProjectileTrap ¶
type AreaProjectileTrap struct {
Projectile Resref `json:"projectile"`
EffectBlockOffset uint32 `json:"effect_block_offset"`
EffectBlockSize uint16 `json:"effect_block_size"`
MissileId uint16 `json:"missile_id"`
DelayCount uint16 `json:"delay_count"`
RepetitionCount uint16 `json:"repetition_count"`
CoordX uint16 `json:"coord_x"`
CoordY uint16 `json:"coord_y"`
CoordZ uint16 `json:"coord_z"`
TargetType byte `json:"target_type"`
PortraitNum byte `json:"portrait_num"`
}
type AreaRegion ¶
type AreaRegion struct {
Name LongString `json:"name"`
Type uint16 `json:"type"`
BoundingLeft uint16 `json:"bounding_left"`
BoundingTop uint16 `json:"bounding_top"`
BoundingRight uint16 `json:"bounding_right"`
BoundingBottom uint16 `json:"bounding_bottom"`
VertexCount uint16 `json:"vertex_count"`
VertexOffset uint32 `json:"vertex_offset"`
TriggerValue uint32 `json:"trigger_value"`
CursorType uint32 `json:"cursor_type"`
Destination Resref `json:"destination"`
EntranceName LongString `json:"entrance_name"`
Flags uint32 `json:"flags"`
InformationText uint32 `json:"information_text"`
TrapDetectionDifficulty uint16 `json:"trap_detection_difficulty"`
TrapDisarmingDifficulty uint16 `json:"trap_disarming_difficulty"`
TrapActivated uint16 `json:"trap_activated"`
TrapDetected uint16 `json:"trap_detected"`
TrapOriginX uint16 `json:"trap_origin_x"`
TrapOriginY uint16 `json:"trap_origin_y"`
KeyItem Resref `json:"key_item"`
RegionScript Resref `json:"region_script"`
TransitionWalkToX uint16 `json:"transition_walk_to_x"`
TransitionWalkToY uint16 `json:"transition_walk_to_y"`
Unused [15]uint32 `json:"unused"`
}
type AreaRestEncounter ¶
type AreaRestEncounter struct {
Name LongString `json:"name"`
RandomCreatureString [10]strref `json:"random_creature_string"`
RandomCreature [10]Resref `json:"random_creature"`
RandomCreatureNum uint16 `json:"random_creature_num"`
Difficulty uint16 `json:"difficulty"`
LifeSpan uint32 `json:"life_span"`
HuntingRange uint16 `json:"hunting_range"`
FollowRange uint16 `json:"follow_range"`
MaxTypeNum uint16 `json:"max_type_num"`
Activated uint16 `json:"activated"`
ProbabilityDay uint16 `json:"probability_day"`
ProbabilityNight uint16 `json:"probability_night"`
Unused [56]uint8 `json:"unused"`
}
type AreaSong ¶
type AreaSong struct {
DaySong uint32 `json:"day_song"`
NightSong uint32 `json:"night_song"`
WinSong uint32 `json:"win_song"`
BattleSong uint32 `json:"battle_song"`
LoseSong uint32 `json:"lose_song"`
AltMusic0 uint32 `json:"alt_music0"`
AltMusic1 uint32 `json:"alt_music1"`
AltMusic2 uint32 `json:"alt_music2"`
AltMusic3 uint32 `json:"alt_music3"`
AltMusic4 uint32 `json:"alt_music4"`
DayAmbient Resref `json:"day_ambient"`
DayAmbientExtended Resref `json:"day_ambient_extended"`
DayAmbientVolume uint32 `json:"day_ambient_volume"`
NightAmbient Resref `json:"night_ambient"`
NightAmbientExtended Resref `json:"night_ambient_extended"`
NightAmbientVolume uint32 `json:"night_ambient_volume"`
Unused [16]uint32 `json:"unused"`
}
type AreaSpawnPoint ¶
type AreaSpawnPoint struct {
Name LongString `json:"name"`
CoordX uint16 `json:"coord_x"`
CoordY uint16 `json:"coord_y"`
RandomCreatures [10]Resref `json:"random_creatures"`
RandomCreatureCount uint16 `json:"random_creature_count"`
Difficulty uint16 `json:"difficulty"`
SpawnRate uint16 `json:"spawn_rate"`
Flags uint16 `json:"flags"`
LifeSpan uint32 `json:"life_span"`
HuntingRange uint32 `json:"hunting_range"`
FollowRange uint32 `json:"follow_range"`
MaxTypeNum uint32 `json:"max_type_num"`
Activated uint16 `json:"activated"`
TimeOfDay uint32 `json:"time_of_day"`
ProbabilityDay uint16 `json:"probability_day"`
ProbabilityNight uint16 `json:"probability_night"`
Unused [14]uint32 `json:"unused"`
}
type AreaTiledObject ¶
type AreaTiledObject struct {
Name LongString `json:"name"`
TileID Resref `json:"tile_id"`
Flags uint32 `json:"flags"`
PrimarySearchSquareStart uint32 `json:"primary_search_square_start"`
PrimarySearchSquareCount uint16 `json:"primary_search_square_count"`
SecondarySearchSquareCount uint16 `json:"secondary_search_square_count"`
SecondarySearcHSquareStart uint32 `json:"secondary_searc_h_square_start"`
Unused [12]uint32 `json:"unused"`
}
type AreaVariable ¶
type AreaVariable struct {
Name LongString `json:"name"`
Type uint16 `json:"type"`
ResRefType uint16 `json:"res_ref_type"`
DWValue uint32 `json:"dw_value"`
IntValue int32 `json:"int_value"`
FloatValue float64 `json:"float_value"`
ScriptName LongString `json:"script_name"`
}
type AreaVertex ¶
type AreaVertex struct {
Coordinate uint16 `json:"coordinate"`
}
type BIF ¶
type BIF struct {
VariableEntries []bifVarEntry
FixedEntries []bifFixedEntry
// contains filtered or unexported fields
}
type Bam ¶
type Bam struct {
Image []image.Paletted
ImageRgba []image.RGBA
Sequences []BamSequence
SequenceToImage []int16
Width int
Height int
Frames []BamFrame
RleFrame [][]uint8
Palette color.Palette
}
func MakeBamFromGif ¶
func (*Bam) ExpandAndCenterImages ¶
func (bam *Bam) ExpandAndCenterImages()
func (*Bam) MakeSpriteSheet ¶
func (*Bam) RebuildSequencesAndDropFrames ¶
func (bam *Bam) RebuildSequencesAndDropFrames()
type BamCHeader ¶
type BamFrameV2 ¶
type BamHeaderV2 ¶
type BamMosaicQuad ¶
type BamSequence ¶
type CHU ¶
type CHU struct {
Name string
Header chuHeader
Panels []chuPanel
Controls []chuControl
// contains filtered or unexported fields
}
func (*CHU) OffsetStrings ¶
func (chu *CHU) OffsetStrings()
func (*CHU) PrintResources ¶
func (chu *CHU) PrintResources()
type CRE ¶
type CRE struct {
CreHeader
KnownSpells []CreKnownSpell `json:"known_spells"`
MemorizedSpellLevels []CreMemorizedSpellLevel `json:"memorized_spell_levels"`
MemorizedSpells []CreMemorizedSpell `json:"memorized_spells"`
Effects []ItmEffect `json:"effects"`
Effectsv2 []EffEffect `json:"effectsv2"`
Items []CreItem `json:"item_table"`
ItemSlots CreEquipment `json:"item_slots"`
Filename string `json:"-"`
}
type CreEquipment ¶ added in v0.7.0
type CreEquipment struct {
Helmet uint16 `json:"helmet"`
Armor uint16 `json:"armor"`
Shield uint16 `json:"shield"`
Gloves uint16 `json:"gloves"`
LeftRing uint16 `json:"left_ring"`
RightRing uint16 `json:"right_ring"`
Amulet uint16 `json:"amulet"`
Belt uint16 `json:"belt"`
Boots uint16 `json:"boots"`
Weapon1 uint16 `json:"weapon_1"`
Weapon2 uint16 `json:"weapon_2"`
Weapon3 uint16 `json:"weapon_3"`
Weapon4 uint16 `json:"weapon_4"`
Quiver1 uint16 `json:"quiver_1"`
Quiver2 uint16 `json:"quiver_2"`
Quiver3 uint16 `json:"quiver_3"`
Quiver4 uint16 `json:"quiver_4"`
Cloak uint16 `json:"cloak"`
QuickItem1 uint16 `json:"quick_item_1"`
QuickItem2 uint16 `json:"quick_item_2"`
QuickItem3 uint16 `json:"quick_item_3"`
InventoryItem1 uint16 `json:"inventory_item_1"`
InventoryItem2 uint16 `json:"inventory_item_2"`
InventoryItem3 uint16 `json:"inventory_item_3"`
InventoryItem4 uint16 `json:"inventory_item_4"`
InventoryItem5 uint16 `json:"inventory_item_5"`
InventoryItem6 uint16 `json:"inventory_item_6"`
InventoryItem7 uint16 `json:"inventory_item_7"`
InventoryItem8 uint16 `json:"inventory_item_8"`
InventoryItem9 uint16 `json:"inventory_item_9"`
InventoryItem10 uint16 `json:"inventory_item_10"`
InventoryItem11 uint16 `json:"inventory_item_11"`
InventoryItem12 uint16 `json:"inventory_item_12"`
InventoryItem13 uint16 `json:"inventory_item_13"`
InventoryItem14 uint16 `json:"inventory_item_14"`
InventoryItem15 uint16 `json:"inventory_item_15"`
InventoryItem16 uint16 `json:"inventory_item_16"`
MagicWeapon uint16 `json:"magic_weapon"`
SelectedWeapon uint16 `json:"selected_weapon"`
SelectedWeaponAbility uint16 `json:"selected_weapon_ability"`
}
type CreHeader ¶ added in v0.7.0
type CreHeader struct {
Signature Signature `json:"signature"`
Version Version `json:"version"`
LongName strref `json:"long_name"`
ShortName strref `json:"short_name"`
Flags uint32 `json:"flags"`
XPValue uint32 `json:"xp_value"`
XP uint32 `json:"xp"`
Gold uint32 `json:"gold"`
PermanentStatusFlags uint32 `json:"permanent_status_flags"`
HitPoints uint16 `json:"hit_points"`
MaxHitPointsBase uint16 `json:"max_hit_points_base"`
AnimationType uint32 `json:"animation_type"`
MetalColor uint8 `json:"metal_color"`
MinorColor uint8 `json:"minor_color"`
MajorColor uint8 `json:"major_color"`
SkinColor uint8 `json:"skin_color"`
LeatherColor uint8 `json:"leather_color"`
ArmorColor uint8 `json:"armor_color"`
HairColor uint8 `json:"hair_color"`
EffStructureVersion uint8 `json:"eff_structure_version"`
SmallPortrait Resref `json:"small_portrait"`
LargePortrait Resref `json:"large_portrait"`
Reputation int8 `json:"reputation"`
HideInShadowsBase uint8 `json:"hide_in_shadows_base"`
ArmorClass int16 `json:"armor_class"`
ArmorClassBase int16 `json:"armor_class_base"`
ArmorClassCurshingAdjustment int16 `json:"armor_class_curshing_adjustment"`
ArmorClassMissileAdjustment int16 `json:"armor_class_missile_adjustment"`
ArmorClassPiercingAdjustment int16 `json:"armor_class_piercing_adjustment"`
ArmorClassSlashingAdjustment int16 `json:"armor_class_slashing_adjustment"`
Thac0 int8 `json:"thac0"`
NumberOfAttacksBase uint8 `json:"number_of_attacks_base"`
SaveVsDeathBase uint8 `json:"save_vs_death_base"`
SaveVsWandsBase uint8 `json:"save_vs_wands_base"`
SaveVsPolyBase uint8 `json:"save_vs_poly_base"`
SaveVsBreathBase uint8 `json:"save_vs_breath_base"`
SaveVsSpellBase uint8 `json:"save_vs_spell_base"`
ResistFireBase int8 `json:"resist_fire_base"`
ResistColdBase int8 `json:"resist_cold_base"`
ResistElectricityBase int8 `json:"resist_electricity_base"`
ResistAcidBase int8 `json:"resist_acid_base"`
ResistMagicBase int8 `json:"resist_magic_base"`
ResistMagicFireBase int8 `json:"resist_magic_fire_base"`
ResistMagicColdBase int8 `json:"resist_magic_cold_base"`
ResistSlashingBase int8 `json:"resist_slashing_base"`
ResistCrushingBase int8 `json:"resist_crushing_base"`
ResistPiercingBase int8 `json:"resist_piercing_base"`
ResistMissileBase int8 `json:"resist_missile_base"`
DetectIllusionBase uint8 `json:"detect_illusion_base"`
SetTrapsBase uint8 `json:"set_traps_base"`
LoreBase uint8 `json:"lore_base"`
LockPickingBase uint8 `json:"lock_picking_base"`
MoveSilentlyBase uint8 `json:"move_silently_base"`
FindTrapsBase uint8 `json:"find_traps_base"`
PickPocketBase uint8 `json:"pick_pocket_base"`
Fatigue uint8 `json:"fatigue"`
Intoxication uint8 `json:"intoxication"`
LuckBase int8 `json:"luck_base"`
ProficiencyLargeSwords uint8 `json:"proficiency_large_swords"`
ProficiencySmallSwords uint8 `json:"proficiency_small_swords"`
ProficiencyBows uint8 `json:"proficiency_bows"`
ProficiencySpears uint8 `json:"proficiency_spears"`
ProficiencyBlunt uint8 `json:"proficiency_blunt"`
ProficiencySpiked uint8 `json:"proficiency_spiked"`
ProficiencyAxes uint8 `json:"proficiency_axes"`
ProficiencyMissiles uint8 `json:"proficiency_missiles"`
UnusedProficiencies [7]uint8 `json:"unused_proficiencies"`
NightmareMode uint8 `json:"nightmare_mode"`
Translucency uint8 `json:"translucency"`
ReputationLossIfKilled uint8 `json:"reputation_loss_if_killed"`
ReputationLossIfJoinsParty uint8 `json:"reputation_loss_if_joins_party"`
ReputationLossIfLeavesParty uint8 `json:"reputation_loss_if_leaves_party"`
UndeadLevel uint8 `json:"undead_level"`
TrackingBase uint8 `json:"tracking_base"`
TrackingTarget LongString `json:"tracking_target"`
Strrefs [100]strref `json:"strrefs"`
LevelFirstClass uint8 `json:"level_first_class"`
LevelSecondClass uint8 `json:"level_second_class"`
LevelThirdClass uint8 `json:"level_third_class"`
Sex uint8 `json:"sex"`
Strength uint8 `json:"strength"`
StrengthBonus uint8 `json:"strength_bonus"`
Intelligence uint8 `json:"intelligence"`
Wisdom uint8 `json:"wisdom"`
Dexterity uint8 `json:"dexterity"`
Constitution uint8 `json:"constitution"`
Charisma uint8 `json:"charisma"`
Morale uint8 `json:"morale"`
MoraleBreak uint8 `json:"morale_break"`
RacialEnemy uint8 `json:"racial_enemy"`
MoraleRecoveryTime uint16 `json:"morale_recovery_time"`
Kit uint32 `json:"kit"`
OverrideScript Resref `json:"override_script"`
ClassScript Resref `json:"class_script"`
RaceScript Resref `json:"race_script"`
GeneralScript Resref `json:"general_script"`
DefaultScript Resref `json:"default_script"`
EnemyAlly uint8 `json:"enemy_ally"`
General uint8 `json:"general"`
Race uint8 `json:"race"`
Class uint8 `json:"class"`
Specific uint8 `json:"specific"`
Gender uint8 `json:"gender"`
ObjectReferences [5]uint8 `json:"object_references"`
Alignment uint8 `json:"alignment"`
GlobalActorEnumeration uint16 `json:"global_actor_enumeration"`
LocalActorEnumeration uint16 `json:"local_actor_enumeration"`
DeathVariable LongString `json:"death_variable"`
KnownSpellListOffset uint32 `json:"known_spell_list_offset"`
KnownSpellListCount uint32 `json:"known_spell_list_count"`
MemorizationLevelListOffset uint32 `json:"memorization_level_list_offset"`
MemorizationLevelListCount uint32 `json:"memorization_level_list_count"`
MemorizationSpellListOffset uint32 `json:"memorization_spell_list_offset"`
MemorizationSpellListCount uint32 `json:"memorization_spell_list_count"`
EquipmentListOffset uint32 `json:"equipment_list_offset"`
ItemListOffset uint32 `json:"item_list_offset"`
ItemListCount uint32 `json:"item_list_count"`
EffectListOffset uint32 `json:"effect_list_offset"`
EffectListCount uint32 `json:"effect_list_count"`
Dialog Resref `json:"dialog"`
}
type CreItem ¶ added in v0.7.0
type CreItem struct {
CreItemHeader
Flags uint32 `json:"flags"`
}
func (*CreItem) MarshalJSON ¶ added in v0.7.0
func (*CreItem) UnmarshalJSON ¶ added in v0.7.0
type CreItemHeader ¶ added in v0.7.0
type CreKnownSpell ¶ added in v0.7.0
type CreMemorizedSpell ¶ added in v0.7.0
type CreMemorizedSpellLevel ¶ added in v0.7.0
type DLG ¶
type DLG struct {
States []DlgState
Transitions []DlgTransition
StateTriggers []string
TransitionTriggers []string
Actions []string
// contains filtered or unexported fields
}
type DlgTransition ¶
type DlgTransition struct {
Flags uint32
TransitionText uint32
JournalText uint32
TransitionTriggerIndex uint32
TransitionActionIndex uint32
NextDlg Resref
NextState uint32
}
func (*DlgTransition) AddCompleteQuest ¶
func (trans *DlgTransition) AddCompleteQuest() bool
func (*DlgTransition) AddQuest ¶
func (trans *DlgTransition) AddQuest() bool
func (*DlgTransition) HasAction ¶
func (trans *DlgTransition) HasAction() bool
func (*DlgTransition) HasJournal ¶
func (trans *DlgTransition) HasJournal() bool
func (*DlgTransition) HasText ¶
func (trans *DlgTransition) HasText() bool
func (*DlgTransition) HasTrigger ¶
func (trans *DlgTransition) HasTrigger() bool
func (*DlgTransition) RemoveQuest ¶
func (trans *DlgTransition) RemoveQuest() bool
func (*DlgTransition) TerminatesDialog ¶
func (trans *DlgTransition) TerminatesDialog() bool
type DynamicFlagsJson ¶ added in v0.7.0
type EffEffect ¶
type EffEffect struct {
Signature Signature
Version Version
EffectID uint32
TargetType uint32
SpellLevel uint32
EffectAmount int32
DWFlags uint32
DurationType uint32
Duration uint32
ProbabilityUpper uint16
ProbabilityLower uint16
Res [8]byte
NumDice uint32
DiceSize uint32
SavingThrow uint32
SaveMod int32
Special uint32
School uint32
Unknown uint32
MinLevel uint32
MaxLevel uint32
Flags uint32
EffectAmount2 int32
EffectAmount3 int32
EffectAmount4 int32
EffectAmount5 int32
Res2 [8]byte
Res3 [8]byte
SourceX int32
SourceY int32
TargetX int32
TargetY int32
SourceType uint32
SourceRes [8]byte
SourceFlags uint32
ProjectileType uint32
SlotNum int32
ScriptName [32]byte
CasterLevel uint32
FirstCall uint32
SecondaryType uint32
Pad [15]uint32
}
type ErrSyntax ¶
type ErrSyntax struct {
Line int
Source string // The contents of the erroneous line, without leading or trailing whitespace
}
ErrSyntax is returned when there is a syntax error in an INI file.
type File ¶
A File represents a parsed INI file.
func (File) Get ¶
Looks up a value for a key in a section and returns that value, along with a boolean result similar to a map lookup.
type ITM ¶
type ItmEffect ¶
type ItmEffect struct {
EffectID uint16 `json:"effect_id"`
TargetType uint8 `json:"target_type"`
SpellLevel uint8 `json:"spell_level"`
EffectAmount int32 `json:"effect_amount"`
Flags uint32 `json:"flags"`
DurationType uint16 `json:"duration_type"`
Duration uint32 `json:"duration"`
ProbabilityUpper uint8 `json:"probability_upper"`
ProbabilityLower uint8 `json:"probability_lower"`
Res Resref `json:"res"`
NumDice uint32 `json:"num_dice"`
DiceSize uint32 `json:"dice_size"`
SavingThrow uint32 `json:"saving_throw"`
SaveMod int32 `json:"save_mod"`
Special uint32 `json:"special"`
}
type ItmHeader ¶ added in v0.7.0
type ItmHeader struct {
Signature Signature `json:"signature"`
Version Version `json:"version"`
GenericName uint32 `json:"generic_name"`
IdentifiedName uint32 `json:"identified_name"`
UsedUpItemID Resref `json:"used_up_item_id"`
ItemFlags uint32 `json:"item_flags"`
ItemType uint16 `json:"item_type"`
NotUsableBy uint32 `json:"not_usable_by"`
AnimationType uint16 `json:"animation_type"`
MinLevelRequired uint16 `json:"min_level_required"`
MinStrRequired uint16 `json:"min_str_required"`
MinStrBonusRequired uint8 `json:"min_str_bonus_required"`
NotUsableBy2a uint8 `json:"not_usable_by2a"`
MinIntRequired uint8 `json:"min_int_required"`
NotUsableBy2b uint8 `json:"not_usable_by2b"`
MinDexRequired uint8 `json:"min_dex_required"`
NotUsableBy2c uint8 `json:"not_usable_by2c"`
MinWisRequired uint8 `json:"min_wis_required"`
NotUsableBy2d uint8 `json:"not_usable_by2d"`
MinConRequired uint8 `json:"min_con_required"`
ProficiencyType uint8 `json:"proficiency_type"`
MinChrRequired uint16 `json:"min_chr_required"`
BaseValue uint32 `json:"base_value"`
MaxStackable uint16 `json:"max_stackable"`
ItemIcon Resref `json:"item_icon"`
LoreValue uint16 `json:"lore_value"`
GroundIcon Resref `json:"ground_icon"`
BaseWeight uint32 `json:"base_weight"`
GenericDescription uint32 `json:"generic_description"`
IdentifiedDescription uint32 `json:"identified_description"`
DescriptionPicture Resref `json:"description_picture"`
Attributes uint32 `json:"attributes"`
AbilityOffset uint32 `json:"ability_offset"`
AbilityCount uint16 `json:"ability_count"`
EffectsOffset uint32 `json:"effects_offset"`
EquippedStartingEffect uint16 `json:"equipped_starting_effect"`
EquippedEffectCount uint16 `json:"equiped_effect_count"`
}
type JsonWed ¶
type JsonWed struct {
Overlays []jsonWedOverlay
Doors []jsonWedDoor
Walls []jsonWedPolygon `json:"-"`
TileIndices []int `json:"-"`
}
func (*JsonWed) GenerateWallPolys ¶
func (*JsonWed) ImportDoors ¶
func (*JsonWed) ImportOverlays ¶
func (*JsonWed) ImportWalls ¶
type KEY ¶
type KEY struct {
// contains filtered or unexported fields
}
func (*KEY) GetFilesByType ¶
func (*KEY) GetResourceName ¶
type LongString ¶
type LongString [32]byte
func (*LongString) MarshalJSON ¶
func (l *LongString) MarshalJSON() ([]byte, error)
func (*LongString) String ¶
func (l *LongString) String() string
func (*LongString) UnmarshalJSON ¶ added in v0.7.0
func (l *LongString) UnmarshalJSON(b []byte) error
func (*LongString) Valid ¶ added in v0.7.0
func (l *LongString) Valid() bool
type MedianCutQuantizer ¶
type MedianCutQuantizer struct {
NumColor int
Points []point
}
MedianCutQuantizer constructs a palette with a maximum of NumColor colors by iteratively splitting clusters of color points mapped on a three-dimensional (RGB) Euclidean space. Once the number of clusters is within the specified bounds, the resulting color is computed by averaging those within each grouping.
func (*MedianCutQuantizer) AddPoint ¶
func (q *MedianCutQuantizer) AddPoint(r, g, b int)
func (*MedianCutQuantizer) MedianCut ¶
func (q *MedianCutQuantizer) MedianCut() color.Palette
type Resref ¶
type Resref [8]byte
func (*Resref) MarshalJSON ¶
func (*Resref) UnmarshalJSON ¶ added in v0.6.2
type SPL ¶
type SPL struct {
SplHeader
Abilities []SplAbility `json:"abilities"`
Effects []ItmEffect `json:"effects"`
Filename string `json:"-"`
}
type STO ¶
type Signature ¶ added in v0.6.2
type Signature [4]byte
func (*Signature) MarshalJSON ¶ added in v0.6.2
func (*Signature) UnmarshalJSON ¶ added in v0.6.2
type SplAbility ¶ added in v0.7.0
type SplAbility struct {
Type uint16 `json:"type"`
QuickSlotType uint16 `json:"quick_slot_type"`
QuickSlotIcon Resref `json:"quick_slot_icon"`
ActionType uint8 `json:"action_type"`
ActionCount uint8 `json:"action_count"`
Range uint16 `json:"range"`
MinCasterLevel uint16 `json:"min_caster_level"`
SpeedFactor uint16 `json:"speed_factor"`
TimesPerDay uint16 `json:"times_per_day"`
DamageDice uint16 `json:"damage_dice"`
DamageDiceCount uint16 `json:"damage_dice_count"`
DamageDiceBonus uint16 `json:"damage_dice_bonus"`
DamageType uint16 `json:"damage_type"`
EffectCount uint16 `json:"effect_count"`
StartingEffect uint16 `json:"starting_effect"`
MaxUsageCount uint16 `json:"max_usage_count"`
UsageFlags uint16 `json:"usage_flags"`
MissileType uint16 `json:"missile_type"`
}
type SplHeader ¶ added in v0.7.0
type SplHeader struct {
Signature Signature `json:"signature"`
Version Version `json:"version"`
GenericName uint32 `json:"generic_name"`
IdentifiedName uint32 `json:"identified_name"`
UsedUpItemID Resref `json:"used_up_item_id"`
ItemFlags uint32 `json:"item_flags"`
ItemType uint16 `json:"item_type"`
NotUsableBy uint32 `json:"not_usable_by"`
AnimationType [2]uint8 `json:"animation_type"`
MinLevelRequired uint8 `json:"min_level_required"`
School uint8 `json:"school"`
MinStrRequired uint8 `json:"min_str_required"`
SecondaryType uint8 `json:"secondary_type"`
MinStrBonusRequired uint8 `json:"min_str_bonus_required"`
NotUsableBy2a uint8 `json:"not_usable_by2a"`
MinIntRequired uint8 `json:"min_int_required"`
NotUsableBy2b uint8 `json:"not_usable_by2b"`
MinDexRequired uint8 `json:"min_dex_required"`
NotUsableBy2c uint8 `json:"not_usable_by2c"`
MinWisRequired uint8 `json:"min_wis_required"`
NotUsableBy2d uint8 `json:"not_usable_by2d"`
MinConRequired uint16 `json:"min_con_required"`
MinChrRequired uint16 `json:"min_chr_required"`
SpellLevel uint32 `json:"spell_level"`
MaxStackable uint16 `json:"max_stackable"`
ItemIcon Resref `json:"item_icon"`
LoreValue uint16 `json:"lore_value"`
GroundIcon Resref `json:"ground_icon"`
BaseWeight uint32 `json:"base_weight"`
GenericDescription uint32 `json:"generic_description"`
IdentifiedDescription uint32 `json:"identified_description"`
DescriptionPicture Resref `json:"description_picture"`
Attributes uint32 `json:"attributes"`
AbilityOffset uint32 `json:"ability_offset"`
AbilityCount uint16 `json:"ability_count"`
EffectsOffset uint32 `json:"effects_offset"`
CastingStartingEffect uint16 `json:"casting_starting_effect"`
CastingEffectCount uint16 `json:"casting_effect_count"`
}
type StoHeader ¶ added in v0.7.0
type StoHeader struct {
Signature Signature `json:"signature"`
Version Version `json:"version"`
StoreType uint32 `json:"store_type"`
Name uint32 `json:"name"`
StoreFlags [4]uint8 `json:"store_flags"`
SellPriceMarkup uint32 `json:"sell_price_markup"`
BuyPriceMarkup uint32 `json:"buy_price_markup"`
DepreciationRate uint32 `json:"depreciation_rate"`
PercentageChanceStealFailure uint16 `json:"percentage_chance_steal_failure"`
Capacity uint16 `json:"capacity"`
Unknown [8]uint8 `json:"unknown"`
OffsetToItemsPurchased uint32 `json:"offset_to_items_purchased"`
CountOfItemsPurchased uint32 `json:"count_of_items_purchased"`
OffsetToItemsForSale uint32 `json:"offset_to_items_for_sale"`
CountOfItemsForSale uint32 `json:"count_of_items_for_sale"`
Lore uint32 `json:"lore"`
IdPrice uint32 `json:"id_price"`
RumoursTavern Resref `json:"rumours_tavern"`
OffsetToDrinks uint32 `json:"offset_to_drinks"`
CountOfDrinks uint32 `json:"count_of_drinks"`
RumoursTemple Resref `json:"rumours_temple"`
RoomFlags [4]uint8 `json:"room_flags"`
PriceOfAPeasantRoom uint32 `json:"price_of_a_peasant_room"`
PriceOfAMerchantRoom uint32 `json:"price_of_a_merchant_room"`
PriceOfANobleRoom uint32 `json:"price_of_a_noble_room"`
PriceOfARoyalRoom uint32 `json:"price_of_a_royal_room"`
OffsetToCures uint32 `json:"offset_to_cures"`
CountOfCures uint32 `json:"count_of_cures"`
Unused [36]uint8 `json:"unused"`
}
type StoItemTypes ¶ added in v0.7.0
type StoItemTypes uint32
const ( BooksMisc StoItemTypes = iota AmuletsAndNecklaces Armor BeltsAndGirdles Boots Arrows BracersAndGauntlets Headgear Keys Potions Rings Scrolls Shields Food Bullets Bows Daggers Maces Slings SmallSwords LargeSwords Hammers MorningStars Flails Darts Axes Quarterstaff Crossbow HandToHandWeapons Spears Halberds CrossbowBolts CloaksAndRobes GoldPieces Gems Wands ContainersBrokenArmor BooksBrokenShieldsBracelets FamiliarsBrokenSwordsEarrings TattoosPST LensesPST BucklersTeeth Candles Unknown1 Clubs Unknown2 Unknown3 LargeShieldsIWD Unknown4 MediumShieldsIWD Notes Unknown5 Unknown6 SmallShields Unknown7 TelescopesIWD DrinksIWD GreatSwordsIWD Container FurPelt LeatherArmor StuddedLeatherArmor ChainMail SplintMail HalfPlate FullPlate HideArmor Robe Unknown8 BastardSword Scarf FoodIWD2 Hat Gauntlet )
func (StoItemTypes) String ¶ added in v0.7.0
func (it StoItemTypes) String() string
type StoItems ¶ added in v0.7.0
type StoItems struct {
FileNameOfItem Resref `json:"filename_of_item"`
ItemExpirationTime uint16 `json:"item_expiration_time"`
Charges1 uint16 `json:"charges1"`
Charges2 uint16 `json:"charges2"`
Charges3 uint16 `json:"charges3"`
Flags uint32 `json:"flags"`
Amount uint32 `json:"amount"`
InfiniteSupplyFlag uint32 `json:"infinite_supply_flag"`
}
type SvgFile ¶
type SvgGroup ¶
type TLK ¶
type TLK struct {
// contains filtered or unexported fields
}
func (*TLK) ConvertToUTF8 ¶
func (t *TLK) ConvertToUTF8(w io.WriteSeeker) error
func (*TLK) GetStringCount ¶
func (*TLK) SetCodepage ¶
type Tis ¶
type Tis struct {
Header tisHeader
Name string
// contains filtered or unexported fields
}
type Version ¶ added in v0.6.2
type Version [4]byte
func (*Version) MarshalJSON ¶ added in v0.6.2
func (*Version) UnmarshalJSON ¶ added in v0.6.2
type Wed ¶
type Wed struct {
Header wedHeader
Overlays []wedOverlay
Header2 wedHeader2
Doors []wedDoor
Tilemaps [][]wedTilemap
DoorTileCells []uint16
TileIndices []uint16
WallGroups []wedWallGroup
Polygons []wedPolygon
PolygonIndices []uint16
Vertices []wedVertex
}
func (*Wed) UpdateOffsets ¶
func (wed *Wed) UpdateOffsets()