eud

package module
v171.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package eud provides a compatibility layer for Panic's EUD scripts.

This package reimplements APIs from the Panic's EUD project: https://gitlab.com/happysoft3/eud-maps-project/-/tree/master/eud_project/libs.

OpenNox cannot support direct memory access, thus any memory manipulation APIs are unavailable. Stubs for these APIs may still be present in the library. Calling them will cause a panic.

Index

Constants

View Source
const (
	CONSOLE_COLOR_BLACK       = 1
	CONSOLE_COLOR_GREY        = 2
	CONSOLE_COLOR_WHITE       = 3
	CONSOLE_COLOR_WHITE_LIGHT = 4
	CONSOLE_COLOR_BROWN       = 5
	CONSOLE_COLOR_RED         = 6
	CONSOLE_COLOR_PINK        = 7
	CONSOLE_COLOR_GREEN       = 8
	CONSOLE_COLOR_LIME        = 10
	CONSOLE_COLOR_DARKBLUE    = 11
	CONSOLE_COLOR_BLUE        = 12
	CONSOLE_COLOR_SKYBLUE     = 13
	CONSOLE_COLOR_ORANGE      = 14
	CONSOLE_COLOR_YELLOW      = 15
	CONSOLE_COLOR_PALE_YELLOW = 16
)
View Source
const (
	RUS_TRIADA         = 2097346  // В п
	RUS_FARGUS         = 16515267 // Гь
	RUS_RUSSIANPROJECT = 16449730 // Эт
	RUS_8BIT           = 16449730 // Эт
	RUS_WOLF           = 2097346  // В п
)
View Source
const (
	UNIT_FLAG_BELOW              = 0x1
	UNIT_FLAG_NO_UPDATE          = 0x2
	UNIT_FLAG_ACTIVE             = 0x4
	UNIT_FLAG_ALLOW_OVERLAP      = 0x8
	UNIT_FLAG_SHORT              = 0x10
	UNIT_FLAG_DESTROYED          = 0x20
	UNIT_FLAG_NO_COLLIDE         = 0x40
	UNIT_FLAG_MISSILE_HIT        = 0x80
	UNIT_FLAG_EQUIPPED           = 0x100
	UNIT_FLAG_PARTITIONED        = 0x200
	UNIT_FLAG_NO_COLLIDE_OWNER   = 0x400
	UNIT_FLAG_OWNER_VISIBLE      = 0x800
	UNIT_FLAG_EDIT_VISIBLE       = 0x1000
	UNIT_FLAG_NO_PUSH_CHARACTERS = 0x2000
	UNIT_FLAG_AIRBORNE           = 0x4000
	UNIT_FLAG_DEAD               = 0x8000
	UNIT_FLAG_SHADOW             = 0x10000
	UNIT_FLAG_FALLING            = 0x20000
	UNIT_FLAG_IN_HOLE            = 0x40000
	UNIT_FLAG_RESPAWN            = 0x80000
	UNIT_FLAG_ON_OBJECT          = 0x100000
	UNIT_FLAG_SIGHT_DESTROY      = 0x200000
	UNIT_FLAG_TRANSIENT          = 0x400000
	UNIT_FLAG_BOUNCY             = 0x800000
	UNIT_FLAG_ENABLED            = 0x1000000
	UNIT_FLAG_PENDING            = 0x2000000
	UNIT_FLAG_TRANSLUCENT        = 0x4000000
	UNIT_FLAG_STILL              = 0x8000000
	UNIT_FLAG_NO_AUTO_DROP       = 0x10000000
	UNIT_FLAG_FLICKER            = 0x20000000
	UNIT_FLAG_SELECTED           = 0x40000000
	UNIT_FLAG_MARKED             = 0x80000000
)
View Source
const (
	DAMAGE_TYPE_BLADE             = 0
	DAMAGE_TYPE_FLAME             = 1
	DAMAGE_TYPE_CRUSH             = 2
	DAMAGE_TYPE_IMPALE            = 3
	DAMAGE_TYPE_DRAIN             = 4
	DAMAGE_TYPE_POISON            = 5
	DAMAGE_TYPE_DISPEL_UNDEAD     = 6
	DAMAGE_TYPE_EXPLOSION         = 7
	DAMAGE_TYPE_BITE              = 8
	DAMAGE_TYPE_ELECTRIC          = 9
	DAMAGE_TYPE_CLAW              = 10
	DAMAGE_TYPE_IMPACT            = 11
	DAMAGE_TYPE_LAVA              = 12
	DAMAGE_TYPE_DEATH_MAGIC       = 13
	DAMAGE_TYPE_PLASMA            = 14
	DAMAGE_TYPE_MANA_BOMB         = 15
	DAMAGE_TYPE_ZAP_RAY           = 16
	DAMAGE_TYPE_AIRBORNE_ELECTRIC = 17
)
View Source
const (
	MON_STATUS_DESTROY_WHEN_DEAD = 1
	MON_STATUS_CHECK             = 2
	MON_STATUS_CAN_BLOCK         = 4
	MON_STATUS_CAN_DODGE         = 8
	MON_STATUS_UNUSED            = 0x10
	MON_STATUS_CAN_CAST_SPELLS   = 0x20
	MON_STATUS_HOLD_YOUR_GROUND  = 0x40
	MON_STATUS_SUMMONED          = 0x80
	MON_STATUS_ALERT             = 0x100
	MON_STATUS_INJURED           = 0x200
	MON_STATUS_CAN_SEE_FRIENDS   = 0x400
	MON_STATUS_CAN_HEAL_SELF     = 0x800
	MON_STATUS_CAN_HEAL_OTHERS   = 0x1000
	MON_STATUS_CAN_RUN           = 0x2000
	MON_STATUS_RUNNING           = 0x4000
	MON_STATUS_ALWAYS_RUN        = 0x8000
	MON_STATUS_NEVER_RUN         = 0x10000
	MON_STATUS_BOT               = 0x20000
	MON_STATUS_MORPHED           = 0x40000
	MON_STATUS_STAY_DEAD         = 0x80000
	MON_STATUS_ON_FIRE           = 0x100000
	MON_STATUS_FRUSTRATED        = 0x200000
)
View Source
const (
	UNIT_CLASS_MISSILE          = 0x1
	UNIT_CLASS_MONSTER          = 0x2
	UNIT_CLASS_PLAYER           = 0x4
	UNIT_CLASS_OBSTACLE         = 0x8
	UNIT_CLASS_FOOD             = 0x10
	UNIT_CLASS_EXIT             = 0x20
	UNIT_CLASS_KEY              = 0x40
	UNIT_CLASS_DOOR             = 0x80
	UNIT_CLASS_INFO_BOOK        = 0x100
	UNIT_CLASS_TRIGGER          = 0x200
	UNIT_CLASS_TRANSPORTER      = 0x400
	UNIT_CLASS_HOLE             = 0x800
	UNIT_CLASS_WAND             = 0x1000
	UNIT_CLASS_FIRE             = 0x2000
	UNIT_CLASS_ELEVATOR         = 0x4000
	UNIT_CLASS_ELEVATOR_SHAFT   = 0x8000
	UNIT_CLASS_DANGEROUS        = 0x10000
	UNIT_CLASS_MONSTERGENERATOR = 0x20000
	UNIT_CLASS_READABLE         = 0x40000
	UNIT_CLASS_LIGHT            = 0x80000
	UNIT_CLASS_SIMPLE           = 0x100000
	UNIT_CLASS_COMPLEX          = 0x200000
	UNIT_CLASS_IMMOBILE         = 0x400000
	UNIT_CLASS_VISIBLE_ENABLE   = 0x800000
	UNIT_CLASS_WEAPON           = 0x1000000
	UNIT_CLASS_ARMOR            = 0x2000000
	UNIT_CLASS_NOT_STACKABLE    = 0x4000000
	UNIT_CLASS_TREASURE         = 0x8000000
	UNIT_CLASS_FLAG             = 0x10000000
	UNIT_CLASS_CLIENT_PERSIST   = 0x20000000
	UNIT_CLASS_CLIENT_PREDICT   = 0x40000000
	UNIT_CLASS_PICKUP           = 0x80000000
)

