Targeting Neutral Creatures with Hostile Spells
#1
Posté 04 décembre 2010 - 03:30
Is there a master script that controls which creatures you can highlight with the cursor when you have selected a hostile spell?
I appreciate any help.
#2
Posté 04 décembre 2010 - 03:39
address of reference: http://nwn2forums.bi...forum=114&sp=15
___________________________________
I got it working after doing the following:
7. Set the Master column for each of the new variants to the 2da value of the original spell.
8. Set the ConjAnim column of the original spell to **** (This one is probably optional).
9. Set the CastAnim column of the original spell to **** (This one is probably optional).
5 (Corrected). Alter the names of the child spell so players know which one they are casting: Set the hostile version's name value to 6423 and the neutral version's name value to 6423. (See below for more)
When I got to number 5 and tried to just change the numerical reference to a string, I got bad string refs and odd results. That column can only be a reference (could it be a string in nwn1?)
After digging into dialog.tlk for a bit using tlkedit, I realized that I'd need to create a whole new file and package that with the script. This seemed to be a road block for most people, because there's not a lot of information out there on how to even override the tlk, and also because I know there are some issues with it. Also, since this is the full language table for the whole game, and this doesn't seem like the more modular approach I wanted. There are other systems out there that use dialog.tlk, so I'd rather stay out of it.
So, instead I found the strings for "Hostile" and "Neutral" (6423 and 6424) and used those.
-=The end result=-
Now when you go to cast a Charm Person spell, two sub spells are presented: Hostile and Neutral. Clicking the hostile version will allow you charm hostiles as before and you still can't target neutrals. Clicking the neutral version won't let you target hostiles, but now you can target neutrals. Casting the spell from items allows you to choose each version if you right click on the item first.
-=Issues=-
The only side affects I see here are:
1. When the spell is cast, spellcraft checks say that a PC is casting "Hostile" or "Neutral" because that is now the actual name of the spell.
2. When cast from an item or a scroll, the hostile version is automatically picked. This may be something to do with the interface (I'll have to see what happens when you cast protection from alignment). Players will have to know to right click to get to the neutral version.
3. When you click on a spell, you are only presented with "Hostile" and "Neutral" and there is some minor loss of context.
-=Next Steps=-
I have to do this for the other variants before I can release it in the new version. Thoughts?
-=Additional Point=-
I should also mention what this means for installation. Basically, if you want to use the charm spells for PRR, you have to:
1. Import the PRR scripts.
2. Place the spells.2da in your campaign folder.
3. Set the spell hook variable to point to the prr_hook_charm script (or merge it with an existing spell hook script if you have one).
If you don't do 2 or 3, you'll get all the prr functionality, except for Charm spells. This seems like an elegant and modular path.
-------------------------------------------------------
I haven't tried it yet, but apparently it is possible.
#3
Posté 04 décembre 2010 - 05:49
The process that the poster goes on to describe is how to create sub-radial spells/feats. Here's a thread where Kaedrin describes how to do those.
Theoretically, using sub-radials to give two options for HostileSetting is a workable solution. You can, if you want, use the same spell script for both spells. You'd then have to put in a GetSpellId() function call (check Wildshape for an example) to determine which version you used.
#4
Posté 04 décembre 2010 - 07:56
Here is an alternate trick you might want to play with:
http://nwn2forums.bi...92693&forum=114
Modifié par 0100010, 04 décembre 2010 - 07:56 .
#5
Posté 04 décembre 2010 - 06:04
#6
Posté 05 décembre 2010 - 01:28
#7
Posté 05 décembre 2010 - 10:03
Thanks for the advice and the interest. I don't know very much about altering 2da spell attributes. when I looked in the 2da files for the spells there didn't appear to be any settings which allowed a spell to target friendly and hostile creatures. It was an either-or scenario. Maybe there is a setting I am not aware of. If you know of one that would be immensely helpful and greatly apprecieated.
#8
Posté 06 décembre 2010 - 02:51
#9
Posté 06 décembre 2010 - 02:54
#10
Posté 07 décembre 2010 - 11:40
The Fred wrote...
Actually, 0100010's link looks pretty interesting. It opens up a lot of possibilities, anyway...
Yes it does, for more things than just spells, I would imagine.
#11
Posté 08 décembre 2010 - 02:11
#12
Posté 09 décembre 2010 - 04:09
#13
Posté 24 décembre 2010 - 01:54
#14
Posté 24 décembre 2010 - 02:00
M. Rieder wrote...
So I am to the point in my module where I need to implement this method of targeting. I acutally need to use it to target a non-hostile object with a spell that can only be cast on the caster. Can that be done with this technique. I read through how to do it and it's out of my league. I really am having troubles making heads or tails of the mechanics of it.
Okay, I'm working my way through it bit, by bit and reading some of the links and it is starting to unravel. Wow! This is amazing. It really opens up the game to lots of new possiblities. Thanks for sharing!
#15
Posté 24 décembre 2010 - 02:14
After taking a close look at the links you provided, it looks like I need to call the script which brings up the targeting GUI. The targeting GUI gets all the info from the currently targeted object and sends it to the script "gui_targetscript". From there, I can script whatever I want to happen to the object/location that the GUI targeted. Is that right?
Modifié par M. Rieder, 24 décembre 2010 - 02:15 .
#16
Posté 25 décembre 2010 - 01:14
#17
Posté 26 décembre 2010 - 05:24
#18
Posté 26 décembre 2010 - 05:47
Modifié par M. Rieder, 26 décembre 2010 - 05:48 .
#19
Posté 26 décembre 2010 - 05:47
Modifié par M. Rieder, 26 décembre 2010 - 05:48 .





Retour en haut






