Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[MOD] -Might and Guile- a tweak mod and kit pack for warriors and rogues.

1707173757680

Comments

  • Snatch_a_kissSnatch_a_kiss Member Posts: 32
    @subtledoctor
    Thank you, I did as you said and everything installed. Today I want to play with the new bard.

  • lefreutlefreut Member Posts: 1,462
    lefreut wrote: »
    LeUI overwrites the UI.menu file so it must be installed before any mod that patches the UI otherwise you will lose the changes these mods made.

    Thanks for the confirmation!

    So, that means LeUI should be installed before any mod that uses the spell-learning UI. Which right now, means Tome & Blood, Might & Guile, and Shadow Magic (EDIT - and Deities of Faerun, and Faiths & Powers).

    Realistically the safest bet is probably to install LeUI early before any Weidu mods. Smaller-scale UI patches like this are only likely to become more common.

    There also SCS that can patch the UI.

    Yes now that mods start to patch the UI, full UI mods that overwrite the UI.menu should go early in the install order.

  • southfla79southfla79 Member Posts: 194
    kjeron wrote: »
    Icezera wrote: »
    Also seems like a previous poster stumbled on this issue and am guessing it's because we both have lefreut's ui (SOD).
    Any plans for compatibility or should I just go ahead and reinstall without the ui? Is it ok to modify the feedback box only then since that's what I really liked.
    Lefreut's UI mod completely overwrites UI.menu.
    Have you tried installing Lefreut's UI first, then MnG?

    Still doesn't work, unfortunately. Tried the latest LeUI than M&G and feats still don't show up :(

  • IcezeraIcezera Member Posts: 20
    Having some trouble with the bard spellcasting. Maybe I'm doing something wrong? Garrick uses initialize bard spellcasting and then daily spellcasting preparation. The cast spell button is still unable to be clicked for me.

  • d2freakd2freak Member Posts: 20
    southfla79 wrote: »
    kjeron wrote: »
    Icezera wrote: »
    Also seems like a previous poster stumbled on this issue and am guessing it's because we both have lefreut's ui (SOD).
    Any plans for compatibility or should I just go ahead and reinstall without the ui? Is it ok to modify the feedback box only then since that's what I really liked.
    Lefreut's UI mod completely overwrites UI.menu.
    Have you tried installing Lefreut's UI first, then MnG?

    Still doesn't work, unfortunately. Tried the latest LeUI than M&G and feats still don't show up :(

    I can report the same. The icons don't show up (but I can click the invisible feats), even if m&g is installed after LeUI.

    Additionally, if LeUI is installed early, SCS fails to install. @lefreut

  • subtledoctorsubtledoctor Member Posts: 11,377
    Icezera wrote: »
    Having some trouble with the bard spellcasting. Maybe I'm doing something wrong? Garrick uses initialize bard spellcasting and then daily spellcasting preparation. The cast spell button is still unable to be clicked for me.

    "Daily Preparation" is meant to be used before sleeping; it gives you memorization slots in your spellbook. Fill them with some spells, then sleep. A couple seconds after waking up, you won't have any slots and you will be able to cast spells.

    After that you can sleep and cast as normal, like a sorcerer. You only need to use the "Daily Preparation" ability if you want to change your memorized spells.

    Maybe it should be called "Evening Spell Preparation?"

  • IcezeraIcezera Member Posts: 20
    edited March 27
    "Daily Preparation" is meant to be used before sleeping; it gives you memorization slots in your spellbook. Fill them with some spells, then sleep. A couple seconds after waking up, you won't have any slots and you will be able to cast spells.

    After that you can sleep and cast as normal, like a sorcerer. You only need to use the "Daily Preparation" ability if you want to change your memorized spells.

    Maybe it should be called "Evening Spell Preparation?"

    That would help. I assumed you did it at the start of the day since daily means you do it for that day, not doing it ahead of time.

    Edit: I am trying to do as you told me. Using "Daily Preparation" before sleeping. However, the skill doesn't seem to do anything and does not give Garrick any memorization slots. The spellbook stubbornly stays at 0/0 memorized.

    Post edited by Icezera on
  • southfla79southfla79 Member Posts: 194
    edited March 27
    Was about to report this as well. Was messing around with a Gallant Kit. Same outcome - used the daily prep, cast animation fired but nothing happened. I recall a prior version the spell selection window popped up to pick the spells I wanted to memorize.

    Scratch that. Figured out what I was doing wrong.

  • IcezeraIcezera Member Posts: 20
    southfla79 wrote: »
    Was about to report this as well. Was messing around with a Gallant Kit. Same outcome - used the daily prep, cast animation fired but nothing happened. I recall a prior version the spell selection window popped up to pick the spells I wanted to memorize.

    Scratch that. Figured out what I was doing wrong.

    Mind telling me what? Still struggling to make it work

  • southfla79southfla79 Member Posts: 194
    Will take a minute...flipping back and forth...

    Click the Initiate Bardic Spell Casting.
    Go to spell book, pick spells to memorize
    go to innates, click daily spell prep. (believe this is only needed when you want to change spell line up)
    Give the game a second or two to run the magic script. spell cast icon should be workable

  • subtledoctorsubtledoctor Member Posts: 11,377
    Maybe the game isn't keeping track of his slots correctly? Leveling up generally fixes that.

    Oh, also, I don't know what kevel he is. Keep in in mind that bards don't get spell slots until 2nd level.

  • subtledoctorsubtledoctor Member Posts: 11,377
    southfla79 wrote: »
    Will take a minute...flipping back and forth...

    Click the Initiate Bardic Spell Casting.
    Go to spell book, pick spells to memorize
    go to innates, click daily spell prep. (believe this is only needed when you want to change spell line up)
    Give the game a second or two to run the magic script. spell cast icon should be workable

    Actually the Spell Prep ability should disable spellcasting - until you sleep. Then the button should be re-enabled a few seconds after you wake up. (A few seconds with the game unpaused, mind.)

  • IcezeraIcezera Member Posts: 20
    edited March 27
    Maybe the game isn't keeping track of his slots correctly? Leveling up generally fixes that.

    Oh, also, I don't know what kevel he is. Keep in in mind that bards don't get spell slots until 2nd level.

    FML. Since Bards are now multiclass I assume it's tied to his mage level? If so, he was level 1. That's why.

    Edit: Sorry to keep bothering you guys about this but I've found that the spells last only in that area after you wake up. After I transition to another area using the worldmap, Garrick can once again no longer use his spells. I have to do the whole "daily preparation" and then rest to get spellcasting back.

    Is there like a 24 hour limit on his spells? That's the only thing I can think of. Or just the script not firing for some reason.

    Edit2: Ok, now I'm not sure what the issue is. Sometimes the transition breaks the spells, sometimes it does not. Oh well.

    Post edited by Icezera on
  • subtledoctorsubtledoctor Member Posts: 11,377
    Well that's... distressing. I have no idea how area transitions work, or why they might interfere with this. I did my testing in the beginning of IWDEE because I can make six variant characters to test different variations. But clearly I now need to dive into a proper game of BGEE for real stress-testing.

    We might as well get a bit technical, since that shouldn't be happening. What you actually have that look like sorcerer spells are not spells; they are innate abilities, which happen to be located under the spells button. (Similar to how several mods implement HLAs.) Every time you cast a spell, it uses opcode 172 to remove all spells, and then checks some stats to determine how many casting slots you have left, and then applies 171 a certain number of times, based on how many slots you have left. So nothing should be removing your spells; they are innate abilities, and they can only disappear if something can remove your innate abilities.

    Unless the 171 effects have a bug with the timing/duration. It should be permanent but there could be a typo or something. I'll double-check.

  • IcezeraIcezera Member Posts: 20
    edited March 27
    No need subtle. After multiple testing attempts, I realized it was because one of the spells Garrick had was mage armor. SCS ai for Garrick has it so that mages reapply that whenever it drops. Since it doesn't last for very long hours, it was being cast as soon as I transitioned to another area with the world map. The travel time made it so that the spell wore off, and then Garrick would cast it super fast. After some times, he would have no spells left and it would register as being unable to cast spells.

    Furthermore, I thought I was losing spells since I would sometimes be able to cast spells of higher levels but he actually isn't supposed to be able to cast them yet, being too low level. Thus, an area transition 'updated' him and removed those higher level spells from being castable.

  • subtledoctorsubtledoctor Member Posts: 11,377
    edited March 27
    Weird. I didn't even think about player scripts. I assumed they wouldn't work, since you don't actually have spells, but instead have custom innate abilities that appear as spells. And you don't actually have spell slots, but instead have a value attached to one of the upper bytes of the Darts proficiency. :lol:

  • southfla79southfla79 Member Posts: 194
    oh, I was wondering why it said dart proficiency when I checked things out in nearinfinity.

    Not a bug report, just curious....how are you defining max# of spells and spells per day? It's generally done through the tpa files but I'm guessing you're not using those?

  • subtledoctorsubtledoctor Member Posts: 11,377
    edited March 28
    southfla79 wrote: »
    oh, I was wondering why it said dart proficiency when I checked things out in nearinfinity.

    Not a bug report, just curious....how are you defining max# of spells and spells per day? It's generally done through the tpa files but I'm guessing you're not using those?

    Spell memorization slots (the boxes that appear in your spellbook when you use "Prepare Spells") just match MXSPLWIZ.2da, except with a -1 modifier applied. So at 1st level when a mage gets one spell, the bard doesn't get any. At 2nd level when a mage has 2 spell slots, the bard has 1 memorization slot.

    Spell casting slots are a whole different beast. You want the technical explanation? It's fun.

    The number of casting slots is controlled by proficiencies. The upper 3 bytes of the Darts and Sling proficiencies are split into 4-bit segments. Each of those segments can have a score equating to a combination of those 4 bits, so this supports having up to (1+2+3+4=) 10 slots. As you level up, you are affected by spells with opcode 233 effects which increase one of those segments by one bit. I think I based the rate of advancement to be matched to a mage's spell table, but delayed by one, i.e. at 1st level when a mage gets 1 spell, the bard gets 0, but at 2nd level when a mage gets 2 spells, a bard also gets 2. So, at 2nd level, the bard has a proficiency value of 2 within the 4-bit segment of Darts proficiency that I designated for 1st-level slots. Hold that thought.

    As I said earlier, the spells themselves are actually innate abilities, which are coded to appear under the spells button. Every time you cast a spell, it uses opcode 172 to remove all such innate abilities from you, and then uses opcode 171 to grant all those innate abilities back to you... except, all those 171 effects are blocked by permanent opcode 206 effects. So you don't get all the spells.

    You know that "Prepare Spells" ability? What that actually does is, when you wake up, a script checks which spells you have memorized in your spellbook, and removes the 206 protection against that spell. So it tries to grant you every spell, but that granting is blocked for every spell except the ones you have memorized. So you end up being granted innate abilities matching the spells you have memorized.

    Back to those proficiencies: when it tries to grant you every spell, it does it for each spell a number of times matching your proficiency value in the 4-bit segment corresponding to that spell's level. So say you are 2nd level, so you have 1 1st-level memorization slot and 2 1st-level casting slots. You might memorize Magic Missile, and when you wake up it will give you 2 instances of Magic Missile. So a "Magic Missile" spell appears under your spells button with a little number "2" next to it. When you cast MM at someone, it first lowers your proficiency by 1 point in the 4-bit segment for 1st-level spells, then triggers the whole process I described above: all spells are removed, then all spells are granted a number of times equal to your new proficiency value (which is now 1), but almost all spells are blocked, only Magic Missile sneaks through. So you end up with 1 instance of Magic Missile under your spells button. Cast MM again, and it reduces your proficiency value in that 4-bit segment to 0, so you get nothing. Now you have no more 1st-level spells, until you rest.

    If you rest without using the "Prepare Spells" ability, the resting script simply restores your proficiency level in each 4-bit segment to what it was before you cast any spells, and then again triggers the remove spells/grant spells process. So when you wake up, you can again cast MM two times. The net result is that what you see in-game is just about identical to what you see when playing a sorcerer. :sunglasses: :

  • d2freakd2freak Member Posts: 20
    @subtledoctor

    Even if lefreut's UI is installed before M&G 4 beta 3, your mod does not correctly patch it. There is no error but the icons and text for your feats does not show up. They are clickable but invisible.

    DavidW just updated SCS with compatibility for lefreut's ui if it is installed before SCS. Maybe you could look at his solution?

  • kjeronkjeron Member Posts: 2,063
    d2freak wrote: »
    Even if lefreut's UI is installed before M&G 4 beta 3, your mod does not correctly patch it. There is no error but the icons and text for your feats does not show up. They are clickable but invisible.
    @subtledoctor I'm guessing this is the same issue as from TnB - the spells themselves don't have a name or icon, particularly if the spells are there and functional.

  • subtledoctorsubtledoctor Member Posts: 11,377
    Nope, this is different. These spells definitely have icons.

  • kjeronkjeron Member Posts: 2,063
    The icons have nothing to do with the sequencer tool or MnG. For reason's you'll have to ask lefreut, his UI is renaming the Icon resref, turning this:
    D5_RFA1
    
    into this:
    D5_RFAB
    
    which doesn't exists.
    The ability name is broken here (200_feats.tpa):
    GET_STRREF %kitlist_name% kit_name_strref
    //			SPRINT feat_select_string /* @___ */ ~Feat Selection~
    //			SET feat_select_strref = RESOLVE_STR_REF (~Feat Selection~) 
    			SPRINT feat_select_name ~%kit_name_strref% %feat_select_string%~
    			SET kit_seq_name = RESOLVE_STR_REF (~%feat_select_name%~) 
    			SET kit_seq_tip = RESOLVE_STR_REF (~%feat_select_name%~)
    
    %feat_select_string% is never set, so it evaluates to itself, which ends up being the abilities actual name, so that's what get's displayed in the sequencer menu. The right-clicked descriptions are working fine for me, however.

  • subtledoctorsubtledoctor Member Posts: 11,377
    Oh yeah, I forgot to change those strings. The icon renaming thing is weird though. How can it do that if the UI mod is installed first?

  • kjeronkjeron Member Posts: 2,063
    edited March 28
    Oh yeah, I forgot to change those strings. The icon renaming thing is weird though. How can it do that if the UI mod is installed first?
    It renames the icons through the UI as it displays them:
    icon lua "bookSpells[4 * rowNumber - 3].icon:sub(1, -2) .. 'B'"
    
    I guess it's trying to replace the spellbook icon (-C) with the actionbar icon (-B), but such only works if the spell's icons follow that naming convention.
    I think if you rename the icons (and reference) from "D5_RFA1" to "D5_RFA1B" it should work. The engine expects spells to have "iconB" exist, so it's not without precedence, it's just not normally necessary in the sequencer/contingency screen.

    Post edited by kjeron on
  • subtledoctorsubtledoctor Member Posts: 11,377
    edited April 1
    kjeron wrote: »
    Oh yeah, I forgot to change those strings. The icon renaming thing is weird though. How can it do that if the UI mod is installed first?
    It renames the icons through the UI as it displays them:
    icon lua "bookSpells[4 * rowNumber - 3].icon:sub(1, -2) .. 'B'"
    
    I guess it's trying to replace the spellbook icon (-C) with the actionbar icon (-B), but such only works if the spell's icons follow that naming convention.
    I think if you rename the icons (and reference) from "D5_RFA1" to "D5_RFA1B" it should work. The engine expects spells to have "iconB" exist, so it's not without precedence, it's just not normally necessary in the sequencer/contingency screen.

    This all tested fine on BG2EE 2.5.16, but now playing on BGEE 2.5.17 - even without LeFreut's or any other UI mod - the icons are missing in the spell-learning screen. (Until you select/"memorize" one, then the icon does appear down below.) Could this be the same suffix issue? Am I missing something else? For each feat-learning spell I do:
    WRITE_ASCII 0x3a ~d5_wfb5~ #8
    	LPF ALTER_SPELL_HEADER STR_VAR icon = ~d5_wfb5~ END
    

    EDIT - they show up fine in SoD as well. So weird. I wonder if it's something about the iOS game...

    Post edited by subtledoctor on
  • subtledoctorsubtledoctor Member Posts: 11,377
    I've uploaded v4 beta 6, with the following fixes:
    - fixed precise strike (I think)
    - prevent feat icons being overwritten by LeFreut's UI mod
    - fixed burglar/sharpshooter/bladesinger not getting feats
    - fixed loresinger songs and usability
    - fixed bard usability generally

    A note to @lefreut - I've changed the feat icons to all have a "b" at the end of the filename, and there's an hour of my life I'll never get back. But I have NO idea if there are spells in other mods that use icons that do not use that naming mechanism. If LeUI really needs to change the "C" icons to "B" icons, then I might be bold to suggest only changing the letter "c" to "b" ... Admittedly I lack information about why, exactly, LeUI does that. But it seems to me that blithely changing .bam references on the fly, for every spell that appears in the spellbook, creates a huge chance to screwing up other mods. Just my 2 cents.

    ThacoBell
  • lefreutlefreut Member Posts: 1,462
    @subtledoctor spells have multiple icons: the 'C' version that is used in the spellbook and the 'B' version (the one with a stone background) that used to be used in spell description and in contingency screens. My mod restore this behavior.

    The problems are:
    1) the engine only expose the name of the 'C' icon.
    2) you can't test in the UI if a bam exists or not.

    As I have no better way, I choose to do this blind replacement. I can add a check to ensure that the last letter is a 'C'.

  • BlastbackBlastback Member Posts: 53
    This mod is absolutely awesome. My only question is how do I get companion rogues to get feats? When I tried with imoen nothing happened.

  • subtledoctorsubtledoctor Member Posts: 11,377
    Blastback wrote: »
    This mod is absolutely awesome. My only question is how do I get companion rogues to get feats? When I tried with imoen nothing happened.

    Thanks! Some joinable NPCs have a weird thing where they are assigned "NO_KIT" instead of "TRUECLASS" ... the script that used to run the feat system cannot handle NPCs with no kit. I don't recall whether I fixed the issue (by assigning Imoen a kit) in the 3.8 series... but you might try the new beta v4 which should allow Imoen to get feats, and also includes a lot of other improvements.

  • ThacoBellThacoBell Member Posts: 9,727
    @subtledoctor The Agent kit doesn't seem to work. I just generated my character and he memorizes and casts spells as a normal wizard. Regular slots and no level delay. No bardic inspirations either.

Sign In or Register to comment.