This would still fail then.with the operating changes being that the currently failing ability to set LOCALS using AO
ActionOverride("Anomen",IncrementGlobal("c-aran_irritates_anomen","LOCALS",1))
[WIP] Expanded Triggers
#21
Posted 19 February 2011 - 05:12 PM
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#22
Posted 19 February 2011 - 05:41 PM
Does it fail? Or you mean in dialogue? It certainly doesn't when used in BCS, because I have a working mod built around that.with the operating changes being that the currently failing ability to set LOCALS using AO
ActionOverride("Anomen",IncrementGlobal("c-aran_irritates_anomen","LOCALS",1))
Retired from modding.
#23
Posted 19 February 2011 - 06:53 PM
in .bcs, they are settable via AO() and documented all the way back to http://www.pocketpla.../simscript.html SimDing0's scripting guide;
There are 3 different types of variables that can be used: global variable, local variables and area variables. Globals take the form Global("variable","GLOBAL",1), and are readable by anything. There can only be one value for a single global.
Locals take the form Global("variable","LOCALS",1), and are only readable by the creature they are set by (although they are settable with ActionOverride). Every creature can have a different value assigned to the same local. Area variables take the form Global("variable","######",1), where ###### is the name of an area. They are assigned specifically to that area, and each area can have a different value assigned to the same variable.
GeN1e, what mod, please, so I can take a look and do some rechecking?
#24
Posted 19 February 2011 - 07:15 PM
there's apparently nothing new to find in there. It summons a cre that runs this scriptDialog. ActionOverride() seems to work setting GLOBAL and such, but fails on setting LOCALS.
in .bcs, they are settable via AO() and documented all the way back to http://www.pocketpla.../simscript.html SimDing0's scripting guide;
<<<<<<<<trap_rev/ag#tr0.baf IF True() THEN RESPONSE #100 ActionOverride(LastSummonerOf(Myself),IncrementGlobal("ag#trap_spike","locals",1)) DestroySelf() END >>>>>>>>
Retired from modding.
#25
Posted 06 March 2011 - 02:16 AM
Does it actually fail, or just in the same dialogue?Dialog. ActionOverride() seems to work setting GLOBAL and such, but fails on setting LOCALS.
I tried a test of ActionOverride("Gorion",SetGlobal("TalkedToMendas","LOCALS",1)) in the State 0 action of MENDA1.DLG (notably BGT) and the local variable does get set correctly.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#26
Posted 12 March 2011 - 08:44 PM
0x4104 NumMirrorImages(O:Object*,I:Value*)
0x4105 NumMirrorImagesGT(O:Object*,I:Value*)
0x4106 NumMirrorImagesLT(O:Object*,I:Value*)
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#27
Posted 12 March 2011 - 08:52 PM
#28
Posted 12 March 2011 - 09:50 PM
0x4107 BouncingSpellLevel(O:Object*,I:Level*)
Returns true if the target creature specified by Object is bouncing spells of Level.
This returns true for both Bounce Spell Level (199) and Decrementing Bounce Spells (200) effects.
0x4108 NumBouncingSpellLevel(O:Object*,I:Level*,I:Amount*)
0x4109 NumBouncingSpellLevelGT(O:Object*,I:Level*,I:Amount*)
0x410A NumBouncingSpellLevelLT(O:Object*,I:Level*,I:Amount*)
Compares the number of spell bounces remaining on the target creature specified by Object at the spell Level to Amount.
If Object has the Bounce Spell Level (199) opcode, then the number of spell bounces is unsigned 0xFFFFFFFF.
0x410B ImmuneToSpellLevel(O:Object*,I:Level*)
Returns true if the target creature specified by Object is protected from spells of Level.
This returns true for both Protection from Spell Levels (102) and Decrementing Spell Immunity (201) effects.
0x410C NumImmuneToSpellLevel(O:Object*,I:Level*,I:Amount*)
0x410D NumImmuneToSpellLevelGT(O:Object*,I:Level*,I:Amount*)
0x410E NumImmuneToSpellLevelLT(O:Object*,I:Level*,I:Amount*)
Compares the number of spell protections remaining on the target creature specified by Object at the spell Level to Amount.
If Object has the Protection from Spell Levels (102) opcode, then the number of spell protections is unsigned 0xFFFFFFFF.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#29
Posted 12 March 2011 - 10:19 PM
0x410F TimeStopCounter(I:Number*)
0x4110 TimeStopCounterGT(I:Number*)
0x4111 TimeStopCounterLT(I:Number*)
Compares the number of ticks left of time stop to Number.
0x4112 TimeStopObject(O:Object*)
Returns true if the the target sprite specified by Object is the caster of time stop (and is exempt from the effect).
0x4113 NumTrappingSpellLevel(O:Object*,I:Level*,I:Amount*)
0x4114 NumTrappingSpellLevelGT(O:Object*,I:Level*,I:Amount*)
0x4115 NumTrappingSpellLevelLT(O:Object*,I:Level*,I:Amount*)
Compares the number of spell traps remaining on the target creature specified by Object at the spell Level to Amount.
Edited by Ascension64, 12 March 2011 - 10:27 PM.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#30
Posted 13 March 2011 - 12:50 AM
I need something like this, or really a means of checking bits 3 through 8 of CRE file flags (dual-classed from fighter, mage, cleric, thief, druid, ranger). It could also be an expanded trigger. Oddly, there are already such triggers for bits 8 and 9 - FallenPaladin() and FallenRanger() - but not for WasFighter() etc.Here's a list off the top of my head:
FIGHTERLEVEL, MAGELEVEL, CLERICLEVEL, etc. for each class (useful for multi/dual classes)
Ultimately, the goal is to have the XP-matching component of Level 1 NPCs work a little more sensibly for dualed characters, and calculate the actual XP by looking at the inactive class, inactive level, XP for that combo and adding it to the current XP. So really I'm looking for some sort of ActualXP stat or trigger.
Maybe there's already something that could make this work - I haven't really had time to keep up with the multitude of TobEx changes.
I'm not sure if this is sufficient
0x4116 OriginalClass(O:Object*,I:Class*Class)
Returns true if the target creature specified by Object is dual-classed and the original class matches Class.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#31
Posted 13 March 2011 - 03:37 AM
It should be a good start if the LEVEL2 stat always records the original class level (not sure offhand). Ideally, I'd like to cross-reference OriginalClass and OriginalLevel against xplevel.2da and get the relevant amount (OriginalXP). Then add OriginalXP() to XP() for ActualXP(). Is that doable? If I had to script all the math, it'd be an insane number of script blocks, and wouldn't be accurate if someone's changed xplevel.2da.I'm not sure if this is sufficient
0x4116 OriginalClass(O:Object*,I:Class*Class)
Returns true if the target creature specified by Object is dual-classed and the original class matches Class.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#33
Posted 13 March 2011 - 04:01 AM
Also, the IESDP seems to suggest that the original level stat will vary, depending on the class name. So for a fighter/thief, level1 will be for fighter and level2 for thief, regardless of which class was the original. Hmph, would require even more script blocks to determine OriginalXP/ActualXP in that case.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#34
Posted 13 March 2011 - 07:55 PM
I don't think any of the other flags appear to be of much use.Wouldn't a CreatureFlags() check be more optimal (like a StateCheck() ), since this is stored at 0x0010 of the .cre header?
WasInParty() is managed well enough by setting globals when first joining the party (See BGT).
Anyway, I've uploaded a new test release. See if you can achieve what you want to achieve with it. If not, we'll change things.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#35
Posted 13 March 2011 - 09:27 PM
Will check it out, but I don't suppose you could put the documentation/readme online somewhere (like here maybe) so it's easy to tell at a glance the included syntax etc.? The changelog here isn't really that verbose (just one mention of "Expanded Triggers: Added triggers 0x4101-0x4119").Anyway, I've uploaded a new test release. See if you can achieve what you want to achieve with it. If not, we'll change things.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#36
Posted 13 March 2011 - 10:19 PM
Anyway, the syntax is
0x4116 OriginalClass(O:Object*,I:Class*Class)
Returns true if the target creature specified by Object is dual-classed and the original class matches Class.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#37
Posted 13 March 2011 - 11:17 PM
I saw that, just wondered if you'd added something else relevant. Without some sort of OriginalXP() or ActualXP() trigger, I'd have to expand level1npcs/xpmod/fjxpmooc.baf from ~3000 lines something like tenfold, twentyfold, maybe more like a hundredfold. Not sure if I'm up to that or if it's such a good idea. Maybe it could be automated somehow but offhand I don't know how. Basically, it checks the current XP of Player1 and tries to match the NPC's XP to that. If the PC has dual-classed (particularly if he's done so recently) the NPC will end up with ~0 XP - something we're trying to remedy with ActualXP() or OriginalXP + XP().Anyway, the syntax is
0x4116 OriginalClass(O:Object*,I:Class*Class)
Returns true if the target creature specified by Object is dual-classed and the original class matches Class.
If there's something I can do to assist this, let me know. Documentation I can do at least (e.g. converting text to HTML and/or SHS's template) if you need help with that.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#38
Posted 14 March 2011 - 02:34 AM
How exactly do you pick up some amount of XP and add it in L1NPC?
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)
#39
Posted 14 March 2011 - 03:13 PM
Right, which should be fine for our purposes, and better than zero which is what XP() views the original class's XP as.I think what the game does is the old class loses its XP. With internal functions for getting XP, the old class XP is treated as the XP at which the level of that old class was obtained (XPLEVEL).
Here's a snippet:How exactly do you pick up some amount of XP and add it in L1NPC?
IF CheckStatGT(Player1,7999999,44) CheckStatLT(LastSummonerOf(Myself),7000000,44) THEN RESPONSE #100 AddXpObject(LastSummonerOf(Myself),1000000) END IF CheckStatGT(Player1,7499999,44) CheckStatLT(LastSummonerOf(Myself),6500000,44) THEN RESPONSE #100 AddXpObject(LastSummonerOf(Myself),1000000) END IF CheckStatGT(Player1,6999999,44) CheckStatLT(LastSummonerOf(Myself),6000000,44) THEN RESPONSE #100 AddXpObject(LastSummonerOf(Myself),1000000) ENDThere's ~3000 lines of these blocks with the goal of setting the joining NPC's XP to roughly the PC's XP (stat #44 is XP). With an OriginalClass() trigger, I suspect I'd have to manually determine the class/level/XP combo either for each block or do it all up front and set some variable at the beginning of the script. Not sure if the latter is even possible actually (if AddXPObject would accept a variable value, we probably wouldn't need ~3000 lines of script). So having either an ActualXP trigger or stat would solve that without increasing the number of blocks.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle
#40
Posted 21 March 2011 - 10:54 PM
Optional: Joinable NPCs more closely match the PCs experience
NPCs, upon joining, will have their XP total adjusted to something closer to the PC's. This component is new to the last beta, and I don't much like the implementation at this point. It'll be revised, eventually.
--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.
Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)
Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)