Jump to content

Recommended Posts

Posted

Hello PZ modding community! After a few days of digging through the source code I've successfully created a list of events that can be used when LUA scripting.

 

I will be updating this list after every major build. (32 -> 33).

 

Here is a link to the sheet. I'll be adding a full functions list as well soon. Also, gimme some advice on the style of that page. I'm a mere software developer, so keep it cool. As always, contact me here if you find something amiss or discover some new functionality or LUA event/function I'm not yet aware of! Also, I know it can be hard to understand, I'm working on fixing that and providing examples of implementation. If you have any questions at all, please leave a comment here or pm me and I'll help ya out.

 

I'll write a mobile site if it's in high demand, for now, consider it desktop only. Should support all known desktop and tablet resolutions though!

 

Edit: Don't want to use my site? Liberal? Here's a dropbox link for the excel sheet!

 

Thanks, happy modding!

Posted

It's beautiful, maaaaaaaaan!

I like the style of the page - clean, direct, very readable. Pragmatic, as a code reference should be. My only suggestions would be to alphabetize the events and perhaps use the true Java class name for all of the callback parameter types (i.e. "IsoPlayer" instead of "Player", etc.)

 

Thanks for the work you put into this =]

Posted

This is the list of events that are registered in the event object ingame (aka you can use this list to see if you missed any)

 

OnGameBootOnPreGameStartOnTickOnTickEvenPausedOnRenderUpdateOnFETickOnGameStartOnPreUIDrawOnPostUIDrawOnCharacterCollideOnKeyPressedOnObjectCollideOnNPCSurvivorUpdateOnPlayerUpdateOnZombieUpdateOnTriggerNPCEventOnMultiTriggerNPCEventOnLoadMapZonesOnAddBuildingOnCreateLivingCharacterOnChallengeQueryOnFillInventoryObjectContextMenuOnPreFillInventoryObjectContextMenuOnFillWorldObjectContextMenuOnPreFillWorldObjectContextMenuOnMakeItemOnJoypadActivateOnWeaponHitCharacterOnWeaponSwingOnWeaponHitTreeOnWeaponSwingHitPointOnPlayerCancelTimedActionOnLoginStateOnLoginStateSuccessOnCharacterCreateStatsOnObjectLeftMouseButtonDownOnObjectLeftMouseButtonUpOnObjectRightMouseButtonDownOnObjectRightMouseButtonUpOnDoTileBuildingOnDoTileBuilding2OnDoTileBuilding3OnConnectFailedOnConnectedOnDisconnectOnConnectionStateChangedOnScoreboardUpdateOnMouseMoveOnMouseDownOnMouseUpOnRightMouseDownOnRightMouseUpOnNewSurvivorGroupOnPlayerSetSafehouseOnLoadAddXPLevelPerkOnSaveOnMainMenuEnterOnPreMapLoadOnPostFloorSquareDrawOnPostFloorLayerDrawOnPostTilesSquareDrawOnPostTileDrawOnPostWallSquareDrawOnPostCharactersSquareDrawOnCreateUIOnMapLoadCreateIsoObjectOnCreateSurvivorOnCreatePlayerOnPlayerDeathOnZombieDeadOnCharacterMeetOnSpawnRegionsLoadedOnPostMapLoadOnAIStateExecuteOnAIStateEnterOnAIStateExitOnAIStateChangeOnPlayerMoveOnInitWorldOnNewGameOnIsoThumpableLoadOnIsoThumpableSaveReuseGridsquareLoadGridsquareEveryTenMinutesEveryDaysEveryHoursOnDuskOnDawnOnEquipPrimaryOnEquipSecondaryOnClothingUpdatedOnRainStartOnRainStopOnAmbientSoundOnResetLuaOnSeeNewRoomOnNewFireOnFillContainerOnChangeWeatherOnRenderTickOnJoypadActivateUIOnDestroyIsoThumpableOnPostSaveOnResolutionChangeOnWaterAmountChangeOnClientCommandOnServerCommandOnContainerUpdateOnObjectAddedonLoadModDataFromServerOnGameTimeLoadedOnWorldMessageOnKeyKeepPressedSendCustomModDataServerPingedOnServerStartedOnLoadedTileDefinitionsOnPostRenderDoSpecialTooltipOnCoopJoinFailedOnCustomUIKeyOnAcceptInviteOnSteamFriendStatusChangedOnSteamServerRespondedOnSteamRefreshInternetServersOnSteamRulesRefreshCompleteOnSteamServerResponded2OnSteamServerFailedToRespond2OnServerWorkshopItemsOnSteamWorkshopItemCreatedOnSteamWorkshopItemNotCreatedOnSteamWorkshopItemUpdatedOnSteamWorkshopItemNotUpdated

 

And thank you an updated list, and puting time into this <3

Posted

It's beautiful, maaaaaaaaan!

I like the style of the page - clean, direct, very readable. Pragmatic, as a code reference should be. My only suggestions would be to alphabetize the events and perhaps use the true Java class name for all of the callback parameter types (i.e. "IsoPlayer" instead of "Player", etc.)

 

Thanks for the work you put into this =]

 

Hey man, don't mention it. Sure no problem, I'll alphabetize it! It was true callbacks until I realized it might be overwhelming to understand at first, but maybe I'll add a simple toggle button. Thanks for the suggestion!

 

Edit: All alphabetized! Sorry, I should've done that to begin with.

 

This is the list of events that are registered in the event object ingame (aka you can use this list to see if you missed any)

 

