What exactly does re-enabling
window.stores
do? I’m working on some modding things and have heard of several in the modding community talk about it.
What exactly does re-enabling
window.stores
do? I’m working on some modding things and have heard of several in the modding community talk about it.
window.stores is a a variable that contains access to functions and values that are very useful to modding and making mods. Re-enabling it just provides access to those functions.
What functions? Could you give me some examples?
There’s camera settings, you can even change your gim locally with it.
window.stores.phaser.mainCharacter.body.x # get x position of player in world
window.stores.phaser.mainCharacter.body.y # get y position of player in world
window.stores.worldOptions.propOptions # options for placing props
window.stores.network.room.send() # send message to gameserver
window.stores.phaser.mainCharacter.skin.updateSkin(skinID) # set skin clientside
window.stores.phaser.scene.cameras.cameras[0].setZoom(10) # zoom camera in
Those are just a small set of examples I had on the top of my head- really though, almost all of modern modding is done with the functions and variables window.stores provides.
Like for example, I’ve been playing around with the camera settings in it and if you wanted to for example mess with the linear interpolation (basically have the camera pan to the character slower and smoother/fast and more rough depending on the value), you could run this code with an enabled windows store:
window.stores.phaser.scene.cameras.main.lerp.x = window.stores.phaser.scene.cameras.main.lerp.y = 0.25
(the default is 0.73, since 0.25 < 0.73, the camera will pan slower and smoother)
There’s also other window variables like window.platformerPhysics if you wanted to mess with the physics in platformer mode.
window.platformerPhysics is a sperate thing, and isn’t included with window.stores. Keep that in mind, the window.stores tutorial will not give you window.platformerPhysics.
Do you know any way to check if someone is in edit mode periodically with JS? I can’t find any variables for edit mode.
Why was window.stores removed anyway?
Gimkit Team didn’t want people abusing mods and making exploits out of window.stores I think.
Pretty sure you might find it in window.stores.session somewhere, not totally sure though.
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.