Skip to content

Commit

Permalink
various additions and fixes #76
Browse files Browse the repository at this point in the history
  • Loading branch information
4Luke4 authored and lynxlynxlynx committed Aug 15, 2019
1 parent 696bd04 commit b2c24a0
Show file tree
Hide file tree
Showing 41 changed files with 420 additions and 85 deletions.
2 changes: 1 addition & 1 deletion _opcodes/op000.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
If the targets AC is already 'AC Modifier' or below, this effect will do nothing).

<p>
AC is capped to the range [-20, 20]
Each modifier type to AC from this opcode is capped to the range [-20, 20]. Each AC type total is capped to the range [-32768,32767].
</p>

{% capture note %}
Expand Down
11 changes: 8 additions & 3 deletions _opcodes/op001-bgee.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,20 @@
<br>0 Cumulative Modifier -&gt; Key = Key + 'Key Modifier' value
<br>1 Flat Value Modifier -&gt; Key = 'Key Modifier' value
<br>2 Percentage Modifier -&gt; Key = (Key * 'Key Modifier' value) / 100
<br>3 Final Value Modifier -> Key = 'Key Modifier' value
<br>3 Final Value Modifier -&gt; Key = 'Key Modifier' value

{% capture note %}
When this opcode is stacked, the values of the Key Modifier are stacked,
not the number of attacks.
When this opcode is stacked, the number of attacks are stacked, not the values of the Key Modifier.
{% endcapture %}

{% include info.html %}

{% capture note %}
Param#1 can take negative values. These values match their positive counterparts (e.g., "-6" corresponds to "-0.5").
{% endcapture %}

{% include note.html %}

{% capture note %}
IWD1 treats all keys <strong>above 5 as 5</strong>.
PST does not support Type 3, while BG(2)EE uses it differently.
Expand Down
12 changes: 9 additions & 3 deletions _opcodes/op002.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@
iwd2: 1
pst: 1
---
Removes the state_sleeping flag from the targeted creature(s).
Removes <a href="#op39">opcode #39</a> effects and the STATE_SLEEPING flag from the targeted creature(s).
<br/>This effect ignores durations attributed to it.

{% capture note %}
Does not remove the state_helpless flag.
Does not remove the STATE_HELPLESS flag.
{% endcapture %}

{% include note.html %}
{% include note.html %}

{% capture note %}
At least in EEs, it can remove <a href="#op177">opcode #177</a> effects targeting an EFF with <a href="#op39">opcode #39</a>. Does not always work when delayed.
{% endcapture %}

{% include note.html %}
8 changes: 0 additions & 8 deletions _opcodes/op003-iwd.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,3 @@
<br/>1 Always Active
<br/>2 Blood Rage
</p>

{% capture note %}
The second paragraph hasn't been verified for PST and BG1 yet, but likely holds.
{% endcapture %}

{% include note.html %}


21 changes: 18 additions & 3 deletions _opcodes/op003.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@
iwd2: 0
pst: 1
---
Applies the berserk effect to the targeted creature(s).
<br/>Target will uncontrollably attack enemies if any are in view, and will occasionally
attack neutral creatures.
Applies the berserk effect to the targeted creature(s) in the style specified by the 'Type' field.
<br/>Target will uncontrollably attack enemies if any are in view, and will occasionally attack neutral creatures.
<br/>Known values for 'Type' are:
<br/>0 Default/In Combat -> Only berserk while in combat.
<br/>1 Constant -> always berserk, sets SPELLSTATE 39 - ANIMAL_RAGE (only in EEs).
<br/>2 Blood Rage -> this is probably not implemented. It should be linked to SPELLSTATE 35 - SUPPRESS_HP_INFO. (only in EEs)

<p>
The affected creature becomes berserk and its AI scripts stop running. Grants a +2 bonus to hit and damage with all weapons. It also sets the STATE_BERSERK flag.
</p>

{% capture note %}
Forces creature(s) to use a melee weapon if possible.
{% endcapture %}

{% include note.html %}

{% capture note %}
This effect only affects party members.
{% endcapture %}
Expand All @@ -29,3 +38,9 @@
{% endcapture %}

{% include note.html %}

