Aller au contenu

Photo

Help required on a few scripts for Arcane Archer.


  • Veuillez vous connecter pour répondre
43 réponses à ce sujet

#1
BloodRiot

BloodRiot
  • Members
  • 26 messages

Greetings everyone.

 

I am doing a conversion of the Pathfinder version of the Arcane Archer to replace the current one in NWN2.

You can find it here for reference: http://paizo.com/pat...caneArcher.html

 

I have a few questions on how to achieve a few things:

 

Enhanced Arrow so far works like a charm, except:

At level 7 the Archer gains a Burst enhancement which is basically added bonus damage on a critical hit. Is there ANY way to have my script "listen" for a critical strike so it can fire my effect on the same hit? I can always do my own rolls which will statiscally be equivalent unless i screw up or miss a couple of things.. but ideally it should just fire whenever it detects that an attack has critically hit.

 

Imbue Arrow's relationship with the spellbook:

I can think of several solutions for this, but in terms of function, what I would rather have is:

Press embue, it checks for spells currently in the spellbook and available to cast, gives you a list of them("not-so-radial" menu style) and from then on, fucntion pretty much like it currently does except with the selected spell.

Alternatively, I could make it work similar to the reserve feats as in Kaedrin's PRC pack.

The questions here are:

Can you read/check for memorized/known spells that can still be cast?

Can you remove one use of the selected spell after it's been used by Imbue Arrow?

 

For now that's what i'm tackling. If other issues arise I'll post new questions.

 

State of the mod:

 

Spellcasting progression:

Completed for Bard/Sorcerer/Wizard. Still in progress for Assassin/Avenger/Hexblade (for support of Kaedrin's).

 

Enhanced Arrow:

Enhancement effect up to +5(at level 10) is done.

Level 3 upgrade is done.

Level 5 upgrade is still being decided as Distance doesn't translate too well to NWN2. Either a slight +AB or simply ignored. Either way easy to implement.

Level 7 Effect is done, checking for the condition is one of the questions asked above.

Level 9 Need to make the 2da entries for this, the mechanics of choosing and applying the effects are the same as the level 3 upgrade, so I only need to change the effects.

 

Embue Arrow:

Not done. Question asked above.

 

Seeker Arrow/Phase Arrow/Hail of Arrows/Arrow of Death:

Mostly the same as vanilla, just need to change the damage bonuses to the arrow it fires to match a regular enhanced arrow and change any problematic DCs and correct uses per day.

 

 

Hopefully one of you better scripters will be able to lend me a hand with this :)

 

Cheers.



#2
rjshae

rjshae
  • Members
  • 4 478 messages
At level 7 the Archer gains a Burst enhancement which is basically added bonus damage on a critical hit. Is there ANY way to have my script "listen" for a critical strike so it can fire my effect on the same hit? I can always do my own rolls which will statiscally be equivalent unless i screw up or miss a couple of things.. but ideally it should just fire whenever it detects that an attack has critically hit.

 

Possibly you could apply an item property to the ammunition using ItemPropertyMassiveCritical() when it is equipped, then remove it when unequipped. I suspect you may need to do an unequip/requip cycle to get the property to work though.

 

I'm not sure about ranged weapons with unlimited ammo. That may prove more complicated.



#3
BloodRiot

BloodRiot
  • Members
  • 26 messages

Hi rjshae.

 

That's exactly what I'm already doing. OnEquip and OnUnequip causes the script to be executed via the k_mod_player_equip script. I add all my enchantments to the arrows themselves with the exception of the +AB portion of the enhancement which goes directly to the PC. Massive criticals would be quite elegant, but it only works on the weapons themselves, not on the ammo... i mean... hummm....i haven't tried but I can't add the property in the blueprint editor so I just assumed. I will try and see if it works anyway.

 

Thanks :)



#4
rjshae

rjshae
  • Members
  • 4 478 messages

Ah, okay. Yes, I'm not sure if that works, but it would be good to know. The crits. come from the weapon rather than the munitions, so it seems like it would. But it depends on whether they implemented it in their code. If not... hmm, I don't think there's a way to determine what the attack roll was or it could be implemented via a damage script. I guess you could set the missile damage to zero, compute the odds of a successful hit being a critical, then apply the damage as an effect. It might look messy in the console though.



