Jump to content

Gamemacik

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by Gamemacik

  1. [_!MG1.DLG] created from [_!MG1.DLG]
    
    [_!MG1.DLG] LEXER ERROR at line 47 column 1-16
    Near Text: -
    	invalid character [-]
    
    [_!MG1.DLG]  ERROR at line 47 column 1-16
    Near Text: -
    	Parsing.Parse_error
    ERROR: parsing [_!MG1.DLG]: Parsing.Parse_error
    ERROR: [_!MG1.DLG] -> [override/_!MG1.DLG] Patching Failed (COPY) (Parsing.Parse_error)
    Stopping installation because of error.
    
    ERROR Installing [EET end (last mod in install order) -> Standard installation], rolling back to previous state
    Unable to Unlink [EET/backup/end/0/OTHER.0]: Unix.Unix_error(1, "unlink", "EET/backup/end/0/OTHER.0")

    The problem is not with exclamation symbol "!" or with _! prefix, reason why _!mg1.D mg2.D compiles with errror is, WEIDU removes or does not use ~~ after EXTERN so if value has negative symbol - it will give error

     

    when weidu decompiles "_!mg1.dlg" file -1 value remains without ~~ so possible fix is change value -1 to positive eg. 0 or Termination dialog is also possible so replace whole EXTERN ~None~ ~-1~ with EXIT

     

    Original _!mg1.D ~-1~ is enclosed by ~~

    OtgW34D.jpg

     

    when weidu decompiles dlg

    z9ZgKWo.jpg

     

    replace files _!MG1.D _!MG2.D in the folder and uninstall/install mod:
    ...\Baldur's Gate II - Enhanced Edition\Dimension_Gate\NEW\DLG\

    _!MG1.D_!MG2.D.rar

  2. #72 (72) IDS: Set IDS State

    Important:
    • Only reliable timing mode is Timing Mode 1 (all others are bugged and can convert to this timing mode under various circumstances).
    • Timing Modes 1/4/7 will permanently set the creature(s) IDS value, leaving no removable effect.

    This bug occurs eg. when an item, ranged weapon as bow has opcode #72 (72) IDS: Set IDS State when you equip arrows opcode become permanent and unremovable 

    To prevent this bug (marked red), use opcode #177 (177) Use EFF File timing mode equipped or instant limited, and eff file with opcode #72 (72) IDS: Set IDS State timing mode instant limited 0 is ok. in most of case is duration in the eff file irrelevant.

     

  3. More details about trigger: 0x4092 InLine(S:Target*,O:Object*)

    Can return true even both S:Target, O:Object are invisible, range for S: Target seems to be unlimited, O:Object must be in visual range

    Returns true if O:Object is "blocking" sight line to S: Target

    Eg.:

    IF
    	Detect([GOODCUTOFF])
    	InLine("Imoen",LastSeenBy(Myself))
    THEN
    	RESPONSE #100
    		DisplayStringHead(Myself,2)
    END

     

  4. Hi, i imported unpaletted npc as [character_old] with false_color=0 until this everything fine, but what i did not expect weapons still use false colors so sword colors are completely messed. I have defined custom WPXXX bams

    I choosed [character_old] because animation has 8 direction and i wanted armor levels also.

    Is there animation type which supports armor level (armor_max_code)? beside [character] anims are 9-dir unmirrored ...

    [monster_icewind] supports objects like weapons only no helmets or armor levels allowed

    [monster] support objects like weapons but not helmets or armor i guess...

    Is there way to force WPXXXXX bams to not use false colors?

    f7U105T.gifVQ71U40.gif

  5. So make your conversable item as you wanted you will have "Make Poison" button as you wanted, and script actions will be executed by invisible npc spawned from dialog file,... (add to dialog CreateCreatureObject(....)

    If you don't want to spam save game file with global variables, you could use local variables instead, to let know what action should be performed by invisible npc add to dialog actions line after npc creation:

    eg.: ActionOverride("INVSNPC",SetGlobal("ALCHEMY","LOCALS",12)) or set variable via opcode as spell...

    or without variables?

    ActionOverride("INVSNPC",TakePartyItemNum("BBERRY_#",30))

     
  6. yes ranged weapons are penalized in melee combat, projectile can hold 1 sound only while ini can have slash, backslash, jab sounds + alternative sounds are not limited to 3.

    But if you plan to make some mass patch for all weapons you would end with countless number of files, i had 1 sword and i limited it to thiefs only, because each race/class has special paperdol, human can be mage/cleric/thief,monk.... each has own ini file

  7. the only way how to play melee weapon sound is attach it to creature XXXX.ini file, and then change id appearance to duplicated  XXXX.ini... or make fake melee weapon which is in fact ranged weapon with projectile, with attack rage 2, and attach sound to projectile.

    I used the first method, i made duplicates of thief ini files so after equipping lightsaber thief transformed to duplicated anim of jedi_thief with special lightsaber sounds.

  8. Instead of conversable item spawn invisible npc with opcode #151 (0x97) Summon: Replace Creature, Parameter2=3 (dont remove), attach dialog to npc and it should work.

    OR.. why dialog, why not make recipes with ingredients, click recipe it will set global variable eg alchemy = 12 , it will spawn invisible npc, npc will check block with value 12 and add item to players inventory,  last script block will always set variable alchemy to 0,, npc DestroySelf(), and also good practice attach to npc opcode delayed #168 (0xA8) Summon: Remove Creature self, bad things may happen npc will not destroy self eg, cutscene or party maliciously entered to other location...

  9. #174 (0xAE) Spell Effect: Play Sound Effect attached to item is played only on successful hit, exception is ranged weapon where you can attach sound to projectile itself.

    I solved similar problem when i wanted to play hm hm lightsaber sound, even if target missed, melee weapon header ignores projectile field

  10. First Item created by action CreateItem(S:ResRef*,I:Usage1*,I:Usage2*,I:Usage3*) is not visible in the inventory,

    if creature dies by normal death, item is dropped

    if creature dies by disintegrated, petrified death, item (with flag: critical) is dropped

    if creature dies by frozen death, item (with flag: critical) is immediately destroyed, removed from inventory even its CRITICAL (even victim is still in one piece).

    If creature leaves party critical invisible item is moved into Protagonist's inventory, item is normally visible.

    This action always puts newly created item into Magical weapon slots instead of inventory, if Magical weapon slots is already occupied items are created in the inventory as they should.

     

     

  11. Small bird is not problem, i guess, best not bumpable and immune to wing buffet, theoretically the invisible npc could work like a trap with use of script or opcode #232 to detect range of enemy.

    I did little test with Exploding Trap SPCL911, map note did not display after setting trap. When i copied opcode 252 from spell SPCL911B to spell SPCL911 into spell Extended Header map note displayed on the map and also was removed when enemy target triggered trap. If 252 opcode is put  to spell SPCL911 to Spell Header, map note will appear but is not removed when enemy trigger trap)

  12. with script yes but you need to know exact coords x,y and with opcode add yes but to remove with opcode spell need to be casted to same position as map marker

    I wanted to use it for trap spell, to remove map marker some invisible creature should stay there which will hold exact x,y coords to remove marker opcode.

     

  13. Dice field Dice Thrown / Maximum Level and Dice Sides / Minimum Level are not limited to first class level only, work with LEVEL1 LEVEL2 LEVEL3 if creature is dual-class of multi-class, if creature is single class LEVEL2 LEVEL3 are ignored, if creature is eg. FIGHTER-MAGE LEVEL3 is ignored.

    Spell Effect is applied if Dice Thrown / Maximum Level >= LEVEL1 OR Dice Thrown / Maximum Level >= LEVEL2 OR Dice Thrown / Maximum Level >= LEVEL3

    Spell Effect is applied if Dice Sides / Minimum Level <= LEVEL1 OR Dice Sides / Minimum Level <= LEVEL2 OR Dice Sides / Minimum Level <= LEVEL3

    Spell Extended_Header Level Required, caster level for Special, Innate, Psionic spell type spells is calculated as average , again LEVEL2, LEVEL3 are IGNORED if it is single class.

    RoundUP((LEVE1+LEVEL2+LEVEL3)/3), eg, 11,33333 = 12 level

     

    Spell Extended_Header Level Required, caster level for Priest, Wizard spell type spells is checked as ClassLevel

     

    eg. FIGHTER_MAGE_CLERIC, LEVEL1=3,  LEVEL2=2, LEVEL3=9 

    0x4094 Level(O:Object*,I:Level*) trigger will return average level from all 3 classes, (3+2+9)/3 = 14/3 = 4,666666666666667 = 5 level

    Target will not be killed by Death Spell SPWI605.SPL becacuse LEVEL3 is higher than 8, for script is better to use:

    CheckStatLT(LastSeenBy(Myself),9,LEVEL)
    CheckStatLT(LastSeenBy(Myself),9,LEVEL2)
    CheckStatLT(LastSeenBy(Myself),9,LEVEL3) 
  14. Spells like Skull Trap, Cloudkill, can bypass opcode #102 (0x66) Spell: Immunity (by Power Level)
    eg: Mage with Globe of Invulnerability can harm himself when casts Skull Trap SPWI313. Setting spell header bit 2 (Hostile) will prevent self-damage.

    This works for single target spells also, like Magic Missile SPWI112, with Hostile flag Magic Missile don't harm mage protected by opcode #102, when he tries to kill himself.

  15. i added to first post some more details to Delay trigger after more testing, now it is even more confusing, it seems to be very unreliable command for long delayed blocks because they may never be executed.

    
    IF
    	Delay(58)
    THEN
    	RESPONSE #100
    		ForceSpell(Myself,WIZARD_GLOBE_OF_INVULNERABILITY)  // SPWI602.SPL (Globe of Invulnerability)
    END
    
    IF
    	Delay(60)
    THEN
    	RESPONSE #100
    		ForceSpell(Myself,CLERIC_HEAL)  // SPPR607.SPL (Heal)
    END
    
    IF
    	Delay(18)
    THEN
    	RESPONSE #100
    		ForceSpell(Myself,WIZARD_MAGIC_MISSILE)  // SPWI112.SPL (Magic Missile)
    END

    in short from testing of script above.

    if spawned NPC is idle it will cast WIZARD_GLOBE_OF_INVULNERABILITY immediately but if eg. moves next check is in 58 sec

    then is should cast 3x MAGIC_MISSILE that means about 54 seconds elapsed

    NPC waits 4 sec and casts WIZARD_GLOBE_OF_INVULNERABILITY, NPC remains idle, after cast is time 58+6=64 seconds

    CLERIC_HEAL is not casted because it is too late, required time was at 60 sec, long casting time of WIZARD_GLOBE_OF_INVULNERABILITY prevented NPC to heal self.

  16. 0x4027 Delay(I:Delay*)
    Delays the next check of the block of triggers where this trigger is, by the number of seconds specified. This value is not stored when the game is saved. 

    Delay is applied immediately before first block execution of delayed script block if block could not be executed because of some different action eg. casting spell or movement , eg. if script block has Delay(60) and then it executes some action eg. casts a spell, before 1st execution game will wait 60 second and then casts a spell a repeats same every 60 seconds. It may happen delayed block will never be executed if another action is in progress, it looks like game gives some tolerance about 1 round if delay block is not executed within this period next chance to execute actions will be at next check in 60 sec. (the 1 round tolerance delay does exist if delayed block never been executed before)

    What is missing in trigger description is: Delay is not executed for every block separately or better say delay changes time (interval for checking) for delayed blocks. This means delay should not be used like a cooldown for casting spells eg.

    IF
    	True()	//This is First script block with Sring 6 is notification - begining of script loop
    THEN
    	RESPONSE #100
    		DisplayString(Myself,6)  // Then join us by all means. You are welcome here.
    		Continue()
    END
    
    IF
    	ActionListEmpty()
    	Delay(3)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,2)  // You played Elminster?
    END
    
    IF
    	ActionListEmpty()
    	Delay(6)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,3)  // Uh, the yugoloth, was it? Yeah, you stole the show with that one, if I recall.
    END
    
    IF
    	ActionListEmpty()
    	Delay(3)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,4)  // And, who knows, we were rehearsing for Picoccio's "Three Days in the Ether." Perhaps we can give you a dress matinee.
    END

    Code above contains 4 blocks, 1st block is notification block to let us know when script loop begins, then 2nd block ticks every 3 second, 3rd block ticks every 6 seconds and 4th block every 3 seconds.

    Result is only 2nd block script is executed, this means only "You played Elminster?" is displayed then script returns at beginning " Then join us by all means. You are welcome here." and continues checking blocks again, actions from blocks 3 and 4 are never executed.

    1st block ticks always (approx. every 1 sec, this varies from script levels, override scripts and master scripts ticks much faster than class script, slowest is Default script)

    2nd blocks ticks every 3 sec, 3,6,9,12,15,18,21,24

    3rd blocks ticks every 6 sec, 6,12,18,24

    4th blocks ticks every 3 sec, 3,6,9,12,15,18,21,24

    Therefore script should not contain blocks with same Delay parameter or rest of blocks below are never executed. We could use Continue() to allow rest of scripts to be checked is such case delayed scripts which are checked in same time interval will be executed, but Continue() checks conditions of following block at once so if 1 block checks health eg.: HPLT(Myself,20) and then cast "CLERIC_HEAL", 2nd block checks HPLT(Myself,30) cast "CLERIC_CURE_MEDIUM_WOUNDS" the second healing is executed even target is already fully healed, because of a way how Continue() changes block checking.

     

    ***

    0x4047 RandomNum(I:Range*,I:Value*)
    Generates a random number between 1 and Range. Returns true only if the random number equals the 2nd parameter. 

    Now about RandomNum, RandomNumGT, RandomNumLT, the problem seems to be similar to delay eg.:

    IF
    	ActionListEmpty()
    	RandomNum(3,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,2)  // You played Elminster?
    END
    
    IF
    	ActionListEmpty()
    	RandomNum(3,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,3)  // Uh, the yugoloth, was it? Yeah, you stole the show with that one, if I recall.
    END
    
    IF
    	ActionListEmpty()
    	RandomNum(3,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,4)  // And, who knows, we were rehearsing for Picoccio's "Three Days in the Ether." Perhaps we can give you a dress matinee.
    END

    Similar script, 3 blocks with 33% chance to execute a block, result is 2nd and 3th block is never executed. I did not expect RandomNum works such way, so simply say if blocks contain same parameters as block above they are never executed. RandomNum is checked only once per loop for blocks with same parameters or better say RandomNum is checked at once for all blocks with same parameters?

     

    If parameters are unique then each block is checked separately and actions in blocks 2 and 3 have chance to be executed.

    IF
    	ActionListEmpty()
    	RandomNum(3,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,2)  // CharnameYou played Elminster?
    END
    
    IF
    	ActionListEmpty()
    	RandomNum(4,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,3)  // Uh, the yugoloth, was it? Yeah, you stole the show with that one, if I recall.
    END
    
    IF
    	ActionListEmpty()
    	RandomNum(5,1)
    THEN
    	RESPONSE #100
    		DisplayString(Myself,4)  // And, who knows, we were rehearsing for Picoccio's "Three Days in the Ether." Perhaps we can give you a dress matinee.
    END

    example of script where RandomNum uses same parameters draconis.bcs

    unique RandomNum parameters: ohryxtra.bcs

     

  17.  Note:
    
        Effect is always instantaneous/delayed.
        AREA and SPECIFICS can only be set on non-global creatures (not potential party members or familiars), and are lost upon saving & reload.
    Note:
    • Effect is always instantaneous/delayed.
    • AREA and SPECIFICS can be set to party members also only be set on non-global creatures (not potential party members or familiars), and are lost upon saving & reload.

    AI button need to be enabled for all scripts attached to party members include temporary area/specifics scripts except override scripts, they are always active.

  18. 16 hours ago, lynx said:
    
    
    IF
        Detect(NearestEnemyOf(Myself))
        HaveSpell(CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    THEN
        RESPONSE #100
            Spell(NearestEnemyOf(Myself),CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    END

     

    I would not post untested code, i tested also this code (above) of course, i tested it today again, I spawned enemy orc shaman with this code attached to class script, tested with override script also, shaman just stand and does nothing. I tried also code without HaveSpell and with ForceSpell, result is same also. Shaman had only one script attached to avoid possible script conflicts, from my testing result is same as posted in my first post above. 

    IF
    	Detect(NearestEnemyOf(Myself))
    THEN
    	RESPONSE #100
    		ForceSpell(NearestEnemyOf(Myself),CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    END

     

  19. A lot of scripts use Detect() with combination of objects eg. NearestEnemyOf(Myself), but Detect won't detect  if enemy is fully invisible somehow. It works with with EA eg. ANYONE, GOODCUTOFF, EVILCUTOFF

    Priest18.BCS

    IF
        Detect(NearestEnemyOf(Myself))
        !See(NearestEnemyOf(Myself))
        HaveSpell(CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    THEN
        RESPONSE #100
            Spell(NearestEnemyOf(Myself),CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    END

     

    Second script works (for nearest GOODCUTOFF invisible/improved invisibility target only)

    
    IF
    	ActionListEmpty()
    	Allegiance(Myself,ENEMY)
    	Detect([GOODCUTOFF])
    	OR(3)
    		!See(LastSeenBy(Myself))
    		StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
    		StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
    	HaveSpell(CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    THEN
    	RESPONSE #100
    		Spell(Myself,CLERIC_TRUE_SIGHT)  // SPPR505.SPL (True Seeing)
    END

     

  20. This action is likely called directly by the engine, and is used to give ankheg give the appearance of emerging from the ground. Calling the action from script has no effect.

    This action is likely called directly by the engine, and is used to give ankheg give the appearance of burrowing into the ground. Calling the action from script has no effect.

    Actually both actions work when called from script, player must have ankheg's animations to get this work

    script actions activate following sequences

    14 SEQ_EMERGE             
    15 SEQ_HIDE 
  21. 21 hours ago, kjeron said:

    Not seeing the issue with ChangeEnemyAlly() in BG2EE.  EA value is altered as specified.

    ChangeEnemyAlly it should update creature's EA as it does for other values such GOODBUTRED or ENEMY... etc. but it does not do that for CONTROLLABLE or ALLY, creature remains uncontrollable, that means it is not true what you said. ... i cant explain better.

    And the spell of course it is custom spell which i made, it bypass her immunities and her "Protection from Petrification".

    7FR0VNs.gif

  22. BG2: EE v 2.5.16.6  ChangeEnemyAlly() will change circle color but creature is stil not controllable, i casted some buff spell to update her EA. Save/Load works also...

    IF
        HotKey(T)
    THEN
        RESPONSE #100
            CreateCreatureObjectEffect("_!BODHI1","",Myself)  // Bodhi
            Wait(2)
            ActionOverride("_!BODHI1",ChangeEnemyAlly(Myself,CONTROLLED))
            Wait(2)
    END

     

    eQCJ1TN.gifUvXOtJq.gif

     

    Spell Immunities, i did not modify her belt in any way nor i did not remove any protection

    7iwoNjI.gif

     

  23. When cut scene is activated with CutSceneMode() opcode #126 (0x7E) Stat: Movement Modifier,  #176 (0xB0) Stat: Movement Modifier (II) does nothing, affected creature moves with normal speed instead until EndCutSceneMode() is called.

    There is several opcodes that work differently in cut scenes eg. creatures inside MAZE #213 are visible, Stun effect are ignored etc..

    Haste #16, Haste2 #317 opcodes seem to work inside cut scenes also.

     

    Note: about opcode #318 Protection from Resource

    From my testing it seems, this is not true what is written about #318 (0x13E) Protection from Resource, effects from eff files cannot be blocked by this opcode #318 nor even spells effects can't be blocked if the effect is added outside of "Special ability". Effect outside of "Special ability" is applied immediately after appearing casting glow (immediately after clicking on spell icon).

    I think reason why someone thinks eff can be blocked is, because the name is same as spell but in reality the spell itself is blocked not the effect. Any effect inside "Special ability" is blocked also doesn't matter what is the name of the effect. So simply say only effects inside "Special ability" can be blocked by #318 (0x13E) Protection from Spell Resource. (word "Spell" is missing)

    Same with #101 (0x65) Protection: from Opcode, this effect cannot block effects from EFF files, EFF files are applied by affected creature itself therefore are immunities ignored, eg. when mage cast fireball active Spell Immunity: Evocation, he is hurt by his own "Fireball" or "Incendiary Cloud" spells, mage is immune only against evocation spells casted by other casters.

     

    ChangeEnemyAlly() doesn't work properly with BG2:EE 2.5


    IF
        HotKey(T)
    THEN
        RESPONSE #100
            CreateCreatureObject("Bodhi",Myself)
            Wait(2)
            ChangeEnemyAlly("Bodhi",CONTROLLED) // doesnt work with BG2EE 2.5 same problem like AddFamiliar(), this can be used to update action bar SelectWeaponAbility(SLOT_WEAPON1,0)
            //ActionOverride("Bodhi",SelectWeaponAbility(SLOT_WEAPON1,0))
            Wait(2)
            ChangeEnemyAlly("Bodhi",ENEMY) // this worked on BG2EE 2.5, because bodhi attacked nearest Player
    END

    Simulacrum SpellBook Bug:

    Cast Simulacrum, then select created Simulacrum image and click to second or first weapon slot to switch weapon, open wizard book W and now you see spell book of your Simulacrum image, repeat same with your mage who casted Simulacrum to get your SpellBook back, casting spell also return original SpellBook (= same update action bar bug).

     

×
×
  • Create New...