{% capture note %}
Used with timing modes 1/4/7 results in setting STATE_BERSERK when it triggers (and using its default behavior), rather than attaching a removable effect with selected behavior.
{% endcapture %}

{% include important.html %}
8 changes: 7 additions & 1 deletion _opcodes/op004.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
iwd2: 1
pst: 1
---
Removes the state_beserk flag from the targeted creature(s).
Removes <a href="#op3">opcode #3</a> effects and STATE_BERSERK from the targeted creature(s). Does not remove <a href="#op245">opcode #245</a>, <a href="#op246">opcode #246</a> and <a href="#op247">opcode #247</a> effects.
<br/>This effect ignores durations attributed to it.

{% capture note %}
Expand All @@ -24,3 +24,9 @@
{% endcapture %}

{% include note.html %}

{% capture note %}
At least in BG2 and EEs, this effect can remove <a href="#op177">opcode #177</a> effects targeting an EFF with <a href="#op3">opcode #3</a>.
{% endcapture %}

{% include note.html %}
90 changes: 79 additions & 11 deletions _opcodes/op005.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,83 @@
---
Charms the targeted creature(s) according to value in the 'Charm Type' field, if the target is matched by the value in the 'General Type' field. Values for 'General Type' are from General.ids.
<br/>Known values for 'Charm Type' are:
<br/>0 Charmed (Target neutral after effect ends)
<br/>1 Charmed (Target hostile after effect ends)
<br/>2 Dire charmed (Target neutral after effect ends)
<br/>3 Dire charmed (Target hostile after effect ends)
<br/>0 Neutral Charm
<ul>
<li>Does not alter targets allegiance stat.</li>
<li>Maintains EA REALLYCHARMED on the target if the caster is EA GOODCUTOFF.</li>
<li>Maintains EA CHARMED_PC on the target if the caster is EA NOTGOOD.</li>
<li>Maintains Portrait Icon 'Charm' on the target.</li>
<li>Effect ends if the creature is attacked by EA GOODCUTOFF.</li>
<li>Target displays "charmed" string.</li>
</ul>
<br/>1 Hostile Charm
<ul>
<li>Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.</li>
<li>Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.</li>
<li>Maintains EA REALLYCHARMED on the target if the caster is GOODCUTOFF.</li>
<li>Maintains EA CHARMED_PC on the target if the caster is NOTGOOD.</li>
<li>Maintains Portrait Icon 'Charm' on the target.</li>
<li>Effect ends if the creature is attacked by EA GOODCUTOFF.</li>
<li>Target displays "charmed" string.</li>
</ul>
<br/>2 Neutral Dire Charm
<ul>
<li>Does not alter targets allegiance stat.</li>
<li>Maintains EA CONTROLLED on the target if the caster is GOODCUTOFF.</li>
<li>Maintains EA ENEMY on the target if the caster is NOTGOOD.</li>
<li>Maintains Portrait Icon 'Dire Charm' on the target.</li>
<li>Effect ends if the creature is attacked by EA GOODCUTOFF.</li>
<li>Target displays "dire charmed" string.</li>
</ul>
<br/>3 Hostile Dire Charm
<ul>
<li>Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.</li>
<li>Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.</li>
<li>Maintains EA CONTROLLED on the target if the caster is GOODCUTOFF.</li>
<li>Maintains EA ENEMY on the target if the caster is NOTGOOD.</li>
<li>Maintains Portrait Icon 'Dire Charm' on the target.</li>
<li>Effect ends if the creature is attacked by EA GOODCUTOFF.</li>
<li>Target displays "dire charmed" string.</li>
</ul>
<br/>4 Controlled by Cleric
<br/>5 Target is hostile
<br/>1000 Charmed (no text) (Target neutral after effect ends)
<br/>1001 Charmed (no text) (Target hostile after effect ends)
<br/>1002 Dire charmed (no text) (Target neutral after effect ends)
<br/>1003 Dire charmed (no text) (Target hostile after effect ends)
<br/>1004 Controlled by Cleric (no text)
<br/>1005 Target is hostile (no text)
<ul>
<li>Sets targets allegiance to GOODCUTOFF if the caster is EVILCUTOFF.</li>
<li>Sets targets allegiance to EVILCUTOFF if the caster is NOTEVIL.</li>
<li>Maintains EA CONTROLLED on the target if the caster is GOODCUTOFF.</li>
<li>Maintains EA ENEMY on the target if the caster is NOTGOOD.</li>
<li>Target displays "turned" string.</li>
</ul>
<br/>5 Thrull Charm
<ul>
<li>Does not alter targets allegiance stat.</li>
<li>Maintains EA ENEMY on the target (regardless of casters Allegience).</li>
<li>Sets THRULLCHARM stat to 1.</li>
<li>Maintains Portrait Icon 'Charm' on the target.</li>
<li>Target displays "charmed" string.</li>
</ul>
<br/>1000 Neutral Charm (no Feedback) -> Same as 0, but target does not display any string.
<br/>1001 Hostile Charm (no Feedback) -> Same as 1, but target does not display any string.
<br/>1002 Neutral Domination -> Same as 2, except:
<ul>
<li>Maintains Portrait Icon 'Domination' on the target.</li>
<li>Target does not display any string.</li>
</ul>
<br/>1003 Hostile Domination -> Same as 3, except:
<ul>
<li>Maintains Portrait Icon 'Domination' on the target.</li>
<li>Target does not display any string.</li>
</ul>
<br/>1004 Controlled by Cleric (no Feedback) -> Same as 4, but target does not display any string.
<br/>1005 Thrull Charm (no Feedback) -> Same as 5, but target does not display any string.

