Jump to content

Mod Beta Compatibility


Recommended Posts

  • Developer

To better support writing mods that work in both the main release and the beta branch, a new function has been added to test against.

CurrentRelease.GreaterOrEqualTo( ReleaseID.X ) -- Where X is the ID of the release. 

This is the official way to check for beta content. Each beta update will add a new ReleaseID. When the beta is merged back into the main game, the ReleaseIDs will be added too. This should provide a seamless transition for mods, with no emergency updates required.

Example Lua Script:

Example Lua Script

if CurrentRelease.GreaterOrEqualTo( ReleaseID.R01_ANR_PART1 ) then
    --[[ Insert A New Reign beta content here ]]
end

You can print the current ReleaseID by running CurrentRelease.PrintID() in the debug console.

Current Release Id Info

The current ReleaseID will be printed in the debug console and the log file. There is no ReleaseID for the current release as none is needed. Calling PrintID in this case will look like "Current Release ID: .." 

The ReleaseID for the A New Reign beta will be printed as "Current Release ID: ReleaseID.R01_ANR_PART1"

 

Link to comment
Share on other sites

@ScottHansenWith your last update you made alot of mods crash, that used dont strave prefabs as a base to build the new prefab.
All prefabs that return
Prefab( "common/trashcan", fn, assets, prefabs)
instead of
Prefab( "common/trashcan", fn, assets)

Wasn't it possible to fix whatever you fixed this way, without making the mods crash?
(I don't know why the mods worked before, since prefabs was really a variable that was not defined, but at least a notification about your fix would be great...)

 

Edited by Serpens
Link to comment
Share on other sites

17 minutes ago, ScottHansen said:

@Serpens

I'm not aware of what change introduced this but I'll have a look tomorrow

thanks :)

just to make it more clear:
The mods that crashes now really contain a undecleared variable. They returning "prefabs" without declaring it. So that way it is now, it is correct and the mods never should have worked before.
I think you can't do anything to make them work again ........
....except defining a non local variable "prefabs" without overriding any variable... maybe this is the thing you fixed? there was non local prefabs and you made it local?

Edited by Serpens
Link to comment
Share on other sites

  • Developer
15 hours ago, Serpens said:

thanks :)

just to make it more clear:
The mods that crashes now really contain a undecleared variable. They returning "prefabs" without declaring it. So that way it is now, it is correct and the mods never should have worked before.
I think you can't do anything to make them work again ........
....except defining a non local variable "prefabs" without overriding any variable... maybe this is the thing you fixed? there was non local prefabs and you made it local?

I've addressed the issue, just as you expected, there was non local prefabs and and we made it local.

There should be a patch coming out today.

Link to comment
Share on other sites

  • Developer
42 minutes ago, Serpens said:

 

@ScottHansen sry for offtopic, but I need help from a developer:
It seems it is no longer possible to generate islands with modworldgenmain.lua ?

 

I asked around the office and the got nothing but sad faces. It appears creating islands is indeed broken in DST right now and its not a simple fix. 

Link to comment
Share on other sites

11 minutes ago, ScottHansen said:

I asked around the office and the got nothing but sad faces. It appears creating islands is indeed broken in DST right now and its not a simple fix. 

okay... sad =/
Anyone knows a workaround ? Maybe creating the islands outside of modworldgenmain? So first one small island is created, so world loads without issues. And after the world is created, the modmain creates the other islands ?

Link to comment
Share on other sites

  • Developer

That would definitely be possible. TheWorld.topology contains all the information about the biomes and tasks and rooms and their connections, after generation if you "erased" everything in a room (including the ground) and reloaded the map, it should work as you expect. (You'd have to put the wormholes in yourself as well, but again the information in Topology should give you a rough idea of where to put them.)

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
 Share

×
  • Create New...