Jump to content

use different file in different updates

Recommended Posts

i want to use different files for my mod that changes the moggles vision but the playervision.lua changed in the beta, causing crash.

I have 2 playervision.lua for different updates and i want to switch between them if needed instead of having 2 different mods

i know about this but i dont what i need to change at --[[ Insert Return of Them beta content here ]]

if CurrentRelease.GreaterOrEqualTo(ReleaseID.IDs.R08_ROT_TURNOFTIDES) then
    --[[ Insert Return of Them beta content here ]]

location - modname/scripts/components/playervision.lua

there is current nothing written in modmain since it just replaces the playervision component

Edited by Rockou_
Link to comment
Share on other sites

Replacing a game file completely is not good modding practice. Is there really no other way of making the changes you want? Making your changes in code will also make it possible for you to use different code for different versions more easily. I'm not sure if it's even possible to switch between two actual files...I guess it might be, but it seems a hassle.

Is ReleaseID.IDs.R08_ROT_TURNOFTIDES the name of the old non-beta release? If that's the case, then in your modmain.lua you'd do:

if CurrentRelease.GreaterOrEqualTo(ReleaseID.IDs.R08_ROT_TURNOFTIDES) then
	-- Beta code
	-- Normal code


Link to comment
Share on other sites

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...