File information

Last updated

Original upload

Created by

xyzkljl1

Uploaded by

xyzkljl1

Virus scan

Safe to use

Tags for this mod

About this mod

Rotate/Translate/Scale your buildings/stones/trees as your will.
任意旋转/平移/缩放建筑、树木和石头

Requirements
Permissions and credits
Changelogs
Donations
Rotate/Translate/Scale your buildings/stones/trees as your will.
All mod open source at https://github.com/xyzkljl1/PalworldModdingKitAndMyMods

(Anyone can upload your fav images or videos for this mod by clicking `Add Media`.No need to ask permission from me.)

Usage:

1.
Press F4 to show the panel and start to use.Press F4 again to exit.

2.
Look at a building to select it, information box will show the name and position of that building.
And there will be a red crosshair to indicate which building is curently selected.(Press F9 to hide this crosshair)

3.
(Optional,but recommended)Press F5 to lock/unlock on one building.
During lock, even if you move your crosshair,you won't select another building.

4.
There are 4 main methods to modify a building:

4.1.Method 1:

Press Left/Right key to select an attribute you want to edit.(Rotation/Translation/Scale each has three attributes-x,y,z. totally 9 attributes.)
Press Up/Down to increase/decrease selected attribute.
Pressing Shift/Alt to let it be faster/slower.

Press ~(aka `,the key in left top of keyboard) to directly input a number for selected attribute.

4.2.Method 2:

Press I/K/J/L/U/O to move to Front/Back/Left/Right/Up/Down.Pressing Shift/Alt to be faster/slower.
Press Period(.) to switch between translate/rotate/scale.(tranlate is default)
When you are editing translate,  I/K/J/L/U/O means "Front/Back/Left/Right/Up/Down".When you are editing rotate/scale, I/K/J/L/U/O means "add X/minus X/minus Y/add Y/minus Z/add Z".
 
Press Comma(,) to switch between World Coord/Object Coord(absolute coord/relative coord).
(object coord is default)
(This switch affects translate and rotate. Scale will ignore it.)
When you are using World Coord, it's basically like Method 1.The movement is not affected by the building's direction.When you press `I`,you always move the building to the sky direction.(same as when you select Z attribute and press `Up` by method 1)
When you are using Object Coord, the movement is affected by the building's direction.When you press `I`,you always move the building to the top direction of this building.If it's upside down,then you will move it to the ground.If it's sideways ,you will move it horizontally.

4.3.Method 3:

Press C to copy a position.Press V to paste the position.
Press F8 to switch between 5 modes: Copy All(translate+rotation+scale)/Translate only/Rotation only/Scale only/Rotation+Scale only

4.4.Method 4:

Press F7 to start/end LiftUp Mode. When you "lift up" a building and move, the building will follow your character.

5.
(Optional) Press R to reset a building to the original position(when you enter the world).

6.
(Optional) Press F6 to start/end Chandelier/Ivy Mode.You can select a chandelier/ivy in this mode.(you can hardly select them in normal mode.)

7.Multi-Select Mode
Look at a building and press Shift+F5 to add it to the multi-select list.Press again to move it out from multi-select list.Press F10 to clear the list.
You can edit all selected objects at the same time.
BUT during multi selecting(when the list at bottom contains at least one building), you can only use Method 2 and reset function.And you can't select trees.
Notice the difference between World Coord and Object Coord.
If you want to keep the relative position/angle,you should switch to World Coord.

Note
1.
Only the following things can be moved:
a) buildings built by player
b) minable stones
c) trees

2.
All changes are permanently.(Except the stones will respawn in original location)
If you modify a model,the hit box is also affected.

2.2.
Press F6 to switch select filter.
When using Normal filter,you will select the nearest building or minable stones at your look-at-ray.
But the Chandelier/Ivy/Expedition Station are exception ,they can't be selected in this situation.
Stones will respawn in the Original location.
When using Special filter, you will select the nearest Chandelier/Ivy/Expedition Station in your front.
When using Tree filter, you will select the nearest tree in your front.
Trees will respawn in new location. 
DO NOT move two trees to exactly the same location.This game uses location to index trees,it may causes some bug.
"Exactly" here means every single digit(including those are not displayed) of two locations is the same.

Line tracing algorithm are not used for Special&Tree filter.Thereforre the selection could be not accurate.
Things far away from you will never be selected.

2.5.
Can't edit a simulating building (buldings that havn't been placed down in building mode).
But you can still select them to check or copy their coord.

4.
Keybinds can be modified in `RotateIt.modconfig.json` or by `Mod Config Menu`.
Other keys can't be modified for now.

Notice. Only following keys are supported:
(Num keys must start with `Num `,such as `Num +`)
0~9
A~Z
F1~F12
Left Right Up Down
` \ + - , . /
Tab
Num 0~9
Num + - . / *
Left Shift/Right Shift/Left Alt/Right Alt/Left Ctrl/Right Ctrl

5.
Not work for online games.
But if you are the host,it may work.IDK.

6.Migrate from game version 3.6 to game version 3.7.
In most condition, once you modify your buildings,they will stay there forever.
But savedata format is changed in game ver 3.7. Means you will lose your changes (that you did before v3.6) when updating to v3.7.
You can fix it by following steps:
Spoiler:  
Show

a) Find your v3.6 save file
You only need the "Level.sav" file.
For steam,it's in "C:\Users\[Your username]\AppData\Local\Pal\Saved\SaveGames\[Your steam user id]\[Your save id]\Level.sav"
(If you already opened the game once in v3.7,the savedata will be upgraded to 3.7.In this case ,you need to find your old save file in "backup\world\[Date]\Level.sav")

