Jump to content

[HELP] Dimensions


Recommended Posts

Well the server/game has a lot of dimensions, i don`t remember for sure, but there are 100k dimensions or something like this on mta. U just set on server side the dimension of an element and u can change his dimension. All dimensions are empty they only have the world objects u can add more objects to them or cars etc just by creating the object and then just set his dimension.

Link to comment

You can't "create" new dimensions. But the element limit is 2^16 = 65536. And there are also 65536 dimensions - just enough to store each element into its own separate dimension. This allows you to create your own dimension system, based on the built-in one. In fact, I tried something like that a long time ago. A dimension system that used arbitrary values as dimension IDs, with each value being assigned a unique integer from 0 to 65535. You can use tables to track things like which elements each dimension contains and which custom dimension system ID corresponds to which built-in dimension system ID.

  • Like 2
Link to comment
On 28/05/2023 at 11:54, DiSaMe said:

You can't "create" new dimensions. But the element limit is 2^16 = 65536. And there are also 65536 dimensions - just enough to store each element into its own separate dimension. This allows you to create your own dimension system, based on the built-in one. In fact, I tried something like that a long time ago. A dimension system that used arbitrary values as dimension IDs, with each value being assigned a unique integer from 0 to 65535. You can use tables to track things like which elements each dimension contains and which custom dimension system ID corresponds to which built-in dimension system ID.

So, just by finding empty dimension or dimension with few elements. I can destroy them and place new ones if i understand it right? 

Standard world dimension 0 have clouds and skybox. Is it possible to set dimensions sky by any way ? Just wondering on that, cause i wanna to make new island. And gray sky like british weather isn't something that i really need. 

Link to comment
5 hours ago, Prever77 said:

So, just by finding empty dimension or dimension with few elements. I can destroy them and place new ones if i understand it right? 

Standard world dimension 0 have clouds and skybox. Is it possible to set dimensions sky by any way ? Just wondering on that, cause i wanna to make new island. And gray sky like british weather isn't something that i really need. 

Well you can use SetSkyGradient or a shader for the sky

https://wiki.multitheftauto.com/wiki/SetSkyGradient

Well about the clouds u can change the weather

https://wiki.multitheftauto.com/wiki/Weather

Link to comment
6 hours ago, Prever77 said:

So, just by finding empty dimension or dimension with few elements. I can destroy them and place new ones if i understand it right? 

Standard world dimension 0 have clouds and skybox. Is it possible to set dimensions sky by any way ? Just wondering on that, cause i wanna to make new island. And gray sky like british weather isn't something that i really need. 

It looks like my post is irrelevant then. I was assuming you wanted to make new dimension IDs so that it would be easier to avoid such mistakes like accidentally using same dimension ID for things that should be in separate dimensions. But from what I understand, that's not the problem, so you can just pick some ID and use it for your island.

Dimensions don't have weathers, all they have is elements. However, if you set weather in the client-side script, it only changes for that player. If you change the weather for the player alongside putting that player in the dimension, from their perspective it will appear as if that dimension has a different weather. To achieve this, whenever you call setElementDimension, you can also call triggerClientEvent to trigger a custom event, which then you would use to call setWeather on the client-side script.

For customizing weather-related properties, in addition to links that @FlorinSzasz posted, there are several other functions, such as setColorFilter and setFogDistance, that you would call on the client side.

  • Like 2
Link to comment
On 31/05/2023 at 19:33, DiSaMe said:

It looks like my post is irrelevant then. I was assuming you wanted to make new dimension IDs so that it would be easier to avoid such mistakes like accidentally using same dimension ID for things that should be in separate dimensions. But from what I understand, that's not the problem, so you can just pick some ID and use it for your island.

Dimensions don't have weathers, all they have is elements. However, if you set weather in the client-side script, it only changes for that player. If you change the weather for the player alongside putting that player in the dimension, from their perspective it will appear as if that dimension has a different weather. To achieve this, whenever you call setElementDimension, you can also call triggerClientEvent to trigger a custom event, which then you would use to call setWeather on the client-side script.

For customizing weather-related properties, in addition to links that @FlorinSzasz posted, there are several other functions, such as setColorFilter and setFogDistance, that you would call on the client side.

Ok. I think that i understand now. So i can make new dimension by chosing id from range 2^16 and set weather,fog,colorfilter etc. of that dimension. Add elemenets etc etc. 

Thank you so much for help guys.

I think this topic can be closed

Link to comment
  • 2 months later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...