Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Conversation

@FoolHen
Copy link
Member

@FoolHen FoolHen commented Oct 18, 2022

Removed http too, as new lua tables now only contain the guids of the modified vanilla objects' ReferenceObjectDatas, making the file small. Those vanilla objects are cloned and included in the custom bundle.

Removed http as new lua tables now only contain the guids of the modified vanilla objects' ReferenceObjectDatas, making the file small. Those vanilla objects are cloned and included in the custom bundle.
@FoolHen FoolHen requested a review from FlashHit October 18, 2022 17:01
@FoolHen FoolHen self-assigned this Oct 18, 2022
---@field CLIENT_TIMEOUT number
Config = require "__shared/Config"

BUNDLE_PREFIX = 'CustomLevels'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to the config. And you can make the config local now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldnt be configurable, its just a static variable

Hooks:Install('ResourceManager:LoadBundles', 100, function(p_Hook, p_Bundles, p_Compartment)
print(p_Compartment)
print(p_Bundles[1])
end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed. Was just for debug prints.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but left it for the same purpose. The print is disabled so its fine,

s_SWROD.streamRealm = StreamRealm.StreamRealm_Both
s_SWROD.castSunShadowEnable = true
s_SWROD.excluded = false
s_SWROD.inclusionSettings = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an inclusionsetting that will check for the current gamemode.
Todo: think about -skipChecksum. Modifiying this in one gamemode, then switch to another gamemode. Player joins and won’t have the changes of the first gamemode. So maybe use the existing one and just modify it again instead of creating a new swrod.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow, what is InclussionSettings for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To only load the custom bundle if the gamemode gets loaded. So you can have different custom bundles for different gamemodes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you define the gamemode in the inclusionsetting


local s_SWROD = SubWorldReferenceObjectData(Guid('6a724d44-4efd-4f7e-9249-2230121d7ecc'))

s_SWROD.bundleName = BUNDLE_PREFIX .. '/' .. p_LevelName:gsub(".*/", "") .. '/' .. SharedUtils:GetCurrentGameMode()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if this could be a config.
Like: BundleName = string.format("%s/%s/%s", BUNDLE_PREFIX, LEVELNAME, GAMEMODE)
So I would still be able to build the bundlename but change the order for example. Or just use the levelname and not the gamemode name.
Same for the superbundle name.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants