@Grammarsalad@subtledoctor Congratulations for new Faiths and Powers release which doesn't require IWDfication! May I ask if you still have plans for idea about getting translated spell descriptions from existing IWDEE installations at page 3 ?
@Grammarsalad@subtledoctor Congratulations for new Faiths and Powers release which doesn't require IWDfication! May I ask if you still have plans for idea about getting translated spell descriptions from existing IWDEE installations at page 3 ?
Yup. That is still something I'm interested in. I'll have to look for advice about how to do it...perhaps from an expert like @swit
@Grammarsalad@subtledoctor Congratulations for new Faiths and Powers release which doesn't require IWDfication! May I ask if you still have plans for idea about getting translated spell descriptions from existing IWDEE installations at page 3 ?
Yup. That is still something I'm interested in. I'll have to look for advice about how to do it...perhaps from an expert like @swit
If you know the original spell names (or symbolic IDS names) then you can write a code to read the string with weidu (READ_STRREF 0x50) and generate TRA file based on that (for example via APPEND_OUTER and variable that stores all of the read strings). Do this for each language by changing TLK that weidu uses - weidu.conf file. Since @subtledoctor is involved in this mod I'm pretty sure he will be able to write a code to do it all automatically.
@Grammarsalad@subtledoctor Congratulations for new Faiths and Powers release which doesn't require IWDfication! May I ask if you still have plans for idea about getting translated spell descriptions from existing IWDEE installations at page 3 ?
Yup. That is still something I'm interested in. I'll have to look for advice about how to do it...perhaps from an expert like @swit
If you know the original spell names (or symbolic IDS names) then you can write a code to read the string with weidu (READ_STRREF 0x50) and generate TRA file based on that (for example via APPEND_OUTER and variable that stores all of the read strings). Do this for each language by changing TLK that weidu uses - weidu.conf file. Since @subtledoctor is involved in this mod I'm pretty sure he will be able to write a code to do it all automatically.
So, @swit , if this is being installed (e.g.) in bgee, how will weidu know to read the strrefs from iwdee?)
I think i understand what he's suggesting. we could make a function in a separate .tpa that advances a counter, reads the string at 0x50, and APPENDS the counter after '@' and then the string, to an external file. Then just INCLUDE that .tpa with every spell as they are ADD_SPELL'd.
So the mod would build a tra file as it is installed. Might work!
And then we would save that file somewhere safe, uninstall the mod, change the Weidu language, and repeat the process.
That was my thought as well.
The thing that confuses me is how do we get a mod that is being installed in (eg) bgee to read spell files from iwdee installed elsewhere on the computer.
But maybe it's something that we install in iwdee, and then use the tra files that it creates...
@Grammarsalad I think the idea is for you(the maker, not the user) to install it on IWDEE once with each native language IWDEE supports, reading the name and desc during that installation and writing it to a textfile which can then be used as a TRA for each language.
It's pretty simple. Put an empty ~%trafile%.TRA~ file in the override. Delete/Move weidu.cong so you can change languages.
OUTER_SET index = 1
COPY_EXISTING ~%spell%.spl~ override // for each spell you need
READ_STRREF NAME1 ref1
READ_STRREF UNIDENTIFIED_DESC ref2
INNER_ACTION BEGIN
APPEND ~%trafile%.tra~ ~@%index%="%ref1%"~
OUTER_SET idx += 1
APPEND ~%trafile%.tra~ ~@%index%="%ref2%"~
END
BUT_ONLY
You would need to adjust so the index so the traref#'s match your english TRA. After installation, save/rename a copy of that TRA file for your mod, then uninstall, change languages, repeat. I tried posting an example of the output, but I don't think the forums liked some of the foreign characters it contained.
I think i understand what he's suggesting. we could make a function in a separate .tpa that advances a counter, reads the string at 0x50, and APPENDS the counter after '@' and then the string, to an external file. Then just INCLUDE that .tpa with every spell as they are ADD_SPELL'd.
So the mod would build a tra file as it is installed. Might work!
And then we would save that file somewhere safe, uninstall the mod, change the Weidu language, and repeat the process.
yeah, generate TRA file for each language beforehand with code installed on IWD:EE to get these strings. Something like this:
<<<<<<<< .../spell.tra >>>>>>>>
COPY ~.../spell.tra~ ~spell.tra~
COPY_EXISTING - ~spell.ids~ ~override~ COUNT_2DA_ROWS 2 cntrow FOR (cnt = 0; cnt <= "%cntrow%"; cnt = cnt + 1) BEGIN READ_2DA_ENTRY cnt 1 2 spell_name INNER_ACTION BEGIN LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = EVAL ~%spell_name%~ RET spell_res spell_num END COPY_EXISTING - ~%spell_res%.spl~ ~override~ READ_STRREF 0x50 string APPEND_OUTER ~spell.tra~ "//%spell_name%%LNL%@%cnt% = ~%string%~" END END
If you're going to use above code prepare spell.ids file first to only have those spells references that you want to extract strings from. Do it for each language and you have all the TRA files ready to be implemented.
edit: added missing RES_NUM_OF_SPELL_NAME and removed not needed code (leftover from my implementation)
Enemies still don't use these spells, right? The mod is only for the player, isn't it?
For now, yes. Hopefully, enemies will be able to detect and defend against them to some degree. But, even then, it's not certain.
However, @JuliusBorisov please feel free to suggest certain enemies that should use certain spells, or any ai deficiencies and I will try to address them. Now that I'm on github, it's much easier for me to keep track of issues (seriously, github is the bee's knees)
There seems to be a problem with the Prayer and Recitation Spells, sometimes. When playing a Cleric/Ranger Multiclass when casting either spell the bonuses and maluses do not apply to every enemy and ally in the area, but seem to all stack upon the caster. Also for some reason the spell animation becomes a bright red blotch. I tested this on a completely clean installation of the game to make sure it wasn't mod interference.
Apparently, when I first noticed the problem I was playing a cleric/ranger, so I tried to check if it was something with the save file by creating new SOA game with just a cleric. Prayer seemed to work. Then I tried making a cleric/ranger and suddenly the Prayer/Recitation spells stop working. For all I know make it affects other multi-classes or kits or combos.
One more question: what game are you playing it on? My guess is that i didn't add the projectiles because they were already in the game i tested, but maybe they aren't in the game you are playing...though i can't figure out why it would sometimes work...
Edit: lol. I need to update this... If anybody is wondering why i am messing with book09, it's because this was before i knew how to add custom strings to eff files
Okay, the prayer spell seems to be broken for all classes (I created a party of 6 of all cleric combos), while the recitation works for a single class cleric, but breaks sometimes for the other combos. Also even when the recitation spell works sometimes its spell animation does not play correctly. I haven't tested righteous wrath yet.
It will probably have to wait until Saturday. It's mid term time and I'm somewhat swamped. ( and even when i have some time, I'm not at the right laptop. Next week is spring break, so I'll have some time.
Until then this bug will vex me
I wanted to let you know so you don't think I'm ignoring this
1) export the projectiles from IWDEE, and rename them with a b_ prefix
2)
ADD_PROJECTILE ~mod/b_projectile.pro~
3) add
LPF ALTER_SPELL_HEADER INT_VAR projectile = %b_projectile% END
under the subspell COPY commands
(I just noticed that you were using WRITE_SHORT to add the projectile to spells... using ALTER_SPELL_HEADER is waaaay easier.
Oh yeah, I really need to clean this one up!!
Edit: I actually may change the projectile names to what they were called in iwdee.my sense is that this will be more compatible with spells that protect from certain projectiles.
It will be easier for me, even, if i make such a spell. This way, I wouldn't need a different version for iwdee and these iwdee spells
Anybody that has the latest version installed, install this little mini-mod on top of it. It should fix the issues with Prayer and Recitation. Be sure to uninstall this mini-mod before uninstalling the main mod, however.
Deeper explanations if anybody is interested:
The 'red blotch' is an animation related bug. There was a missing animation that is supposed to play over affected enemies that was missing from IWDEE. I created an animation that resembled the 'positive' version but was a reddish color--I nickname it 'dread red'. Anyway, because projectiles were not added, both animations played over the caster and resulted in that rather ugly looking effect. That is fixed (along with a related issue where the wrong animations were playing over the wrong targets--These are IWDEE bugs that I should make a point to report at some time)
As for Recitation, I think that the only issue is that no real portrait icons were properly added. I could be wrong, but that is the only issue that I could reproduce (that said, I would like to hear about it if anybody experiences other issues with this spell. I may need more information to reproduce--and therefore fix--the issue, however.) In any case, this is fixed, in that it now displays something to indicate that one is under the effects of this spell. However, I'm going to need to create proper portrait icons in the nearish future.
@Grammarsalad Okay, I tried the patch and am not noticing any difference: prayer still seems bugged and recitation doesn't work for multi classes. Although I will try a reinstalling everything from scratch to make sure there are no "fragments" causing problems, and re-downloading all both the mod files. I'll get back to you once I get to an area with enough internet flow to re-download BG2 from steam; at the moment I'm in a Fast Food joint on the Highway.
@Grammarsalad Okay, I tried the patch and am not noticing any difference: prayer still seems bugged and recitation doesn't work for multi classes. Although I will try a reinstalling everything from scratch to make sure there are no "fragments" causing problems, and re-downloading all both the mod files. I'll get back to you once I get to an area with enough internet flow to re-download BG2 from steam; at the moment I'm in a Fast Food joint on the Highway.
Keep your eyes on the road!
Aahh, sorry the patch didn't work.
I have tested the newer versions of the spells successfully.
You can probably just uninstall the mod and delete anything that might be in your override folder. But, you will also need to download the updated mod on the first page...
@Grammarsalad Okay. Clean new BG2 Install (Steam), installed new Spells 086a, and then installed new patch. Prayer seems to be fixed for all casters. But recitation is broken, displaying the same behavior I originally described in prayer: no spread, red blotch, bonus and penalties stacked on caster.
A side note: Righteous Wrath Works perfectly gameplay-wise, though characters' who receive an extra APR because of matching alignment display a white dash ("-") upon their portrait rather than what I assume should be a haste symbol.
Comments
Congratulations for new Faiths and Powers release which doesn't require IWDfication!
May I ask if you still have plans for idea about getting translated spell descriptions from existing IWDEE installations at page 3 ?
Or @subtledoctor , do you know how to do that?
The thing that confuses me is how do we get a mod that is being installed in (eg) bgee to read spell files from iwdee installed elsewhere on the computer.
But maybe it's something that we install in iwdee, and then use the tra files that it creates...
I think the idea is for you(the maker, not the user) to install it on IWDEE once with each native language IWDEE supports, reading the name and desc during that installation and writing it to a textfile which can then be used as a TRA for each language.
It's pretty simple.
Put an empty ~%trafile%.TRA~ file in the override.
Delete/Move weidu.cong so you can change languages. You would need to adjust so the index so the traref#'s match your english TRA.
After installation, save/rename a copy of that TRA file for your mod, then uninstall, change languages, repeat.
I tried posting an example of the output, but I don't think the forums liked some of the foreign characters it contained.
<<<<<<<< .../spell.tra
>>>>>>>>
COPY ~.../spell.tra~ ~spell.tra~
COPY_EXISTING - ~spell.ids~ ~override~
COUNT_2DA_ROWS 2 cntrow
FOR (cnt = 0; cnt <= "%cntrow%"; cnt = cnt + 1) BEGIN
READ_2DA_ENTRY cnt 1 2 spell_name
INNER_ACTION BEGIN
LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = EVAL ~%spell_name%~ RET spell_res spell_num END
COPY_EXISTING - ~%spell_res%.spl~ ~override~
READ_STRREF 0x50 string
APPEND_OUTER ~spell.tra~ "//%spell_name%%LNL%@%cnt% = ~%string%~"
END
END
If you're going to use above code prepare spell.ids file first to only have those spells references that you want to extract strings from. Do it for each language and you have all the TRA files ready to be implemented.
edit: added missing RES_NUM_OF_SPELL_NAME and removed not needed code (leftover from my implementation)
Well, thanks guys...I'm going to see about this just after fnp release
Version 0.84a
- Updated with a proper marker.
If you already have this installed, there is no need to reinstall. Just place the itm file in the attached zip into your override folder.
However, @JuliusBorisov please feel free to suggest certain enemies that should use certain spells, or any ai deficiencies and I will try to address them. Now that I'm on github, it's much easier for me to keep track of issues (seriously, github is the bee's knees)
@Reddbane this is just for cleric/ rangers?
Just tried a Dwarf Fighter/Cleric and Prayer has the same problem, not spreading, and becoming a red blotch.
COPY ~Spells/data/iwd_spells/priest_3/PRAYERH.BAM~ ~override~ // COPY ~Spells/data/iwd_spells/priest_3/PRAYERG.BAM~ ~override~ // //sounds COPY ~Spells/data/iwd_spells/priest_3/#EFF_P31.WAV~ ~override~ // COPY ~Spells/data/iwd_spells/priest_3/EFF_E03.WAV~ ~override~ // //itm //itm icons //effs //secondary spells COPY ~Spells/data/iwd_spells/priest_3/#PRAYERB.SPL~ ~override~ //spl LPF ALTER_EFFECT INT_VAR match_opcode = 139 // parameter1 = 7160 //combat penalties END // STRING_SET 7160 @31600002 COPY_EXISTING ~book09.itm~ ~override~ SAY NAME2 @31600003 COPY ~Spells/data/iwd_spells/priest_3/#PRAYERG.SPL~ ~override~ //spl LPF ALTER_EFFECT INT_VAR match_opcode = 139 // parameter1 = 13086 //combat bonuses END // STRING_SET 13086 @31600004 COPY_EXISTING ~book10.itm~ ~override~ SAY NAME2 @31600005 //Spell itself ADD_SPELL ~Spells/data/iwd_spells/priest_3/b_p316.spl~ 1 3 ~CLERIC_PRAYER~ // Spell SAY NAME1 @31600000 SAY NAME2 @31600000 SAY UNIDENTIFIED_DESC @31600001 SAY DESC @31600001 LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = ~CLERIC_PRAYER~ RET spell_res END
( Man i am in love with github. I'm doing this on my phone!)
After this, there is some compatibility code for some as yet unreleased components and then adding the icons.
It looks like i didn't add any projectiles...
@Reddbane
One more question: what game are you playing it on? My guess is that i didn't add the projectiles because they were already in the game i tested, but maybe they aren't in the game you are playing...though i can't figure out why it would sometimes work...
Edit: lol. I need to update this... If anybody is wondering why i am messing with book09, it's because this was before i knew how to add custom strings to eff files
I am currently testing the spells on a clean steam copy of BG2EE, only installed a few hours ago (3/7/2016).
It will probably have to wait until Saturday. It's mid term time and I'm somewhat swamped. ( and even when i have some time, I'm not at the right laptop. Next week is spring break, so I'll have some time.
Until then this bug will vex me
I wanted to let you know so you don't think I'm ignoring this
( cross post with subtle)
Edit: I actually may change the projectile names to what they were called in iwdee.my sense is that this will be more compatible with spells that protect from certain projectiles.
It will be easier for me, even, if i make such a spell. This way, I wouldn't need a different version for iwdee and these iwdee spells
Anybody that has the latest version installed, install this little mini-mod on top of it. It should fix the issues with Prayer and Recitation. Be sure to uninstall this mini-mod before uninstalling the main mod, however.
Deeper explanations if anybody is interested:
The 'red blotch' is an animation related bug. There was a missing animation that is supposed to play over affected enemies that was missing from IWDEE. I created an animation that resembled the 'positive' version but was a reddish color--I nickname it 'dread red'. Anyway, because projectiles were not added, both animations played over the caster and resulted in that rather ugly looking effect. That is fixed (along with a related issue where the wrong animations were playing over the wrong targets--These are IWDEE bugs that I should make a point to report at some time)
As for Recitation, I think that the only issue is that no real portrait icons were properly added. I could be wrong, but that is the only issue that I could reproduce (that said, I would like to hear about it if anybody experiences other issues with this spell. I may need more information to reproduce--and therefore fix--the issue, however.) In any case, this is fixed, in that it now displays something to indicate that one is under the effects of this spell. However, I'm going to need to create proper portrait icons in the nearish future.
Okay, I tried the patch and am not noticing any difference: prayer still seems bugged and recitation doesn't work for multi classes. Although I will try a reinstalling everything from scratch to make sure there are no "fragments" causing problems, and re-downloading all both the mod files. I'll get back to you once I get to an area with enough internet flow to re-download BG2 from steam; at the moment I'm in a Fast Food joint on the Highway.
Aahh, sorry the patch didn't work.
I have tested the newer versions of the spells successfully.
You can probably just uninstall the mod and delete anything that might be in your override folder. But, you will also need to download the updated mod on the first page...
Okay. Clean new BG2 Install (Steam), installed new Spells 086a, and then installed new patch. Prayer seems to be fixed for all casters. But recitation is broken, displaying the same behavior I originally described in prayer: no spread, red blotch, bonus and penalties stacked on caster.
A side note: Righteous Wrath Works perfectly gameplay-wise, though characters' who receive an extra APR because of matching alignment display a white dash ("-") upon their portrait rather than what I assume should be a haste symbol.