OnGameBootOnPreGameStartOnTickOnTickEvenPausedOnRenderUpdateOnFETickOnGameStartOnPreUIDrawOnPostUIDrawOnCharacterCollideOnKeyPressedOnObjectCollideOnNPCSurvivorUpdateOnPlayerUpdateOnZombieUpdateOnTriggerNPCEventOnMultiTriggerNPCEventOnLoadMapZonesOnAddBuildingOnCreateLivingCharacterOnChallengeQueryOnFillInventoryObjectContextMenuOnPreFillInventoryObjectContextMenuOnFillWorldObjectContextMenuOnPreFillWorldObjectContextMenuOnMakeItemOnJoypadActivateOnWeaponHitCharacterOnWeaponSwingOnWeaponHitTreeOnWeaponSwingHitPointOnPlayerCancelTimedActionOnLoginStateOnLoginStateSuccessOnCharacterCreateStatsOnObjectLeftMouseButtonDownOnObjectLeftMouseButtonUpOnObjectRightMouseButtonDownOnObjectRightMouseButtonUpOnDoTileBuildingOnDoTileBuilding2OnDoTileBuilding3OnConnectFailedOnConnectedOnDisconnectOnConnectionStateChangedOnScoreboardUpdateOnMouseMoveOnMouseDownOnMouseUpOnRightMouseDownOnRightMouseUpOnNewSurvivorGroupOnPlayerSetSafehouseOnLoadAddXPLevelPerkOnSaveOnMainMenuEnterOnPreMapLoadOnPostFloorSquareDrawOnPostFloorLayerDrawOnPostTilesSquareDrawOnPostTileDrawOnPostWallSquareDrawOnPostCharactersSquareDrawOnCreateUIOnMapLoadCreateIsoObjectOnCreateSurvivorOnCreatePlayerOnPlayerDeathOnZombieDeadOnCharacterMeetOnSpawnRegionsLoadedOnPostMapLoadOnAIStateExecuteOnAIStateEnterOnAIStateExitOnAIStateChangeOnPlayerMoveOnInitWorldOnNewGameOnIsoThumpableLoadOnIsoThumpableSaveReuseGridsquareLoadGridsquareEveryTenMinutesEveryDaysEveryHoursOnDuskOnDawnOnEquipPrimaryOnEquipSecondaryOnClothingUpdatedOnRainStartOnRainStopOnAmbientSoundOnResetLuaOnSeeNewRoomOnNewFireOnFillContainerOnChangeWeatherOnRenderTickOnJoypadActivateUIOnDestroyIsoThumpableOnPostSaveOnResolutionChangeOnWaterAmountChangeOnClientCommandOnServerCommandOnContainerUpdateOnObjectAddedonLoadModDataFromServerOnGameTimeLoadedOnWorldMessageOnKeyKeepPressedSendCustomModDataServerPingedOnServerStartedOnLoadedTileDefinitionsOnPostRenderDoSpecialTooltipOnCoopJoinFailedOnCustomUIKeyOnAcceptInviteOnSteamFriendStatusChangedOnSteamServerRespondedOnSteamRefreshInternetServersOnSteamRulesRefreshCompleteOnSteamServerResponded2OnSteamServerFailedToRespond2OnServerWorkshopItemsOnSteamWorkshopItemCreatedOnSteamWorkshopItemNotCreatedOnSteamWorkshopItemUpdatedOnSteamWorkshopItemNotUpdated

 

And thank you an updated list, and puting time into this <3

 

No problem, glad it helps! And thanks for that list, I'll compare it to mine.

Posted

It's beautiful, maaaaaaaaan!

I like the style of the page - clean, direct, very readable. Pragmatic, as a code reference should be. My only suggestions would be to alphabetize the events and perhaps use the true Java class name for all of the callback parameter types (i.e. "IsoPlayer" instead of "Player", etc.)

 

Thanks for the work you put into this =]

 

Hey man, don't mention it. Sure no problem, I'll alphabetize it! It was true callbacks until I realized it might be overwhelming to understand at first, but maybe I'll add a simple toggle button. Thanks for the suggestion!

*snip*

You could do both,object/variable time and a tag. IsoGameCharacter player, int 0, etc

Posted

 

You could do both,object/variable time and a tag. IsoGameCharacter player, int 0, etc

 

 

For simplicity, I'll keep it in the legend for now and define primitives in the event detail section. Thank you!

  • 1 year later...
Posted (edited)

Hi, can't download your sheet because link probably dead. That shown as(after going by link)  "No input file specified." Please fix link.

 

Quote

Hello PZ modding community! After a few days of digging through the source code I've successfully created a list of events that can be used when LUA scripting.

 

I will be updating this list after every major build. (32 -> 33).

 

Here is a link to the sheet. I'll be adding a full functions list as well soon. Also, gimme some advice on the style of that page. I'm a mere software developer, so keep it cool. As always, contact me here if you find something amiss or discover some new functionality or LUA event/function I'm not yet aware of! Also, I know it can be hard to understand, I'm working on fixing that and providing examples of implementation. If you have any questions at all, please leave a comment here or pm me and I'll help ya out.

 

I'll write a mobile site if it's in high demand, for now, consider it desktop only. Should support all known desktop and tablet resolutions though!

 

Edit: Don't want to use my site? Liberal? Here's a dropbox link for the excel sheet!

 

Thanks, happy modding!

 

Edited by Jokecat
  • 3 months later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...