#5
BloodRiot

BloodRiot
  • Members
  • 26 messages

It doesn't unfortunatly. Guess I can just scrap the idea of enchanting the arrows and just do it all on the bow. For some reason I wanted to do it on the arrows, but I rather stack temporary buffs on the bow and get a clean result using the game code than having to code the entire thing in a OnHit effect that might bug out or be unreliable anyways. It's jsut a matter of changing the target of the same enchants. Thanks for the idea anyways... it COULD have worked and it would have been the best solution.

 

On to the next bit. Imbue Arrow....exciting stuff. ;)



#6
BloodRiot

BloodRiot
  • Members
  • 26 messages

Ok, some interesting annoyances:

 

Because I'm sometimes a noob that way, I totally forgot that ItemProperties to weapons work alright for regular hits, but they are added damage on critical hit, not multiplied. Except strangely enough for Massive criticals which by rules, it is supposed to be add,not multiplied and it is.

 

At level 7, the arcane archer is supposed to add(and some multiply on crit) the following damage to his attacks:

1- Enhance Arrow basic enchant: +4 Magic Damage(at level 7). Multiplies on Crit (longbow is x3)

2- Enhance Arrow level 3 upgrade: +1d6 Magic Damage. Multiplies on Crit (longbow is x3)

3- Enhance Arrow level 7 upgrade: Massive criticals 2d10 Magic Damage (according to the rules no it's not supposed to multiply on crits)

 

Adding those 3 as itemproperties doesn't work too well in the sense that the first and second bonuses neither stack with themselves, nor do they get multiplied on crit. The properties both appear i nthe item but the combat text tells me that only the 1d6 is in effect. Massive criticals strangely enough gets multiplied and furthermore it's of the base weapon type, Not Magical or any we want to specify.

 

So I then tried to make it as the ability it is supposed to be and add it to the character as an effect and not an itemproperty.

The non stacking problem still applies for the 2 first effects but at least it gets multiplied on crits correctly. The only way I know of doing the third effect is to grant the overhelming criticals feat at level 7 but I think it will also take the base weapon damage type and as far as I can tell It can only be of xd6 and not xd10.

 

Anyone knows a way to create a stacking same damage type damage bonus on a permanent effect that is basically a X+1d6 or a solution to the on critical only damage(both the triggering of the effect and the damage type)?

 

Cheers.

 

(EDIT: Fixed the striken text bits.) I split both effects into separate feats and scripts. The second one is dependant on the first for activation and deactivation and gets added and removed as the conditions are met in the "parent script". Both feats are set as "stacking" in the feat.2da.



#7
BloodRiot

BloodRiot
  • Members
  • 26 messages

I have a beta build that I'd like to release for testing. I am awaiting permission from Kaedrin as, for now, this mod needs (as it was meant originally) to be compatible with his PRC pack as a companion mod. It only changes the AA to which Kaedrin only touched the requirements to qualify for as far as I understand. Should be fine but I'll be preparing a fully standalone version should permission be denied or takes too long to get, but only after I work out the unfinished features listed below.

 

The features that are now ready are:

*Enhanced Arrow: +1 to +5 base effect.

*Enhanced Arrow, level 3 upgrade: +1d6 Magic Damage (based of Elemental Damage in PF).

*Enhanced Arrow, level 7 upgrade: +2d10 Burst Damage, dealt on a separate roll of a natural 20 internally to the script.(based of Elemental Burst in PF).

*Enhanced Arrow, level 9 upgrade: +2d6 Magic Damage vs 1 of 4 Alignments (based of Aligned Arrows in PF).

*Seeker Arrow: Reworked to include shooting animation and adds all the new effects from enhanced arrow.

*Hail of Arrows: Reworked to include shooting animation and adds all the new effects from enhanced arrow on every shot.

*Arrow of Death: SpellCast Ability Modifier (ie: Int for Wizards, Cha for Sorcerers) added to Save Dc. Reworked to include shooting animation and adds all the new effects from enhanced arrow.

*Spellcasting progression added for Bard, Sorcerer and Wizard.

 

Still left to do:

*Imbue Arrow.

*Spellcasting progression for Assassin, Avenger and Hexblade.


  • GCoyote et rjshae aiment ceci

#8
BloodRiot

BloodRiot
  • Members
  • 26 messages

Update and request for help.

 

The bad news is I still haven't got a word from Kaedrin, so I'm moving towards a standalone release.

The good news is imbue arrow SEEMS to be coming along quite well. The way I'm doing it is listing all spells that are currently memorized that are both HOSTILE and AREA. It isn't full proof as some spells are getting left out such as fireburst as it is not a Hostile spell, but I think it's better to lose one or two hostile spells than getting a bunch of mass buff spells listed that are just not quite right to be using with Imbue Arrow.

 

The GUI is mostly done on the display part. Currently I'm sending the icon resref to the UIButtons and all seems well, split up between spell levels and all. Now the hard part I know CAN be done but i'm having a hard time making it work. Besides the icon resref, I should also send the spellID to a gui local var for each button and then when I press a button it should fire the appropriate script sendign the spellID to that script.

Problems so far:

 

*I need to send the SpellID to each button and store it in a local var. Don't really know if I'm doing it or not. Can I send it as part of the AddListBoxRow cfunction or do I need to use SetLocalGUIVariable?

 

*In my GUI XML I have as part of the UIButton these two lines:

                    OnLeftClick='UIObject_Misc_ExecuteServerScript("gui_testmessage")'
                    OnLeftClick0=UIButton_Input_ScreenClose()

When I press the button, it corectly closes the GUI, but the script as far as I can tell doesn't fire. The script only have one single line of code within the void main() which is basically:

void main ()
{
    SendMessageToPC(OBJECT_SELF, "Testing 1, 2, 3!");
}

I'm not getting any message back and I've even tried finding the PC with several different command such as GetLastRested() or GetLastPCRested or GetFirstPC, so to my best knowledge, the script isn't fireing at all even though it is called "gui_testmessage".

 

Anyone knows what I am doing wrong here?

 

So to recap:

Need to get my initial script to send and store the each spellID to it's own gui button, and when pressed the gui button should execute another script and send it it's spellID.

 

Thanks.

Cheers.



#9
Dann-J

Dann-J
  • Members
  • 3 161 messages

Update and request for help.

 

The good news is imbue arrow SEEMS to be coming along quite well. The way I'm doing it is listing all spells that are currently memorized that are both HOSTILE and AREA. It isn't full proof as some spells are getting left out such as fireburst as it is not a Hostile spell, but I think it's better to lose one or two hostile spells than getting a bunch of mass buff spells listed that are just not quite right to be using with Imbue Arrow.

 

One thing I discovered a few years ago is that the Knock spell is considered hostile for some reason. As useful as an Arrow of Knocking might be for unlocking doors and chests from a distance, it wouldn't really contribute much while in combat. :)



#10
BloodRiot

BloodRiot
  • Members
  • 26 messages

Oh.. good to know. Perhaps I will throw in a couple of exceptions once my problem with the data transfer from/to the UI is fixed I will try and do a more thorough test of the spells and perhaps fix the exceptions.

 

Till then... I'm stumped on the script execution and variable thingy... It's probably even a simple thing I'm missing or failing to understand and it's getting annoying. According to the info I've read... the code to execute SHOULD work as it currently is.



#11
rjshae

rjshae
  • Members
  • 4 478 messages

One thing I discovered a few years ago is that the Knock spell is considered hostile for some reason. As useful as an Arrow of Knocking might be for unlocking doors and chests from a distance, it wouldn't really contribute much while in combat. :)

 

Is that because a door is set to a hostile faction in order to allow bashing?



#12
BloodRiot

BloodRiot
  • Members
  • 26 messages

Perhaps...either way since I just thought of a good solution.

 

I'll just create a brand new 2da with just the spells I want to allow. If others want to add their custom spells, 2da editing couldn't be simpler. The added advantage is that Get2DAString() will have to search a much smaller 2da if that even matters. A bit of work but might be worth it.

 

PS: I jsut checked.. Knock is not listed as Hostile. You sure you got the right spell?



#13
kamal_

kamal_
  • Members
  • 5 238 messages

but I think it's better to lose one or two hostile spells than getting a bunch of mass buff spells listed that are just not quite right to be using with Imbue Arrow.


Cheers.

It's probably not a typical arcane archer spell, but mass healing spells can be very effective with Imbue Arrow when used against undead.



#14
Dann-J

Dann-J
  • Members
  • 3 161 messages

 

 

PS: I jsut checked.. Knock is not listed as Hostile. You sure you got the right spell?

 

My mistake - 'harmful' was the word I wanted, rather than 'hostile'. GetLastSpellHarmful() will return TRUE for the Knock spell, even though it doesn't actually do any harm. A check for whether or not a spell is hostile shouldn't have any problems with Knock then.



#15
BloodRiot

BloodRiot
  • Members
  • 26 messages

I do appreciate the comments. I did notice the fireburst problem and now that I know there are more issues like that, I think I will definitely go the way of listing valid spells on my own 2da's. Besides allowing others to customize the valid spells should they have custom spells installed, it will also reduce the amount of conditionals necessary to filter the valid spells.

 

Unless I'm missing out on something that would make this a very bad idea, I think should have thought of this first :D

 

Now if I can only get this blasted GUI to fire of a script I'd be a happy man.



#16
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi BloodRiot,

I received your PM and will help you where I can. :)

