Jump to content


Photo

Loosing my war with WeiDU


  • Please log in to reply
4 replies to this topic

#1 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 22 April 2006 - 09:07 AM

I asked this question at G3 a week ago, but either my english was worse than usually at the moment or no one find this problem interesting enough to reply. :( It could be considered crossposting perhaps, but since I was unable to figure it out on my own for the last week, I decided to ask the same question here as well in hopes that it might catch an eye of someone who knows an answer :rolleyes:

Back to the point: I'm trying to modify dialogue. To simplify a problem, I need to add custom trigger and custom transition action to a certain state of existing dialogue file. As I understand, proper line for the former would be:
ADD_STATE_TRIGGER test 0 ~some test trigger here~
and for the latter:
ADD_TRANS_ACTION test BEGIN 0 END BEGIN END
~some action~

My problem is that when I'm making .d file consisting of this two lines and compiling it with WeiDU, it adds new trigger as it should, but ignores new action completely. When I tried to swap this 2 lines for add_trans_action to be first in the list, nothing changes: I get my new trigger but no new action :wacko:

As an interesting side effect of my attempts to fix it, I found out that if I make two .d files, one for adding trigger and another for adding action, and compile them one after another, everything works fine adding all that I need. But using several .d files to modify same one .dlg file feels somehow... stupid to me, so I will be grateful if somebody share some hints on how to make it right - by one .d file. :)

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#2 Pex657

Pex657
  • Member
  • 159 posts

Posted 22 April 2006 - 10:22 AM

I think I had the same issue, Shed helped me out with my problem. Thanks Shed :)
Here is the code, hopefully it will help you.
ADD_TRANS_ACTION NEEBER // Patching an action in NEEBER.dlg
BEGIN 16 END // Patching the sixteenth state
BEGIN 0 END // Patching the first transition/reply of the state
~GiveItemCreate("TSON#P",LastTalkedToBy,1,1,0)~ // The change

REPLACE_SAY NEEBER // Patching a Say-text in NEEBER.dlg
16 // Patching the sixteenth state
~You've been really nice to me. I'll give you some rocks that other people threw at me. Also you can have this sword. Please take care of it. Here.~ // New String

Edited by Pex657, 22 April 2006 - 10:25 AM.


#3 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 22 April 2006 - 11:28 AM

Thank you, Pex657.
I tried to run add_trans_action and replace_say from one .d to see if it will work for me - it does (while replace_say remains ignored if used in one .d with add_trans_action). Although I'm afraid it doesn't make me any clearer as to why add_trans_action and add_state_trigger didn't want to work together, at least now I'm sure that it's not my computer's incompatibility with WeiDU ^_^
Perhaps if you could remember how these lines from your example was looking like while you were still experiencing same issue as I do and what exactly did Shed tell you to change to fix it, it might help though :rolleyes:

Hmm... inspired by Pex' post I run another series of tests, which eventually leads to following:
after I run this

//my test .d file

REPLACE_SAY test 0 ~Ribbit!~

ADD_STATE_TRIGGER test 0 ~Global("test", "LOCALS",0)~

ADD_TRANS_ACTION test BEGIN 0 END BEGIN 0 END
~SetGlobal("test", "LOCALS",1)~

APPEND test
IF ~~ THEN
BEGIN Cr01
SAY ~Blah!~
IF~~ THEN EXIT
END
END

and check then resulting .dlg file, I found that replace_say didn't affect modified .dlg at all, add_trans_action works fine, add_state_trigger went after replace_say (i.e. were seemingly ignored by WeiDU) and append, well, appends OK.
I supose that if such behaviour was typical for WeiDU every modder and it's dog were long since screaming about how stupid and usless it is, so it must be my local problem, but still, I don't see one wrong bit in my example .d :blink:

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#4 -Guest-

-Guest-
  • Guest

Posted 22 April 2006 - 11:59 AM

This is probably not going to help but shouldn't it be
REPLACE_SAY test 
0
 ~Ribbit!~
with breaks inbetween each thing or it might not matter, i don't have enough weidu skills to know.

#5 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 22 April 2006 - 12:04 PM

It doesn't matter, these breaks are used just for visual convenience AFAIK.

Edited by Creepin, 22 April 2006 - 12:07 PM.

The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)