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
- func ABS(v int) int
- func AbilityDbSetExplanation(ability int, desc string)
- func CheckGameKorLanguage() bool
- func CheckGameRusLanguage() bool
- func CheckPlayerInput(plr ns3.ObjectID) int
- func CmdLine(commandMessage string, show bool)
- func CreateNewNPC(x, y float32, dest *ns3.ObjectID)
- func CreateSingleColorMaidenAt(r, g, b int, x, y float32) ns3.ObjectID
- func CsfChangeString(csfId int, newString string) bool
- func CsfChangeVoiceFileName(csfId int, newName string, forced bool) bool
- func CsfEditSectionString(csfId int, desc string)
- func CsfGetKeyStringFromId(csfId int) string
- func CsfGetVoiceFileNameFromId(csfId int) string
- func CsfWholeStringCount() int
- func DistanceUnitToUnit(unit1, unit2 ns3.ObjectID) float32
- func FABS(v float32) float32
- func FloatToInt(x float32) intdeprecated
- func GameDataUtilSetValueByIndex(keyId string, index int, setvalue float32) bool
- func GetMapAuthorEmail() string
- func GetMapCopyright() string
- func GetMapExplanation() string
- func GetMapFlagValue() int
- func GetMapInfoAuthor() string
- func GetMapPartnerEmail() string
- func GetMapRecommendedPlayerMinMax(min, max *int)
- func GetMapReleaseDate() string
- func GetMapReleaseVersion() string
- func GetMapSecondaryAuthor() string
- func GetMapTitle() string
- func GetMemory(addr int) intdeprecated
- func GetMemoryFloat(addr int) float32deprecated
- func GetPlayerAction(plr ns3.ObjectID) int
- func GetPlayerIndex(unit ns3.ObjectID) int
- func GetPlayerMouseX(unit ns3.ObjectID) int
- func GetPlayerMouseXY(unit ns3.ObjectID, xpos, ypos *int) bool
- func GetPlayerMouseY(unit ns3.ObjectID) int
- func GetSpellNumber(name string) int
- func GetUnitClass(unit ns3.ObjectID) int
- func GetUnitStatus(unit ns3.ObjectID) int
- func GetUnitThingID(unit ns3.ObjectID) int
- func GiveCreatureToPlayer(owner int, unit ns3.ObjectID)
- func IntToFloat(x int) float32deprecated
- func IsMissileUnit(unit ns3.ObjectID) bool
- func IsMonsterUnit(unit ns3.ObjectID) bool
- func IsPlayerUnit(unit ns3.ObjectID) bool
- func Loadmap(mapFileName string)
- func MagicMissileUtilSummon(misName string, owner ns3.ObjectID, speed float32, xVect, yVect float32) ns3.ObjectID
- func MakeCoopTeam()
- func MapVersionInfo() string
- func MathDegreeToDir(degree int) int
- func MathDirToDegree(direction int) int
- func MonsterActionPush(obj ns3.ObjectID) int
- func MonsterForceCastSpell(obj ns3.ObjectID, spell int, x, y float32)
- func MonsterGetCurrentAction(obj ns3.ObjectID) int
- func MonsterSetActionGuard(obj ns3.ObjectID)
- func NPCDressupEquipment(npc ns3.ObjectID, item ns3.ObjectID, mode bool)
- func NoxConsolePrint(msg string, color int)
- func PlaySoundAround(sUnit ns3.ObjectID, sNumber int)
- func PlayerAutoTeamAssign()
- func PlayerGetArmorValue(unit ns3.ObjectID) int
- func PlayerGetCurrentLevel(unit ns3.ObjectID) int
- func PlayerGetCurrentManaAmount(unit ns3.ObjectID) int
- func PlayerGetEquipedWeapon(unit ns3.ObjectID) ns3.ObjectID
- func PlayerGetMaxSpeed(unit ns3.ObjectID) int
- func PlayerGetMaxWeight(unit ns3.ObjectID) int
- func PlayerGetMaximumManaAmount(unit ns3.ObjectID) int
- func PlayerGetNextWeapon(unit ns3.ObjectID) ns3.ObjectID
- func PlayerGetStrength(unit ns3.ObjectID) int
- func PlayerIngameNick(unit ns3.ObjectID) string
- func PlayerSetCurrentManaAmount(unit ns3.ObjectID, val int)
- func PlayerSetMaximumManaAmount(unit ns3.ObjectID, val int)
- func PlayerSetStrength(unit ns3.ObjectID, val int)
- func RemoveCoopTeamMode()
- func RemoveTreadLightly(unit ns3.ObjectID)
- func SToInt(x string) intdeprecated
- func SetMemory(addr int, value int)deprecated
- func SetPlayerAction(plr ns3.ObjectID, act int)
- func SetUnitMaxHealth(unit ns3.ObjectID, amount int)
- func SetUnitStatus(unit ns3.ObjectID, stat int)
- func SpellUtilGetId(name string) int
- func SpellUtilGetPlayerAbilityCooldown(unit ns3.ObjectID, slot int) int
- func SpellUtilSetPlayerAbilityCooldown(unit ns3.ObjectID, slot int, val int)
- func SpellUtilSetSpellAimRate(unit ns3.ObjectID, rate float32)
- func SpellUtilSetSpellDelayOnDeffensive(unit ns3.ObjectID, min, max int)
- func SpellUtilSetSpellDelayOnDisabling(unit ns3.ObjectID, min, max int)
- func SpellUtilSetSpellDelayOnEscape(unit ns3.ObjectID, min, max int)
- func SpellUtilSetSpellDelayOnOffensive(unit ns3.ObjectID, min, max int)
- func SpellUtilSetSpellDelayOnReaction(unit ns3.ObjectID, min, max int)
- func SpellUtilSetUnitSpell(unit ns3.ObjectID, spellName string, spellFlag int)
- func SpellUtilSetUnitSpellLevel(unit ns3.ObjectID, spellLvl int)
- func TellStoryClientside(str string, unitname string)
- func ThingDbEditThingDescription(thingId int, desc string)
- func ThingDbEditThingName(thingId int, desc string)
- func ToFloat(x int) float32deprecated
- func ToInt(x float32) intdeprecated
- func ToStr(x int) stringdeprecated
- func UniChatMessage(unit ns3.ObjectID, msg string, duration int)
- func UniPrint(unit ns3.ObjectID, msg string)
- func UniPrintToAll(msg string)
- func WallUtilAddBreakableWall(wallID ns3.WallID)
- func WallUtilCloseWallAtObjectPosition(anyunit int)
- func WallUtilCreateMagicWall(sPtr int, sWallX, sWallY int, sWallDir int, sUnk2 int) ns3.WallID
- func WallUtilDestroyWallAtObjectPosition(anyunit int)
- func WallUtilGetWallAtObjectPosition(anyunit int) ns3.WallID
- func WallUtilOpenWallAtObjectPosition(anyunit int)
- func WallUtilToggleWallAtObjectPosition(anyunit int)
- func WallUtilWallIsDestroyed(wallID ns3.WallID) bool
- func WallUtilWallIsOpened(wallID ns3.WallID) bool
Constants ¶
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 )
const ( RUS_TRIADA = 2097346 // В п RUS_FARGUS = 16515267 // Гь RUS_RUSSIANPROJECT = 16449730 // Эт RUS_8BIT = 16449730 // Эт RUS_WOLF = 2097346 // В п )
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 )
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 )
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 )
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 AbilityDbSetExplanation ¶
func CheckGameKorLanguage ¶
func CheckGameKorLanguage() bool
func CheckGameRusLanguage ¶
func CheckGameRusLanguage() bool
func CheckPlayerInput ¶ added in v171.1.0
func CreateNewNPC ¶ added in v171.2.0
func CreateSingleColorMaidenAt ¶ added in v171.2.0
func CsfChangeString ¶ added in v171.1.0
func CsfChangeVoiceFileName ¶ added in v171.1.0
func CsfEditSectionString ¶
func CsfGetKeyStringFromId ¶ added in v171.1.0
func CsfGetVoiceFileNameFromId ¶ added in v171.1.0
func CsfWholeStringCount ¶ added in v171.1.0
func CsfWholeStringCount() int
func DistanceUnitToUnit ¶ added in v171.1.0
DistanceUnitToUnit computes distance between two units.
func FloatToInt
deprecated
added in
v171.1.0
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 GetMemoryFloat
deprecated
added in
v171.1.0
func GetPlayerAction ¶ added in v171.1.0
func GetPlayerIndex ¶ added in v171.1.0
func GetPlayerMouseX ¶ added in v171.1.0
func GetPlayerMouseXY ¶ added in v171.1.0
func GetPlayerMouseY ¶ added in v171.1.0
func GetSpellNumber ¶ added in v171.1.0
func GetUnitClass ¶ added in v171.1.0
GetUnitClass returns unit class.
func GetUnitStatus ¶ added in v171.3.0
func GetUnitThingID ¶ added in v171.1.0
GetUnitThingID returns an index of an object type in game's database.
func GiveCreatureToPlayer ¶ added in v171.1.0
func IntToFloat
deprecated
added in
v171.1.0
func IsMissileUnit ¶
IsMissileUnit checks if unit is a missile.
func IsMonsterUnit ¶
IsMonsterUnit checks if unit as a monster.
func IsPlayerUnit ¶
IsPlayerUnit checks if unit as a player.
func MagicMissileUtilSummon ¶ added in v171.1.0
func MakeCoopTeam ¶ added in v171.1.0
func MakeCoopTeam()
func MapVersionInfo ¶ added in v171.1.0
func MapVersionInfo() string
func MathDegreeToDir ¶
func MathDirToDegree ¶
func MonsterActionPush ¶ added in v171.2.0
func MonsterForceCastSpell ¶ added in v171.2.0
func MonsterGetCurrentAction ¶ added in v171.2.0
func MonsterSetActionGuard ¶ added in v171.2.0
func NPCDressupEquipment ¶ added in v171.2.0
func NoxConsolePrint ¶ added in v171.1.0
NoxConsolePrint prints a message
func PlaySoundAround ¶
func PlayerAutoTeamAssign ¶ added in v171.1.0
func PlayerAutoTeamAssign()
func PlayerGetArmorValue ¶ added in v171.1.0
func PlayerGetCurrentLevel ¶ added in v171.1.0
func PlayerGetCurrentManaAmount ¶ added in v171.1.0
func PlayerGetEquipedWeapon ¶ added in v171.1.0
func PlayerGetMaxSpeed ¶ added in v171.1.0
func PlayerGetMaxWeight ¶ added in v171.1.0
func PlayerGetMaximumManaAmount ¶ added in v171.1.0
func PlayerGetNextWeapon ¶ added in v171.1.0
func PlayerGetStrength ¶ added in v171.1.0
func PlayerIngameNick ¶ added in v171.1.0
func PlayerSetCurrentManaAmount ¶ added in v171.1.0
func PlayerSetMaximumManaAmount ¶ added in v171.1.0
func PlayerSetStrength ¶ added in v171.1.0
func RemoveCoopTeamMode ¶ added in v171.1.0
func RemoveCoopTeamMode()
func RemoveTreadLightly ¶ added in v171.1.0
func SetPlayerAction ¶ added in v171.1.0
func SetUnitMaxHealth ¶ added in v171.1.0
SetUnitMaxHealth sets units max health.
func SetUnitStatus ¶ added in v171.3.0
func SpellUtilGetId ¶ added in v171.1.0
func SpellUtilGetPlayerAbilityCooldown ¶ added in v171.1.0
func SpellUtilSetPlayerAbilityCooldown ¶ added in v171.1.0
func SpellUtilSetSpellAimRate ¶ added in v171.1.0
func SpellUtilSetSpellDelayOnDeffensive ¶ added in v171.1.0
func SpellUtilSetSpellDelayOnDisabling ¶ added in v171.1.0
func SpellUtilSetSpellDelayOnEscape ¶ added in v171.1.0
func SpellUtilSetSpellDelayOnOffensive ¶ added in v171.1.0
func SpellUtilSetSpellDelayOnReaction ¶ added in v171.1.0
func SpellUtilSetUnitSpell ¶ added in v171.1.0
func SpellUtilSetUnitSpellLevel ¶ added in v171.1.0
func TellStoryClientside ¶
func ThingDbEditThingName ¶
func UniChatMessage ¶
UniChatMessage displays a string in a speech bubble for a given duration (in frames). It does not localize the string.
func UniPrint ¶
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 WallUtilCloseWallAtObjectPosition ¶ added in v171.1.0
func WallUtilCloseWallAtObjectPosition(anyunit int)
func WallUtilCreateMagicWall ¶ added in v171.1.0
func WallUtilDestroyWallAtObjectPosition ¶ added in v171.1.0
func WallUtilDestroyWallAtObjectPosition(anyunit int)
func WallUtilGetWallAtObjectPosition ¶ added in v171.1.0
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 WallUtilWallIsOpened ¶ added in v171.1.0
Types ¶
This section is empty.