However, it would be very helpful for you to post your complete XML script and the complete gui_xxxx script so that I can take a closer look for you.

If you have been following my tutorial, then there are certain checks you can make mentioned at the back that may suggest why the script is not firing at all. Also, there is a "Target" type example in that same tutorial, where you "zap" a creature. One of your best starting points would be to ensure you have that example code in your module, and you can use the "zap" code to zap a target. Once you have established that as working, it may help you progress with your own code from there.

As I say though, post your scripts (in full) so followers can take a closer look for you. :)
 
Edit: In your OnLeftClick examples above, be sure to use OnLeftClick0 and OnLeftClick1. I don't think you can start a "0" after the command without a number, like you have done ... if you see what I mean. Try this way .... (I also remove those speech marks, but that may not be required.)

 

EDIT: Actually, it's not a problem ... It's been a while. ;)
 

OnLeftClick0=UIObject_Misc_ExecuteServerScript("gui_testmessage")  
OnLeftClick1=UIButton_Input_ScreenClose()

Thanks,
Lance.



#17
BloodRiot

BloodRiot
  • Members
  • 26 messages

Hi Lance. Thanks for joining in. Really appreciate it.

I will take a closer look at the ZAPP part in your tutorial.

 

Meanwhile I will show what I have:

The GUI XML (based of the quickcast xml mostly:

imbuearrow.xml

<?xml version="1.0" encoding="NWN2UI">


<UIScene name="SCREEN_IMBUEARROW_SPELLS" x=0 y=0 width=335 height=480 fadeout="0.2" fadein="0.2" backoutkey=true capturemouseclicks=false capturemouseevents=true
    priority="SCENE_SCRIPT" scriptloadable=true draggable=true dragregion_x=0 dragregion_y=0 dragregion_width=264 dragregion_height=24 />

    <!-- GUI HEADER -->
    <UIPane name="IMBUE_TITLE_PANE" x=15 y=0 width=320 height=24 capturemouseclicks=false >    
        <UIText x=0 y=2 text="  Imbue Arrow" width=320 height=20 align=left valign=middle fontfamily="Title_Font" style="1" multiline=false />
        <UIFrame x=0 y=0 width=320 height=24 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
        bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
        left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
        border=5 />
    </UIPane>
    
    <!-- SPELL LEVELS HEADER -->
    <!-- REMOVED FOR EASIER READING. JUST SPELL NUMBER HEADER FRAMES MUCH LIKE GUI HEADER ABOVE -->
    
    <!-- LISTS -->
    <UIPane  name="LISTBOX_MAIN" x=0 y=40 width=335 height=440 capturemouseclicks=false scrollsegmentsize=24 hidescrollbarwhennotneeded=true scrollbaronright=false >
        <!-- LEVEL 0 SPELL LIST -->
        <UIListBox name="LISTBOX_0" x=15 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL0_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL0_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false
                    OnLeftClick0=UIObject_Misc_ExecuteServerScript("gui_testmessage")
                    OnLeftClick1=UIButton_Input_ScreenClose() >                    >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 1 SPELL LIST -->
        <UIListBox name="LISTBOX_1" x=47 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL1_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL1_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false
                    OnLeftClick0=UIObject_Misc_ExecuteServerScript("gui_testmessage")
                    OnLeftClick1=UIButton_Input_ScreenClose() >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 2 SPELL LIST -->
        <!-- REMOVED THE CODE FOR EASE OF READ. JSUT COPIES OF THE LEVEL 0 and 1, BUT FOR THE REMAINING SPELL LEVELS. -->
    </UIPane>

The feat script that fires the GUI:

gui_imbuearrow.ncs

#include "X0_I0_SPELLS"
#include "nwn2_inc_spells"
#include "br_aa_includes"

int GetAArcherHasSpell(int nSpellID, object oArcher=OBJECT_SELF)
{
    if(GetSpellKnown(oArcher, nSpellID))
    {
        return GetHasSpell(nSpellID, oArcher);
    }
    return FALSE;
}

int GetIsAreaSpell(int nTargetingUI)
{
    if((nTargetingUI == 0)
        || (nTargetingUI == 3)
        || (nTargetingUI == 4)
        || (nTargetingUI == 5)
        || (nTargetingUI == 12)
        || (nTargetingUI == 14)
        || (nTargetingUI == 16))
    {
        return FALSE;
    }
    return TRUE;
}

void GetImbueSpellList(object oArcher=OBJECT_SELF)
{
    int i;
    int n;
    string sTexts;
    string sIcons;
    int nSpellID;
    // open gui and clear any listbox items from an earlier viewing
    DisplayGuiScreen(oArcher, "SCREEN_IMBUEARROW_SPELLS", FALSE, "imbuearrow.xml");
    for(i = 0; i < 10; i++)
    {
        ClearListBox(oArcher, "SCREEN_IMBUEARROW_SPELLS", "LISTBOX_"+IntToString(i));
    }

    // read each row from itemtypes.2da, create a new listbox item for it and populate the button
    // with the 2da entry's text
    for(n = 0; n < GetNum2DARows("spells"); n++)
    {
        int nIsHostile = StringToInt(Get2DAString("spells", "HostileSetting", n));
        int nIsArea = StringToInt(Get2DAString("spells", "TargetingUI", n));
        if((GetAArcherHasSpell(n))
            && (GetIsAreaSpell(nIsArea)))
        {
            string sSpellLvl = Get2DAString("spells", "Wiz_Sorc", n);
            string sSpellIcon = Get2DAString("spells", "IconResRef", n);
            //sTexts = "LISTBOX_ITEM_TEXT_1=" + GetStringByStrRef(StringToInt(Get2DAString("spells", "Name", n)));
            sIcons = "LISTBOX_LVL"+sSpellLvl+"_ITEM_1="+sSpellIcon+".tga";
            AddListBoxRow(oArcher, "SCREEN_IMBUEARROW_SPELLS", "LISTBOX_"+sSpellLvl, "ROW_"+IntToString(n), "", sIcons, "0="+IntToString(n), "");            
        }

    }
}

void main()
{
    SendMessageToPC(OBJECT_SELF, "Running GUI Script!");
    GetImbueSpellList();
}

and finally the script that the GUI is supposed to fire:

gui_testmessage.ncs

void main ()
{
    SendMessageToPC(OBJECT_SELF, "Testing 1, 2, 3!");
}

Off to take another look at your tutorial.

 

Cheers and thanks again.



#18
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi BR,

OK, I have your scripts and taking a look now .... In the meanwhile, can you tell me if you *ever* had anything work on an initial test?

The way I work is like this:-

1) Start with the basic GUI displaying .... Does it work? Move onto step 2 ...
2) Add some GUI calls to scripts and send data to them ..... Do the calls send the correct data? Move onto step 3 ...
3) Write the supporting scripts.

