Jump to content


Photo

creating a monk weapon with effects


  • Please log in to reply
24 replies to this topic

#1 Slayne

Slayne
  • Member
  • 29 posts

Posted 29 March 2003 - 11:24 PM

Curious - is it possible to create a monk weapon, with an effect like say...blindness; yet maintain the bonus' of using his fists.

Like, if I created a weapon and choose the martial arts as a proficiency(dont know of anything that uses this offhand), then as an extension choose Fists for the damage type, would the engine recognize it as a fist weapon for the monk and allow him to maintain all his normal abilities he'd have if using his fists normally.

Just curious if this is possible to do without to much code digging. Something I can whip up without all the stress.

#2 Slayne

Slayne
  • Member
  • 29 posts

Posted 29 March 2003 - 11:37 PM

Did notice that the monks "fist" weapons were in the override from the TOB install. So I see how the monk's weapons are actually created.

I guess it would be just mimicing how they were created since there really isn't any bonus' received, its just a new weapon upgraded every so often as the xp increases.

I was assuming it was something in the coding that was just upping the values as the monk increased, but it doesn't appear that way from what I'm seeing so far.

#3 Slayne

Slayne
  • Member
  • 29 posts

Posted 30 March 2003 - 12:16 AM

Well, figured out how its making the weapons.

Just need to figure out how the game is figuring out how to equip the monk with the actual weapon. As it stands, using the same values as the fist weapons the monk is using, I can not actually weapon the weapon w/out the use of shadowkeeper, as it doesn't consider "hand to hand" as an equipable area for the slots.

Some where the game is doing it on its own so that the monk still has the fists equiped and prevents me from doing so on my own. Only way I know around this is to set it as a different value, say a dagger, but use all the other settings and just tweak the damage ratio to match a monk weapon. Though the proficency will be messed up since the monk doesn't get to max out a score like they prolly do with their fists.

#4 Tyrus

Tyrus

    Author of Improved Battles & Veronna

  • Member
  • 145 posts

Posted 02 April 2003 - 10:20 AM

I have created many complicated weapons but I remember trying to make monk gloves that would add lightning damage to his/her attacks but it would not work no matter how many different ways I tried.

#5 Slayne

Slayne
  • Member
  • 29 posts

Posted 02 April 2003 - 11:54 AM

There's something in the coding, I don't know where, that is used to assign the monk his "fists" for weapons. As there are actually 8 different "fists" the monk uses as he levels up, starting from fist1 to fist8.

I don't know where the file is that would require editing that would allow you to equip another "fist" type weapon in its stead. So unfortunately as it stands, I don't think its really possible.

Outside of creating spl and eff files and creating a new innate ability to give to the monk that would give his fists lightening damage or whatever. If you set the duration to perm, I don't see why it wouldn't last. Course, that might create stacking issues, but since I suck with spl/eff files, I can't really try and find out.

#6 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 02 April 2003 - 05:05 PM

Here's how it works. The monk is treated by the game as a hardcoded kit. (Just like the Barbarian and Sorcerer.) The monk's abilities and fist items (the various mfistx.itm ones where 'x' is a number from 1 to 8) are applied to the character from a clab file. This file is not available for editing. (Same as the ones for the mages.) It's all hardcoded, but it works the same as a regular kit. Fists get equipped into slot10, which can be done via spell or script. Your choices here are either to modify the original monk fist items, and let the game insert them for you, or assign a script to do so. I suggest the latter, with something like the following procedure:
-First create a stack of modified monk fist items. For example, if you want to add the blindness effect as you mentioned, open each original mfist item in NI or IEEP and add the blindness effect. Then save them with a slightly different name. A good one here would be bmfistx.itm.
-Next, you need to figure out a way to get the item equipped on the character. Here's the method I would use because it sounds kinda "monkish". Create a scroll/tome/book called something like "Technique of the Darkstrike" or somesuch nonsense. Using this casts a spell that sets a local variable on the character.
- Create another spell called BMFist.spl that places the new fist in the old fist slot. This spell should be set so that the min level of each extention header matches the level of the fist the monk is supposed to have. To clarify, I think the monk uses mfist3.itm at levels 6-8. (Starting level for BG2 is in here, so really you only need to worry about creating new fists from mfist3 upwards.) So the first extention header of this spell would have a min casting level of 6, and create item bmfist3 in the fist slot. At level 9, when a monk gets a better fist mfist4, you'd compensate by creating a new extention header in the spell that has a min casting level of 9, and creates item bmfist4 in the fist slot. You follow? Do this for all the damn monk fists. You'll wind up with about 5 or 6 extention headers total IIRC.
- Now there are different ways to do this, but what I'd do is add a block to the DPlayer3.bcs script. This is the script that is assigned to each party character and runs constantly in the background like the baldur.bcs. The block should look something like this:

