Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

Rockou_

use different file in different updates

Recommended Posts

Rockou_    4

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 ]]
end 

location - modname/scripts/components/playervision.lua

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

Share this post


Link to post
Share on other sites
Ultroman    529

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
else
	-- Normal code
end 

 

Share this post


Link to post
Share on other sites