Variables

This section is empty.

Functions

func ABS

func ABS(v int) int

func AbilityDbSetExplanation

func AbilityDbSetExplanation(ability int, desc string)

func CheckGameKorLanguage

func CheckGameKorLanguage() bool

func CheckGameRusLanguage

func CheckGameRusLanguage() bool

func CheckPlayerInput

func CheckPlayerInput(plr ns3.ObjectID) int

func CmdLine

func CmdLine(commandMessage string, show bool)

func CreateNewNPC

func CreateNewNPC(x, y float32, dest *ns3.ObjectID)

func CreateSingleColorMaidenAt

func CreateSingleColorMaidenAt(r, g, b int, x, y float32) ns3.ObjectID

func CsfChangeString

func CsfChangeString(csfId int, newString string) bool

func CsfChangeVoiceFileName

func CsfChangeVoiceFileName(csfId int, newName string, forced bool) bool

func CsfEditSectionString

func CsfEditSectionString(csfId int, desc string)

func CsfGetKeyStringFromId

func CsfGetKeyStringFromId(csfId int) string

func CsfGetVoiceFileNameFromId

func CsfGetVoiceFileNameFromId(csfId int) string

func CsfWholeStringCount

func CsfWholeStringCount() int

func DistanceUnitToUnit

func DistanceUnitToUnit(unit1, unit2 ns3.ObjectID) float32