{% capture note %}
If this effect turns a party member hostile, it will disable all of their scripts.
{% endcapture %}

{% include note.html %}

{% capture note %}
In EEs, the "Dice Thrown" parameter can be used to override the maintained EA Value. It is used in all but the first application of the effect.
{% endcapture %}

{% include note.html %}
8 changes: 7 additions & 1 deletion _opcodes/op011.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@
iwd2: 1
pst: 1
---
Removes the poison effect from the targeted creature(s).
Removes <a href="#op25">opcode #25</a> poison effects and STATE_POISON from the targeted creature(s).

{% capture note %}
This effect ignores durations attributed to it.
{% endcapture %}

{% include info.html %}

{% capture note %}
At least in EEs, this effect can remove <a href="#op177">opcode #177</a> effects targeting an EFF with <a href="#op25">opcode #25</a>.
{% endcapture %}

{% include info.html %}
27 changes: 25 additions & 2 deletions _opcodes/op012-bgee.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
name: "HP: Damage"
param1: "Damage Amount"
param2: "Type"
savingthrow: "Save Type"
special: "Flags"
bg1: 0
bg2: 0
bgee: 1
Expand Down Expand Up @@ -73,10 +75,17 @@
<br/>1073741826 Disease Set to Percentage
<br/>1073741827 Disease Reduce by Percentage
<br/><br/>The Dice values can be used to inflict varying damage amounts - e.g. 2d6 would do 2-12 damage (Damage type is still specified by the 'Type' value).
<br/><br/>Useful bit values for 'Save Type' are:
<br/>Bit 10 - Ignore primary target - Line AoE projectile doesn't affect end target
<br/>Bit 11 - Ignore secondary target - Line AoE projectile doesn't affect bystanders
<br/>Bit 24 - Bypass 'mirror image'
<br/>Bit 25 - Ignore difficulty - It refers to the damage multiplier to party members based on difficulty.
<br/><br/>Known bit values for 'Flags' are:
<br/>Bit 0 - Drain HP to caster
<br/>Bit 1 - Transfer HP to target
<br/>Bit 2 - Fist damage only
<br/>Bit 3 - Drain to max. HP of caster
<br/>Bit 5 - Suppress combat log feedback string
<br/>Bit 8 - Save for half
<br/>Bit 9 - Made save
<br/>Bit 10 - Does not wake sleepers
Expand All @@ -93,7 +102,21 @@
{% include note.html %}

{% capture note %}
Using 'Magic Fire' or 'Magic Cold' as a damage type will result the game to crash if the damage kills the target.
Damage type "Poison" automatically uses save flag "Bypass Mirror Image".
{% endcapture %}

{% include warning.html %}
{% include note.html %}

