PATCH_IF (kit BAND 0b01000000 = 0b01000000) BEGIN
// should be:
PATCH_IF (kit BAND 0b01000000) = 0b01000000 BEGIN
Not 100% sure, but I think weidu evalutes the '=' before 'BAND', so this: kit BAND 0b01000000 = 0b01000000ends up being evalutated like this: kit BAND (0b01000000 = 0b01000000)
kit BAND 1 // (true = 1)so it ends up matching the Cleric of Talos.
How am I supposed to restrain a kit from using plate armors? I thought about using OPcode 181 (Disallow item type) but actually every armor including plate and full plate have their category field set to "Armor".
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) BEGIN READ_BYTE 0x18 flags1 PATCH_IF ((flags1 & BIT3) = BIT3) BEGIN READ_ASCII 0x22 animation (2) PATCH_IF ("%animation%" STRING_EQUAL_CASE "4A") BEGIN LPF ~ADD_ITEM_EQEFFECT~ INT_VAR opcode = 319 target = 1 timing = 2 parameter1 = IDS_OF_SYMBOL (~Kit~ ~KitInternalName~) parameter2 = 9 special = RESOLVE_STR_REF (@Y) END END END END BUT_ONLY
The special part is optional and just makes the kit name appear on the list of those who can't wear the armor (Y = the string with the kit's name in Mixed Cases).
"4A" is the animation for plate/full plate.
That should do the trick.
Perfect, exactly what I was looking for, thank you, and thank Gwendolyne
I would like to make a class that can't equip anything in the offhand, whether shields or weapons. The idea I got would be to force equipping an undroppable, unremovable by any means item in the offhand on character creation, but then I was wondering, would they benefit from single-handed weapon style or do I have to get that through another way? Is there a work around? Some other way to do that?
Also, concerning wspatck.2da and wspecial.2da, can they be extended to add extra proficiency levels? Same question for stylbonu.2da If so, would the GUI handle it, if I allowed a kit, for instance, to have 6 or 7 pips in one weapon? Probably @Avenger_teambg would be among the most suitable people to answer this question.
would they benefit from single-handed weapon style or do I have to get that through another way? Is there a work around
They would only be able to benefit from Sword and Shield style (the item would have to be a shield, weapons and items with abilities would allow an extra attack, non-weapons without any abilities would be destroyed as soon it was their time to attack).
Also, concerning wspatck.2da and wspecial.2da, can they be extended to add extra proficiency levels? Same question for stylbonu.2da If so, would the GUI handle it, if I allowed a kit, for instance, to have 6 or 7 pips in one weapon? Probably @Avenger_teambg would be among the most suitable people to answer this question.
All 3 files can handle proficiency from 0 to 7. The chargen and levelup screen will not display points 6 or 7, but the record screen in-game will.
They would only be able to benefit from Sword and Shield style (the item would have to be a shield, weapons and items with abilities would allow an extra attack, non-weapons without any abilities would be destroyed as soon it was their time to attack).
Alright, so I'm probably better-off if I prevent shields from being equipped, prevent putting pips in other combat styles, and restrict the APR weapons such as Belm etc.... So that it's not exactly totally forbidden but still strongly discouraging.
All 3 files can handle proficiency from 0 to 7. The chargen and levelup screen will not display points 6 or 7, but the record screen in-game will.
Thank you, this is what I wanted to know. Concerning the points, they won't display in the levelup screen but can you still level them up? stylbonu.2da is presented differently, but if I wanted a third single weapon proficiency I would just have to add a singleweapon-3 with the different values I want behind that?
I am trying to figure out how the game knows which strref to display in the record screen for a status effect. I've found STATDESC.2DA, and this is exactly the file I was looking for. I am confused what exactly the left-most column represents, though. I know that it represents the status effect of the row, I just don't understand *how* it represents it. For example, in STATDESC.2DA, Spell Shield's first column value is 73. Where is this 73 coming from, and how is it linked to Spell Shield? I thought that this 73 must have been associated with Spell Shield in some other 2DA or IDS file, but cannot seem to find a connection. Thanks!
@Bubb The first column number corresponds to the value used in opcodes 142/169/240 (Display/Prevent/Remove Portrait Icon), as well as opcodes 39, 213, 218, and 314 (Sleep, Maze, Stoneskin, Stoneskin).
The first 190 have a hardcoded link to cycles 66 - 255 of the file 'STATES.BAM' (or 'STATES2.BAM', I think it depends on game), though they can still be overridden by specifying another BAM file in the last column. Any higher values must specify their own BAM file for their icon in the last column.
73 = cycle 139 (73+66) of 'STATES.BAM', which contains the icon for Spell Shield.
How does one create new spell sequencers? I would like to create innate copies as well as a new sequencer for one of my kits but I can't find how to do that:
I created the main SPL file (Named ZKWSLS1.spl), the secondary spell files (ZKWSLS1D.spl and ZKWSLS1P.spl) as copies of the minor spell sequencer spell, modified the resources fields in their effect so that they match the new spell names and changed the main spell to innate, but the game crashes when the spell is cast, before I can select my spells...
I found the CONTINGX.2da file, is there anything to do with that? I tried adding my spell to replace a blank in the appropriate column, but this didn't change anything.
What am I missing? Also, what's the limit to the level/number of spells that can be selected with the spell sequencer OPcode?
The game is picky about that stuff. You might need to edit .lua files or do other stuff that Weidu can't really handle. There's a thread related to this in tbe UI modding forum.
Tome & Blood converts the Sequencer spells into innate abilities... I honestly forget how I did that but you can look at the mod on Github.
If you want one kit to be able to cast the Sequencer spell(s) innately, the easiest way is probably just to use opcode 146 to cast the normal versions.
Thank you, this solves part of my problem but not all of it, alas. I wanted to create a Superior Spell Sequencer HLA that allows any 3 spells of any level as a HLA, but I'll probably have to think of something else...
@Luke93 I agree with subtledoctor, though I'd like to explain why it's not working. For some reason, all the flail strrefs have a trailing space, and thus your STRING_EQUAL_CASE is failing. If you really wanted to continue using your current method, you might want to implement some sort of TRIM function (or just include the trailing space). If you used subtledoctor's suggestion, your issue should be fixed without using a TRIM function, and as pointed out, would work for all languages.
READ_LONG 0x08 gen_name
PATCH_IF (gen_name == 6704) BEGIN // 6704 is the gen_name of flails
blah blah
END
As @argent77 said, READ_STRREF is more flexible (since you can check for the string itself or even different string variations) -> that's why I use this method even if it requires extra work to support different languages (moreover, I didn't know about the trailing space....)
@Gwendolyne Keep in mind that not all weapons use the Weapon Proficiency attribute -> think of PLYMSTAR.ITM.....
If you really want to also patch non regular weapons (such as PLYMSTAR : 0x1C-Hand-to-Hand), then just add this:
READ_ASCII 0x22 animation (2)
PATCH_IF ((SHORT_AT 0x1c == 0x17) OR ((SHORT_AT 0x1c == 0x1C) AND ("%animation%" STRING_EQUAL_CASE "FL")) BEGIN
or whatever animation flag you want to check.
Remember that, as other people already said, patching items according to their names, is not a good idea, in purpose of mods compatibility. But of course, do it if you wish.
Not really a technical question, but what in your opinion makes for a good quest mod with new items and all that? What do you think is most important? Writing, interesting fights, multiple alternatives and options? I would like to create my first quest mod and don't really know what I should focus most on.
All is a matter of taste, but I prefer quest mods adding new areas to explore, no h&s, offering possibility to avoid fight, different ways to solve quests...
And... as the doctor said, providing items (even overpowered ones) only usable in the new adventure and useless in the vanilla scenario.
Does someone know how I should edit UI.menu to fix this bug (look at the attached screenshot)? It occurs (for instance) if you decide to mod a weapon style (Single Weapon Style in this case) so that it grants you a bonus to attack rolls.....
@Luke93 I don't see any feasible way to remove the duplicate entry. I've looked at the UI.MENU code used to generate that string, and the actual content is generated by the engine. A hardcoded and unexposed behavior - I don't believe there is anything (easy) you can do to remove it by modding UI.MENU. It seems like an engine bug to me - maybe you should open a redmine ticket?
If you are really determined to fix it - you could do some string manipulation at runtime. You could fix it by either removing the Single Weapon Style entry (easiest), or by detecting the Single Weapon Style entry, and then manually correcting the weapon entry; if the corrected weapon entry is +0, you could then remove it from the list. A little complicated - but possible. If you want any help with the modification, just let me know.
If you are wondering, the text you are describing is defined on line 5504 of UI.MENU.
So, testing saving throws are a PITA. I need to keep reloading until I see the exact roll that shows me if a creature is having a penalty applied properly to their saving throw (what means a 5% chance of getting this result).
Is there an easy way to see this?
I wish the log displayed saving throws the same way it displays hit rolls...
So, testing saving throws are a PITA. I need to keep reloading until I see the exact roll that shows me if a creature is having a penalty applied properly to their saving throw (what means a 5% chance of getting this result).
Is there an easy way to see this?
I wish the log displayed saving throws the same way it displays hit rolls...
Thanks.
The best way is often to control+Q if necessary and then check through the record sheet, EEKeeper or NI if the creature properly has a saving throw penalty applied to them, with the right timing etc...
Comments
kit BAND 0b01000000 = 0b01000000
ends up being evalutated like this:kit BAND (0b01000000 = 0b01000000) kit BAND 1 // (true = 1)
so it ends up matching the Cleric of Talos.Perfect, exactly what I was looking for, thank you, and thank Gwendolyne
Also, concerning wspatck.2da and wspecial.2da, can they be extended to add extra proficiency levels? Same question for stylbonu.2da
If so, would the GUI handle it, if I allowed a kit, for instance, to have 6 or 7 pips in one weapon? Probably @Avenger_teambg would be among the most suitable people to answer this question.
The chargen and levelup screen will not display points 6 or 7, but the record screen in-game will.
Thank you, this is what I wanted to know. Concerning the points, they won't display in the levelup screen but can you still level them up?
stylbonu.2da is presented differently, but if I wanted a third single weapon proficiency I would just have to add a singleweapon-3 with the different values I want behind that?
The first column number corresponds to the value used in opcodes 142/169/240 (Display/Prevent/Remove Portrait Icon), as well as opcodes 39, 213, 218, and 314 (Sleep, Maze, Stoneskin, Stoneskin).
The first 190 have a hardcoded link to cycles 66 - 255 of the file 'STATES.BAM' (or 'STATES2.BAM', I think it depends on game), though they can still be overridden by specifying another BAM file in the last column.
Any higher values must specify their own BAM file for their icon in the last column.
73 = cycle 139 (73+66) of 'STATES.BAM', which contains the icon for Spell Shield.
I would like to create innate copies as well as a new sequencer for one of my kits but I can't find how to do that:
I created the main SPL file (Named ZKWSLS1.spl), the secondary spell files (ZKWSLS1D.spl and ZKWSLS1P.spl) as copies of the minor spell sequencer spell, modified the resources fields in their effect so that they match the new spell names and changed the main spell to innate, but the game crashes when the spell is cast, before I can select my spells...
I found the CONTINGX.2da file, is there anything to do with that? I tried adding my spell to replace a blank in the appropriate column, but this didn't change anything.
What am I missing? Also, what's the limit to the level/number of spells that can be selected with the spell sequencer OPcode?
Unless someone else can enlighten me. Maybe @Avenger_teambg or @kjeron ?
I agree with subtledoctor, though I'd like to explain why it's not working. For some reason, all the flail strrefs have a trailing space, and thus your STRING_EQUAL_CASE is failing. If you really wanted to continue using your current method, you might want to implement some sort of TRIM function (or just include the trailing space). If you used subtledoctor's suggestion, your issue should be fixed without using a TRIM function, and as pointed out, would work for all languages.
PATCH_IF (SHORT_AT 0x1c == 0x17) BEGIN
Maces (you need to check the proficiency, otherwise you also select clubs ): Morning Stars:
PATCH_IF (SHORT_AT 0x1c == 0x16) BEGIN
Remember that, as other people already said, patching items according to their names, is not a good idea, in purpose of mods compatibility.
But of course, do it if you wish.
What do you think is most important? Writing, interesting fights, multiple alternatives and options? I would like to create my first quest mod and don't really know what I should focus most on.
And... as the doctor said, providing items (even overpowered ones) only usable in the new adventure and useless in the vanilla scenario.
I don't see any feasible way to remove the duplicate entry. I've looked at the UI.MENU code used to generate that string, and the actual content is generated by the engine. A hardcoded and unexposed behavior - I don't believe there is anything (easy) you can do to remove it by modding UI.MENU. It seems like an engine bug to me - maybe you should open a redmine ticket?
If you are really determined to fix it - you could do some string manipulation at runtime. You could fix it by either removing the Single Weapon Style entry (easiest), or by detecting the Single Weapon Style entry, and then manually correcting the weapon entry; if the corrected weapon entry is +0, you could then remove it from the list. A little complicated - but possible. If you want any help with the modification, just let me know.
If you are wondering, the text you are describing is defined on line 5504 of UI.MENU.
Is there an easy way to see this?
I wish the log displayed saving throws the same way it displays hit rolls...
Thanks.