Class LuaManager.GlobalObject

java.lang.Object
zombie.Lua.LuaManager.GlobalObject
Enclosing class:
LuaManager

public static class LuaManager.GlobalObject extends Object
Object containing global Lua functions. The methods in this class are called from Lua as methodName() instead of qualifying them with the class name, even if they are not static.
  • Constructor Details

    • GlobalObject

      public GlobalObject()
  • Method Details

    • loadVehicleModel

      public static Model loadVehicleModel(String name, String loc, String tex)
    • loadStaticZomboidModel

      public static Model loadStaticZomboidModel(String name, String loc, String tex)
    • loadSkinnedZomboidModel

      public static Model loadSkinnedZomboidModel(String name, String loc, String tex)
    • loadZomboidModel

      public static Model loadZomboidModel(String name, String mesh, String tex, String shader, boolean bStatic)
    • setModelMetaData

      public static void setModelMetaData(String name, String mesh, String tex, String shader, boolean bStatic)
    • reloadModelsMatching

      public static void reloadModelsMatching(String meshName)
    • getSLSoundManager

      public static SLSoundManager getSLSoundManager()
    • getRadioAPI

      public static RadioAPI getRadioAPI()
    • getRadioTranslators

      public static ArrayList<String> getRadioTranslators(Language language)
    • getTranslatorCredits

      public static ArrayList<String> getTranslatorCredits(Language language)
    • getBehaviourDebugPlayer

      public static IsoGameCharacter getBehaviourDebugPlayer()
    • setBehaviorStep

      public static void setBehaviorStep(boolean b)
    • getPuddlesManager

      public static IsoPuddles getPuddlesManager()
    • getAllAnimalsDefinitions

      public static ArrayList<AnimalDefinitions> getAllAnimalsDefinitions()
    • setPuddles

      public static void setPuddles(float initialPuddles)
    • fastfloor

      public static float fastfloor(float coord)
    • getZomboidRadio

      public static ZomboidRadio getZomboidRadio()
    • getRandomUUID

      public static String getRandomUUID()
    • sendItemListNet

      public static boolean sendItemListNet(IsoPlayer sender, ArrayList<InventoryItem> items, IsoPlayer receiver, String transferID, String custom)
    • convertToPZNetTable

      public static se.krka.kahlua.vm.KahluaTable convertToPZNetTable(se.krka.kahlua.vm.KahluaTable table)
    • instof

      public static boolean instof(Object obj, String name)
    • getClassSimpleName

      public static String getClassSimpleName(Object object)
    • serverConnect

      public static void serverConnect(String user, String pass, String server, String localIP, String port, String serverPassword, String serverName, boolean useSteamRelay, boolean doHash, int authtype, String secretKey)
    • serverConnectCoop

      public static void serverConnectCoop(String serverSteamID)
    • sendPing

      public static void sendPing()
    • connectionManagerLog

      public static void connectionManagerLog(String event, String message)
    • forceDisconnect

      public static void forceDisconnect()
    • checkPermissions

      public static boolean checkPermissions(IsoPlayer player, Capability capability)
    • backToSinglePlayer

      public static void backToSinglePlayer()
    • isIngameState

      public static boolean isIngameState()
    • getPerformanceLocal

      public static se.krka.kahlua.vm.KahluaTable getPerformanceLocal()
    • getNetworkLocal

      public static se.krka.kahlua.vm.KahluaTable getNetworkLocal()
    • getGameLocal

      public static se.krka.kahlua.vm.KahluaTable getGameLocal()
    • getPerformanceRemote

      public static se.krka.kahlua.vm.KahluaTable getPerformanceRemote()
    • getNetworkRemote

      public static se.krka.kahlua.vm.KahluaTable getNetworkRemote()
    • getGameRemote

      public static se.krka.kahlua.vm.KahluaTable getGameRemote()
    • getMPStatus

      public static se.krka.kahlua.vm.KahluaTable getMPStatus()
    • canConnect

      public static boolean canConnect()
    • getReconnectCountdownTimer

      public static String getReconnectCountdownTimer()
    • sendAnimalGenome

      public static void sendAnimalGenome(IsoAnimal animal)
    • addAnimal

      public static IsoAnimal addAnimal(IsoCell cell, int x, int y, int z, String animalType, AnimalBreed breed, boolean skeleton)
    • addAnimal

      public static IsoAnimal addAnimal(IsoCell cell, int x, int y, int z, String animalType, AnimalBreed breed)
    • removeAnimal

      public static void removeAnimal(int id)
    • getFakeAttacker

      public static IsoGameCharacter getFakeAttacker()
    • sendHitVehicle

      public static void sendHitVehicle(IsoGameCharacter target, String damage, boolean isTargetHitFromBehind, String vehicleDamage, String vehicleSpeed, boolean isVehicleHitFromBehind)
    • requestUsers

      public static void requestUsers()
    • requestPVPEvents

      public static void requestPVPEvents()
    • clearPVPEvents

      public static void clearPVPEvents()
    • getUsers

      public static ArrayList<NetworkUser> getUsers()
    • networkUserAction

      public static void networkUserAction(String action, String username, String additionArgument)
    • banUnbanUserAction

      public static void banUnbanUserAction(String action, String username, String additionArgument)
    • teleportUserAction

      public static void teleportUserAction(String action, String username, String additionArgument)
    • teleportToHimUserAction

      public static void teleportToHimUserAction(String action, String username, String additionArgument)
    • requestRoles

      public static void requestRoles()
    • getRoles

      public static ArrayList<Role> getRoles()
    • getCapabilities

      public static ArrayList<Capability> getCapabilities()
    • addRole

      public static void addRole(String name)
    • setupRole

      public static void setupRole(Role role, String description, Color color, se.krka.kahlua.vm.KahluaTable capabilities_raw)
    • deleteRole

      public static void deleteRole(String name)
    • setDefaultRoleFor

      public static void setDefaultRoleFor(String defaultId, String roleName)
    • moveRole

      public static void moveRole(byte dir, String roleName)
    • getWarNearest

      public static WarManager.War getWarNearest()
    • getWars

      public static ArrayList<WarManager.War> getWars()
    • getHutch

      public static IsoHutch getHutch(int x, int y, int z)
    • getAnimal

      public static IsoAnimal getAnimal(int id)
    • sendAddAnimalFromHandsInTrailer

      public static void sendAddAnimalFromHandsInTrailer(IsoAnimal animal, IsoPlayer player, BaseVehicle vehicle)
    • sendAddAnimalFromHandsInTrailer

      public static void sendAddAnimalFromHandsInTrailer(IsoDeadBody animal, IsoPlayer player, BaseVehicle vehicle)
    • sendAddAnimalInTrailer

      public static void sendAddAnimalInTrailer(IsoAnimal animal, IsoPlayer player, BaseVehicle vehicle)
    • sendAddAnimalInTrailer

      public static void sendAddAnimalInTrailer(IsoDeadBody animal, IsoPlayer player, BaseVehicle vehicle)
    • sendRemoveAnimalFromTrailer

      public static void sendRemoveAnimalFromTrailer(IsoAnimal animal, IsoPlayer player, BaseVehicle vehicle)
    • sendRemoveAndGrabAnimalFromTrailer

      public static void sendRemoveAndGrabAnimalFromTrailer(IsoAnimal animal, IsoPlayer player, BaseVehicle vehicle, AnimalInventoryItem item)
    • sendRemoveAndGrabAnimalFromTrailer

      public static void sendRemoveAndGrabAnimalFromTrailer(IsoDeadBody animal, IsoPlayer player, BaseVehicle vehicle, AnimalInventoryItem item)
    • sendAttachAnimalToPlayer

      public static void sendAttachAnimalToPlayer(IsoAnimal animal, IsoPlayer player, IsoObject object, boolean remove)
    • sendAttachAnimalToTree

      public static void sendAttachAnimalToTree(IsoAnimal animal, IsoPlayer player, IsoObject object, boolean remove)
    • sendPickupAnimal

      public static void sendPickupAnimal(IsoAnimal animal, IsoPlayer player, AnimalInventoryItem item)
    • sendButcherAnimal

      public static void sendButcherAnimal(IsoDeadBody body, IsoPlayer player)
    • sendFeedAnimalFromHand

      public static void sendFeedAnimalFromHand(IsoAnimal animal, IsoPlayer player, InventoryItem item)
    • sendHutchGrabAnimal

      public static void sendHutchGrabAnimal(IsoAnimal animal, IsoPlayer player, IsoObject object, InventoryItem item)
    • sendHutchGrabCorpseAction

      public static void sendHutchGrabCorpseAction(IsoAnimal animal, IsoPlayer player, IsoObject object, InventoryItem item)
    • sendHutchRemoveAnimalAction

      public static void sendHutchRemoveAnimalAction(IsoAnimal animal, IsoPlayer player, IsoObject object)
    • sendCorpse

      public static void sendCorpse(IsoDeadBody body)
    • getAllItems

      public static ArrayList<Item> getAllItems()
    • scoreboardUpdate

      public static void scoreboardUpdate()
    • save

      public static void save(boolean doCharacter)
    • saveGame

      public static void saveGame()
    • getAllRecipes

      public static ArrayList<Recipe> getAllRecipes()
    • requestUserlog

      public static void requestUserlog(String user)
    • addUserlog

      public static void addUserlog(String user, String type, String text)
    • removeUserlog

      public static void removeUserlog(String user, String type, String text)
    • tabToX

      public static String tabToX(String a, int tabX)
    • isType

      public static boolean isType(Object obj, String name)
    • isoToScreenX

      public static float isoToScreenX(int player, float x, float y, float z)
    • isoToScreenY

      public static float isoToScreenY(int player, float x, float y, float z)
    • screenToIsoX

      public static float screenToIsoX(int player, float x, float y, float z)
    • screenToIsoY

      public static float screenToIsoY(int player, float x, float y, float z)
    • getAmbientStreamManager

      public static BaseAmbientStreamManager getAmbientStreamManager()
    • getSleepingEvent

      public static SleepingEvent getSleepingEvent()
    • setPlayerMovementActive

      public static void setPlayerMovementActive(int id, boolean bActive)
    • setActivePlayer

      public static void setActivePlayer(int id)
    • getPlayer

      public static IsoPlayer getPlayer()
      Gets the current player. To support splitscreen, getSpecificPlayer() should be preferred instead.
      Returns:
      The current player.
    • getNumActivePlayers

      public static int getNumActivePlayers()
    • playServerSound

      public static void playServerSound(String sound, IsoGridSquare sq)
    • getMaxActivePlayers

      public static int getMaxActivePlayers()
    • getPlayerScreenLeft

      public static int getPlayerScreenLeft(int player)
    • getPlayerScreenTop

      public static int getPlayerScreenTop(int player)
    • getPlayerScreenWidth

      public static int getPlayerScreenWidth(int player)
    • getPlayerScreenHeight

      public static int getPlayerScreenHeight(int player)
    • getPlayerByOnlineID

      public static IsoPlayer getPlayerByOnlineID(int id)
    • initUISystem

      public static void initUISystem()
    • getPerformance

      public static PerformanceSettings getPerformance()
    • getWorldSoundManager

      public static WorldSoundManager getWorldSoundManager()
    • getAnimalChunk

      public static AnimalChunk getAnimalChunk(int x, int y)
    • AddWorldSound

      public static void AddWorldSound(IsoPlayer player, int radius, int volume)
    • AddNoiseToken

      public static void AddNoiseToken(IsoGridSquare sq, int radius)
    • pauseSoundAndMusic

      public static void pauseSoundAndMusic()
    • resumeSoundAndMusic

      public static void resumeSoundAndMusic()
    • isDemo

      public static boolean isDemo()
    • getTimeInMillis

      public static long getTimeInMillis()
    • getCurrentCoroutine

      public static se.krka.kahlua.vm.Coroutine getCurrentCoroutine()
    • reloadLuaFile

      public static Object reloadLuaFile(String filename)
    • reloadServerLuaFile

      public static Object reloadServerLuaFile(String filename)
    • setSpawnRegion

      public static void setSpawnRegion(String spawnRegionName)
    • getServerSpawnRegions

      public static se.krka.kahlua.vm.KahluaTable getServerSpawnRegions()
    • getServerOptions

      public static ServerOptions getServerOptions()
    • getServerName

      public static String getServerName()
    • getServerIP

      public static String getServerIP()
    • getServerPort

      public static String getServerPort()
    • isShowConnectionInfo

      public static boolean isShowConnectionInfo()
    • setShowConnectionInfo

      public static void setShowConnectionInfo(boolean enabled)
    • isShowServerInfo

      public static boolean isShowServerInfo()
    • setShowServerInfo

      public static void setShowServerInfo(boolean enabled)
    • getSpecificPlayer

      public static IsoPlayer getSpecificPlayer(int player)
    • getCameraOffX

      public static float getCameraOffX()
    • getLatestSave

      public static se.krka.kahlua.vm.KahluaTable getLatestSave()
    • isCurrentExecutionPoint

      public static boolean isCurrentExecutionPoint(String file, int line)
    • toggleBreakOnChange

      public static void toggleBreakOnChange(se.krka.kahlua.vm.KahluaTable table, Object key)
    • isDebugEnabled

      public static boolean isDebugEnabled()
    • toggleBreakOnRead

      public static void toggleBreakOnRead(se.krka.kahlua.vm.KahluaTable table, Object key)
    • toggleBreakpoint

      public static void toggleBreakpoint(String file, int line)
    • sendVisual

      public static void sendVisual(IsoPlayer player)
    • sendSyncPlayerFields

      public static void sendSyncPlayerFields(IsoPlayer player, byte syncParams)
    • sendClothing

      public static void sendClothing(IsoPlayer player, ItemBodyLocation location, InventoryItem item)
    • syncVisuals

      public static void syncVisuals(IsoPlayer player)
    • sendEquip

      public static void sendEquip(IsoPlayer player)
    • sendDamage

      public static void sendDamage(IsoPlayer player)
    • sendPlayerEffects

      public static void sendPlayerEffects(IsoPlayer player)
    • sendItemStats

      public static void sendItemStats(InventoryItem item)
    • hasDataReadBreakpoint

      public static boolean hasDataReadBreakpoint(se.krka.kahlua.vm.KahluaTable table, Object key)
    • hasDataBreakpoint

      public static boolean hasDataBreakpoint(se.krka.kahlua.vm.KahluaTable table, Object key)
    • hasBreakpoint

      public static boolean hasBreakpoint(String file, int line)
    • getLoadedLuaCount

      public static int getLoadedLuaCount()
    • getLoadedLua

      public static String getLoadedLua(int n)
    • isServer

      public static boolean isServer()
    • isServerSoftReset

      public static boolean isServerSoftReset()
    • isClient

      public static boolean isClient()
    • isMultiplayer

      public static boolean isMultiplayer()
    • canSeePlayerStats

      public static boolean canSeePlayerStats()
    • getAccessLevel

      @Deprecated public static String getAccessLevel()
      Deprecated.
    • haveAccess

      @Deprecated public static boolean haveAccess(String access)
      Deprecated.
    • getOnlinePlayers

      public static ArrayList<IsoPlayer> getOnlinePlayers()
    • getDebug

      public static boolean getDebug()
    • getCameraOffY

      public static float getCameraOffY()
    • createRegionFile

      public static se.krka.kahlua.vm.KahluaTable createRegionFile()
      Create a dynamic table containing all spawnpoints.lua we find in vanilla folder + in loaded mods
    • getMapDirectoryTable

      public static se.krka.kahlua.vm.KahluaTable getMapDirectoryTable()
    • deleteSave

      public static void deleteSave(String folder)
    • sendPlayerExtraInfo

      public static void sendPlayerExtraInfo(IsoPlayer p)
    • getServerAddressFromArgs

      public static String getServerAddressFromArgs()
    • getServerPasswordFromArgs

      public static String getServerPasswordFromArgs()
    • getServerListFile

      @Deprecated public static String getServerListFile()
      Deprecated.
    • addServerToAccountList

      public static void addServerToAccountList(Server server)
    • updateServerToAccountList

      public static void updateServerToAccountList(Server server)
    • deleteServerToAccountList

      public static void deleteServerToAccountList(Server server)
    • addAccountToAccountList

      public static void addAccountToAccountList(Server server, Account account)
    • updateAccountToAccountList

      public static void updateAccountToAccountList(Account account)
    • deleteAccountToAccountList

      public static void deleteAccountToAccountList(Account account)
    • getServerList

      public static se.krka.kahlua.vm.KahluaTable getServerList()
    • ping

      public static void ping(String username, String pwd, String ip, String port, boolean doHash)
    • getCustomizationData

      public static void getCustomizationData(String username, String pwd, String ip, String port, String serverPassword, String serverName, boolean doHash)
    • getCombatConfig

      public static CombatConfig getCombatConfig()
    • stopPing

      public static void stopPing()
    • transformIntoKahluaTable

      public static se.krka.kahlua.vm.KahluaTable transformIntoKahluaTable(HashMap<Object,Object> map)
    • getSaveDirectory

      public static ArrayList<File> getSaveDirectory(String folder)
    • getFullSaveDirectoryTable

      public static se.krka.kahlua.vm.KahluaTable getFullSaveDirectoryTable()
    • getSaveName

      public static String getSaveName(File file)
    • getSaveDirectoryTable

      public static se.krka.kahlua.vm.KahluaTable getSaveDirectoryTable()
    • getCurrentSaveName

      public static String getCurrentSaveName()
    • getMods

      public static List<String> getMods()
    • doChallenge

      public static void doChallenge(se.krka.kahlua.vm.KahluaTable challenge)
    • doTutorial

      public static void doTutorial(se.krka.kahlua.vm.KahluaTable tutorial)
    • setMinMaxZombiesPerChunk

      public static void setMinMaxZombiesPerChunk(float min, float max)
    • deleteAllGameModeSaves

      public static void deleteAllGameModeSaves(String gameMode)
    • sledgeDestroy

      public static void sledgeDestroy(IsoObject object)
    • getBannedIPs

      public static void getBannedIPs()
    • getBannedSteamIDs

      public static void getBannedSteamIDs()
    • getTickets

      public static void getTickets(String author)
    • addTicket

      public static void addTicket(String author, String message, int ticketID)
    • viewedTicket

      public static void viewedTicket(String author, int ticketID)
    • removeTicket

      public static void removeTicket(int ticketID)
    • sendFactionInvite

      public static void sendFactionInvite(Faction faction, IsoPlayer host, String invited)
    • acceptFactionInvite

      public static void acceptFactionInvite(Faction faction, String host)
    • sendSafehouseInvite

      public static void sendSafehouseInvite(SafeHouse safehouse, IsoPlayer host, String invited)
    • acceptSafehouseInvite

      public static void acceptSafehouseInvite(SafeHouse safehouse, String host, IsoPlayer invited, boolean isAccepted)
    • sendSafehouseChangeMember

      public static void sendSafehouseChangeMember(SafeHouse safehouse, String player)
    • sendSafehouseChangeOwner

      public static void sendSafehouseChangeOwner(SafeHouse safehouse, String username)
    • sendSafehouseChangeRespawn

      public static void sendSafehouseChangeRespawn(SafeHouse safehouse, String player, boolean doRemove)
    • sendSafehouseChangeTitle

      public static void sendSafehouseChangeTitle(SafeHouse safehouse, String title)
    • sendSafezoneClaim

      public static void sendSafezoneClaim(String username, int x, int y, int h, int w, String title)
    • sendSafehouseClaim

      public static void sendSafehouseClaim(IsoGridSquare square, IsoPlayer player, String title)
    • sendSafehouseRelease

      public static void sendSafehouseRelease(SafeHouse safehouse)
    • createHordeFromTo

      public static void createHordeFromTo(float spawnX, float spawnY, float targetX, float targetY, int count)
    • createHordeInAreaTo

      public static void createHordeInAreaTo(int spawnX, int spawnY, int spawnW, int spawnH, int targetX, int targetY, int count)
    • spawnHorde

      public static void spawnHorde(float x, float y, float x2, float y2, float z, int count)
    • createZombie

      public static IsoZombie createZombie(float x, float y, float z, SurvivorDesc desc, int palette, IsoDirections dir)
    • triggerEvent

      public static void triggerEvent(String event)
    • triggerEvent

      public static void triggerEvent(String event, Object param)
    • triggerEvent

      public static void triggerEvent(String event, Object param, Object param2)
    • triggerEvent

      public static void triggerEvent(String event, Object param, Object param2, Object param3)
    • triggerEvent

      public static void triggerEvent(String event, Object param, Object param2, Object param3, Object param4)
    • debugLuaTable

      public static void debugLuaTable(Object param, int depth)
    • debugLuaTable

      public static void debugLuaTable(Object param)
    • sendItemsInContainer

      public static void sendItemsInContainer(IsoObject obj, ItemContainer container)
    • getModDirectoryTable

      public static se.krka.kahlua.vm.KahluaTable getModDirectoryTable()
    • getModInfoByID

      public static ChooseGameInfo.Mod getModInfoByID(String modID)
    • getModInfo

      public static ChooseGameInfo.Mod getModInfo(String modDir)
    • getMapFoldersForMod

      public static ArrayList<String> getMapFoldersForMod(String modID)
    • spawnpointsExistsForMod

      public static boolean spawnpointsExistsForMod(String modID, String mapFolder)
    • getFileSeparator

      public static String getFileSeparator()
      Returns the OS-defined file separator. It is not generally needed to use this, as most functions that expect a filepath string will parse them in an OS-independent way.
      Returns:
      File separator.
    • getScriptManager

      public static ScriptManager getScriptManager()
    • checkSaveFolderExists

      public static boolean checkSaveFolderExists(String f)
    • getAbsoluteSaveFolderName

      public static String getAbsoluteSaveFolderName(String f)
    • checkSaveFileExists

      public static boolean checkSaveFileExists(String f)
    • checkSavePlayerExists

      public static boolean checkSavePlayerExists()
    • cacheFileExists

      public static boolean cacheFileExists(String filename)
    • fileExists

      public static boolean fileExists(String filename)
    • serverFileExists

      public static boolean serverFileExists(String filename)
    • takeScreenshot

      public static void takeScreenshot()
    • takeScreenshot

      public static void takeScreenshot(String fileName)
    • checkStringPattern

      public static boolean checkStringPattern(String pattern)
    • instanceItem

      public static InventoryItem instanceItem(Item item)
    • instanceItem

      public static InventoryItem instanceItem(String item)
    • instanceItem

      public static InventoryItem instanceItem(String item, float useDelta)
    • instanceItem

      public static InventoryItem instanceItem(ItemKey item)
    • createNewScriptItem

      public static Item createNewScriptItem(String base, String name, String display, String type, String icon)
    • cloneItemType

      public static Item cloneItemType(String newName, String oldName)
    • moduleDotType

      public static String moduleDotType(String module, String type)
    • require

      public static Object require(String f)
    • getRenderer

      public static SpriteRenderer getRenderer()
    • getGameTime

      public static GameTime getGameTime()
    • getMaxPlayers

      public static Double getMaxPlayers()
    • callLua

      public static void callLua(String func, Object param1)
    • callLuaReturn

      public static ArrayList<Object> callLuaReturn(String func, ArrayList<Object> params)
    • callLuaBool

      public static Boolean callLuaBool(String func, Object params)
    • getWorld

      public static IsoWorld getWorld()
    • getCell

      public static IsoCell getCell()
    • getCellSizeInChunks

      public static Double getCellSizeInChunks()
    • getCellSizeInSquares

      public static Double getCellSizeInSquares()
    • getChunkSizeInSquares

      public static Double getChunkSizeInSquares()
    • getMinimumWorldLevel

      public static Double getMinimumWorldLevel()
    • getMaximumWorldLevel

      public static Double getMaximumWorldLevel()
    • getSandboxOptions

      public static SandboxOptions getSandboxOptions()
    • getFileOutput

      public static DataOutputStream getFileOutput(String filename)
      Gets an output stream for a file in the Lua cache.
      Parameters:
      filename - Path, relative to the Lua cache root, to write to. '..' is not allowed.
      Returns:
      Output stream, or null if the path was not valid.
    • getLastStandPlayersDirectory

      public static String getLastStandPlayersDirectory()
    • getLastStandPlayerFileNames

      public static List<String> getLastStandPlayerFileNames()
    • getAllSavedPlayers

      @Deprecated public static List<BufferedReader> getAllSavedPlayers() throws IOException
      Deprecated.
      Throws:
      IOException
    • getSandboxPresets

      public static List<String> getSandboxPresets()
    • deleteSandboxPreset

      public static void deleteSandboxPreset(String name)
    • getFileReader

      public static BufferedReader getFileReader(String filename, boolean createIfNull) throws IOException
      Gets a file reader for a file in the Lua cache.
      Parameters:
      filename - Path, relative to the Lua cache root, to read from. '..' is not allowed.
      createIfNull - Whether to create the file if it does not exist. The created file will be empty.
      Returns:
      File reader, or null if the path was not valid.
      Throws:
      IOException
    • getModFileReader

      public static BufferedReader getModFileReader(String modId, String filename, boolean createIfNull) throws IOException
      Gets a file reader for a file in a mod's directory.
      Parameters:
      modId - ID of the target mod. If null, the path will be relative to the local mods directory.
      filename - Path, relative to the mod's common folder, to read from. '..' is not allowed.
      createIfNull - Whether to create the file if it does not exist. The created file will be empty.
      Returns:
      File reader, or null if the path or mod was not valid.
      Throws:
      IOException
    • listFilesInZomboidLuaDirectory

      public static ArrayList<String> listFilesInZomboidLuaDirectory(String directory) throws IOException
      Throws:
      IOException
    • listFilesInModDirectory

      public static ArrayList<String> listFilesInModDirectory(String modID, String directory) throws IOException
      Throws:
      IOException
    • refreshAnimSets

      public static void refreshAnimSets(boolean reload)
    • reloadActionGroups

      public static void reloadActionGroups()
    • getModFileWriter

      public static LuaManager.GlobalObject.LuaFileWriter getModFileWriter(String modId, String filename, boolean createIfNull, boolean append)
      Gets a file writer for a file in a mod's directory. Note: it is generally unwise to write to a mod's lua or scripts directories, as this will change the checksum.
      Parameters:
      modId - ID of the target mod. If null, the path will be relative to the local mods directory.
      filename - Path, relative to the mod's common folder, to write to. '..' is not allowed.
      createIfNull - Whether to create the file if it does not exist. The created file will be empty.
      append - Whether to open the file in append mode. If true, the writer will write after the file's current contents. If false, the current contents of the file will be erased.
      Returns:
      The file writer, or null if the path or mod was not valid.
    • updateFire

      public static void updateFire()
    • deletePlayerFromDatabase

      public static void deletePlayerFromDatabase(String savedir, String player, String world)
    • checkPlayerExistsInDatabase

      public static boolean checkPlayerExistsInDatabase(String savedir, String player, String world)
    • deletePlayerSave

      public static void deletePlayerSave(String fileName)
    • getControllerCount

      public static int getControllerCount()
    • isControllerConnected

      public static boolean isControllerConnected(int index)
    • getControllerGUID

      public static String getControllerGUID(int joypad)
    • getControllerName

      public static String getControllerName(int joypad)
    • getControllerAxisCount

      public static int getControllerAxisCount(int c)
    • getControllerAxisValue

      public static float getControllerAxisValue(int c, int axis)
    • getControllerDeadZone

      public static float getControllerDeadZone(int c, int axis)
    • setControllerDeadZone

      public static void setControllerDeadZone(int c, int axis, float value)
    • saveControllerSettings

      public static void saveControllerSettings(int c)
    • getControllerButtonCount

      public static int getControllerButtonCount(int c)
    • getControllerPovX

      public static float getControllerPovX(int c)
    • getControllerPovY

      public static float getControllerPovY(int c)
    • reloadControllerConfigFiles

      public static void reloadControllerConfigFiles()
    • isJoypadPressed

      public static boolean isJoypadPressed(int joypad, int button)
    • isJoypadDown

      public static boolean isJoypadDown(int joypad)
    • isJoypadLTPressed

      public static boolean isJoypadLTPressed(int joypad)
    • isJoypadRTPressed

      public static boolean isJoypadRTPressed(int joypad)
    • isJoypadLeftStickButtonPressed

      public static boolean isJoypadLeftStickButtonPressed(int joypad)
    • isJoypadRightStickButtonPressed

      public static boolean isJoypadRightStickButtonPressed(int joypad)
    • getJoypadAimingAxisX

      public static float getJoypadAimingAxisX(int joypad)
    • getJoypadAimingAxisY

      public static float getJoypadAimingAxisY(int joypad)
    • getJoypadMovementAxisX

      public static float getJoypadMovementAxisX(int joypad)
    • getJoypadMovementAxisY

      public static float getJoypadMovementAxisY(int joypad)
    • getJoypadAButton

      public static int getJoypadAButton(int joypad)
    • getJoypadBButton

      public static int getJoypadBButton(int joypad)
    • getJoypadXButton

      public static int getJoypadXButton(int joypad)
    • getJoypadYButton

      public static int getJoypadYButton(int joypad)
    • getJoypadLBumper

      public static int getJoypadLBumper(int joypad)
    • getJoypadRBumper

      public static int getJoypadRBumper(int joypad)
    • getJoypadBackButton

      public static int getJoypadBackButton(int joypad)
    • getJoypadStartButton

      public static int getJoypadStartButton(int joypad)
    • getJoypadLeftStickButton

      public static int getJoypadLeftStickButton(int joypad)
    • getJoypadRightStickButton

      public static int getJoypadRightStickButton(int joypad)
    • wasMouseActiveMoreRecentlyThanJoypad

      public static boolean wasMouseActiveMoreRecentlyThanJoypad()
    • activateJoypadOnSteamDeck

      public static void activateJoypadOnSteamDeck()
    • reactivateJoypadAfterResetLua

      public static boolean reactivateJoypadAfterResetLua()
    • isJoypadConnected

      public static boolean isJoypadConnected(int index)
    • toInt

      public static int toInt(double val)
    • getClientUsername

      public static String getClientUsername()
    • setPlayerJoypad

      public static void setPlayerJoypad(int player, int joypad, IsoPlayer playerObj, String username)
    • setPlayerMouse

      public static void setPlayerMouse(IsoPlayer playerObj)
    • revertToKeyboardAndMouse

      public static void revertToKeyboardAndMouse()
    • revertToKeyboardAndMouseFromMainMenu

      public static void revertToKeyboardAndMouseFromMainMenu()
    • isJoypadUp

      public static boolean isJoypadUp(int joypad)
    • isJoypadLeft

      public static boolean isJoypadLeft(int joypad)
    • isJoypadRight

      public static boolean isJoypadRight(int joypad)
    • isJoypadLBPressed

      public static boolean isJoypadLBPressed(int joypad)
    • isJoypadRBPressed

      public static boolean isJoypadRBPressed(int joypad)
    • getButtonCount

      public static int getButtonCount(int joypad)
    • setDebugToggleControllerPluggedIn

      public static void setDebugToggleControllerPluggedIn(int index)
    • lineSeparator

      public static String lineSeparator()
    • getFileWriter

      public static LuaManager.GlobalObject.LuaFileWriter getFileWriter(String filename, boolean createIfNull, boolean append)
      Gets a file writer for a file in the Lua cache.
      Parameters:
      filename - Path, relative to the Lua cache root, to write to. '..' is not allowed.
      createIfNull - Whether to create the file if it does not exist.
      append - Whether to open the file in append mode. If true, the writer will write after the file's current contents. If false, the current contents of the file will be erased.
      Returns:
      File writer, or null if the path was not valid.
    • getSandboxFileWriter

      public static LuaManager.GlobalObject.LuaFileWriter getSandboxFileWriter(String filename, boolean createIfNull, boolean append)
    • createStory

      public static void createStory(String storyName)
    • createWorld

      public static void createWorld(String worldName)
    • sanitizeWorldName

      public static String sanitizeWorldName(String worldName)
    • forceChangeState

      public static void forceChangeState(GameState state)
    • endFileOutput

      public static void endFileOutput()
    • getFileInput

      public static DataInputStream getFileInput(String filename)
      Gets an input stream for a file in the Lua cache.
      Parameters:
      filename - Path, relative to the Lua cache root, to write to. '..' is not allowed.
      Returns:
      Input stream, or null if the path was not valid.
    • getGameFilesInput

      public static DataInputStream getGameFilesInput(String filename)
    • getGameFilesTextInput

      public static BufferedReader getGameFilesTextInput(String filename)
    • endTextFileInput

      public static void endTextFileInput()
    • endFileInput

      public static void endFileInput()
    • getLineNumber

      public static int getLineNumber(se.krka.kahlua.vm.LuaCallFrame c)
    • ZombRand

      public static double ZombRand(double max)
      Returns a pseudorandom integer between 0 and max - 1.
      Parameters:
      max - Exclusive upper bound of the integer value.
      Returns:
      Random integer.
    • ZombRandBetween

      public static double ZombRandBetween(double min, double max)
      Returns a pseudorandom integer between min and max - 1. No difference from ZombRand(min, max).
      Parameters:
      min - Inclusive lower bound of the random integer.
      max - Exclusive upper bound of the random integer.
      Returns:
      The random integer.
    • ZombRand

      public static double ZombRand(double min, double max)
      Returns a pseudorandom integer between min and max - 1.
      Parameters:
      min - Inclusive lower bound of the random integer.
      max - Exclusive upper bound of the random integer.
      Returns:
      Random integer.
    • ZombRandFloat

      public static float ZombRandFloat(float min, float max)
      Returns a pseudorandom float between min and max.
      Parameters:
      min - Lower bound of the random float.
      max - The upper bound of the random float.
      Returns:
      The random float.
    • getShortenedFilename

      public static String getShortenedFilename(String str)
    • isKeyDown

      public static boolean isKeyDown(int key)
    • isKeyDown

      public static boolean isKeyDown(String keyName)
    • wasKeyDown

      public static boolean wasKeyDown(int key)
    • wasKeyDown

      public static boolean wasKeyDown(String keyName)
    • isKeyPressed

      public static boolean isKeyPressed(int key)
    • isKeyPressed

      public static boolean isKeyPressed(String keyName)
    • getBaseSoundBank

      public static BaseSoundBank getBaseSoundBank()
    • getFMODSoundBank

      public static BaseSoundBank getFMODSoundBank()
    • isSoundPlaying

      public static boolean isSoundPlaying(Object sound)
    • stopSound

      public static void stopSound(long sound)
    • isShiftKeyDown

      public static boolean isShiftKeyDown()
    • isCtrlKeyDown

      public static boolean isCtrlKeyDown()
    • isAltKeyDown

      public static boolean isAltKeyDown()
    • isMetaKeyDown

      public static boolean isMetaKeyDown()
    • setZoomLevels

      public static void setZoomLevels(Double... zooms)
    • getCore

      public static Core getCore()
    • getGameVersion

      public static String getGameVersion()
    • getBreakModGameVersion

      public static GameVersion getBreakModGameVersion()
    • getSquare

      public static IsoGridSquare getSquare(double x, double y, double z)
    • getDebugOptions

      public static DebugOptions getDebugOptions()
    • setShowPausedMessage

      public static void setShowPausedMessage(boolean b)
    • getFilenameOfCallframe

      public static String getFilenameOfCallframe(se.krka.kahlua.vm.LuaCallFrame c)
    • getFilenameOfClosure

      public static String getFilenameOfClosure(se.krka.kahlua.vm.LuaClosure c)
    • getFirstLineOfClosure

      public static int getFirstLineOfClosure(se.krka.kahlua.vm.LuaClosure c)
    • getLocalVarCount

      public static int getLocalVarCount(se.krka.kahlua.vm.Coroutine c)
    • getLocalVarCount

      public static int getLocalVarCount(se.krka.kahlua.vm.LuaCallFrame callFrame)
    • isSystemLinux

      public static boolean isSystemLinux()
    • isSystemMacOS

      public static boolean isSystemMacOS()
    • isSystemWindows

      public static boolean isSystemWindows()
    • isModActive

      public static boolean isModActive(ChooseGameInfo.Mod mod)
    • openURl

      public static void openURl(String url)
    • isDesktopOpenSupported

      public static boolean isDesktopOpenSupported()
    • showFolderInDesktop

      public static void showFolderInDesktop(String folder)
    • getActivatedMods

      public static ArrayList<String> getActivatedMods()
      Gets the list of currently activated mods. Remember that in B42+, mod ids are prefixed with a \ character.
    • toggleModActive

      public static void toggleModActive(ChooseGameInfo.Mod mod, boolean active)
    • saveModsFile

      public static void saveModsFile()
    • manipulateSavefile

      public static void manipulateSavefile(String folder, String action)
    • getLocalVarName

      public static String getLocalVarName(se.krka.kahlua.vm.Coroutine c, int n)
    • getLocalVarName

      public static String getLocalVarName(se.krka.kahlua.vm.LuaCallFrame callFrame, int n)
    • getLocalVarStack

      public static int getLocalVarStack(se.krka.kahlua.vm.Coroutine c, int n)
    • getLocalVarStackIndex

      public static int getLocalVarStackIndex(se.krka.kahlua.vm.LuaCallFrame callFrame, int n)
    • getCallframeTop

      public static int getCallframeTop(se.krka.kahlua.vm.Coroutine c)
    • getCoroutineTop

      public static int getCoroutineTop(se.krka.kahlua.vm.Coroutine c)
    • getCoroutineObjStack

      public static Object getCoroutineObjStack(se.krka.kahlua.vm.Coroutine c, int n)
    • getCoroutineObjStackWithBase

      public static Object getCoroutineObjStackWithBase(se.krka.kahlua.vm.Coroutine c, int n)
    • localVarName

      public static String localVarName(se.krka.kahlua.vm.Coroutine c, int n)
    • getCoroutineCallframeStack

      public static se.krka.kahlua.vm.LuaCallFrame getCoroutineCallframeStack(se.krka.kahlua.vm.Coroutine c, int n)
    • getLuaStackTrace

      public static ArrayList<String> getLuaStackTrace()
    • createTile

      public static void createTile(String tile, IsoGridSquare square)
    • getNumClassFunctions

      public static int getNumClassFunctions(Object o)
    • getClassFunction

      public static Method getClassFunction(Object o, int i)
    • getNumClassFields

      public static int getNumClassFields(Object o)
    • getClassField

      public static Field getClassField(Object o, int i)
    • getDirectionTo

      public static IsoDirections getDirectionTo(IsoGameCharacter chara, IsoObject objTarget)
    • translatePointXInOverheadMapToWindow

      public static float translatePointXInOverheadMapToWindow(float x, UIElement ui, float zoom, float xpos)
    • translatePointYInOverheadMapToWindow

      public static float translatePointYInOverheadMapToWindow(float y, UIElement ui, float zoom, float ypos)
    • translatePointXInOverheadMapToWorld

      public static float translatePointXInOverheadMapToWorld(float x, UIElement ui, float zoom, float xpos)
    • translatePointYInOverheadMapToWorld

      public static float translatePointYInOverheadMapToWorld(float y, UIElement ui, float zoom, float ypos)
    • drawOverheadMap

      public static void drawOverheadMap(UIElement ui, int level, float zoom, float xpos, float ypos)
    • assaultPlayer

      public static void assaultPlayer()
    • isoRegionsRenderer

      public static IsoRegionsRenderer isoRegionsRenderer()
    • zpopNewRenderer

      public static ZombiePopulationRenderer zpopNewRenderer()
    • zpopSpawnTimeToZero

      public static void zpopSpawnTimeToZero(int cellX, int cellY)
    • zpopClearZombies

      public static void zpopClearZombies(int cellX, int cellY)
    • zpopSpawnNow

      public static void zpopSpawnNow(int cellX, int cellY)
    • addVirtualZombie

      public static void addVirtualZombie(int x, int y)
    • luaDebug

      public static void luaDebug()
    • setAggroTarget

      public static void setAggroTarget(int id, int x, int y)
    • debugFullyStreamedIn

      public static void debugFullyStreamedIn(int x, int y)
    • getClassFieldVal

      public static Object getClassFieldVal(Object o, Field field)
    • getMethodParameter

      public static String getMethodParameter(Method o, int i)
    • getMethodParameterCount

      public static int getMethodParameterCount(Method o)
    • breakpoint

      public static void breakpoint()
    • getLuaDebuggerErrorCount

      public static int getLuaDebuggerErrorCount()
    • getLuaDebuggerErrors

      public static ArrayList<String> getLuaDebuggerErrors()
    • doLuaDebuggerAction

      public static void doLuaDebuggerAction(String action)
    • isQuitCooldown

      public static boolean isQuitCooldown()
    • getGameSpeed

      public static int getGameSpeed()
    • setGameSpeed

      public static void setGameSpeed(int NewSpeed)
    • stepForward

      public static void stepForward()
    • isGamePaused

      public static boolean isGamePaused()
    • getMouseXScaled

      public static int getMouseXScaled()
    • getMouseYScaled

      public static int getMouseYScaled()
    • getMouseX

      public static int getMouseX()
    • setMouseXY

      public static void setMouseXY(int x, int y)
    • isMouseButtonDown

      public static boolean isMouseButtonDown(int number)
    • isMouseButtonPressed

      public static boolean isMouseButtonPressed(int number)
    • getMouseY

      public static int getMouseY()
    • getSoundManager

      public static BaseSoundManager getSoundManager()
    • getLastPlayedDate

      public static String getLastPlayedDate(String filename)
    • getTextureFromSaveDir

      public static Texture getTextureFromSaveDir(String filename, String saveName)
    • getSaveInfo

      public static se.krka.kahlua.vm.KahluaTable getSaveInfo(String saveDir)
    • renameSaveFile

      public static boolean renameSaveFile(String gameMode, String oldName, String newName)
    • setSavefilePlayer1

      public static void setSavefilePlayer1(String gameMode, String saveDir, int sqlID)
    • getServerSavedWorldVersion

      public static int getServerSavedWorldVersion(String saveFolder)
    • getZombieInfo

      public static se.krka.kahlua.vm.KahluaTable getZombieInfo(IsoZombie zombie)
    • getPlayerInfo

      public static se.krka.kahlua.vm.KahluaTable getPlayerInfo(IsoPlayer player)
    • getMapInfo

      public static se.krka.kahlua.vm.KahluaTable getMapInfo(String mapDir)
    • getVehicleInfo

      public static se.krka.kahlua.vm.KahluaTable getVehicleInfo(BaseVehicle vehicle)
    • getLotDirectories

      public static ArrayList<String> getLotDirectories()
    • useTextureFiltering

      public static void useTextureFiltering(boolean bUse)
    • getTexture

      public static Texture getTexture(String filename)
    • tryGetTexture

      public static Texture tryGetTexture(String filename)
    • sendSecretKey

      public static void sendSecretKey(String username, String pwd, String ip, int port, String serverPassword, boolean doHash, int authType, String secretKey)
    • stopSendSecretKey

      public static void stopSendSecretKey()
    • generateSecretKey

      public static String generateSecretKey()
    • sendGoogleAuth

      public static void sendGoogleAuth(String username, String code)
    • createQRCodeTex

      public static Texture createQRCodeTex(String user, String key) throws com.google.zxing.WriterException, IOException
      Throws:
      com.google.zxing.WriterException
      IOException
    • getVideo

      public static VideoTexture getVideo(String filename, int width, int height)
    • getTextManager

      public static TextManager getTextManager()
    • setProgressBarValue

      public static void setProgressBarValue(IsoPlayer player, int value)
    • getText

      public static String getText(String txt)
    • getText

      public static String getText(String txt, Object arg1)
    • getText

      public static String getText(String txt, Object arg1, Object arg2)
    • getText

      public static String getText(String txt, Object arg1, Object arg2, Object arg3)
    • getText

      public static String getText(String txt, Object arg1, Object arg2, Object arg3, Object arg4)
    • getTextOrNull

      public static String getTextOrNull(String txt)
    • getTextOrNull

      public static String getTextOrNull(String txt, Object arg1)
    • getTextOrNull

      public static String getTextOrNull(String txt, Object arg1, Object arg2)
    • getTextOrNull

      public static String getTextOrNull(String txt, Object arg1, Object arg2, Object arg3)
    • getTextOrNull

      public static String getTextOrNull(String txt, Object arg1, Object arg2, Object arg3, Object arg4)
    • getItemText

      public static String getItemText(String txt)
    • getRadioText

      public static String getRadioText(String txt)
    • getTextMediaEN

      public static String getTextMediaEN(String txt)
    • getItemNameFromFullType

      public static String getItemNameFromFullType(String fullType)
    • getItem

      public static Item getItem(String itemType)
    • getItemStaticModel

      public static String getItemStaticModel(String itemType)
    • isItemFood

      public static boolean isItemFood(String itemType)
    • getItemFoodType

      public static String getItemFoodType(String itemType)
    • isItemFresh

      public static boolean isItemFresh(String itemType, float age)
    • getItemCount

      public static int getItemCount(String itemType)
    • getItemWeight

      public static float getItemWeight(String itemType)
    • getItemActualWeight

      public static float getItemActualWeight(String itemType)
    • getItemConditionMax

      public static int getItemConditionMax(String itemType)
    • getItemEvolvedRecipeName

      public static String getItemEvolvedRecipeName(String itemType)
    • hasItemTag

      public static boolean hasItemTag(String itemType, ItemTag itemTag)
    • getItemDisplayName

      public static String getItemDisplayName(String itemType)
    • getItemName

      public static String getItemName(String itemType)
    • getItemTextureName

      public static String getItemTextureName(String itemType)
    • getAndFindNearestTracks

      public static ArrayList<AnimalTracks> getAndFindNearestTracks(IsoGameCharacter chr)
    • getItemTex

      public static Texture getItemTex(String itemType)
    • getRecipeDisplayName

      public static String getRecipeDisplayName(String name)
    • getMyDocumentFolder

      public static String getMyDocumentFolder()
    • getSpriteManager

      public static IsoSpriteManager getSpriteManager(String sprite)
    • getSprite

      public static IsoSprite getSprite(String sprite)
    • getServerModData

      public static void getServerModData()
    • isXBOXController

      public static boolean isXBOXController()
    • isPlaystationController

      public static boolean isPlaystationController(int id)
    • sendClientCommand

      public static void sendClientCommand(String module, String command, se.krka.kahlua.vm.KahluaTable args)
      Sends a command to the server, triggering the OnClientCommand event on the server. Does nothing if called on the server.
      Parameters:
      module - Module of the command. It is conventional to use the name of your mod as the module for all of your commands.
      command - Name of the command.
      args - Arguments to pass to the server. Non-POD elements of the table will be lost.
    • sendClientCommand

      public static void sendClientCommand(IsoPlayer player, String module, String command, se.krka.kahlua.vm.KahluaTable args)
      Sends a command to the server, triggering the OnClientCommand event on the server. Does nothing if called on the server.
      Parameters:
      player - The local player to associate the command with. If the player is not local, no command will be sent.
      module - Module of the command. It is conventional to use the name of your mod as the module for all of your commands.
      command - Name of the command.
      args - Arguments to pass to the server. Non-POD elements of the table will be lost.
    • sendServerCommand

      public static void sendServerCommand(String module, String command, se.krka.kahlua.vm.KahluaTable args)
      Sends a command to all clients, triggering the OnServerCommand event on every client. Does nothing if called on the client.
      Parameters:
      module - Module of the command. It is conventional to use the name of your mod as the module for all of your commands.
      command - Name of the command.
      args - Arguments to pass to the clients. Non-POD elements of the table will be lost.
    • sendServerCommand

      public static void sendServerCommand(IsoPlayer player, String module, String command, se.krka.kahlua.vm.KahluaTable args)
      Sends a command to a specific client, triggering the OnServerCommand event on the client. Does nothing if called on the client.
      Parameters:
      player - The player to send the command to. Only that player's client will receive the command.
      module - Module of the command. It is conventional to use the name of your mod as the module for all of your commands.
      command - Name of the command.
      args - Arguments to pass to the client. Non-POD elements of the table will be lost.
    • sendServerCommandV

      public void sendServerCommandV(String module, String command, Object... values)
    • sendClientCommandV

      public void sendClientCommandV(IsoPlayer player, String module, String command, Object... values)
    • addVariableToSyncList

      public static void addVariableToSyncList(String key)
    • getOnlineUsername

      public static String getOnlineUsername()
    • isValidUserName

      public static boolean isValidUserName(String user)
    • getHourMinute

      public static String getHourMinute()
    • SendCommandToServer

      public static void SendCommandToServer(String command)
    • isAdmin

      public static boolean isAdmin()
    • canModifyPlayerScoreboard

      @Deprecated public static boolean canModifyPlayerScoreboard()
      Deprecated.
    • isAccessLevel

      @Deprecated public static boolean isAccessLevel(String accessLevel)
      Deprecated.
    • sendHumanVisual

      public static void sendHumanVisual(IsoPlayer player)
    • stopFire

      public static void stopFire(Object obj)
    • sortBrowserList

      public static se.krka.kahlua.vm.KahluaTable sortBrowserList(se.krka.kahlua.j2se.KahluaTableImpl table, String sortType, boolean sortDown, se.krka.kahlua.j2se.KahluaTableImpl filterTable)
    • getGameClient

      public static GameClient getGameClient()
    • sendRequestInventory

      public static void sendRequestInventory(int id, String username)
    • InvMngGetItem

      public static void InvMngGetItem(long itemId, String itemType, int playerID, String username)
    • InvMngRemoveItem

      public static void InvMngRemoveItem(long itemId, int playerID, String username)
    • InvMngUpdateItem

      public static void InvMngUpdateItem(InventoryItem item, int playerID)
    • getConnectedPlayers

      public static ArrayList<IsoPlayer> getConnectedPlayers()
    • getPlayerFromUsername

      public static IsoPlayer getPlayerFromUsername(String username)
    • isCoopHost

      public static boolean isCoopHost()
    • setAdmin

      public static void setAdmin()
    • addWarningPoint

      public static void addWarningPoint(String user, String reason, int amount)
    • disconnect

      public static void disconnect()
    • writeLog

      public static void writeLog(String loggerName, String logs)
    • doKeyPress

      public static void doKeyPress(boolean doIt)
    • getEvolvedRecipes

      public static Stack<EvolvedRecipe> getEvolvedRecipes()
    • getZone

      public static Zone getZone(int x, int y, int z)
    • getZones

      public static ArrayList<Zone> getZones(int x, int y, int z)
    • getVehicleZoneAt

      public static VehicleZone getVehicleZoneAt(int x, int y, int z)
    • getCellMinX

      public static int getCellMinX()
    • getCellMaxX

      public static int getCellMaxX()
    • getCellMinY

      public static int getCellMinY()
    • getCellMaxY

      public static int getCellMaxY()
    • replaceWith

      public static String replaceWith(String toReplace, String regex, String by)
    • getTimestamp

      public static long getTimestamp()
    • getTimestampMs

      public static long getTimestampMs()
    • forceSnowCheck

      public static void forceSnowCheck()
    • getGametimeTimestamp

      public static long getGametimeTimestamp()
    • canInviteFriends

      public static boolean canInviteFriends()
    • inviteFriend

      public static void inviteFriend(String steamID)
    • getFriendsList

      public static se.krka.kahlua.vm.KahluaTable getFriendsList()
    • getSteamModeActive

      public static Boolean getSteamModeActive()
    • getStreamModeActive

      public static Boolean getStreamModeActive()
    • getRemotePlayModeActive

      public static Boolean getRemotePlayModeActive()
    • isValidSteamID

      public static boolean isValidSteamID(String s)
    • getCurrentUserSteamID

      public static String getCurrentUserSteamID()
    • getCurrentUserProfileName

      public static String getCurrentUserProfileName()
    • getSteamScoreboard

      public static boolean getSteamScoreboard()
    • isSteamOverlayEnabled

      public static boolean isSteamOverlayEnabled()
    • activateSteamOverlayToWorkshop

      public static void activateSteamOverlayToWorkshop()
    • activateSteamOverlayToWorkshopUser

      public static void activateSteamOverlayToWorkshopUser()
    • activateSteamOverlayToWorkshopItem

      public static void activateSteamOverlayToWorkshopItem(String itemID)
    • activateSteamOverlayToWebPage

      public static void activateSteamOverlayToWebPage(String url)
    • getSteamProfileNameFromSteamID

      public static String getSteamProfileNameFromSteamID(String steamID)
    • getSteamAvatarFromSteamID

      public static Texture getSteamAvatarFromSteamID(String steamID)
    • getSteamIDFromUsername

      public static String getSteamIDFromUsername(String username)
    • resetRegionFile

      public static void resetRegionFile()
    • getSteamProfileNameFromUsername

      public static String getSteamProfileNameFromUsername(String username)
    • getSteamAvatarFromUsername

      public static Texture getSteamAvatarFromUsername(String username)
    • getSteamWorkshopStagedItems

      public static ArrayList<SteamWorkshopItem> getSteamWorkshopStagedItems()
    • getSteamWorkshopItemIDs

      public static ArrayList<String> getSteamWorkshopItemIDs()
    • getSteamWorkshopItemMods

      public static ArrayList<ChooseGameInfo.Mod> getSteamWorkshopItemMods(String itemIDStr)
    • isSteamRunningOnSteamDeck

      public static boolean isSteamRunningOnSteamDeck()
    • showSteamGamepadTextInput

      public static boolean showSteamGamepadTextInput(boolean password, boolean multiLine, String description, int maxChars, String existingText)
    • showSteamFloatingGamepadTextInput

      public static boolean showSteamFloatingGamepadTextInput(boolean multiLine, int x, int y, int width, int height)
    • isFloatingGamepadTextInputVisible

      public static boolean isFloatingGamepadTextInputVisible()
    • sendPlayerStatsChange

      public static void sendPlayerStatsChange(IsoPlayer player)
    • sendPersonalColor

      public static void sendPersonalColor(IsoPlayer player)
    • requestTrading

      public static void requestTrading(IsoPlayer you, IsoPlayer other)
    • acceptTrading

      public static void acceptTrading(IsoPlayer you, IsoPlayer other, boolean accept)
    • tradingUISendAddItem

      public static void tradingUISendAddItem(IsoPlayer you, IsoPlayer other, InventoryItem item)
    • tradingUISendRemoveItem

      public static void tradingUISendRemoveItem(IsoPlayer you, IsoPlayer other, InventoryItem item)
    • tradingUISendUpdateState

      public static void tradingUISendUpdateState(IsoPlayer you, IsoPlayer other, int state)
    • sendWarManagerUpdate

      public static void sendWarManagerUpdate(int onlineID, String attacker, WarManager.State state)
    • getTwoLetters

      public static String getTwoLetters(String input)
    • splitString

      public static se.krka.kahlua.vm.KahluaTable splitString(String input, int maxSize)
    • querySteamWorkshopItemDetails

      public static void querySteamWorkshopItemDetails(ArrayList<String> itemIDs, se.krka.kahlua.vm.LuaClosure functionObj, Object arg1)
    • connectToServerStateCallback

      public static void connectToServerStateCallback(String button)
    • getPublicServersList

      public static se.krka.kahlua.vm.KahluaTable getPublicServersList()
    • steamRequestInternetServersList

      public static void steamRequestInternetServersList()
    • steamReleaseInternetServersRequest

      public static void steamReleaseInternetServersRequest()
    • steamRequestInternetServersCount

      public static int steamRequestInternetServersCount()
    • steamGetInternetServerDetails

      public static Server steamGetInternetServerDetails(int index)
    • steamRequestServerRules

      public static boolean steamRequestServerRules(String host, int port)
    • getHostByName

      public static String getHostByName(String hostname)
    • steamRequestServerDetails

      public static boolean steamRequestServerDetails(String host, int port)
    • isPublicServerListAllowed

      public static boolean isPublicServerListAllowed()
    • isSteamServerBrowserEnabled

      public static boolean isSteamServerBrowserEnabled()
    • testSound

      public static void testSound()
    • getFMODEventPathList

      public static ArrayList<String> getFMODEventPathList()
    • debugSetRoomType

      public static void debugSetRoomType(Double roomType)
    • copyTable

      public static se.krka.kahlua.vm.KahluaTable copyTable(se.krka.kahlua.vm.KahluaTable table)
    • copyTable

      public static se.krka.kahlua.vm.KahluaTable copyTable(se.krka.kahlua.vm.KahluaTable to, se.krka.kahlua.vm.KahluaTable from)
    • renderIsoCircle

      public static void renderIsoCircle(float x, float y, float z, float radius, float r, float g, float b, float a, int thickness)
    • renderIsoRect

      public static void renderIsoRect(float x, float y, float z, float radius, float r, float g, float b, float a, int thickness)
    • renderLine

      public static void renderLine(float x, float y, float z, float tx, float ty, float tz, float r, float g, float b, float a)
    • configureLighting

      public static void configureLighting(float darkStep)
    • invalidateLighting

      public static void invalidateLighting()
    • testHelicopter

      public static void testHelicopter()
    • endHelicopter

      public static void endHelicopter()
    • getServerSettingsManager

      public static ServerSettingsManager getServerSettingsManager()
    • rainConfig

      public static void rainConfig(String cmd, int arg)
    • sendSwitchSeat

      public static void sendSwitchSeat(BaseVehicle vehicle, IsoGameCharacter chr, int seatFrom, int seatTo)
    • getVehicleById

      public static BaseVehicle getVehicleById(int id)
    • removeVehicle

      public static void removeVehicle(IsoPlayer player, BaseVehicle baseVehicle)
    • removeAllVehicles

      public static void removeAllVehicles(IsoPlayer player)
    • addBloodSplat

      public void addBloodSplat(IsoGridSquare sq, int nbr)
    • addBloodSplat

      public void addBloodSplat(IsoGridSquare sq, int nbr, float xoffset, float yoffset)
    • addCarCrash

      public static void addCarCrash()
    • createRandomDeadBody

      public static IsoDeadBody createRandomDeadBody(IsoGridSquare square, int blood)
    • addZombieSitting

      public void addZombieSitting(int x, int y, int z)
    • addZombiesEating

      public void addZombiesEating(int x, int y, int z, int totalZombies, boolean skeletonBody)
    • addZombiesInOutfitArea

      public ArrayList<IsoZombie> addZombiesInOutfitArea(int x1, int y1, int x2, int y2, int z, int totalZombies, String outfit, Integer femaleChance)
    • addZombiesInOutfit

      public static ArrayList<IsoZombie> addZombiesInOutfit(int x, int y, int z, int totalZombies, String outfit, Integer femaleChance)
    • addZombiesInOutfit

      public static ArrayList<IsoZombie> addZombiesInOutfit(int x, int y, int z, int totalZombies, String outfit, Integer femaleChance, boolean isCrawler, boolean isFallOnFront, boolean isFakeDead, boolean isKnockedDown, boolean isInvulnerable, boolean isSitting, float health)
    • addZombiesInOutfit

      public static ArrayList<IsoZombie> addZombiesInOutfit(int x, int y, int z, int totalZombies, String outfit, Integer femaleChance, boolean isCrawler, boolean isFallOnFront, boolean isFakeDead, boolean isKnockedDown, boolean isInvulnerable, boolean isSitting, float health, boolean isAnimRecording)
    • addZombiesInOutfit

      public static ArrayList<IsoZombie> addZombiesInOutfit(int x, int y, int z, int totalZombies, String outfit, Integer femaleChance, boolean isCrawler, boolean isFallOnFront, boolean isFakeDead, boolean isKnockedDown, boolean isInvulnerable, boolean isSitting, float health, boolean isAnimRecording, float heightOffset)
    • addZombiesInBuilding

      public ArrayList<IsoZombie> addZombiesInBuilding(BuildingDef def, int totalZombies, String outfit, RoomDef room, Integer femaleChance)
    • addVehicleDebug

      public static BaseVehicle addVehicleDebug(String scriptName, IsoDirections dir, Integer skinIndex, IsoGridSquare sq)
    • addVehicle

      public static BaseVehicle addVehicle(String script, int x, int y, int z)
    • attachTrailerToPlayerVehicle

      public static void attachTrailerToPlayerVehicle(int playerIndex)
    • getKeyName

      public static String getKeyName(int key)
    • getKeyCode

      public static int getKeyCode(String keyName)
    • queueCharEvent

      public static void queueCharEvent(String eventChar)
    • queueKeyEvent

      public static void queueKeyEvent(int lwjglKeyCode)
    • addAllVehicles

      public static void addAllVehicles()
    • addAllBurntVehicles

      public static void addAllBurntVehicles()
    • addAllSmashedVehicles

      public static void addAllSmashedVehicles()
    • addAllVehicles

      public static void addAllVehicles(Predicate<VehicleScript> predicate)
    • addPhysicsObject

      public static BaseVehicle addPhysicsObject()
    • toggleVehicleRenderToTexture

      public static void toggleVehicleRenderToTexture()
    • reloadSoundFiles

      public static void reloadSoundFiles()
    • getAnimationViewerState

      public static AnimationViewerState getAnimationViewerState()
    • getAttachmentEditorState

      public static AttachmentEditorState getAttachmentEditorState()
    • getEditVehicleState

      public static EditVehicleState getEditVehicleState()
    • getSpriteModelEditorState

      public static SpriteModelEditorState getSpriteModelEditorState()
    • showAnimationViewer

      public static void showAnimationViewer()
    • showAttachmentEditor

      public static void showAttachmentEditor()
    • showChunkDebugger

      public static void showChunkDebugger()
    • getTileGeometryState

      public static TileGeometryState getTileGeometryState()
    • showGlobalObjectDebugger

      public static void showGlobalObjectDebugger()
    • showSeamEditor

      public static void showSeamEditor()
    • getSeamEditorState

      public static SeamEditorState getSeamEditorState()
    • showSpriteModelEditor

      public static void showSpriteModelEditor()
    • showVehicleEditor

      public static void showVehicleEditor(String scriptName)
    • showWorldMapEditor

      public static void showWorldMapEditor(String value)
    • reloadVehicles

      public static void reloadVehicles()
    • reloadEngineRPM

      public static void reloadEngineRPM()
    • reloadXui

      public static void reloadXui()
    • reloadScripts

      public static void reloadScripts(ScriptType type)
    • reloadEntityScripts

      public static void reloadEntityScripts()
    • reloadEntitiesDebug

      public static void reloadEntitiesDebug()
    • reloadEntityDebug

      public static void reloadEntityDebug(GameEntity entity)
    • reloadEntityFromScriptDebug

      public static void reloadEntityFromScriptDebug(GameEntity entity)
    • getIsoEntitiesDebug

      public static ArrayList<GameEntity> getIsoEntitiesDebug()
    • proceedPM

      public static String proceedPM(String command)
    • processSayMessage

      public static void processSayMessage(String message)
    • processGeneralMessage

      public static void processGeneralMessage(String message)
    • processShoutMessage

      public static void processShoutMessage(String message)
    • ProceedFactionMessage

      public static void ProceedFactionMessage(String message)
    • ProcessSafehouseMessage

      public static void ProcessSafehouseMessage(String message)
    • ProcessAdminChatMessage

      public static void ProcessAdminChatMessage(String message)
    • showWrongChatTabMessage

      public static void showWrongChatTabMessage(int actualTabID, int rightTabID, String chatCommand)
    • focusOnTab

      public static void focusOnTab(Short id)
    • updateChatSettings

      public static void updateChatSettings(String fontSize, boolean showTimestamp, boolean showTitle)
    • checkPlayerCanUseChat

      public static Boolean checkPlayerCanUseChat(String chatCommand)
    • reloadVehicleTextures

      public static void reloadVehicleTextures(String scriptName)
    • useStaticErosionRand

      public static void useStaticErosionRand(boolean use)
    • getClimateManager

      public static ClimateManager getClimateManager()
    • getClimateMoon

      public static ClimateMoon getClimateMoon()
    • getWorldMarkers

      public static WorldMarkers getWorldMarkers()
    • getIsoMarkers

      public static IsoMarkers getIsoMarkers()
    • getErosion

      public static ErosionMain getErosion()
    • getAllOutfits

      public static ArrayList<String> getAllOutfits(boolean female)
    • getAllVehicles

      public static ArrayList<String> getAllVehicles()
    • getAllHairStyles

      public static ArrayList<String> getAllHairStyles(boolean female)
    • getHairStylesInstance

      public static HairStyles getHairStylesInstance()
    • getBeardStylesInstance

      public static BeardStyles getBeardStylesInstance()
    • getAllBeardStyles

      public static ArrayList<String> getAllBeardStyles()
    • getVoiceStylesInstance

      public static VoiceStyles getVoiceStylesInstance()
    • getAllVoiceStyles

      public static ArrayList<VoiceStyle> getAllVoiceStyles()
    • getAllItemsForBodyLocation

      public static se.krka.kahlua.vm.KahluaTable getAllItemsForBodyLocation(String bodyLocation)
    • getAllDecalNamesForItem

      public static ArrayList<String> getAllDecalNamesForItem(InventoryItem item)
    • screenZoomIn

      public void screenZoomIn()
    • screenZoomOut

      public void screenZoomOut()
    • addSound

      public void addSound(IsoObject source, int x, int y, int z, int radius, int volume)
    • sendPlaySound

      public void sendPlaySound(String sound, boolean loop, IsoMovingObject object)
    • sendAddXp

      public void sendAddXp(IsoPlayer player, PerkFactory.Perk perk, float amount, boolean noMultiplier)
    • sendIconFound

      public void sendIconFound(IsoPlayer player, String type, float distanceTraveled)
    • addXpNoMultiplier

      public void addXpNoMultiplier(IsoPlayer player, PerkFactory.Perk perk, float amount)
    • addXp

      public void addXp(IsoPlayer player, PerkFactory.Perk perk, float amount)
    • addXpMultiplier

      public void addXpMultiplier(IsoPlayer player, PerkFactory.Perk perk, float multiplier, int minLevel, int maxLevel)
    • syncBodyPart

      public void syncBodyPart(BodyPart bodyPart, long syncParams)
    • syncPlayerStats

      public void syncPlayerStats(IsoPlayer player, int syncParams)
    • sendPlayerStat

      public void sendPlayerStat(IsoPlayer player, CharacterStat stat)
    • sendPlayerNutrition

      public void sendPlayerNutrition(IsoPlayer player)
    • SyncXp

      public void SyncXp(IsoPlayer player)
    • checkServerName

      public String checkServerName(String name)
    • Render3DItem

      public void Render3DItem(InventoryItem item, IsoGridSquare sq, float xoffset, float yoffset, float zoffset, float rotation)
      Draws an item's model in the world. Only works when certain render state is set.
      Parameters:
      item - The item to render.
      sq - The square to draw the item on.
      xoffset - Offset on the x axis to draw the model.
      yoffset - Offset on the y axis to draw the model.
      zoffset - Offset on the z axis to draw the model.
      rotation - Yaw rotation of the model in degrees.
    • getContainerOverlays

      public ContainerOverlays getContainerOverlays()
    • getTileOverlays

      public TileOverlays getTileOverlays()
    • NewMapBinaryFile

      public void NewMapBinaryFile(String cmd) throws IOException
      Throws:
      IOException
    • getAverageFSP

      public Double getAverageFSP()
    • getCPUTime

      public long getCPUTime()
    • getGPUTime

      public long getGPUTime()
    • getCPUWait

      public long getCPUWait()
    • getGPUWait

      public long getGPUWait()
    • getServerFPS

      public int getServerFPS()
    • createItemTransaction

      public static byte createItemTransaction(IsoPlayer player, InventoryItem item, ItemContainer src, ItemContainer dst)
    • createItemTransactionWithPosData

      @Deprecated public static byte createItemTransactionWithPosData(IsoPlayer player, InventoryItem item, ItemContainer src, ItemContainer dst, String direction, float posX, float posY, float posZ)
      Deprecated.
    • changeItemTypeTransaction

      public static byte changeItemTypeTransaction(IsoPlayer player, InventoryItem item, String itemType)
    • removeItemTransaction

      public static void removeItemTransaction(byte id, boolean isCanceled)
    • isItemTransactionConsistent

      public static boolean isItemTransactionConsistent(InventoryItem item, ItemContainer src, ItemContainer dst, String extra)
    • isItemTransactionDone

      public static boolean isItemTransactionDone(byte id)
    • isItemTransactionRejected

      public static boolean isItemTransactionRejected(byte id)
    • getItemTransactionDuration

      public static int getItemTransactionDuration(byte id)
    • isActionDone

      public static boolean isActionDone(byte id)
    • isActionRejected

      public static boolean isActionRejected(byte id)
    • getActionDuration

      public static int getActionDuration(byte id)
    • removeAction

      public static void removeAction(byte id, boolean isCanceled)
    • emulateAnimEvent

      public static void emulateAnimEvent(NetTimedAction action, long duration, String event, String parameter)
    • emulateAnimEventOnce

      public static void emulateAnimEventOnce(NetTimedAction action, long duration, String event, String parameter)
    • detectBadWords

      public static boolean detectBadWords(String text)
    • profanityFilterCheck

      public static boolean profanityFilterCheck(String text)
    • showDebugInfoInChat

      public static void showDebugInfoInChat(String msg)
    • createBuildAction

      public static byte createBuildAction(IsoPlayer player, float x, float y, float z, boolean north, String spriteName, se.krka.kahlua.vm.KahluaTable item)
    • startFishingAction

      public static byte startFishingAction(IsoPlayer player, InventoryItem item, IsoGridSquare sq, se.krka.kahlua.vm.KahluaTable bobber)
    • syncItemModData

      public void syncItemModData(IsoPlayer player, InventoryItem item)
    • syncItemFields

      public void syncItemFields(IsoPlayer player, InventoryItem item)
    • syncHandWeaponFields

      public void syncHandWeaponFields(IsoPlayer player, HandWeapon item)
    • getPickedUpFish

      public InventoryItem getPickedUpFish(IsoPlayer player)
    • sendAddItemToContainer

      public static void sendAddItemToContainer(ItemContainer container, InventoryItem item)
    • sendAddItemsToContainer

      public static void sendAddItemsToContainer(ItemContainer container, ArrayList<InventoryItem> items)
    • sendAttachedItem

      public static void sendAttachedItem(IsoGameCharacter character, String location, InventoryItem item)
    • sendReplaceItemInContainer

      public static void sendReplaceItemInContainer(ItemContainer container, InventoryItem oldItem, InventoryItem newItem)
    • sendRemoveItemFromContainer

      public static void sendRemoveItemFromContainer(ItemContainer container, InventoryItem item)
    • sendRemoveItemsFromContainer

      public static void sendRemoveItemsFromContainer(ItemContainer container, ArrayList<InventoryItem> items)
    • replaceItemInContainer

      public static void replaceItemInContainer(ItemContainer container, InventoryItem oldItem, InventoryItem newItem)
    • log

      public static void log(DebugType type, String message)
    • teleportPlayers

      public static void teleportPlayers(IsoPlayer player)
    • checkModsNeedUpdate

      public static void checkModsNeedUpdate(UdpConnection connection)
    • getSearchMode

      public static SearchMode getSearchMode()
    • transmitBigWaterSplash

      public static void transmitBigWaterSplash(int x, int y, float dx, float dy)
    • addAreaHighlight

      public static void addAreaHighlight(int x1, int y1, int x2, int y2, int z, float r, float g, float b, float a)
    • addAreaHighlightForPlayer

      public static void addAreaHighlightForPlayer(int playerIndex, int x1, int y1, int x2, int y2, int z, float r, float g, float b, float a)
    • configRoomFade

      public static void configRoomFade(float seconds, float percent)
    • timSort

      public static void timSort(se.krka.kahlua.vm.KahluaTable table, Object functionObject)
    • javaListRemoveAt

      public static Object javaListRemoveAt(List<?> javaList, int index)
    • sendDebugStory

      public static void sendDebugStory(IsoGridSquare square, int type, String name)
    • displayLUATable

      public static void displayLUATable(se.krka.kahlua.vm.KahluaTable table)
    • showTimers

      public static void showTimers(String clazzStr)
    • showTimersTotal

      public static void showTimersTotal(String clazzStr)
    • resetTimers

      public static void resetTimers(String clazzStr)
    • getTimerKept

      public static void getTimerKept(String clazzStr, String field)