Actions in .dat are not working properly

I have a “Mobilephone Mod” that I created that adds a mobilephone with multiple functions.
Right now I have the ability to change the functions on the crafting screen, but it is too inconvenient, so I am modifying it to use “Actions” to easily change the functions.

However, it does not work.

Mobilephone has 8 colors and one of them (Black) was successful.
Unturned 2023_03_17 10_14_19

I copied the Action part in that successful .dat, changed only the ID, and completed the remaining 7 colors.

However, all of the remaining 7 colors only reflect the first Action.
Unturned 2023_03_17 10_13_48

No matter how many times I go back and correct it, it doesn’t work.

Everything is crafting and changing functions normally on the crafting screen.
Only the Actions section is not normal.

What is the cause?
Below is the text in the .dat.
Please let me know if you can think of anything.

*We are using DeepL to translate.
We apologize if there are any offensive expressions or parts that are difficult to understand.

Sorry, self resolved.
I apologize for the inconvenience, but please delete this topic.

If you solved your problem by yourself, I’m sure some other modders may appreciate if you explained what the issue was and what your solution to it was.

1 Like

+1

1 Like

Indeed, that’s true.
I got confused and posted because I couldn’t figure it out due to such a basic mistake, and then I felt embarrassed and deleted it.
I will roughly describe the situation again and also write down the solution.

Regarding the issue where the “Action” option does not work properly.

※ Although I have solved the problem myself, I will leave this here in case someone else encounters the same situation.

Consultation content:

In the Mod I am creating, there is an item with multiple functions.
There are 8 different colors for the item, and 9 types of functions that can be used.

Previously, I had it set up so that all function changes were made through the crafting interface, but now I’m modifying it to use the Action option so that function changes can be easily made within the inventory.

One of the 8 colors was completed without any problems, and all 9 buttons were successfully added to the screen when the item was right-clicked in the inventory.

However, for the second color onwards, only one button was added, and I couldn’t figure out where I was making a mistake no matter how many times I reviewed the .dat files and Unity.

I simply copied and pasted the .dat file of the first color, which was successful without any problems, and changed only the ID for the other colors.
Still, it didn’t work.

Can you think of any possible causes?

Solution:

I was using the Override option to keep the Mod size small.
Here is the content of that option.

Master_Bundle_Override mobilephonemod.masterbundle
Bundle_Override_Path /Item/Tools_Mobilephone/Black/Default_Black

To cut to the chase, the problem was that I had forgotten to modify the part of the Path that said “Black” in the .dat files for the other colors.

The Action_0 without Override was applied correctly, and one button was displayed.
However, since the Action_1 was set to an item with the wrong Override, the button for this item was not displayed.
All of the Action_2 onwards were not using Override and the .dat files were correct, but they were all affected by Action_1 and not displayed.

I noticed this when I saw an error in the log in the Unturned game’s workshop.
(Embarrassingly, I didn’t realize that this log was for workshop items, and I had never seen it before…)
I found out because there was a “Game Object” text at the end of the error log.

Based on this error log, I corrected all the Overrides for the items with errors, and the Action options were applied correctly.

I am very embarrassed to have asked such a trivial question without checking properly…
I will be more careful in the future.
I apologize for any inconvenience I may have caused.

1 Like

I’ve gone ahead and updated the title & original post for you

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.