Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Eager-PlayerAdd locations to H$5 Room
#1
Hello, 
I recently made an entire H$5 room using the Room248 as container.
Is there a way to add specific locations to said room? I don't want to manually move the poses across the room :(
Reply
#2
So it is quite possible. The easiest way is to set the positions when creating the room, but you can do it manually too. The body of the room (Addons\Room***\Scenes\Luder\Room\Room***) should contain a code, for example, for 10 positions:
"TTransform:local_room_position_group. {
TNode.SNode STransform :local_Sroom_position_group;
TNode.Parent TTransform :local_Scene;
Object.Name "room_position_group";
};
TTransform:local_Pos1. {
TNode.SNode STransform :local_SPos1;
TNode.Parent TTransform :local_room_position_group;
Object.Name "Pos1";
};
STransform:local_SPos1. {
SSimpleTransform.Translation Vector3f( -18.75, 0, -7.5 );
Object.Name "SPos1";
};

... repeat for Pos2, Pos3...Pos9


TTransform:local_Pos10. {
TNode.SNode STransform :local_SPos10;
TNode.Parent TTransform :local_room_position_group;
Object.Name "Pos10";
};
STransform:local_SPos10. {
SSimpleTransform.Translation Vector3f( 0, 0, 30.5 );
SSimpleTransform.Rotation Vector3f( 0, -180, 0 );
Object.Name "SPos10";
};

STransform :local_Sroom_position_group Object.Name "Sroom_position_group";
And the second file AvFurnitures.bs (Addons\VX.Room***\Scripts\Luder\Room**)
There for every Pos1, 2,3... there should be registered

AvFurniture:Pos1_Furniture. {
.RootNode "Room:room_position_group";
.Do [ AvFurnitureSituation :Pos1_FurnitureSituation . {
.AttrH {
.Type "*";
};
.Mappings [ "Pos1" , "%{ModelTRS}" ];
.Exports ["*" ];
};
];
.Description "Pos1";
};
AvFurniture:Pos2_Furniture. {
.RootNode "Room:room_position_group";
.Do [ AvFurnitureSituation :Pos2_FurnitureSituation . {
.AttrH {
.Type "*";
};
.Mappings [ "Pos2" , "%{ModelTRS}" ];
.Exports [ "*" ];
};
];
.Description "Pos2";
};

That's it.. :)
[-] The following 1 user Likes amidka2006's post:'s post
  • daspex (Yesterday)
Reply
#3
So it is quite possible. The easiest way is to set the positions when creating the room, but you can do it manually too. The body of the room (Addons\Room***\Scenes\Luder\Room\Room***) should contain a code, for example, for 10 positions:
"TTransform:local_room_position_group. {
TNode.SNode STransform :local_Sroom_position_group;
TNode.Parent TTransform :local_Scene;
Object.Name "room_position_group";
};
TTransform:local_Pos1. {
TNode.SNode STransform :local_SPos1;
TNode.Parent TTransform :local_room_position_group;
Object.Name "Pos1";
};
STransform:local_SPos1. {
SSimpleTransform.Translation Vector3f( -18.75, 0, -7.5 );
Object.Name "SPos1";
};

... repeat for Pos2, Pos3...Pos9


TTransform:local_Pos10. {
TNode.SNode STransform :local_SPos10;
TNode.Parent TTransform :local_room_position_group;
Object.Name "Pos10";
};
STransform:local_SPos10. {
SSimpleTransform.Translation Vector3f( 0, 0, 30.5 );
SSimpleTransform.Rotation Vector3f( 0, -180, 0 );
Object.Name "SPos10";
};

STransform :local_Sroom_position_group Object.Name "Sroom_position_group";
And the second file AvFurnitures.bs (Addons\VX.Room***\Scripts\Luder\Room**)
There for every Pos1, 2,3... there should be registered

AvFurniture:Pos1_Furniture. {
.RootNode "Room:room_position_group";
.Do [ AvFurnitureSituation :Pos1_FurnitureSituation . {
.AttrH {
.Type "*";
};
.Mappings [ "Pos1" , "%{ModelTRS}" ];
.Exports ["*" ];
};
];
.Description "Pos1";
};
AvFurniture:Pos2_Furniture. {
.RootNode "Room:room_position_group";
.Do [ AvFurnitureSituation :Pos2_FurnitureSituation . {
.AttrH {
.Type "*";
};
.Mappings [ "Pos2" , "%{ModelTRS}" ];
.Exports [ "*" ];
};
];
.Description "Pos2";
};

That's it.. :)

Operators:
SSimpleTransform.Translation Vector3f( 0, 0, 30.5 );
SSimpleTransform.Rotation Vector3f( 0, -180, 0 );

are responsible for the offset and rotation of the position relative to the center of the room coordinates.
[-] The following 1 user Likes amidka2006's post:'s post
  • daspex (Yesterday)
Reply
#4
I am a total noob, could you please be more specific?
I cannot find said file, I only have two files in that path:
R9ZRoom248.[bsb]
R9ZRoom248_box.[bsb]

Maybe we can do a discord call and you can help me?
Reply
#5
(04-04-2025, 11:51 AM)Eager-Player Wrote:

[To see links please log-in or register here]

I am a total noob, could you please be more specific?
I cannot find said file, I only have two files in that path:
R9ZRoom248.[bsb]
R9ZRoom248_box.[bsb]

Maybe we can do a discord call and you can help me?

Hello!
To edit files, you first need to recode them from bsb to bs. I don't know if you can do this, so I recoded and corrected two files that will be needed. Save your bsb files in a DIFFERENT directory, and put mine instead. A different directory is essential, by default the game reads *.bsb files and if they are not there, only then reads *.bs.
I wrote the paths where to place the files earlier, but the room file name is different for you, I forgot that I have an author's room, they go without R9.
At the end of each file, I added two new positions, what I added was highlighted with remarks //added by Amidka. You can delete them or leave them, they do not interfere.

By the way, I don't know about you, but in my version of room 248 there are already 4 positions. Perhaps I myself once added it and forgot.
Now, in essence, you need to correct the coordinates in the operators SSimpleTransform.Translation Vector3f( 0, 0, 0 );
SSimpleTransform.Rotation Vector3f( 0, 0, 0 );
The first set of numbers is the coordinates in meters, the second is the pose rotation in degrees. Please note, if you don't know, in this game for some reason the second axis is not Y, like everyone else, but Z.
In the AvFurnitures file, you don't need to edit anything for positions 1-4 that were there and 5-6 that I added. If it's not enough, add position 7,8, etc., similar to my edits :)

Good luck!
[-] The following 1 user Likes amidka2006's post:'s post
  • daspex (Yesterday)
Reply
#6
For some reason the files weren't added the first time.


Attached Files
.rar   Room248.rar (Size: 329.31 KB / Downloads: 2)
[-] The following 1 user Likes amidka2006's post:'s post
  • daspex (Yesterday)
Reply




Users browsing this thread: 1 Guest(s)
Copyright: Roy's website was started on September 3, 2013. We been on-line over 10 years and going strong.
WARNING: ADULT CONTENT: You must be 18 years of age or older to view this website.