eud

package module
v171.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 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 added in v171.1.0

func CheckPlayerInput(plr ns3.ObjectID) int

func CmdLine added in v171.1.0

func CmdLine(commandMessage string, show bool)

func CreateNewNPC added in v171.2.0

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

func CreateSingleColorMaidenAt added in v171.2.0

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

func CsfChangeString added in v171.1.0

func CsfChangeString(csfId int, newString string) bool

func CsfChangeVoiceFileName added in v171.1.0

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

func CsfEditSectionString

func CsfEditSectionString(csfId int, desc string)

func CsfGetKeyStringFromId added in v171.1.0

func CsfGetKeyStringFromId(csfId int) string

func CsfGetVoiceFileNameFromId added in v171.1.0

func CsfGetVoiceFileNameFromId(csfId int) string

func CsfWholeStringCount added in v171.1.0

func CsfWholeStringCount() int

func DistanceUnitToUnit added in v171.1.0

func DistanceUnitToUnit(unit1, unit2 ns3.ObjectID) float32

DistanceUnitToUnit computes distance between two units.

func FABS

func FABS(v float32) float32

func FloatToInt deprecated added in v171.1.0

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 added in v171.1.0

func GetMapAuthorEmail() string

func GetMapCopyright added in v171.1.0

func GetMapCopyright() string

func GetMapExplanation added in v171.1.0

func GetMapExplanation() string

func GetMapFlagValue added in v171.1.0

func GetMapFlagValue() int

func GetMapInfoAuthor added in v171.1.0

func GetMapInfoAuthor() string

func GetMapPartnerEmail added in v171.1.0

func GetMapPartnerEmail() string

func GetMapRecommendedPlayerMinMax added in v171.1.0

func GetMapRecommendedPlayerMinMax(min, max *int)

func GetMapReleaseDate added in v171.1.0

func GetMapReleaseDate() string

func GetMapReleaseVersion added in v171.1.0

func GetMapReleaseVersion() string

func GetMapSecondaryAuthor added in v171.1.0

func GetMapSecondaryAuthor() string

func GetMapTitle added in v171.1.0

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 added in v171.1.0

func GetMemoryFloat(addr int) float32

GetMemoryFloat reads float value from memory at a given address.

Deprecated: OpenNox cannot support direct memory access.

func GetPlayerAction added in v171.1.0

func GetPlayerAction(plr ns3.ObjectID) int

func GetPlayerIndex added in v171.1.0

func GetPlayerIndex(unit ns3.ObjectID) int

func GetPlayerMouseX added in v171.1.0

func GetPlayerMouseX(unit ns3.ObjectID) int

func GetPlayerMouseXY added in v171.1.0

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

func GetPlayerMouseY added in v171.1.0

func GetPlayerMouseY(unit ns3.ObjectID) int

func GetSpellNumber added in v171.1.0

func GetSpellNumber(name string) int

func GetUnitClass added in v171.1.0

func GetUnitClass(unit ns3.ObjectID) int

GetUnitClass returns unit class.

func GetUnitStatus added in v171.3.0

func GetUnitStatus(unit ns3.ObjectID) int

func GetUnitThingID added in v171.1.0

func GetUnitThingID(unit ns3.ObjectID) int

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

func GiveCreatureToPlayer added in v171.1.0

func GiveCreatureToPlayer(owner int, unit ns3.ObjectID)

func IntToFloat deprecated added in v171.1.0

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 added in v171.1.0

func Loadmap(mapFileName string)

func MagicMissileUtilSummon added in v171.1.0

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

func MakeCoopTeam added in v171.1.0

func MakeCoopTeam()

func MapVersionInfo added in v171.1.0

func MapVersionInfo() string

func MathDegreeToDir

func MathDegreeToDir(degree int) int

func MathDirToDegree

func MathDirToDegree(direction int) int

func MonsterActionPush added in v171.2.0

func MonsterActionPush(obj ns3.ObjectID) int

func MonsterForceCastSpell added in v171.2.0

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

func MonsterGetCurrentAction added in v171.2.0

func MonsterGetCurrentAction(obj ns3.ObjectID) int

func MonsterSetActionGuard added in v171.2.0

func MonsterSetActionGuard(obj ns3.ObjectID)

func NPCDressupEquipment added in v171.2.0

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

func NoxConsolePrint added in v171.1.0

func NoxConsolePrint(msg string, color int)

NoxConsolePrint prints a message

func PlaySoundAround

func PlaySoundAround(sUnit ns3.ObjectID, sNumber int)

func PlayerAutoTeamAssign added in v171.1.0

func PlayerAutoTeamAssign()

