Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't handle PST animate.ids...in dialogs, at least #199

Open
burner1024 opened this issue Jun 29, 2021 · 6 comments
Open

can't handle PST animate.ids...in dialogs, at least #199

burner1024 opened this issue Jun 29, 2021 · 6 comments
Labels

Comments

@burner1024
Copy link
Contributor

animate.ids looks like this

0x6050 (cl 4) Thokola
0x6051 (cl 1) Nameless One, Severed Arm
0x6052 (cl 1) Nameless as Zombie

Error

[action list near line 131, column 2 of DINCAR2.DLG] PARSE WARNING at line 132 column 1-33
Near Text: )
	[PolymorphEx] argument [(cl 1)
Nameless One, Severed Arm] not found in [Animate.IDS]

@4Luke4
Copy link

4Luke4 commented Jun 29, 2021

Might be related to this...

@burner1024
Copy link
Contributor Author

burner1024 commented Jun 29, 2021

Man, weidu is too smart for its own good... + seems easy enough to add, but for the life of me I can't figure out how to make it parse pst's animate.ids.
Edit: actually, there's special code for animate.ids already, but it looks like for some reason parentheses or comma in ids symbol confuses d/baf action parser.

D action looks like this

Polymorph(24647)
SetAnimState("Vhail", ANIM_MIMEATTACK1)

The relevant weidu code is just

COPY_EXISTING_REGEXP GLOB ~^.+\.dlg$~ ~override~
  DECOMPILE_AND_PATCH BEGIN x = 0 END
BUT_ONLY

@burner1024 burner1024 changed the title can't handle PST animate.ids... at all? can't handle PST animate.ids...in dialogs, at least Jul 10, 2021
@FredrikLindgren
Copy link
Member

FredrikLindgren commented Sep 19, 2021

This happens because Dlg.save_dlg invokes Dlg.convert_raw_text on the action, which replaces the final space in "(cl 1) " with a newline, which cases the future Hashtbl lookup to fail, resulting in the parse warning. The D file is created fine, with Polymorph(123) in the action list. It appears to be the compiler that expands the IDS code into its symbol.

@FredrikLindgren
Copy link
Member

And this should be fixed in 65964c2.

@FredrikLindgren
Copy link
Member

This is back on because regexps suck.

@burner1024
Copy link
Contributor Author

So, uhm, any examples of strings that should and should not be caught by the regex? Maybe I'll think of one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants