Jump to content

NEWB question


JediMindTrix

Recommended Posts

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

Link to comment

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 by Jarno Mikkola
Link to comment

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.
 

Link to comment

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.

Link to comment

 

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					

 

Link to comment

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 by Jarno Mikkola
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...