IF
Global("BMFist","LOCALS",1)
OR(6)
HasItem("MFist3",Myself)
HasItem("MFist4",Myself)
HasItem("MFist5",Myself)
HasItem("MFist6",Myself)
HasItem("MFist7",Myself)
HasItem("MFist8",Myself)
THEN
RESPONSE #100
SetInterrupt(FALSE)
ReallyForceSpellRes("BMFIST",Myself) // The Blinding monkfist aquisition spell.
SetInterrupt(TRUE)
Continue()
END

Now, this looks complicated but here's the breakdown of how the game will interpret and run this combination of items/script changes.
1) Player is level 8 and finds the Treatise of the Blinding Strike. Character reads the scroll (It's a monk-only usable item.) The local variable "BMFist" is set to a value of "1".
2) Being a monk the character currently has the MFist3.itm equipped. The script recognizes this AND the fact that the character has read the treatise. So it casts the spell BMFist on the character.
3) The spell uses the extention header highest possible to be used by this character at the time of the spell's casting. In this case, it's the first extention header (Min level of 6.) and creates the new BMFist3.itm in the character's fist slot. Destroying the old MFist3.itm. Now the script won't cast the spell anymore as the IF check no longer reads true.
4) The character continues on with his oppressive life in quest for his soul, etc... and with the help of the handy new technique, gains enough experience to advance to level nine. The character levels up, and the game creates the MFist4.itm in the fist slot as per the hardcoded monk's clab file.
5) The script check comes true and casts the BMFist spell again, and the character this time uses the second extention header (which has the min casting level of 9) and gets the new and improved BMFist4.itm to replace the original MFist4.itm. The script no longer reads true and the character continues on his/her way.

This is a complex set up for just adding an effect to a monk's fist attack but think of the possibilites here. Adding a neat little portrait icon and some displayed text can make the player feel like his character is special. One can also repeat this procedure for a dozen different monk styles, modifying the fist for each one. Imagine treatise of "The Flaming Fist" or "The Piercing Strike" etc... can really customize things up a bit. It'd make a nice little weidu mod if all the bells and whistles were added in.
Just my 2 copper's worth. ;)

The great wolf Fenrir gapes ever at the dwelling of the gods.


#7 Slayne

Slayne
  • Member
  • 29 posts

Posted 04 April 2003 - 08:37 PM

Well now. Won't this be a pain in the half to learn to script. I'm still doing midrange coding for npcs and junk, not scripting yet.

Oh well, I'll figure it out I'm sure. Thank you for the assistance, shall keep this bookmarked so when I start my venture into that area I have something to go by.

#8 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 05 April 2003 - 12:01 AM

Ah bugger then. I was hoping someone would take up the gauntlet with this. Maybe I'll sit down when I've got some free time and package up a few martial art styles for monks. Anyone have any suggestions/requests/preferences? Bear in mind I'm only interested in something "balanced". ;)

The great wolf Fenrir gapes ever at the dwelling of the gods.


#9 adam_2112

adam_2112

    They bite, they fight, they bite bite bite, fight fight fight

  • Member
  • 91 posts

Posted 05 April 2003 - 12:05 AM

Try talking to seifer because he is going to make a martial arts styles mod for use with the ryu and akuma part of his mod and this would greatly help him.
"The goal of war is not to die for your country but to make the other guy die for his."

#10 Slayne

Slayne
  • Member
  • 29 posts

Posted 06 April 2003 - 01:26 PM

Definately going to be something I'll work on. Especially like the idea about reading manuals to learn the techniques. It just happens to be above my current skill level unfortunately. I will tinker with it, just going to be a bit before any results are actually seen.