{% capture note %}
If this effect reduces target to -20 (Allegiance: [PC]) or -9 (any other Allegiance value) hit points, it also applies opcode #13 of the specified type:
<ul>
<li>Crushing/Slashing/Piercing: Exploding Death</li>
<li>Acid/Unlisted: Acid Death</li>
<li>Cold/Magic Cold: Frozen Death</li>
<li>Fire/Magic Fire: Burning Death</li>
<li>Electricity: Electrified Death</li>
<li>Magic/Missile/Poison: Normal Death</li>
</ul>
{% endcapture %}

{% include note.html %}
70 changes: 68 additions & 2 deletions _opcodes/op013.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,80 @@
<br/>1 Don't show death message
<br/>Known values for 'Death Type' are:
<br/>0 Acid death
<ul>
<li>Sets state STATE_ACID_DEATH (0x00000400), STATE_DEAD (0x00000800)</li>
<li>Kicked from party, drops inventory</li>
</ul>
<br/>1 Burning death
<ul>
<li>Sets state STATE_FLAME_DEATH (0x00000200), STATE_DEAD (0x00000800)</li>
<li>Character Tint Solid, character color ~[0x00404040] (Darkens avatar)</li>
<li>Kicked from party, drops inventory</li>
</ul>
<br/>2 Crushed death
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Kicked from party, drops inventory</li>
</ul>
<br/>4 Normal death
<ul>
<li>Sets state STATE_DEAD (0x00000800)</li>
<li>Drops inventory</li>
</ul>
<br/>8 Chunked death
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Sets ANIMATE[0x230][EXPLODING_TORSO]</li>
<li>Plays sound ("GORE.WAV")/("GORE2.WAV")</li>
<li>Kicked from party, drops inventory, sets all color indexes to 70</li>
</ul>
<br/>16 Stoned death
<ul>
<li>Sets state STATE_STONE_DEATH (0x00000080)</li>
<li>Any hostile action against the creature(s) applies an Exploding Stoned Death to them</li>
<li>Kicked from party, retains inventory, overlay's color index 72</li>
</ul>
<br/>32 Freezing death
<br/>64 Exploding stoned death
<ul>
<li>Applies Exploding Freezing Death to the target with a (random) 0-5 second delay</li>
<li>Sets state STATE_FROZEN_DEATH (0x00000040)</li>
<li>Any hostile action against the creature applies an Exploding Freezing Death to the target</li>
<li>Kicked from party, retains inventory, overlay's color index 71</li>
</ul>
<br/>64 Exploding stoned death/Level Drain death
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Sets ANIMATE[0x100][CHUNKS]</li>
<li>Kicked from party, retains inventory, sets all color indexes to 72</li>
</ul>
<br/>128 Exploding freezing death
<br/>256 Electrified death
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Sets ANIMATE[0x100][CHUNKS]</li>
<li>Kicked from party, retains inventory, sets all color indexes to 71</li>
</ul>
<br/>256 Electrified death
<ul>
<li>Sets state STATE_FLAMING_DEATH (0x00000200), STATE_DEAD (0x00000800)</li>
<li>Character Tint Solid, character color ~[0x00404040] (Darkens avatar)</li>
<li>Kicked from party, drops inventory</li>
</ul>
<br/>512 Disintegration death
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Sets ANIMATE[0x100][CHUNKS]</li>
<li>Kicked from party, retains inventory, sets all color indexes to 72</li>
</ul>
<br/>1024 Destruction (in IWD2)
<ul>
<li>Sets state STATE_EXPLODING_DEATH (0x00000100), STATE_DEAD (0x00000800)</li>
<li>Sets ANIMATE[0x230][EXPLODING_TORSO]</li>
<li>Plays sound ("GORE.WAV")/("GORE2.WAV")</li>
<li>Kicked from party, retains inventory, sets all color indexes to 70</li>
</ul>
<br/>Other
<ul>
<li>Removes all death states, but does not restore HP</li>
<li>Drops inventory</li>
</ul>
<br/>Any -> Removes death states that they do not set (e.g, a normal Death will remove STATE_FROZEN_DEATH).
2 changes: 1 addition & 1 deletion _opcodes/op014-bgee.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
iwd2: 0
pst: 0
---
Removes the frozen_death state from the targeted creature(s).
Removes STATE_FROZEN_DEATH from the targeted creatures and restores them to 1 HP. Does not affect creatures without STATE_FROZEN_DEATH.
Loading

0 comments on commit b2c24a0

Please sign in to comment.