Tried to create a Wizard Eye Spell...again using CHATGPT

Ok…

I thought …maybe…ChatGPT could replicate the summon Familiar spell and I could create a Wizard Eye spell where I could possess it…thereby allowing me to go scout ahead. As the Wizard Eye Spell should.

This is the script ChatGPT gave me. It compiled. It summoned the creature (I used the flying eyeball). I created a conversation. That worked when I speak to it. Here are the scripts:

Name of the summon script: “wizardeye”

// Summon and Possess Wizard Eye Script

#include "nw_i0_generic"

void main()
{
    // Declare variables
    object oCaster = OBJECT_SELF;
    object oEye;
    int nDuration = GetCasterLevel(oCaster) * 6; // Duration in rounds (1 round per level)
    location locCaster = GetLocation(oCaster);

    // Create the Wizard Eye
    oEye = CreateObject(OBJECT_TYPE_CREATURE, "wizard_eye", locCaster);
    if (!GetIsObjectValid(oEye))
    {
        SendMessageToPC(oCaster, "Failed to create Wizard Eye. Please contact a DM.");
        return;
    }

    // Set properties of the Wizard Eye
    SetLocalObject(oEye, "WIZEYE_OWNER", oCaster); // Set owner of the eye
    SetLocalInt(oEye, "WIZEYE_DURATION", nDuration); // Set duration
    SetLocalInt(oEye, "WIZEYE_MOVE_SPEED", 10); // Move speed if examining ceiling and walls
    SetLocalInt(oEye, "WIZEYE_INFRASIGHT", 10); // Infravision range
    SetLocalInt(oEye, "WIZEYE_NORMALSIGHT", 60); // Normal vision range


    // Apply visual and detection properties
    SetIsTemporaryEnemy(oEye, oCaster); // Hide the eye from enemies

    // Set possession properties
    SetLocalObject(oEye, "WIZEYE_CASTER", oCaster); // Set caster as the controller

    // Assign control of the eye to the caster
    AssignCommand(oEye, ActionStartConversation(oCaster, "wizard_eye_conversation")); // Start the conversation with the Wizard Eye

    // Play visual effect
    effect eVFX = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
    ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, locCaster);

    // Debug message
    SendMessageToPC(oCaster, "You have conjured a Wizard Eye. Speak with it to assume control.");

    // Debug message for testing
    SendMessageToPC(oCaster, "Debug message: Summoning script executed successfully.");
}

I then created the creature with the resref: wizard_eye. Which worked.

Name of the conversaton: “wizardeyeconv”

Where I put the following script Chat GPT told me to put on the ACTIONS Tab of the conversation where the NPC says: “As you wish you now have control of me”

// wiz_eye_pos.nss

void main()
{
    object oEye = OBJECT_SELF;
    object oCaster = GetLocalObject(oEye, "WIZEYE_OWNER");

    if (!GetIsObjectValid(oCaster) || !GetIsObjectValid(oEye))
        return;

    // Transfer control to the player
    AssignCommand(oEye, ActionJumpToObject(oCaster));
}

But I when I speak to it…nothing happens. I don’t even get the radial option to “possess” as you do with the familiar. What am I doing wrong?

Eh…I got to go to bed now but…That last script just jumps the eye to the caster. Also, maybe you shouldn’t use OBJECT_SELF for the eye but instead its tag like:

object oEye = GetObjectByTag("wizard_eye"); (if the tag of the eye is “wizard_eye” that is)

But…if the creatue doesn’t have a conversation on it, how can you talk to it? I would guess you would have to have a conversation attached to the creature. Oh, I don’t know. I’m too tired. I’m not sure I understand this whole scenario either. It’s a bit confusing.

EDIT: Another thing that’s confusing is you say that the name of the conversation is “wizardeyeconv” but in the script the conversation that starts is “wizard_eye_conversation”

Again, I’m confused about this scenario and how it plays out. Maybe if you rephrase it a bit more clearly of what happens and what doesn’t happen and what works etc. it’s easier to follow… I think I understand somewhat of what you’re trying to do, but I don’t know what works and what doesn’t…

Ah thanks…I will try some of the things you said.

Yeah the conversation is on the creature.

EDIT:
I am putting in the summons script the correct conversation name it is to reference…maybe that will help…from: “wizard_eye_conversation” to “wizardeyeconv” which is actually the correct name of the conversation…which I am going to test.

I spoke to tinygiant…he says this can’t be done…can’t possess a summoned creature.

1 Like

May be I am not remembering it right, but don’t wizards have the possess familiar skill in nwn?

yup…but it is hardcoded he said…this is not possible :frowning:

I did find a guy who created the wizard eye spell in NWN2.

I wonder if that script works in NWN:EE

Here is the vault entry