#11 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 06 April 2003 - 01:43 PM

Its an interesting manner of thinking which I'll play around with soon.

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#12 Slayne

Slayne
  • Member
  • 29 posts

Posted 06 April 2003 - 03:01 PM

Seem to be having trouble creating the spell and having the script actually use it when I CLUA the global to match.

#13 Slayne

Slayne
  • Member
  • 29 posts

Posted 06 April 2003 - 03:15 PM

UMFIST.spl
"Create Item in Slot" is on the first rightside extension. Have it aimed at the itm I created. Perm/100% pointed to Self. Slot 10(fists)

Level one bases of casting, since the monks weapons dont have level requirements, I'm unsure as to what level implications to set since they themselves dont actually have any.

I created 8 fists, actual copies of the original fists, with an "unconsciousness" extension added, set to 100% pretarget. Figure this way, I know it works for sure.


Extend_Top the Baldur.bcs file

IF
Global("UMFIST","GLOBAL",1)
OR(6)
HasItem("MFist3",Myself) // Fist
HasItem("MFist4",Myself) // Fist
HasItem("MFist5",Myself) // Fist
HasItem("MFist6",Myself) // Fist
HasItem("MFist7",Myself) // Fist
HasItem("MFist8",Myself) // Fist
THEN
RESPONSE #100
SetInterrupt(FALSE)
ReallyForceSpellRES("UMFIST",Myself)
SetInterrupt(TRUE)
Continue()
END



Was mentioned in FWP that the locals may not work well in the file, so I changed it to a global set instead.

#14 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 06 April 2003 - 06:28 PM

Actually, change it back to a local and put the snippet in the DPlayer3.bcs, NOT the baldur. The baldur.bcs won't recoginize a "Myself" target as it runs independant of the characters. In the baludr you'd have to run the same snippet for Player1 to Player6. Also, if you set it to global, you can only have it happen once to a character in the party. By using a LOCALS variable, you could have more than one monk in the group learn the same technique. Unlikely, but a much better way to do it.

Edit: Oh yeah, extend_top that snippet too. ;)

The great wolf Fenrir gapes ever at the dwelling of the gods.


#15 -Sim-

-Sim-
  • Guest

Posted 07 April 2003 - 07:22 AM

Please don't use DPLAYER3.BCS if you can help it... it gets turned off with the party AI.

#16 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 07 April 2003 - 07:54 AM

True enough Sim, but IMO it's better than cramming a snippet 6 times that size into an already overcrowded Baldur.bcs script. Hell, something like BP has that script at around 400kb pre-minimods!

The great wolf Fenrir gapes ever at the dwelling of the gods.


#17 Slayne

Slayne
  • Member
  • 29 posts

Posted 07 April 2003 - 12:37 PM

Wouldnt there be a way to swap the weapons out similar to how Sola swaps his blades out? Looking at the script appended too the baldur file, though I'm not quite sure what tags do what.

#18 Slayne

Slayne
  • Member
  • 29 posts

Posted 07 April 2003 - 12:38 PM

IF
Delay(6)
OR(6)
HasItemEquiped("solablad",Player1) // Tsuki no Ken +4
HasItemEquiped("solablad",Player2) // Tsuki no Ken +4
HasItemEquiped("solablad",Player3) // Tsuki no Ken +4
HasItemEquiped("solablad",Player4) // Tsuki no Ken +4
HasItemEquiped("solablad",Player5) // Tsuki no Ken +4
HasItemEquiped("solablad",Player6) // Tsuki no Ken +4
!HasItemEquiped("solablad","sola") // Tsuki no Ken +4
!HasItemEquiped("solablad","solaufein") // Tsuki no Ken +4
THEN
RESPONSE #100
DisplayStringHeadOwner("solablad",79341) // Tsuki no Ken +4
TakePartyItem("solablad") // Tsuki no Ken +4
END

#19 -Sim-

-Sim-
  • Guest

Posted 07 April 2003 - 12:51 PM

No luck, since there's no spellcasting equivalent of DisplayStringHeadOwner. You're going to need a separate block for every player if you do it that way.

#20 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 16 April 2003 - 02:25 AM

Hlid, is this coding limited to items only or can it be coded into dialogue as well?

Seif

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu