Difference between revisions of "Allow Changing Texture and Mesh on a Structure"

From ARK Modding Wiki
Jump to navigation Jump to search
(Created page with "Category:Tutorials Category:TIAPs In this guide we will go through the necessary steps to allow changing a structure's mesh and/or texture using a multi-use menu. The...")
 
Line 2: Line 2:
 
[[Category:TIAPs]]
 
[[Category:TIAPs]]
 
In this guide we will go through the necessary steps to allow changing a structure's mesh and/or texture using a multi-use menu.  
 
In this guide we will go through the necessary steps to allow changing a structure's mesh and/or texture using a multi-use menu.  
The resulting structure will also save these changes to persist over server restarts.
+
The resulting structure will also save these changes to persist over server restarts and properly replicate them to all users.
 +
 
 +
Before starting this guide make sure you have a structure set up and ready. Make sure you have a way to spawn and place it in order to test if it works.
 +
 
 +
== Step 1: Setting up variables ==
 +
In order to properly save any changes users make over server restarts you will need one variable per property that will change.
 +
In our case we will need one variable to identify the mesh, and one to identify the texture. A few different types could be used, but in order to keep the save game small and allow for efficient replication we will use one integer variable per property. ''Side Note: You could definitely use a byte variable in order to save even more space, but I am quite sure that UE4 will pad this to 4 bytes anyway. If you do happen to know how this is treated internally, make sure to update this article!''

Revision as of 13:50, 12 September 2017

In this guide we will go through the necessary steps to allow changing a structure's mesh and/or texture using a multi-use menu. The resulting structure will also save these changes to persist over server restarts and properly replicate them to all users.

Before starting this guide make sure you have a structure set up and ready. Make sure you have a way to spawn and place it in order to test if it works.

Step 1: Setting up variables

In order to properly save any changes users make over server restarts you will need one variable per property that will change. In our case we will need one variable to identify the mesh, and one to identify the texture. A few different types could be used, but in order to keep the save game small and allow for efficient replication we will use one integer variable per property. Side Note: You could definitely use a byte variable in order to save even more space, but I am quite sure that UE4 will pad this to 4 bytes anyway. If you do happen to know how this is treated internally, make sure to update this article!