DistanceUnitToUnit computes distance between two units.

func FABS

func FABS(v float32) float32

func FloatToInt deprecated

func FloatToInt(x float32) int

FloatToInt naively converts float to int.

Deprecated: use native conversion int(x).

func GameDataUtilSetValueByIndex

func GameDataUtilSetValueByIndex(keyId string, index int, setvalue float32) bool

func GetMapAuthorEmail

func GetMapAuthorEmail() string

func GetMapCopyright

func GetMapCopyright() string

func GetMapExplanation

func GetMapExplanation() string

func GetMapFlagValue

func GetMapFlagValue() int

func GetMapInfoAuthor

func GetMapInfoAuthor() string

func GetMapPartnerEmail

func GetMapPartnerEmail() string

func GetMapRecommendedPlayerMinMax

func GetMapRecommendedPlayerMinMax(min, max *int)

func GetMapReleaseDate

func GetMapReleaseDate() string

func GetMapReleaseVersion

func GetMapReleaseVersion() string

func GetMapSecondaryAuthor

func GetMapSecondaryAuthor() string

func GetMapTitle

func GetMapTitle() string

func GetMemory deprecated

func GetMemory(addr int) int

GetMemory reads value from memory at a given address.

Deprecated: OpenNox cannot support direct memory access.

func GetMemoryFloat deprecated

func GetMemoryFloat(addr int) float32

GetMemoryFloat reads float value from memory at a given address.

Deprecated: OpenNox cannot support direct memory access.

func GetPlayerAction

func GetPlayerAction(plr ns3.ObjectID) int

func GetPlayerIndex

func GetPlayerIndex(unit ns3.ObjectID) int

func GetPlayerMouseX

func GetPlayerMouseX(unit ns3.ObjectID) int

func GetPlayerMouseXY

func GetPlayerMouseXY(unit ns3.ObjectID, xpos, ypos *int) bool

func GetPlayerMouseY

func GetPlayerMouseY(unit ns3.ObjectID) int

func GetSpellNumber

func GetSpellNumber(name string) int

func GetUnitClass

func GetUnitClass(unit ns3.ObjectID) int

GetUnitClass returns unit class.

func GetUnitStatus

func GetUnitStatus(unit ns3.ObjectID) int

func GetUnitThingID

func GetUnitThingID(unit ns3.ObjectID) int

GetUnitThingID returns an index of an object type in game's database.