https://neverwintervault.org/project/nwn2/script/teleport-spells

Read down the entry

… and does nothing else. Correct. The useage of OBJECT_SELF is ok here.

> "wizard_eye_conversation"

is too long. Name length is restricted to 16 chars.

As TinyGiant already told, it’s not possible to possess a summoned creature. It only works with familiars.

Seemingly it’s the same topic like this:

Then is it possible to somehow make this eye into a familiar? Just brainstorming here… In NWN2 these things are easier, I believe, since we have companions that we have full control and not just henchmen…

Wow, reading about that teleport-spells sounds quite advanced and cool, I must say.

Again, it seems like you would have benefited from working in NWN2 instead… :wink:

1 Like

I have no idea, and I’m not eager to develop something like this. The easiest way I can think of is to overwrite an existing one. Just change the model in hen_familiar. But the EE already has an eyeball, so what’s the point?

But wait, maybe it’s a good idea to replace the original pixie model with the one from Stonehammer? :smiley:

1 Like

I’m not quite following you now. If that’s the case then it’s not a familiar?
Well, I’m not eager to do something like this either…however, I actually have something similar in the module I’m currently working on. It’s one of the companions who has a construct/familar that she summons as a henchman, but it’s just a help when fighting battles, even though she says in a conversation that you can use the familiar for scouting ahead, just like with the wizard’s eye, you can’t use it like that ingame in my module at the moment. I guess if I wanted to do something specific with that I would look at the teleport-spells for NWN2, but, no, I have so much other more important things to do with my module at the moment.

Trying in other words: There already is an Eyeball familiar, so what’s the point to create another one?

To get too much lost into details is a great danger!!! I once spent days to fix the textures on tiles in the mountain tileset. Probably no player will notice that. :slight_smile:

1 Like

Ok, I get you now…I think. So there already is a eye familiar, but @Imtherealthing said that you can possess familiars:

If that’s true, I don’t really see the problem.

You can possess a familiar? And there is an eye familiar? Then…what?

Because it was a 4th level Spell from 2nd ed AD&D.

The Eyeball in NWN:EE is a familiar…it is not a spell. The Eyeball in NWN is a mini-beholder not like the spell where it is just a single large floating eye that turns invisible. See Spell description below:

2nd Ed. D&D

Wizard Eye
(Alteration)
Range: 0
Duration: 1 rd./level
Area of Effect: Special
Components: V, S, M
Casting Time: 1 turn
Saving Throw: None

When this spell is employed, the wizard creates an invisible sensory organ that sends him visual information. The wizard eye travels at 30 feet per round if viewing an area ahead as a human would (i.e., primarily looking at the floor), or 10 feet per round if examining the ceiling and walls as well as the floor ahead. The wizard eye can see with infravision up to 10 feet, and with normal vision up to 60 feet away in brightly lit areas. The wizard eye can travel in any direction as long as the spell lasts. It has substance and a form that can be detected (by a detect invisibility spell, for instance). Solid barriers prevent the passage of a wizard eye, although it can pass through a space no smaller than a small mouse hole (1 inch in diameter).

Using the eye requires the wizard to concentrate. However, if his concentration is broken, the spell does not end–the eye merely becomes inert until the wizard again concentrates, subject to the duration of the spell. The powers of the eye cannot be enhanced by other spells or items. The caster is subject to any gaze attack met by the eye. A successful dispel cast on the wizard or eye ends the spell. With respect to blindness, magical darkness, and so on, the wizard eye is considered an independent sensory organ of the caster.

The material component of the spell is a bit of bat fur.

I was just suggesting that maybe you could somehow work around the problem and think outside of the box. If you can’t possess summoned creatures but you can possess familiars, and there’s some sort of “eye” already, then maybe use that without it having to be a spell per se. Or something along those lines…
Or maybe the spell can summon a familiar perhaps…again, just trying to think outside of the box here.
And if it needs to be invisible, maybe make it invisible in some way? I have no idea how stuff like this work in NWNEE.

Yeah…trying to do that. Think outside the box. Talking to tinygiant he said it’s pretty much impossible. He said that you could make a familiar to replace a current one like Mmat said. But, it still can’t be cast by a spell per se. It would have to be summoned. Not what I’m looking for.

I suggested to tinygiant to maybe make it where the summons goes out to scout ahead and send feedback to the PC. Like: “30 feet NW there is an orc and 40 feet W are 5 orcs”…something like this we are exploring. You don’t actually see it, but close enough to the spell we can get.

Something similar to this telescope I have in my game…where one clicks on the item and you can see what is in the area. Rather than give feedback that it is an “Outsider” for example…I would like it to use the actual name (not the tag or race type). Here are the scripts.
telescope_scripts.zip (3.0 KB)