Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Slayn
« on: December 30, 2007, 09:16:21 AM »

Okay.. I've been reading up on WeiDu and have downloaded several mods, been looking at examples other Modders have used.  So I have a fairly reasonable idea of how I should go about this.. but I just like to be sure of things, and best way to do that is ask people that know for sure ;) so here I am again.

I want my mini-mod to be fully compatible with every other mod out there.  I've already noticed that some of the mods I have downloaded either edit / replace the same files mine does (DPLAYER3.BCS / SPELL.IDS) or use the same file name as mine (SPIN127.SPL etc..)  While it's possible for me to change the file names around and manually add the lines to the replaced files.. I'd like WeiDu to do it for me.  So here is what I learned, let me know if it's correct..

An Example of Adding a Spell:
Code: [Select]
ADD_SPELL SPIN303.SPL INNATE 3 ROUSING_CHORUS
SAY NAME1 ~Rousing Chorus~
        SAY DESCRIPTION ~description...~

Then I would use EXTEND to edit DPLAYER3.BCS right?
Code: [Select]
EXTEND_BOTTOM ~DPLAYER3.BCS~  ~DPLAYER3.BAF~If I understand it right.. that would take the information from DPLAYER3.BAF and Add it to the bottom of the game's DPLAYER3.BCS.
Or am I completely off in left field on that one?

If I am right on that, then how would I make the .BAF file? Just make a text file with the code I want added and save it as .BAF?
Also if everything I've said is correct, do I need the COMPILE command at the end of the .tp2 file still?

Thanks again for the help, and sorry if I sound like a complete nub :D


EDIT:: By way of Trial and Error with the use of a dummy folder copy of my BG1 files, I have figured out how to make the .tp2 file, how to create the .baf file and how to append everything needed with use of the EXTEND_BOTTOM command :D
So.. this case is closed for the time being.
Now I just need to figure out all the little tricks in editing the spells themselves so i can tweak them a bit.
Currently they are simply Innate versions of spells already in the game with new names.. found spells that did very close to exact things I wanted my new spells to do and did some slight editing.  Still a bit clueless on all the little variables these spells use though so that's my next goal. :)
Posted by: SixOfSpades
« on: December 29, 2007, 11:17:09 PM »

Yeah, well, half of the hardcoded stuff in this game falls under the category of "it would be odd."  ::)
Posted by: Echon
« on: December 29, 2007, 06:11:15 PM »

If that is the case, it might work for wizard spells. However, the ones in question were priest spells. It would be odd if they also had to pass a check.

-Echon
Posted by: SixOfSpades
« on: December 29, 2007, 11:42:31 AM »

For some strange reason there is a small chance that the character does not learn the spell so just use ApplySpell() ten times. I have never seen that fail.
That sounds like the game is automatically running ApplySpell through the filter of the character's % chance to successfully scribe a Wizard spell. Instead of ApplySpell() 10 times, what happens if you set the user's INT to 25 momentarily, and just ApplySpell() once?
Posted by: Slayn
« on: December 29, 2007, 06:42:44 AM »

Everything seems to work perfectly as planned now.  spells are gained at their appropriate levels.  What i have done is a base number of uses are given when the spell is gained.  At certain levels specific spells gain more charges.  Simplest way i've done it is kept the dummy spell at 1 charge and just have multiple Give Innate Ability where i want them. Seems to work pretty nice, though looks a little bit sloppy in script lol.  Now the next goal is to read-up on WeiDu so I can get everything I put straight into my BG1 into a .d or .tp2 file (forget now even which is used or needed lol) so that it's all sharable.  Still a long way to go before I'll be completely satisfied with it all, think the spells are a little on the strong side at the moment and not managed to get much of the items I made into the game yet either (can't think of where i want them to appear or what). 
But I'd like to say thanks for all the help! And thanks Echon for the fast responses today lol
I'll get better at this eventually ;)
Posted by: Echon
« on: December 29, 2007, 02:53:18 AM »

Since you are using Give Innate Ability instead of Learn Spell, one ApplySpell() should be enough.

-Echon
Posted by: Slayn
« on: December 28, 2007, 08:39:41 PM »

Give Innate Ability did the job!  I dunno how I never saw that in the list for effects :s or the Learn Spell either one.
It worked perfect, gave the spell I wanted it to give.
My only last last question now is it gave the ability with a charge of 10, is it possible to change that for each one? on the dummy spell under #charges it's at 1.  I did however still have what looks to be a dice roll modifier attached to it which I just removed so will see if that changes the number of charges given.

Edit: Nevermind, just took a look at the code in DPlayer3.BCS again and noticed i had 10 copies of ApplySpell and sure enough when I removed 1 it changed the number of charges from 10 to 9.  So seems however many times I have applyspell listed is how many chages it is giving. :D
Posted by: Echon
« on: December 28, 2007, 12:25:07 PM »

I know this method works because I use it with The Fields of the Dead. It has been some time since I have done any modding, though, so I there is a lot I cannot remember. Try using Give Innate Ability (171) instead of Learn Spell (147). If that does not work either, you can email me the SPLs and the code, and I will take a look at it.

-Echon
Posted by: Slayn
« on: December 28, 2007, 11:47:06 AM »

i tried duration Instant/Permanent and set Time to 9 and tried duration Instant/Permanent after bonuses (9) both.. neither worked.
wondering if it's a lost cause :s  was looking for some modded BG1 characters to maybe see how the spells were set up but most i seem to find are BG2 kit packs.
Posted by: Echon
« on: December 28, 2007, 08:25:48 AM »

Posting all that is fine. I contains what I believe is the error. Your dummy spell's effect uses Instant/Limited (0) as the timing mode and it has a duration of 0, which means the character gains the ability for 0 seconds. Change it to Instant/Permanent (9) and try again.

