New engine features: Add runtime item resources creation and tweak op122/255#117
Open
4Luke4 wants to merge 6 commits into
Open
New engine features: Add runtime item resources creation and tweak op122/255#1174Luke4 wants to merge 6 commits into
4Luke4 wants to merge 6 commits into
Conversation
Register an opcode hook (op122/255) in EEex_Opcode_Patch.lua to invoke EEex.dll hooks around CGameEffectCreateItem item placement.
Add some basic example usages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a robust system for creating, copying, persisting, and restoring in-memory ITM (item) resources, along with related opcode and marshalling infrastructure. The core changes enable items to be dynamically created, modified, and saved across game sessions, with hooks for engine integration and opcode extension.
The most important changes are:
Item Creation, Copying, and Persistence (EEex_Item):
EEex_Item.lua, which implements functions to create new in-memory items (EEex_Item_CreateFromResref), copy existing items (EEex_Item_CreateCopy), and manage persistent item resources, including marshaling and unmarshaling item state for save/load support. This includes validation, resource management, and header override logic.Marshalling Integration:
EEex_Itemwith the startup file list to ensure the new item logic is loaded at game initialization.Opcode and Engine Hook Extensions:
CGameEffectCreateItem(opcodes #122/#255), allowing pre- and post-processing when items are created by effects. This enables custom item flags/logic to be injected before and after the engine places the item. [1] [2]These changes provide a foundation for dynamic, persistent, and extensible item handling in the engine, with deep integration into the save/load and effect processing systems.
Requires: Bubb13/InfinityLoader#5.
Requires: #116.