b)Convert v3.6 "Level.sav" file to "Level.sav.json" using PalWorldSaveTools(sha1 :5b4730683746abf386fe3cada735d356f0d981d7).
Copy Level.sav to the tool dir and run convert_sav_to_json.cmd.
(NOTICE: you shouldn't use the latest version of the tool.You should use the version for v3.6.The above link has a postfix in url to indicate the version.)
(some other tools may also works,but I haven't tried.)
NOTICE: You will need knowledge about Git/Python to use it.
If you don't have such knowledge, just send your "Level.sav" file to me. I will manually convert it for you if there isn't too many requests.I will develop a site if there are hundreds of requests.

c) Copy the "Level.sav.json" to mod dir(LogicMods)

d) Start v3.7 game with latest this mod(>=1.15)
e) Open UE4SS GUI Console
If you don't have gui console,set "GUIConsoleEnabled"/"GUIConsoleVisible" to 1 in UE4SS-settings.ini.
If you have it but it's all whit, set "GraphicsAPI" to "dx11" in the same file.

f)Click "RotateIt" under "BP Mods" tab in GUI Console.
Click "Mod Buttons".
Click "Migration From 3.6 to 3.7". Your buildings should recover in a few seconds.
Exit game to save.
If nothing happens after click the button,send me the whole UE4SS.log after exit the game.


Q&A:
1.Why this happens in v3.7?
The devs used to store the building transform in FPalMapObjectSaveData. In v3.7,they decide to store it in another form.(maybe because they want to optimize building staff).
Instead of converting old data to new data, they simply discard all old data. That's very normal,not a bug.
Because you don't have any chance to modify the old datas without this mod,the old datas should always be the default value.Discarding them is safe and simple. 
That's not a good news for us mod users though.You need to provide the old saves so that the mod can read your old building datas and apply them again in new version.

2.Will this happen again?
Possible ,but not that possible.
You can't expect devs to consider compatibility with this mod.They may do it again.
But devs won't change save data format every day for no reason.
If this happens again,it might be months ,years later or even never.

3.Can I fix it again if it happens again?
No promises but there is a good chance that I can.
Even if some data is lost somehow,I can always read them out from backup saves.
And applying the transform to objects is a quite common operation in UE(or any engine).
Fixing should be possible.Just matter of time.
Even if I already leaves nexus then,it shouldn't be very hard to find another modder to finish the job.


Install:

0.
You can use Vortex to install

1.Install UE4SS
Download: https://github.com/UE4SS-RE/RE-UE4SS/releases/download/v3.0.0/UE4SS_v3.0.0.zip
Extract the zip to: Palworld\Pal\Binaries\Win64\
Dir struct should be like:
Need UE4SS Version >= 2.5.2!!
-Palworld\Pal\Binaries\Win64
   - Mods
      - mods.txt
      - ....
   - UE4SS-settings.ini
   - ...

2.
Edit File `Palworld\Pal\Binaries\Win64\Mods\mods.txt` to ensure the following line is in the file
BPModLoaderMod : 1

3.
Download this mod.Extract and copy content of `LogicMods` to Palworld\Pal\Content\Paks\LogicMods