Thanks for the reply and suggestion. But the default autopause (e.g. end of round) doesn't cancel queued actions, if the script is just firing it off, why would it behave differently?
@Allbrother: I've just had a look inside the PauseGame() assembly.
How do you do that? Are the auto-pause options themselves moddable? Is it possible to take the end of round option, change the frequency and make it trigger really only once per round as opposed to once per round per character, as it currently does, which is what prompted me to look for alternatives in the first place?
@Allbrother: It's not the autopause that's canceling the queued actions, it's the fact that the creature is executing an action, (the PauseGame(), in this case).
Basically I use a disassembler to view the raw x86 assembly instructions of the .exe, and figure out what it is doing from there. Very hard, wouldn't recommend it if you value your sanity
But anyway - no, the auto-pause options are not moddable without directly modifying the .exe via some sort of hack like TobEx or EEex.
@Allbrother: It's not the autopause that's canceling the queued actions, it's the fact that the creature is executing an action, (the PauseGame(), in this case).
Basically I use a disassembler to view the raw x86 assembly instructions of the .exe, and figure out what it is doing from there. Very hard, wouldn't recommend it if you value your sanity
But anyway - no, the auto-pause options are not moddable without directly modifying the .exe via some sort of hack like TobEx or EEex.
I see, thanks again. I'll try the invisible summon after I get some sleep
Question from a complete amateur - If I want to make a spell mod using pre-existing files in the game, do I need to do anything specific to make them compatible with mods like SCS, TnB and SR?
If I install these mods first and then make my own files, is that the easiest way of ensuring compatibility?
Cheers
It depends how you define 'compatible'.
Generally for compatibility, if you want to put your spells into the general namespace so they can be used by clerics, learned by sorcerers etc, you need to use WEIDU's ADD_SPELL to add them.
SCS will be fine with new spells, though it might get confused if you edit existing spells. Its AI won't use your new spells, though. SCS is generally best installed late in the install order.
SR doesn't add spells in a very compatibility-friendly way, so it's best to install SR *before* installing your spell mod.
The IESDP states that the old weapon proficiency system (i.e., offsets 0x006e – 0x0075 of a CRE file) is functional only in BG1 (original). That's outdated info since it seems to work fine on EEs. @Bubb Could you confirm?
@Luke93: It appears they still function. The weapon's item category must match the old proficiency type in the .ITM at offset 0x1C ->
(Old prof to .ITM categories):
Large swords = 20
Small sword = 16 or 19
Bow = 15
Spear = 29 or 30
Blunt = 17 or 21 or 26
Spiked = 22 or 23
Axe = 25
Missile = 18 or 24 or 27
The proficiency triggers can target them by using the 0-7 range:
0 - Large sword
1 - Small sword
2 - Bow
3 - Spear
4 - Blunt
5 - Spiked
6 - Axe
7 - Missile
It doesn't appear that Opcode #233 can alter them. I don't know if they can be restored to character gen / level up.
I want to learn how to use control structures in WeiDU, i. e., loops, conditional statements, etc. (Just in case, that's statements like IF, WHILE, FOR, and so on). Is that explained somewhere?
Why on earth is the LastSummonerOf data not kept after reloading? Is there any way to fix this? I’m tired of having to key persistent summoned creatures to specific NPCs in their scripts in roundabout methods.
@Alonso There is no escape character in weidu, but it does have 4 different delimiters that you can use, so that you can use the others within:
~
"
%
~~~~~ (5x)
What operators are available in WeiDU? Right now I need to use the "not equals" operator, but I'd also like to know what other operators are available. For "not equals" I've tried != but it doesn't seem to work.
The code is:
// Only write the identified name and description
// if they actually exist
PATCH_IF (~%identifiedName%~ STRING_MATCHES_REGEXP ~~ != 0) BEGIN
SAY NAME2 (AT identifiedName)
SAY DESC (AT identifiedDescription)
END
is always true (which for STRING_MATCHES_REGEXP true = 0).
If you want to match an empty string, use:
~string~ STR_EQ ~~
If you are reading these strings from in-game files, know that weidu doesn't read invalid string references as an empty string, but as this string (not including the ~'s):
Can someone show me a code to read the mxbrdspl.2da and check what the maximum spell level they get slots for is? Tweaks Anthology grants up to 7 and Rogue Rebalancing grants up to 8, and I want a more accurate check than just checking for those two mods.
What are exactly STATs #150 SUMMONDISABLE and #188 SUMMON_DISABLE_ACTION?
When a creature is summoned, it is "disabled" until the summoning animation finishes playing. It exists, and can be hit by AoE spells, but is otherwise invisible, unselectable, and untargetable.
If you are reading these strings from in-game files, know that weidu doesn't read invalid string references as an empty string, but as this string (not including the ~'s):
~<Invalid Strref -1>~
I had guessed that invalid string references would be read as something funny, so I created a tra file in which all the invalid string references are empty strings. So what I want to match are not empty strings, but rather the opposite: Non empty strings. That's why I need the operator "doesn't equal". What's that operator (or something equivalent) in WeiDU?
I had guessed that invalid string references would be read as something funny, so I created a tra file in which all the invalid string references are empty strings. So what I want to match are not empty strings, but rather the opposite: Non empty strings. That's why I need the operator "doesn't equal". What's that operator (or something equivalent) in WeiDU?
You had the correct operator "!=", just the wrong comparison before it.
This:
PATCH_IF (~%identifiedName%~ STRING_MATCHES_REGEXP ~~ != 0) BEGIN
is always false, because the first arguement:
~%identifiedName%~ STRING_MATCHES_REGEXP ~~
is always true, and for STRING_MATCHES_REGEXP, true = 0, so you end up with:
PATCH_IF (0 != 0) BEGIN
If you want to match non-empty strings:
PATCH_IF (~string~ STR_EQ ~~) = 0 BEGIN
// or
PATCH_IF (~string~ STR_EQ ~~) != 1 BEGIN
// or
PATCH_IF !(~string~ STR_EQ ~~) BEGIN
Can anyone tell me if there's some trick to using PartyRested()?
Nothing in my mod involving that trigger seems to be working.
Yeah I've tried using that trigger several times and always gave up. I never could get it to work. The annoying thing is that the game seems to use it just fine as do other mods.
Comments
Thanks for the reply and suggestion. But the default autopause (e.g. end of round) doesn't cancel queued actions, if the script is just firing it off, why would it behave differently?
Also
How do you do that? Are the auto-pause options themselves moddable? Is it possible to take the end of round option, change the frequency and make it trigger really only once per round as opposed to once per round per character, as it currently does, which is what prompted me to look for alternatives in the first place?
Basically I use a disassembler to view the raw x86 assembly instructions of the .exe, and figure out what it is doing from there. Very hard, wouldn't recommend it if you value your sanity
But anyway - no, the auto-pause options are not moddable without directly modifying the .exe via some sort of hack like TobEx or EEex.
I see, thanks again. I'll try the invisible summon after I get some sleep
It depends how you define 'compatible'.
Generally for compatibility, if you want to put your spells into the general namespace so they can be used by clerics, learned by sorcerers etc, you need to use WEIDU's ADD_SPELL to add them.
SCS will be fine with new spells, though it might get confused if you edit existing spells. Its AI won't use your new spells, though. SCS is generally best installed late in the install order.
SR doesn't add spells in a very compatibility-friendly way, so it's best to install SR *before* installing your spell mod.
(Old prof to .ITM categories):
Large swords = 20
Small sword = 16 or 19
Bow = 15
Spear = 29 or 30
Blunt = 17 or 21 or 26
Spiked = 22 or 23
Axe = 25
Missile = 18 or 24 or 27
The proficiency triggers can target them by using the 0-7 range:
0 - Large sword
1 - Small sword
2 - Bow
3 - Spear
4 - Blunt
5 - Spiked
6 - Axe
7 - Missile
It doesn't appear that Opcode #233 can alter them. I don't know if they can be restored to character gen / level up.
Thanks! Also, they're functional for every CLASS (offset 0x273), including the non-playable ones right (e.g., GENIE_DAO)?
If you're patching a file:
If you're not patching a file:
I have this string in a tra file:
@115614 = ~Dradeel's Recipe:
MONKEY BALLS (makes ~40)
[More text]~
WeiDU gives an error when it reads this string because of the ~ character before the number 40.
~
"
%
~~~~~ (5x)
FYI: For whatever reason ~~~~~ (5x) didn't work in my mod, and I couldn't use " because it's also used in the same string, but % did the trick.
The code is:
If you want to match an empty string, use: If you are reading these strings from in-game files, know that weidu doesn't read invalid string references as an empty string, but as this string (not including the ~'s):
I see, it doesn't sound like a good implementation.... Moreover, it's not compatible with mods that add new spells (e.g., IWDification or SCS).
This: is always false, because the first arguement: is always true, and for STRING_MATCHES_REGEXP, true = 0, so you end up with: If you want to match non-empty strings:
Nothing in my mod involving that trigger seems to be working.
Yeah I've tried using that trigger several times and always gave up. I never could get it to work. The annoying thing is that the game seems to use it just fine as do other mods.