stingerhs Posted September 4, 2004 Share Posted September 4, 2004 ok, i posted this before, but no one could really help me that much. so, i'll just open a new discussion here. ok, what i want to do is have a spell cast whenever a weapon hits someone. ie, whenever a blaster bolt hits someone, a frag explosion goes off. now, it has been suggested that i check the on hit properties, but there is no function in the on hit parameters for what i want. now, i have been brainstorming, and i'm thinking that two things will have to happen to get the job done. first, a new line will have to be added to the onhit.2da. before this happens, i need to no what the fields are referring to in the 2da. second, i may need a script to complete the job. i could try to do the scripts myself just following the many guides to scripting, but it could turn into a disaster. the scripting will be done as i go, but i really need to know what the fields are in the onhit.2da first. any help will be greatly appriciated. thanx. Link to comment Share on other sites More sharing options...
tk102 Posted September 4, 2004 Share Posted September 4, 2004 a new line will have to be added to the onhit.2da You mean iprp_onhit.2da. Well I can see what you're attempting, unfortunately the only .2da that references scripts is spells.2da (Activate Item). You try pursuing down that path. I did once when attempting to make a flamethrower, but I had to turn it into an armband to get it to 'activate' properly. Maybe beancounter's experiments with new 2da tables will yield some possibilities. Link to comment Share on other sites More sharing options...
Achilles Posted September 4, 2004 Share Posted September 4, 2004 Well, before you get started, you may want to consider that you may end up having to edit four .2da files: iprp_onhit.2da iprp_onhitcost.2da iprp_onhitdc.2da iprp_onhitdur.2da :eek: The scripts would be diffucult to accomplish because you would need something to fire them (a trigger point, a dialog, etc). Since you'd practically have to re-write the game to make this work, you might want to stick to the .2da files. Check out the later portions of this thread to read a similar discussion. Now, back to your request, the specified .2da are pretty simple. (row label) - number for each row Name - corresponding entry in dialog.tlk Label - shows the entry in the 2da file Cost - ? Param1resref - the value that belongs in the corresponding GFF file node Effectchance - Self explanatory (?) Durationrounds - Self explanatory (?) I hope that helps. Link to comment Share on other sites More sharing options...
Mono_Giganto Posted September 4, 2004 Share Posted September 4, 2004 Hmmm let me know if you get this to work, I have a few ideas for onhit properties.... Link to comment Share on other sites More sharing options...
beancounter Posted September 4, 2004 Share Posted September 4, 2004 I think there are three different approaches to this, and I have not tested the first two, but I know the last works. 1st, checking the NWN Lexicon you are looking for the itemproperty CastSpellOnHit, not the itemproperty OnHit. I am almost 99% sure that the itemproperty OnHit will not let you execute your own script. Now KOTOR does not have a itemproperty CastSpellOnHit. So you would need to have someone here post the row number of the itemproperty CastSpellOnHit in NWN for the 2da table itemproperties and itempropdef. You would then need to create the exact same entry into KOTOR's 2da table and cross your fingers that the Bioware programmers were lazy and only deleted the 2da row, not the actual code that supported the row number. If it works it would open up a whole new field for custom items. 2nd, you could modify the k_ai_master, under Case 1006 (on damaged), to check who was the last creature to damage you and then check what weapon they used. Then if it meets your criteria, execute a script. 3rd, you could create your own grenade, or copy tk102 work for a custom armband. Good luck and it would be really cool if you got it the 1st one to work. Link to comment Share on other sites More sharing options...
stingerhs Posted September 5, 2004 Author Share Posted September 5, 2004 first of all, thanks for the help. i really appriciate it. The scripts would be diffucult to accomplish because you would need something to fire them (a trigger point, a dialog, etc). Since you'd practically have to re-write the game to make this work, you might want to stick to the .2da files. hmm, i thought that scripts would have to fire to display the stun animations, etc, with any on hit property. ie, whenever the game calculates out a 'stun', the script for 'stun' would fire. is that possible, well, as far as you guys know?? Well, before you get started, you may want to consider that you may end up having to edit four .2da files thats ok, for some reason, tedious tasks like adding lots of lines to 2da files doesn't bother me that much. besides, for some reason i seem to be making time somewhere between college classes, studying, holding a job, and doing stuff with games. go figure. 1st, checking the NWN Lexicon you are looking for the itemproperty CastSpellOnHit, not the itemproperty OnHit. I am almost 99% sure that the itemproperty OnHit will not let you execute your own script. Now KOTOR does not have a itemproperty CastSpellOnHit. So you would need to have someone here post the row number of the itemproperty CastSpellOnHit in NWN for the 2da table itemproperties and itempropdef this is something i might check out, although not tonight (just worked 9 hrs, you do the math ). 3rd, you could create your own grenade hmm, i didn't think it was possible to make your own grenade. i guess with the proper 2da editing, it could be done. i give that one a whirl later. well, i'll get to work on this stuff ASAP. thanks for all the help and ideas, i really appreciate it. :D Link to comment Share on other sites More sharing options...
beancounter Posted September 6, 2004 Share Posted September 6, 2004 I think the scripts for the on hit are buried in the game engine, because I looked through the on hit tables and I did not see a section that called a script. If you find one please let everyone know. You may be onto something with this one: Originally posted by stingerhs hmm, i thought that scripts would have to fire to display the stun animations, etc, with any on hit property. ie, whenever the game calculates out a 'stun', the script for 'stun' would fire. is that possible, well, as far as you guys know?? There is a 2da table that control the scripts for certain effects - check out the 2da statescripts. It sets the effects for when a character is stunned, confused or insane. However, making a change will probably effect everything that causes the state - such as a spell or item. Link to comment Share on other sites More sharing options...
stingerhs Posted September 6, 2004 Author Share Posted September 6, 2004 Originally posted by beancounter There is a 2da table that control the scripts for certain effects - check out the 2da statescripts. It sets the effects for when a character is stunned, confused or insane. However, making a change will probably effect everything that causes the state - such as a spell or item. this is what i noticed earlier. now, i was thinking that just simply adding a line to statescripts.2da won't hurt anything. again, i could be wrong though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.