However, the point being, in steps one and two, I can determine if anything I add or alter to the XML stops the GUI from displaying or working. Therefore, it is an easier step to remove the offending bit of XML code and try again.

So, was there ever a time when you had it displaying the GUI from a basic test .. even if the buttons did not work at that stage?

EDIT: All I get when I activate your GUI is a title bar with "IMBUE ARROW" inside it. There are no other buttons or objects created from your code. And not being familiar with "Imbue Arrow" as an "ability", I am not sure what I am expecting to see, or if there is anything about my character that is meant to activate it in a certain way?

At a guess from what you have posted earlier, it seems you may have copied and tried to use/alter existing code (i.e. LISTBOX code) to achieve whatever it is you are trying to achieve. However, I do not see how the code you have that follows the screen definition does anything. :(

Perhaps if you can describe in more detail what the ability does, how you intend the GUI to work, and have a drawing outline may help.

NOTE: I do not know how to work with self-populating lists very well at all. My only XML code I have written that does anything like that is my BESTIARY GUI, which comes with my module (when released). However, I don't think it will help you much. You may need to consider designing a more "simple" GUI that has a selection of buttons (already pre-defined with the events you want to occur) and then simply either hide or deactivate buttons according to the PCs abilities to have access to them.

Cheers,
Lance.

#19
BloodRiot

BloodRiot
  • Members
  • 26 messages

I worked the visual part before anything else.

 

The GUI always displayed what I expected it to. I started by placing all the spells into a single list. Then I removed the spells I didn't want to display via filtering on the script that calls the gui. Finally I split the spells into separate lists by spell level. All these worked as expected. Only then I tried to execute something and I only changed one of the spell lists to both close on button press and execute script as you can read there. That never worked. The closing yes, but the execute no.

 

I can try and make a simple GUI with just the minimal to have a button displayed and try to execute it that way.



#20
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

I worked the visual part before anything else.
 
The GUI always displayed what I expected it to. I started by placing all the spells into a single list. Then I removed the spells I didn't want to display via filtering on the script that calls the gui. Finally I split the spells into separate lists by spell level. All these worked as expected. Only then I tried to execute something and I only changed one of the spell lists to both close on button press and execute script as you can read there. That never worked. The closing yes, but the execute no.
 
I can try and make a simple GUI with just the minimal to have a button displayed and try to execute it that way.


Hi BR,

Can you provide me with a screenshot of what I am expecting to see? :)

