Closed Incrementis closed 8 months ago
A rudimentary test results in success. When activating the following line in "!_CheckTLK.tpa" it works as expected.
// HAS ONLY TESTING PURPOSE. DELETE IT IF ISSUE ON GITHUB IS FIXED!
LAF STR_SET_EVAL_WITH_STRINGS
INT_VAR
idx = d
STR_VAR
text = ~%b%~
sound = ~%c%~
END
The following file contains the complete code for better understanding: !_CheckTlk.txt Basically the desired STR_SET_EVAL_WITH_STRINGS function is commented out inside the TLK loop so it can be tested outside and what interestingly works.
Further investigation is needed.
The first test is carried out with the following setup:
Language German:
LAF STR_SET_EVAL_WITH_STRINGS
is commented outLPF STR_SET_EVAL_WITH_STRINGS
is used insteadOUTER_SPRINT ~Texts1~ ~Ausgewählt 1~
will be changed to OUTER_SPRINT ~Texts1~ ~Ausgewählt 1 234 Something WEnt Wr0ng~
OUTER_SPRINT ~Texts1~ ~Ausgewählt 1 234 Something WEnt Wr0ng~
will be changed to OUTER_SPRINT ~Texts1~ ~Ausgewählt 1~
Language English:
The first test shows the following:
Additionally, the string “Ausgewählt 1” is written a second time to a different daialog.tlk location (71450)
CHRSND.2DA does not use the corrected strref, but the new one (71450)
Further investigation is required.
This seems important to note:
The mod installation is done in two parts. The first installation option will repair the stringref text depending on the name of the sound file. The second installation option is to install everything without performing the repair. Both installations can be carried out individually or together. Without documenting the second test in too much detail, the second reinstall of the repair module repairs the strref that needs to be corrected.
This results in the follwowing assumption:
Further investigation is needed.
The third(🇩🇪 ) test is carried out with the following setup:
OUTER_SPRINT ~Texts1~ ~Ausgewählt 12345~ OUTER_SPRINT ~Texts2~ ~Ausgewählt 43456~ OUTER_SPRINT ~Texts18~ ~Müde1234~
in InitVoxArraysOUTER_SPRINT ~Texts1~ ~Ausgewählt 1~ OUTER_SPRINT ~Texts2~ ~Ausgewählt 4~ OUTER_SPRINT ~Texts18~ ~Müde~
This will be an indication for acceptance in Test 2.
Results of test 3:
The second option, which installs everything except repair, installed automatically even though "n" was pressed for that module. It is not clear how and why this happens.
Nevertheless, the repairs were a success in the right places. As expected the three "Ausgewählt 1", "Ausgewählt 4" and "Müde" were also added to dialog.tlk as new strrefs. In addition, CHARSND.2DA did not use the corrected strrefs, but the newly added ones.
Further investigation will be focused on setup-\<modname>.tp2(see attached txt file for code). setup-Demo_SoD.txt
The WeiDU documentation says the following about installing more than one component(see screenshot):
The following was observed:
Because there are two components, the pseudodynamic array values will not have the same values when changed. For example, in the repair mod, if all values are set to !_NULL, the second component will not have the !_NULL values in the array, but will have the initialized values in the ALWAYS section.
Further investigation is required.
Ok, the problems are identified as normal behavior in the WeiDU ALWAYS section. In the documentation it is written: "This flag specified a TP2 Action that is executed at the beginning of each Component, before the component-specific TP2 Action."
The problem was posted here: https://www.gibberlings3.net/forums/topic/37766-same-arrays-in-different-components/
Once this partial problem is solved, further investigation of this main problem will be undertaken.
SOLVED: Since the first component is a proprietary repair code and not a standalone module in itself, it is solved with ACTION_READLN.
The installation is no longer implemented in two components. It is a component that asks the user if they want to use the code to repair dalog.tlk.
Fourth test contains:
The initial installation contains the following texts: OUTER_SPRINT ~Texts1~ ~Ausgewählt 1 Something went wrong~ OUTER_SPRINT ~Texts2~ ~Ausgewählt 4 Something went wrong~
These will be repaired to OUTER_SPRINT ~Texts1~ ~Ausgewählt 1~ OUTER_SPRINT ~Texts2~ ~Ausgewählt 4~
Result: No problems were found. The repair was a success.
Further investigation is required.
Fifth test contains: weidu.conf must be deleted before installing in another language!
If everything works without problems, this issue will be closed.
Result fifth test:
An answer to why this is so is not clear at this point.
The solution mentioned in the second comment is being implemented and tested.
The sixth test contains similar tests to the fourth and fifth tests.
weidu.conf must be deleted before installing in another language!
Result: Uninstalling the mod in one language (🇬🇧) and installing it in another (🇩🇪) and vice versa results in names used in "M_cdsnd.lua" being present in both languages. The repair was carried out correctly. That's an improvement. Furthermore, this could be the result of human error. Nevertheless, this feature is defined as beta for a certain period of time.
The error could not be reproduced. This is classified as human error.
This feature is set as a beta feature. It does not always work as expected, so it is necessary to look for reproducibility of the behavior. Further procedures can then be defined. In the worst case, this feature will be completely deleted from the system.