I cannot replace IfValidForPartyDialog(Myself)
[Deleted User]
Posts: 0
I want to modify the file bddefai.bcs. For this purpose I have written this code:
I have tested the following with positive result:
Does anyone have a suggestion?
ACTION_IF FILE_EXISTS_IN_GAME ~bddefai.bcs~ BEGIN COPY_EXISTING ~bddefai.bcs~ ~override~ DECOMPILE_BCS_TO_BAF REPLACE_TEXTUALLY ~IF[%TAB% %LNL%%MNL%%WNL%]*Global("BDAI_DISABLE_ATTACK","LOCALS",0)[%TAB% %LNL%%MNL%%WNL%]*ActionListEmpty()[%TAB% %LNL%%MNL%%WNL%]*IfValidForPartyDialog(Myself)[%TAB% %LNL%%MNL%%WNL%]*CheckStat(Myself,0,SANCTUARY)[%TAB% %LNL%%MNL%%WNL%]*!ModalState(BATTLESONG)[%TAB% %LNL%%MNL%%WNL%]*See(NearestEnemyOf(Myself))[%TAB% %LNL%%MNL%%WNL%]*!StateCheck(NearestEnemyOf(Myself),STATE_REALLY_DEAD)[%TAB% %LNL%%MNL%%WNL%]*!Allegiance(NearestEnemyOf(Myself),GOODCUTOFF)[%TAB% %LNL%%MNL%%WNL%]*!IfValidForPartyDialog(NearestEnemyOf(Myself))[%TAB% %LNL%%MNL%%WNL%]*THEN[%TAB% %LNL%%MNL%%WNL%]*RESPONSE #100[%TAB% %LNL%%MNL%%WNL%]*AttackOneRound(NearestEnemyOf(Myself))[%TAB% %LNL%%MNL%%WNL%]*END~ ~~ REPLACE_TEXTUALLY ~IF[%TAB% %LNL%%MNL%%WNL%]*Global("BDAI_ATTACK_MODE","LOCALS",2)[%TAB% %LNL%%MNL%%WNL%]*ActionListEmpty()[%TAB% %LNL%%MNL%%WNL%]*IfValidForPartyDialog(Myself)[%TAB% %LNL%%MNL%%WNL%]*IsWeaponRanged(Myself)[%TAB% %LNL%%MNL%%WNL%]*Range(NearestEnemyOf(Myself),4)[%TAB% %LNL%%MNL%%WNL%]*THEN[%TAB% %LNL%%MNL%%WNL%]*RESPONSE #100[%TAB% %LNL%%MNL%%WNL%]*EquipMostDamagingMelee()[%TAB% %LNL%%MNL%%WNL%]*Continue()[%TAB% %LNL%%MNL%%WNL%]*END~ ~~ COMPILE_BAF_TO_BCS BUT_ONLY ENDUnfortunately, the relevant places will not be changed.
I have tested the following with positive result:
REPLACE_TEXTUALLY ~Global("BDAI_ATTACK_MODE","LOCALS",2)[%TAB% %LNL%%MNL%%WNL%]*ActionListEmpty()~ ~~And I have tested the following with negative result:
REPLACE_TEXTUALLY ~IfValidForPartyDialog(Myself)~ ~~It seems that I cannot replace IfValidForPartyDialog(Myself).
Does anyone have a suggestion?
0
Comments
IsValidForPartyDialogue()
You can see exactly what weidu is decompiling the script into by running this on the bcs file: (It will create a scrolling wall of text in the install prompt, so for long scripts it's easier to look at the results in the weidu debug file.)
As well, this: can be shortened to this: as WNL includes both LNL and MNL characters.
That's good to know. Thank you very much!