func GiveCreatureToPlayer

func GiveCreatureToPlayer(owner int, unit ns3.ObjectID)

func IntToFloat deprecated

func IntToFloat(x int) float32

IntToFloat naively converts int to float.

Deprecated: use native conversion float32(x).

func IsMissileUnit

func IsMissileUnit(unit ns3.ObjectID) bool

IsMissileUnit checks if unit is a missile.

func IsMonsterUnit

func IsMonsterUnit(unit ns3.ObjectID) bool

IsMonsterUnit checks if unit as a monster.

func IsPlayerUnit

func IsPlayerUnit(unit ns3.ObjectID) bool

IsPlayerUnit checks if unit as a player.

func Loadmap

func Loadmap(mapFileName string)

func MagicMissileUtilSummon

func MagicMissileUtilSummon(misName string, owner ns3.ObjectID, speed float32, xVect, yVect float32) ns3.ObjectID

func MakeCoopTeam

func MakeCoopTeam()

func MapVersionInfo

func MapVersionInfo() string

func MathDegreeToDir

func MathDegreeToDir(degree int) int

func MathDirToDegree

func MathDirToDegree(direction int) int

func MonsterActionPush

func MonsterActionPush(obj ns3.ObjectID) int

func MonsterForceCastSpell

func MonsterForceCastSpell(obj ns3.ObjectID, spell int, x, y float32)

func MonsterGetCurrentAction

func MonsterGetCurrentAction(obj ns3.ObjectID) int

func MonsterSetActionGuard

func MonsterSetActionGuard(obj ns3.ObjectID)

func NPCDressupEquipment

func NPCDressupEquipment(npc ns3.ObjectID, item ns3.ObjectID, mode bool)

func NoxConsolePrint

func NoxConsolePrint(msg string, color int)

NoxConsolePrint prints a message

func PlaySoundAround

func PlaySoundAround(sUnit ns3.ObjectID, sNumber int)

func PlayerAutoTeamAssign

func PlayerAutoTeamAssign()

func PlayerGetArmorValue

func PlayerGetArmorValue(unit ns3.ObjectID) int

func PlayerGetCurrentLevel

func PlayerGetCurrentLevel(unit ns3.ObjectID) int

func PlayerGetCurrentManaAmount

func PlayerGetCurrentManaAmount(unit ns3.ObjectID) int

func PlayerGetEquipedWeapon

func PlayerGetEquipedWeapon(unit ns3.ObjectID) ns3.ObjectID

func PlayerGetMaxSpeed

func PlayerGetMaxSpeed(unit ns3.ObjectID) int

func PlayerGetMaxWeight

func PlayerGetMaxWeight(unit ns3.ObjectID) int

func PlayerGetMaximumManaAmount

func PlayerGetMaximumManaAmount(unit ns3.ObjectID) int

func PlayerGetNextWeapon

func PlayerGetNextWeapon(unit ns3.ObjectID) ns3.ObjectID

func PlayerGetStrength

func PlayerGetStrength(unit ns3.ObjectID) int

func PlayerIngameNick

func PlayerIngameNick(unit ns3.ObjectID) string

func PlayerSetCurrentManaAmount

func PlayerSetCurrentManaAmount(unit ns3.ObjectID, val int)

func PlayerSetMaximumManaAmount

func PlayerSetMaximumManaAmount(unit ns3.ObjectID, val int)

func PlayerSetStrength

func PlayerSetStrength(unit ns3.ObjectID, val int)

func RemoveCoopTeamMode

func RemoveCoopTeamMode()

func RemoveTreadLightly

func RemoveTreadLightly(unit ns3.ObjectID)

func SToInt deprecated

func SToInt(x string) int

SToInt converts string to int.

Deprecated: use strconv.Atoi.

func SetMemory deprecated

func SetMemory(addr int, value int)

SetMemory writes value to memory at a given address.

Deprecated: OpenNox cannot support direct memory access.

func SetPlayerAction

func SetPlayerAction(plr ns3.ObjectID, act int)

func SetUnitMaxHealth