Depending upon how custom built your script that calls the XML is, is it worth posting that too, so I can use that to call your XML rather than my lever, which simply calls the XML without any pre-defining stuff. ;)

 

EDIT: I just realised that your gui_imbuearrow is your calling script. (Normally scripts beginning gui_ are called from the XML.)

Once I have a more complete picture of what it is you are trying to achieve, and have this script working to the point you currently have it, then I may be able to get into the details of why something in particular does not work.

As I say, I do not know much about LISTS. However, if your code works that much as it stands, I may be able to check what I would consider (by comparison to me) the easier bits. ;)

Cheers,
Lance.



#21
BloodRiot

BloodRiot
  • Members
  • 26 messages

Ok, so let me explain how it works:

 

Create a feat that activates on self that is tied to a spell that runs the gui_imbuearrow.ncs.

Give your test character that feat.

For the moment it only supports wizard/sorcerer spells, so the character must have at least level 1 wizard or sorcerer spells.

Memorize/pick area of effect spells such as sleep. Cone, Point and non hostile spells wont get picked.

Rest.

Activate feat.

You should have spells listed in the gui then.

 

full XML below:

<?xml version="1.0" encoding="NWN2UI">


<UIScene name="SCREEN_IMBUEARROW_SPELLS" x=0 y=0 width=335 height=480 fadeout="0.2" fadein="0.2" backoutkey=true capturemouseclicks=false capturemouseevents=true
    priority="SCENE_SCRIPT" scriptloadable=true draggable=true dragregion_x=0 dragregion_y=0 dragregion_width=264 dragregion_height=24 />

    <!-- GUI HEADER -->
    <UIPane name="IMBUE_TITLE_PANE" x=15 y=0 width=320 height=24 capturemouseclicks=false >    
        <UIText x=0 y=2 text="    Imbue Arrow" width=320 height=20 align=left valign=middle fontfamily="Title_Font" style="1" multiline=false />
        <UIFrame x=0 y=0 width=320 height=24 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
        bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
        left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
        border=5 />
    </UIPane>
    
    <!-- SPELL LEVELS HEADER -->
    <UIPane name="IMBUE_SPELL_LEVELS" x=15 y=24 width=320 height=16 capturemouseclicks=false >    
        <UIPane name="LISTBOX_HEADER_LVL_0" x=0 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="0" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_1" x=32 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="1" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_2" x=64 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="2" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_3" x=96 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="3" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_4" x=128 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="4" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_5" x=160 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="5" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_6" x=192 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="6" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_7" x=224 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="7" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_8" x=256 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="8" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
        <UIPane name="LISTBOX_HEADER_LVL_9" x=288 y=0 height=16 width=32 yPadding=0 xPadding=0
        expandhorizontal=true capturemouseclicks="false" >
            <UIText text="9" x=0 y=0 width=32 height=16 align=center valign=middle fontfamily="Title_Font" style="1" multiline=false />
            <UIFrame x=0 y=0 width=32 height=16 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
                bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
                left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
                border=5 />
        </UIPane>
    </UIPane>
    
    <!-- LISTS -->
    <UIPane  name="LISTBOX_MAIN" x=0 y=40 width=335 height=440 capturemouseclicks=false scrollsegmentsize=24 hidescrollbarwhennotneeded=true scrollbaronright=false >
        <!-- LEVEL 0 SPELL LIST -->
        <UIListBox name="LISTBOX_0" x=15 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL0_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL0_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 1 SPELL LIST -->
        <UIListBox name="LISTBOX_1" x=47 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL1_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL1_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false
                    OnLeftClick0=UIObject_Misc_ExecuteServerScript("gui_testmessage")
                    OnLeftClick1=UIButton_Input_ScreenClose()>
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 2 SPELL LIST -->
        <UIListBox name="LISTBOX_2" x=79 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL2_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL2_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 3 SPELL LIST -->
        <UIListBox name="LISTBOX_3" x=111 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL3_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL3_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>        
        <!-- LEVEL 4 SPELL LIST -->
        <UIListBox name="LISTBOX_4" x=143 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL4_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL4_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 5 SPELL LIST -->
        <UIListBox name="LISTBOX_5" x=175 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL5_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL5_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 6 SPELL LIST -->
        <UIListBox name="LISTBOX_6" x=207 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL6_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL6_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 7 SPELL LIST -->
        <UIListBox name="LISTBOX_7" x=239 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL7_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL7_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 8 SPELL LIST -->
        <UIListBox name="LISTBOX_8" x=271 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL8_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL8_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>
        <!-- LEVEL 9 SPELL LIST -->
        <UIListBox name="LISTBOX_9" x=303 y=0 yPadding=0 xPadding=0 showpartialchild=true width=32 height=440
        unequalcontrols=false capturemouseclicks="false"
        update=true >
            <UIPane name="LISTBOX_LVL9_ITEM" x=0 y=0 height=32 width=32 yPadding=0 xPadding=0
                expandhorizontal=true prototype=true capturemouseclicks="false" >
                <UIButton name="LISTBOX_LVL9_ITEM_1" x=0 y=0 height=32 width=32 prototype=true
                    draggable=false >
                    <UIText align=right valign=bottom fontfamily="Special_Font" style="1" />
                    <UIFrame state=base        fill="b_emptyframe.tga" />
                    <UIFrame state=up        fill="b_empty.tga" />
                    <UIFrame state=down        fill="b_overlay_active.tga" />
                    <UIFrame state=focused    fill="b_overlay_active.tga" />
                    <UIFrame state=hilited    fill="b_overlay.tga" />
                    <UIFrame state=hifocus    fill="b_overlay_active.tga" />
                    <UIFrame state=disabled fill="b_emptyframe.tga" />
                </UIButton>
            </UIPane>
        </UIListBox>    
    </UIPane>


#22
BloodRiot

BloodRiot
  • Members
  • 26 messages

see if this link works to show how looks in game:

https://drive.google...dE8xN0Y4YkJxM0E



#23
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi BR,

 

From the screenshot, this looks rather good. :)

 

It surprises me that you are having any issues considering you have all this side working. ;)

 

I will try to get a situation as you describe (from what you provided) and then work from there then.

 

EDIT: I also just realised that your gui_imbuearrow script *is* the one that calls your XML. Normally, if it begins with "gui_", it is a script that is called from the XML. That made me ignore it for the moment, but now I see what you are getting at. :)

 

Cheers,

Lance.



#24
BloodRiot

BloodRiot
  • Members
  • 26 messages

Thanks Lance. :) Seems just like my luck having the so called "hard parts" done and somehow getting stumped on the "simple bits".

 

The problem seems to be fireing any script from the button using either UIObject_Input_ActionTargetScript or UIObject_MISC_ExecuteServerScript. It just won't do anything.

I have just tested a new UI XML and script which are both copypasta from your zapp example XML and NCS and it doesn't work.

XML is the following. The Zapp script is exactly like yours:

<?xml version="1.0" encoding="NWN2UI">


<UIScene name="SCREEN_IMBUEARROW_SPELLS" x=ALIGN_CENTER y=ALIGN_CENTER width=500 height=500 priority=SCENE_SCRIPT scriptloadable=true
draggable=true idleexpiretime="0.1f"/>

    <!-- GUI HEADER -->
    <UIPane name="IMBUE_TITLE_PANE" x=15 y=0 width=320 height=24 capturemouseclicks=false >    
        <UIText x=0 y=2 text="    Imbue Arrow" width=320 height=20 align=left valign=middle fontfamily="Title_Font" style="1" multiline=false />
        <UIFrame x=0 y=0 width=320 height=24 topleft="tp_frame_tl.tga" topright="tp_frame_tr.tga" bottomleft="tp_frame_bl.tga"
        bottomright="tp_frame_BR.tga" top="tp_frame_t.tga" bottom="tp_frame_b.tga"
        left="tp_frame_l.tga" right="tp_frame_r.tga" fillstyle="stretch" fill="tp_frame_bg.tga"
        border=5 />
    </UIPane>
    
    <UIButton name="ZapButton" text="ZAPP CREATURE" x=15 y=24 width=320 height=32 style="STYLE_SMALL_BUTTON"
    OnLeftClick=UIObject_Input_ActionTargetScript("creature",29,31,0,"TRUE","gui_zapcreature","target:object")
    OnLeftClick0=UIButton_Input_ScreenClose()
    OnToolTip='UIObject_Tooltip_DisplayTooltipString("TARGET A CREATURE","OBJECT_X","OBJECT_Y","SCREEN_TOOLTIP_2")'/>

Could it be something in the module? I'm using vordan's hero creator.

EDIT: Nah... on Uninvited Guests Module doesn't work either.



#25
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi BR,

OK, bear in mind that this is *not* one of my strong areas. ;)

I think you are approaching the coding from two different aspects:-

1) Making a list solution (which is really cool by the way), while hoping the left click option will work, and ...
2) Hoping that you can incorporate a targeting system like my Zapp into such a list.

And here is also a concern, which I copied from the "quickspell.xml": "<!-- The names of the controls are specific and the engine will expect them to have those names in order to interact, init, and query them. -->"
 
Therefore, this is my conclusion (which may be wrong, but at least it may help redirect you) ....
 
1) Creating a list of spells to work like the official quickspell XML may not be possible due to some hard-coding detection of functions called for the quick spell GUI.
 
2) Maybe the above is possible, if you can add your own XML code to run alongside the quickspell.xml script in some way (tricking the engine), or ....
 
3) Rework your own XML to (somehow) amalgamate my zapp code into your XML. (Which I believe is your current goal.)

(By the way, I note that "0" and "1" thing does not appear to be a problem there then.)

NOTE: Do you have the "gui_zapcreature" script in your module to ensure that the button is working or not then? Please confirm.

Cheers,
Lance.

CUT: See my next post. :)