Jump to content

[done-ish]Question to ALTER_TRANS


jastey

Recommended Posts

I want to change the transition from a reply options to another dlg state. I am trying to achieve this with ALTER_TRANS using the following syntax:

ALTER_TRANS bdff1709
	BEGIN 2 END
	BEGIN 1 END
	BEGIN ~EPILOGUE~ ~EXTERN bdff1709 0~ END

ALTER_TRANS bdff1709
	BEGIN 4 END
	BEGIN 0 END
	BEGIN ~EPILOGUE~ ~EXTERN bdff1709 0~ END

My problem: it doesn't get done, but without any error or warning. The transition just doesn't get changed. Worse: if I put this into a d-file with other changes to the dlg (like APPEND bdff1709; ADD_STATE_TRIGGER), none of it gets patched to bdff1709.dlg. The bdff1709.dlg gets moved to the override, that's it. If I remove the ALTER_TRANS syntax, everything else gets patched into the dlg. If I include only the ALTER_TRANS, nothing is changed. The installer gives no errors or warnings.

If someone could point out the obvious, I'd be grateful.

Link to comment

Bizarrely, ALTER_TRANS appears to be case-sensitive.

If I do

<<<<<<<< .../stratagems-inline/test.d
ALTER_TRANS bdff1709
BEGIN 2 END
BEGIN 1 END
BEGIN
	"EPILOGUE" "EXTERN bdff1709 0"
END

ALTER_TRANS bdff1709
BEGIN 4 END
BEGIN 0 END
BEGIN
	"EPILOGUE" "EXTERN bdff1709 7"
END

>>>>>>>>

COMPILE ".../stratagems-inline/test.d"

then I can reproduce Jastey's bug.

If I do

<<<<<<<< .../stratagems-inline/test.d
ALTER_TRANS bdff1709
BEGIN 2 END
BEGIN 1 END
BEGIN
	"EPILOGUE" "EXTERN BDFF1709 0"
END

ALTER_TRANS bdff1709
BEGIN 4 END
BEGIN 0 END
BEGIN
	"EPILOGUE" "EXTERN BDFF1709 7"
END

>>>>>>>>

COMPILE ".../stratagems-inline/test.d"

it works fine.

Probably worth reporting to Wisp - it's undocumented as far as I can see.

Link to comment

So this is a about hash-table lookups. WeiDU does not normalise case when interring or looking up symbols, so it can store different case-variations of the same filename as they were different files. The "file" loaded by the EXTERN is written to disk after the file loaded by the main ALTER_TRANS action, but since it was loaded before ALTER_TRANS made any changes, it ends up overwriting the changes to the first file.

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