Jump to content

How to change an entry in ENGINEST.2DA?


temnix

Recommended Posts

With Weidu, I mean. I'd like to replace

 

STRREF_AUTOPAUSE_SCRIPTED 24545

 

with a reference to a custom string.

 

This must be a basic question, but I don't normally deal with Weidu a lot.

Link to comment

1)

 

Change the contents of string reference 24545 in dialog.tlk. Anything that uses that text anywhere in the game would be affected.

STRING_SET 24545 ~New text~

2)

 

Add a new string to dialog.tlk, updating the reference in the .2da file so that this particular usage is updated to the new text.

 

This can be done with either a string replace inside the file or by looping through the file row-by-row (since it's a .2da). I recommend this over option 1 because you don't need to be sure that it was actually using reference 24545 previously. Other platforms might not have 24545 as the default value, plus other mods could also have changed the value in this file.

 

Here's an example using string replace.

COPY_EXISTING ~enginest.2da~ ~override~
  SET new_ref = RESOLVE_STR_REF (~New text~)
  REPLACE_TEXTUALLY ~^STRREF_AUTOPAUSE_SCRIPTED[ %TAB%]+.*~ ~STRREF_AUTOPAUSE_SCRIPTED %new_ref%~
  BUT_ONLY
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...