Jump to content

APPEND inside a patch


Recommended Posts

I'm changing a category of items to make them conversable. After some checks and filters the code generates a dialogue from a template, copying it over in an INNER_ACTION. The name of the dialogue file that results for every item is the same as the SOURCE_RES of the item, for simplicity, and both are represented by the variable "itemres". In the end I want to insert APPEND to add to ITEMDIAL.2DA. The code is approximately like this:

....inside the patch, after making the dialogues...

OUTER_SET strref = RESOLVE_STR_REF (~Know It~)
APPEND ~ITEMDIAL.2DA~ ~%itemres% %strref% %itemres%~
UNLESS ~ITEMDIAL.2DA~ ~%itemres% %strref% %itemres%~

(and more ENDs to wrap up)

I see no problem with this code, but somehow a parsing error results. Anybody has guesses as to why?


Link to comment

And I would bet that only one of these: %itemres% %strref% %itemres% is actually needed as the others can probably be presumed to either exist, or not if the first one is there. As elsewhere:

APPEND ~kit.ids~ ~0x80000000 WILDMAGE~ UNLESS ~\bWILDMAGE\b~


Link to comment
16 hours ago, subtledoctor said:

I think change

UNLESS ~ITEMDIAL.2DA~ ~%itemres% %strref% %itemres%~ 


UNLESS ~%itemres% %strref% %itemres%~ 


Quite so! Thank you again.

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.

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...