func SetUnitMaxHealth(unit ns3.ObjectID, amount int)

SetUnitMaxHealth sets units max health.

func SetUnitStatus

func SetUnitStatus(unit ns3.ObjectID, stat int)

func SpellUtilGetId

func SpellUtilGetId(name string) int

func SpellUtilGetPlayerAbilityCooldown

func SpellUtilGetPlayerAbilityCooldown(unit ns3.ObjectID, slot int) int

func SpellUtilSetPlayerAbilityCooldown

func SpellUtilSetPlayerAbilityCooldown(unit ns3.ObjectID, slot int, val int)

func SpellUtilSetSpellAimRate

func SpellUtilSetSpellAimRate(unit ns3.ObjectID, rate float32)

func SpellUtilSetSpellDelayOnDeffensive

func SpellUtilSetSpellDelayOnDeffensive(unit ns3.ObjectID, min, max int)

func SpellUtilSetSpellDelayOnDisabling

func SpellUtilSetSpellDelayOnDisabling(unit ns3.ObjectID, min, max int)

func SpellUtilSetSpellDelayOnEscape

func SpellUtilSetSpellDelayOnEscape(unit ns3.ObjectID, min, max int)

func SpellUtilSetSpellDelayOnOffensive

func SpellUtilSetSpellDelayOnOffensive(unit ns3.ObjectID, min, max int)

func SpellUtilSetSpellDelayOnReaction

func SpellUtilSetSpellDelayOnReaction(unit ns3.ObjectID, min, max int)

func SpellUtilSetUnitSpell

func SpellUtilSetUnitSpell(unit ns3.ObjectID, spellName string, spellFlag int)

func SpellUtilSetUnitSpellLevel

func SpellUtilSetUnitSpellLevel(unit ns3.ObjectID, spellLvl int)

func TellStoryClientside

func TellStoryClientside(str string, unitname string)

func ThingDbEditThingDescription

func ThingDbEditThingDescription(thingId int, desc string)

func ThingDbEditThingName

func ThingDbEditThingName(thingId int, desc string)

func ToFloat deprecated

func ToFloat(x int) float32

ToFloat converts int to float.

Deprecated: use native conversion float32(x).

func ToInt deprecated

func ToInt(x float32) int

ToInt converts float to int.

Deprecated: use native conversion int(x).

func ToStr deprecated

func ToStr(x int) string

ToStr converts int to string.

Deprecated: use strconv.Itoa.

func UniChatMessage

func UniChatMessage(unit ns3.ObjectID, msg string, duration int)

UniChatMessage displays a string in a speech bubble for a given duration (in frames). It does not localize the string.

func UniPrint

func UniPrint(unit ns3.ObjectID, msg string)

UniPrint displays a string on the screen of the player. It does not localize the string.

func UniPrintToAll

func UniPrintToAll(msg string)

UniPrintToAll displays a string to everyone. It does not localize the string.

func WallUtilAddBreakableWall

func WallUtilAddBreakableWall(wallID ns3.WallID)

func WallUtilCloseWallAtObjectPosition

func WallUtilCloseWallAtObjectPosition(anyunit int)

func WallUtilCreateMagicWall

func WallUtilCreateMagicWall(sPtr int, sWallX, sWallY int, sWallDir int, sUnk2 int) ns3.WallID

func WallUtilDestroyWallAtObjectPosition

func WallUtilDestroyWallAtObjectPosition(anyunit int)

func WallUtilGetWallAtObjectPosition

func WallUtilGetWallAtObjectPosition(anyunit int) ns3.WallID

func WallUtilOpenWallAtObjectPosition

func WallUtilOpenWallAtObjectPosition(anyunit int)

func WallUtilToggleWallAtObjectPosition

func WallUtilToggleWallAtObjectPosition(anyunit int)

func WallUtilWallIsDestroyed

func WallUtilWallIsDestroyed(wallID ns3.WallID) bool

func WallUtilWallIsOpened

func WallUtilWallIsOpened(wallID ns3.WallID) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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