ID:2919636
 
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Give the dmi editor new 3 button options
* NONE
* Rotate clockwise with client direction
* Rotate anti-clockwise with client direction

If Rotate clockwise is chosen, and when your client dir value is changed, the image will rotate.
It doesn't care its direction. It will only care client direction.


Example)
If we have [North:▲] as a sample image, and "Rotate Clockwise" is chosen...

Default: [▲]
Client rotates: [▶]
Client rotates: [▼]
Client rotates: [◀]
Client rotates: [▲]

These ones are all set to north direction, but the image is just rotated by client direction.


Example2)
If an image has 4 dir states, it will be:
[N:▲][E:▶][S:▼][W:◀]

Default: [▲]
When image direction is east, then it's [▶]
In this state, if your client rotates, it becomes [▼] (it still directs to east)
In this state, if the image directs to north, it becomes [▶]

Something like
atom/appearance_flags = KEEP_CLIENT_DIR
would be nice.
In response to Kozuma3
Kozuma3 wrote:
Something like
atom/appearance_flags = KEEP_CLIENT_DIR
would be nice.

Oh, yeah, that'd be quite cleaner, but the flag name looks weird because 'keeping client direction' sounds those images are bound to a client, but it's for everyone.

ROTATE_BY_CLIENT_DIR // If atom has this, Its image is rotated by 90 to clockwise
REVERSE_CLIENT_ROTATE // does anti-clockwise instead of clockwise
This rotation should be applied before Matrix because it should rotate dmi images to dupe before anything.
As discussed in Discord, I don't see a use case for this. It doesn't make sense to me as a feature.
In response to Lummox JR
Lummox JR wrote:
As discussed in Discord, I don't see a use case for this. It doesn't make sense to me as a feature.

I found an excessive amount of sprites are supposed to be duplicated just to rotate by clockwise.

Example)
"WELCOME" on floor, and when it has only single dir state, It's seen as "WELCOME" which client direction you see.
To make this rotated by your client dir...
1. You should make the spirte 4 direction states in dmi file
2. copy-paste the original sprite into 4 states. (dmi editor does it tho)
3. now, you should manually rotate other 3 new states by clockwise
4. do this for the full dmi

So, every new sprites from a single sprite that are made for new 3 directions are actually duplication of the first one.
This means, dmi file size becomes x4 just because it needs x4 direction sprites even if it's a duplicated one.

If Dream Maker can support this, this duplication is not necessary.


I don't see a use case for this

I seriously need this. I am supposed to manually edit all dmi files to have 4 directions, and all direction sprites are just a duplicated and rotated version of the first one.

I will show you a case:

https://cdn.discordapp.com/attachments/586014397177004074/ 1163673213386117160/image.png?ex=662724a2&is=6614afa2&hm=d29 6e48f7dd34f2756d8c604cc0d91171b6fa8fed43f85d5ed2d96534cd694b c&

This is an image of dmi sprites difference.
The bottom one is original.
The top one is what I editted (x4 because I had to copy-paste and rotate)

The result is: https://www.youtube.com/watch?v=MbqLNU8md3I

If you look at after 0:20..

* [0:22]: Your client rotates, but walls are following to SOUTH dir state because it has only it.
* [0:28]: Your client rotates, and walls are rotated to follow its own direction


So, the point is
You can actually do this by manually edit all dmi files to have 4 directions
but should this not be a feature when DM can support this automatically? This incredibly helps to reduce x4 dmi file size since you don't have to do that.

I had to make x4 dmi size just to make that work.


------
So, advantage of this:
* Dev doesn't have to copy-paste the sprite into 4 directions when a single direction one is enough
* That they don't have to means dmi file will not be bloated in file size
* It can support client.dir more usable. This is very potential even if you think it'll not be that good.
Almost everything I needed already exists, but this tedious issue blocked me doing further client rotation system.


(Also, Kozuma's suggestion using appearance flag instead of dmi option seems better in this case)
Okay, I think I understand now, but it sounds like what you need is a transform based on client.dir rather than a flag on the icon itself.

Now that I understand the use case is largely for floor tiles that would need to rotate, I get it now. This will take a little thought.
Some appearances don't need to rotate, so I think appearance_flag or something like that will work here. (I figured dmi flag might not be best here)

Also, not only floors, top-view sprites are effective with this too.
I leave a note to make sure just in case


1. Default: [▲]
2. When image direction is east, then it's [▶]
3. In this state, if your client rotates, it becomes [▼] (it still directs to east)
4. In this state, if the image directs to north, it becomes [▶]

In this example, an image has 4 direction images.
Step #3 should be the real client transform
Stpe #2 and #4 is just dir state change

Dir state change by client dir value is already how it works (which is applied to #2, #3, #4 all steps)
but transform rotation is required at step #3