Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Adding game save/load callbacks for lua scripting. #1395

Closed
wants to merge 1 commit into from

Conversation

Neloreck
Copy link
Contributor

@Neloreck Neloreck commented Jul 9, 2023

Adding optional lua callbacks to allow creation of custom saves.
Following same pattern as CoC/anomaly mods. Having marshal library without these callbacks does not make complete sense because NetPacket has size limitations and requires strict data ordering.

Changes:

  • Added on_before_game_save lua callback
  • Added on_game_save lua callback
  • Added on_before_game_load lua callback
  • Added on_game_load lua callback

@Xottab-DUTY
Copy link
Member

Sorry! This feature will be merged as a part of the Call of Chernobyl code merge, but with CoC/Anomaly matching callback names.

@Neloreck
Copy link
Contributor Author

Is there any WIP branch / fork?

@Neloreck Neloreck deleted the feature/game-saves-callbacks branch October 18, 2023 20:50
@Xottab-DUTY
Copy link
Member

Is there any WIP branch / fork?

Not yet, I screwed some changes and discarded the branch (but saved the already finished work luckily) yesterday. I will start again somewhat soon. There's not much changes really.

@Neloreck
Copy link
Contributor Author

Sounds good. Do we expect CoC to work out of box with OXR engine + their gamedata?

@Xottab-DUTY
Copy link
Member

Xottab-DUTY commented Oct 18, 2023

Sounds good. Do we expect CoC to work out of box with OXR engine + their gamedata?

Yes, but it's the same as for other mods – there might be errors in scripts which are ok for luabind used in vanilla engine (and CoC engine), but our luabind may not tolerate them.

  1. Hopefully, there's no to little number of these errors.
  2. I'd like to make our luabind behave the same as vanilla one, to make our engine 99-100% compatible with mods, but it requires some research on behaviour differences.

@Xottab-DUTY
Copy link
Member

CoC support can be tracked in #1529.

@Neloreck
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Lua Modmaker Experience Modmaker experience with OpenXRay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants