JediMindTrix Posted September 13, 2020 Posted September 13, 2020 Hello folks! First question, are there code tags for the forum? Second question(s). I'm trying to make a short .tp2 that will patch a few portraits into portrait.2da. I've quoted what I have below:BACKUP ~portraitsbackup~ AUTHOR ~~ BEGIN portraitpatch ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03L.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03M.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03M.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03S.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END //access portraits.2da, add portraits to list COPY_EXISTING "portrait.2da" "override/portrait.2da" COUNT_2DA_ROWS 2 %portraitRows% //count rows store in variable INSERT_2DA_ROW %portraitRows% 2 ~FORCL03L ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03M ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03S ****~ PRETTY_PRINT_2DA END So far it just says "using lang\en_us\dialog.tlk" then enter to exit. Kinda clueless here. Plz help Quote
Jarno Mikkola Posted September 13, 2020 Posted September 13, 2020 (edited) 1: The <> sign in the threads reply option is the code -tags. 2: Well you didn't actually begin a component, you just misplaced the worms in this: BEGIN ~Portrait patch~ Or with the next things coming up, you will want to replace that with say @1 .... you'll soon find out why: Also to install mods to EE game, you need to assign a .tra file, aka translation file, as it requires to be in a different code base than the .tp2 file... and you need to assign the translation... here's how that's done: LANGUAGE ~English~ ~English~ ~portraitsbackup/setup.tra~ The .tra file just consists of all the @x numbers and then equation mark and what that translates into, so: @1 = ~Portrait patch~ The .tp2 needs to be in UTF-8 non BOM, while the .tra file is in Windows-1252 code language. For that,. you are best to use the Notepad++ rather than Notepad. This is a short on this issue, there's more that comes with additional languages and their characters in EE game that need auto-translations or equalent(I don't remember exactly how this is said in English). Also, Worm sign. Edited September 13, 2020 by Jarno Mikkola Quote
JediMindTrix Posted September 13, 2020 Author Posted September 13, 2020 Followed those steps, still having issues: BACKUP ~portraitsbackup~ AUTHOR ~~ LANGUAGE ~English~ ~English~ ~translations/english/setup.tra~ SAY @1 ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03L.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03M.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03M.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03S.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END //access portraits.2da, add portraits to list COPY_EXISTING "portrait.2da" "override/portrait.2da" COUNT_2DA_ROWS 2 %portraitRows% //count rows store in variable INSERT_2DA_ROW %portraitRows% 2 ~FORCL03L ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03M ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03S ****~ PRETTY_PRINT_2DA END It now says 'I expected one of these tokens: EOF BEGIN LANGUAGE When I move language ahead of Say it produces a much longer list of 'expected' including BEGIN. If I re-add BEGIN after LANGUAGE at this point it just produces the same list. Quote
Jarno Mikkola Posted September 13, 2020 Posted September 13, 2020 Try this: BACKUP ~PortraitPatch/backup~ AUTHOR ~~ LANGUAGE ~English~ ~English~ ~PortraitPatch/translations/english/setup.tra~ BEGIN @1 ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03L.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03M.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03M.wav~ ~/override~ END ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03S.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END //access portraits.2da, add portraits to list COPY_EXISTING "portrait.2da" "override/portrait.2da" COUNT_2DA_ROWS 2 %portraitRows% //count rows store in variable INSERT_2DA_ROW %portraitRows% 2 ~FORCL03L ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03M ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03S ****~ PRETTY_PRINT_2DA END Also note that the setup.tra file's directory was changed ... and I'll recommend to use the mod folder as the backup folder... it doesn't need to exist in the mods folder, as it's made, and it's subfolders are made during the install process. This: ACTION_IF FILE_EXISTS ~PortraitPatch/Portrait/FORCL03L.bmp~ THEN BEGIN COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~/override~ END Doesn't make sense, just do this instead: COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~override~ END It's simplier, so it's good for testing at least. Cause the assumption is that your game that the mod is due to be installed already has the .bmp files. That is your intention, right ? I, have no input to the rest... aka, don't know. Quote
JediMindTrix Posted September 13, 2020 Author Posted September 13, 2020 Says it expected either EOF or BEGIN at line 7 now BACKUP ~PortraitPatch/backup~ AUTHOR ~~ LANGUAGE ~English~ ~English~ ~PortraitPatch/translations/english/setup.tra~ BEGIN @1 COPY ~PortraitPatch/Portrait/FORCL03L.wav~ ~override~ END COPY ~PortraitPatch/Portrait/FORCL03M.wav~ ~override~ END COPY ~PortraitPatch/Portrait/FORCL03S.wav~ ~override~ END //access portraits.2da, add portraits to list COPY_EXISTING "portrait.2da" "override/portrait.2da" COUNT_2DA_ROWS 2 %portraitRows% //count rows store in variable INSERT_2DA_ROW %portraitRows% 2 ~FORCL03L ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03M ****~ COUNT_2DA_ROWS 2 %portraitRows% INSERT_2DA_ROW %portraitRows% 2 ~FORCL03S ****~ PRETTY_PRINT_2DA END Quote
Jarno Mikkola Posted September 13, 2020 Posted September 13, 2020 (edited) Ahh... remove the END's, you don't need them. Well, at least the ones in the COPY -lines. I don't know if the last one is needed ... but if this is a single component mod, then definitely you don't need it. Edited September 13, 2020 by Jarno Mikkola Quote
JediMindTrix Posted September 13, 2020 Author Posted September 13, 2020 (edited) That worked! Thank you! Edited September 13, 2020 by JediMindTrix Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.