func PlayerGetArmorValue added in v171.1.0

func PlayerGetArmorValue(unit ns3.ObjectID) int

func PlayerGetCurrentLevel added in v171.1.0

func PlayerGetCurrentLevel(unit ns3.ObjectID) int

func PlayerGetCurrentManaAmount added in v171.1.0

func PlayerGetCurrentManaAmount(unit ns3.ObjectID) int

func PlayerGetEquipedWeapon added in v171.1.0

func PlayerGetEquipedWeapon(unit ns3.ObjectID) ns3.ObjectID

func PlayerGetMaxSpeed added in v171.1.0

func PlayerGetMaxSpeed(unit ns3.ObjectID) int

func PlayerGetMaxWeight added in v171.1.0

func PlayerGetMaxWeight(unit ns3.ObjectID) int

func PlayerGetMaximumManaAmount added in v171.1.0

func PlayerGetMaximumManaAmount(unit ns3.ObjectID) int

func PlayerGetNextWeapon added in v171.1.0

func PlayerGetNextWeapon(unit ns3.ObjectID) ns3.ObjectID

func PlayerGetStrength added in v171.1.0

func PlayerGetStrength(unit ns3.ObjectID) int

func PlayerIngameNick added in v171.1.0

func PlayerIngameNick(unit ns3.ObjectID) string

func PlayerSetCurrentManaAmount added in v171.1.0

func PlayerSetCurrentManaAmount(unit ns3.ObjectID, val int)

func PlayerSetMaximumManaAmount added in v171.1.0

func PlayerSetMaximumManaAmount(unit ns3.ObjectID, val int)

func PlayerSetStrength added in v171.1.0

func PlayerSetStrength(unit ns3.ObjectID, val int)

func RemoveCoopTeamMode added in v171.1.0

func RemoveCoopTeamMode()

func RemoveTreadLightly added in v171.1.0

func RemoveTreadLightly(unit ns3.ObjectID)

func SToInt deprecated added in v171.1.0

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 added in v171.1.0

func SetPlayerAction(plr ns3.ObjectID, act int)

func SetUnitMaxHealth added in v171.1.0

func SetUnitMaxHealth(unit ns3.ObjectID, amount int)

SetUnitMaxHealth sets units max health.

func SetUnitStatus added in v171.3.0

func SetUnitStatus(unit ns3.ObjectID, stat int)

func SpellUtilGetId added in v171.1.0

func SpellUtilGetId(name string) int

func SpellUtilGetPlayerAbilityCooldown added in v171.1.0

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

func SpellUtilSetPlayerAbilityCooldown added in v171.1.0

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

func SpellUtilSetSpellAimRate added in v171.1.0

func SpellUtilSetSpellAimRate(unit ns3.ObjectID, rate float32)

func SpellUtilSetSpellDelayOnDeffensive added in v171.1.0

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

func SpellUtilSetSpellDelayOnDisabling added in v171.1.0

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

func SpellUtilSetSpellDelayOnEscape added in v171.1.0

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

func SpellUtilSetSpellDelayOnOffensive added in v171.1.0

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

func SpellUtilSetSpellDelayOnReaction added in v171.1.0

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

func SpellUtilSetUnitSpell added in v171.1.0

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

func SpellUtilSetUnitSpellLevel added in v171.1.0

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 added in v171.1.0

func ToFloat(x int) float32

ToFloat converts int to float.

Deprecated: use native conversion float32(x).

func ToInt deprecated added in v171.1.0

func ToInt(x float32) int

ToInt converts float to int.

Deprecated: use native conversion int(x).

func ToStr deprecated added in v171.1.0

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 added in v171.1.0

func WallUtilAddBreakableWall(wallID ns3.WallID)

func WallUtilCloseWallAtObjectPosition added in v171.1.0

func WallUtilCloseWallAtObjectPosition(anyunit int)

func WallUtilCreateMagicWall added in v171.1.0

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

func WallUtilDestroyWallAtObjectPosition added in v171.1.0

func WallUtilDestroyWallAtObjectPosition(anyunit int)

func WallUtilGetWallAtObjectPosition added in v171.1.0

func WallUtilGetWallAtObjectPosition(anyunit int) ns3.WallID

func WallUtilOpenWallAtObjectPosition added in v171.1.0

func WallUtilOpenWallAtObjectPosition(anyunit int)

func WallUtilToggleWallAtObjectPosition added in v171.1.0

func WallUtilToggleWallAtObjectPosition(anyunit int)

func WallUtilWallIsDestroyed added in v171.1.0

func WallUtilWallIsDestroyed(wallID ns3.WallID) bool

func WallUtilWallIsOpened added in v171.1.0

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