-Echon
Posted by: Slayn
« on: December 28, 2007, 08:01:45 AM »

Hit yet another road block   :(

The code is in DPlayers3.BCS, i can tell it works it does ApplySpell(Myself,LEARN_SONGA) I have it set to 0 higher up in the code so that this spell is learned at the very beginning.  I test it in game and it gives me the spell.. my Special Abilities button becomes click-able.  but there is no spell there.. there's nothing there.
I've checked the dummy spell, the actual spell both and I can't see a single thing wrong with either of them.  Unless it's one of the "Unknowns" that is messing me up :s

here is what my Dummy spell and Actual spells look like in NI.

Dummy Spell:
Signature   SPL
Version   V1 
Spell name   LearnSpellA
Identified name   No such index
Casting sound   None
Flags   ( No flag set )
Spell type   Innate (4)
Wizard school   Schoolless - 0
Priest type   All priests - 0
Spell school   Schoolless (0)
Unknown   00 00 h
Spell school (selection)   Unknown (0)
Spell category   None (0)
Unknown   00 00 00 00 00 00 00 00 00 00 00 00 h
Spell level   1
Unknown   01 00 h
Spell icon   SPPR309B.BAM
Unknown   00 00 h
Unknown   00 00 80 1e 2c 00 04 00 h
Unknown   00 00 00 00 h
Unknown   7f 96 98 00 h
Unknown   00 00 80 1e 2c 00 04 00 h
Unknown   00 00 00 00 h
Ability offset   72 h
# abilities   1
Effects offset   9a h
Unknown   00 00 h
# global effects   0

Type   Melee (1)
Unknown   00 h
Ability icon location   Innate slots (4)
Icon   SPWI106B.BAM
Target type   Caster (5)
Range   0
Minimum level   1
Casting speed   2
To hit   0
Dicesize   6
# dice   0
Enchanted   0
Damage type   Piercing (1)
# effects   1
Effect index   0
# charges   1
Unknown   01 00 h
Projectile type   180

Type   Learn spell (147)
Targettype   TargetSelf (1)
Power   0
Unknown   00 00 00 00 h
Spell type   Innate (2)
Duration   Instant/Limited (0)
Dispel/Resistance   No dispel/Bypass resistance (0)
Time   0
Probability 1   100
Probability 2   0
Resource   SPIN125.SPL (Flying Peeble)
# dice / Max level   0
Dice size / Min level   0
Savetype   ( No save )
Save bonus   0
Unknown   00 00 00 00 h


and my actual spell:

Signature   SPL
Version   V1 
Spell name   Flying Peeble
Identified name   Flying Peeble
Casting sound   CAS_P05.WAV
Flags   ( No flag set )
Spell type   Innate (4)
Wizard school   Schoolless - 0
Priest type   Cleric/Paladin - 32768
Spell school   Enchantment (11)
Unknown   00 00 h
Spell school (selection)   Unknown (0)
Spell category   MagicAttack (4)
Unknown   00 00 00 00 00 00 00 00 00 00 00 00 h
Spell level   1
Unknown   01 00 h
Spell icon   SPPR106C.BAM
Unknown   00 00 h
Unknown   00 00 80 1e 46 00 04 00 h
Unknown   00 00 00 00 h
Unknown   7f 96 98 00 h
Unknown   00 00 80 1e 46 00 04 00 h
Unknown   00 00 00 00 h
Ability offset   72 h
# abilities   1
Effects offset   9a h
Unknown   00 00 h
# global effects   0


Type   Melee (1)
Unknown   00 h
Ability icon location   Innate slots (4)
Icon   SPPR106B.BAM
Target type   Living actor (1)
Range   50
Minimum level   1
Casting speed   4
To hit   0
Dicesize   6
# dice   0
Enchanted   0
Damage type   Piercing (1)
# effects   2
Effect index   0
# charges   1
Unknown   01 00 h
Projectile type   17


sorry if that was too much useless spam :s just cannot figure out why the game recognizes as the Bard is learning an innate spell but not giving the innate spell.
I've tried resting several times to see if that could be it, but nothing :s
Posted by: Echon
« on: December 28, 2007, 07:29:10 AM »

Exactly. :)

-Echon
Posted by: Slayn
« on: December 28, 2007, 06:55:05 AM »

So in effect I make dummy spells with the effect of Learn Spell and have the spell i want learned in there.. and link to the dummy spells with ApplySpell?
That suprisingly makes sense to me lol
Posted by: Echon
« on: December 28, 2007, 06:09:08 AM »

I was going too fast and forgot a rather important part of it. You need to make secondary spells with #147 Learn Spell (http://iesdp.gibberlings3.net/opcodes/bg1tots.htm) that refer to your new bard songs. These spells are the ones that should be applied with the script. For some strange reason there is a small chance that the character does not learn the spell so just use ApplySpell() ten times. I have never seen that fail.

-Echon
Posted by: Slayn
« on: December 26, 2007, 03:54:36 AM »

Okay I have the spells made, have them set to Innate in all the right places.. Have them adding to SPELL.IDS correctly.. and I tried the cold given earlier in the thread to set them to the PC with scripts.  It doesn't work :s  ApplySpell is (i believe) making the spell cast on the PC.  Tried it with different ones and either I take damage (as per the spell) or get hit with whatever buff / debuff is attached.
I've looked all over for other commands to put in place of that which would grant the Spell to the Player instead of Cast it on him..

Only ones I could find was ADD_KNOWN_SPELL and GA_ ... And not too sure the first will work, and not even sure the GA_ is compatible with BG1.
Any clue as to what i should do?