Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: K4thos
« on: August 14, 2017, 12:09:45 PM »

all good, I will mark the topic as solved. Thanks guys for help.
Posted by: Wisp
« on: August 14, 2017, 11:04:31 AM »

So, everything good or do you want me to do something?
Posted by: Gwendolyne_FP
« on: August 13, 2017, 03:00:46 PM »

Thanks a lot!

This tip will help me to resolve my last compatibility problem with compiling dialogs. ;)
Posted by: Argent77
« on: August 13, 2017, 02:35:28 PM »

It appear so (at least it did in my tests). JOURNAL options seem to be added after FLAGS is applied.
Posted by: Gwendolyne_FP
« on: August 13, 2017, 02:22:26 PM »

Does it mean that FLAGS 0 does not break anything? I mean if I add SOLVED_JOURNAL (for example) in the same line.
Posted by: Argent77
« on: August 13, 2017, 11:35:36 AM »

I don't think BIT9 has any effect in the classic games, so the following line should safely work for all games:
Code: [Select]
IF ~~ DO ~%GWDialogue%SetGlobal("GW#GwendyNO","GLOBAL",0) %GWDialogue%SetGlobal("GW#GwendyOK","GLOBAL",1) EraseJournalEntry(@3590012) AddJournalEntry(@3590014,INFO)~ FLAGS ~%BIT9%~ EXTERN GWGWENDY Gwendolynette.Bag

Or for more clarity you could set a more descriptive variable that is used in place of BIT9, e.g.  set
Code: [Select]
OUTER_SET INSTANT_ACTIONS = BIT9in the .tp2 file and use
Code: [Select]
FLAGS ~%INSTANT_ACTIONS%~in the .d file.

Edit: Or define
Code: [Select]
OUTER_SET INSTANT_ACTIONS = 0for classic BG2. In this case no flags should be set.
Posted by: Gwendolyne_FP
« on: August 13, 2017, 11:15:12 AM »

ToBEx adds DialogueSetGlobal and DialogueIncrementGlobal to be used in d files which have the same meaning as BIT9.

To provide compatibility with BG2 and BG2:EE, I used until now this kind of coding:

Code: [Select]
IF ~~ DO ~%GWDialogue%SetGlobal("GW#GwendyNO","GLOBAL",0) %GWDialogue%SetGlobal("GW#GwendyOK","GLOBAL",1) EraseJournalEntry(@3590012) AddJournalEntry(@3590014,INFO)~ EXTERN GWGWENDY Gwendolynette.Bag

with
Code: [Select]
BG2 : OUTER_SPRINT GWDialogue "Dialogue"
BG2:EE : OUTER_SPRINT GWDialogue ""

How to use the FLAGS BIT9 in this case? I mean something like FLAGS BIT9 for BG2:EE compilation and nothing for BG2, in the same d file?
Posted by: K4thos
« on: August 13, 2017, 09:56:32 AM »

thanks, looks like the current implementation does the job already. I can cofirm that flags are correctly decompiled (SoD BDMURS.DLG).
Posted by: Argent77
« on: August 13, 2017, 09:27:51 AM »

Looks like FLAGS is implemented in a very rudimentary way. It accepts only straight numeric values (i.e. no expressions), variable evaluation seems to work though. Defining multiple FLAGS instances don't make sense. Only the latest instance is used.

Examples: "FLAGS 512" sets bit 9, "FLAGS 1536" sets bits 9 and 10 (512 + 1024). You can also use BITx constants when you add EVAL to the COMPILE action, e.g. FLAGS ~%BIT9%~ is evaluated to FLAGS 512.

WeiDU decompiles DLG with FLAGS correctly when used at command line. DECOMPILE_DLG_TO_D and DECOMPILE_AND_PATCH appear to work as well.
Posted by: K4thos
« on: August 13, 2017, 09:00:51 AM »

neat, but shouldn't weidu decomile FLAGS into D format in such case (DECOMPILE_DLG_TO_D and command line decompile feature) so they are not missing after compiliation? I don't think it's the case although I will check it out.

edit: quote from documentation:
Quote
FLAGS: Used to set transition flags manually, though I can’t imagine why one would do this.
well, now there is a real purpose. I think naming them properly rather than using integer is the way to go. btw. what integer should be used for bit9 - 9 or 512?
Posted by: Argent77
« on: August 13, 2017, 08:09:33 AM »

According to the WeiDU docs there is already a FLAGS option that can be used to set arbitrary transition flags directly.
Posted by: K4thos
« on: August 13, 2017, 06:27:09 AM »

Currently weidu D format only supports bti0-bit8 transition table flags. Patch 2.x for EE games added 2 new flags:
- bit9: Execute immediate - executes actions without delay instead of being added through the dialogue owner's action queue. I think it's mostly usefull as an alternative for ToBEx DialogueSetGlobal, DialogueIncrementGlobal, DialogueSG actions that allows variables to be set instantaneously and checked immediately afterwards in the same dialogue.
- bit10: Clear Actions - not sure what problems this bit is meant to solve - any ideas?

Other bits syntax in D format is "EXIT", "UNSOLVED_JOURNAL" etc. so I think both new bits should be supported the same way, so for example as "INSTANT_ACTIONS", "CLEAR_ACTIONS". Weidu should either ignore them on non-EE games or print some warning when present.