Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

New Spells types, bind, warp, buffs, time limited, and more


Scorpious2k
 Share

Recommended Posts

> @Zeta, feel free to use that program for your own community or for your games and friends but Eclipse Stable will remain the most recommended, most stable, more used program and we will keep that promiss but unless your making ur own version of Eclipse 2.7, you should use edit ES and post it as ur own cause a lot of the coding in it is by Damian and he hasnt given you permission to use his codes in your engine.

No offense but I don't have my own community, I have never taken any credit of Damian's, and I don't have my own engine. I am allowed to edit ES right? I figured thats why there's the source. And if I ever did and made a game with it then Eclipse and ES credits would be given as necessary.

Anyways again nice work Scorpious2k.
Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Quick test. Installed it, etc and tested it quickly because i have very little time :p

This is what i noticed

*New properties not saving correctly. When you want to edit the spell again, the spell type, target, duration and frequency will reset.

*Stun spell stuns yourself/or thinks the npc is already stunned since it will return "The Spell on X has failed" when casting for first time in an npc. I assume something similar could happen with the root spell but haven't tested it yet.

*Bind Spell not working. Activated the spell in a certain location, proceeded to get killed by an NPC but spawned on Class default location. Tried killing myself with a Kill atrribute too. Not working.

*Teleport spell working fine.
*Basic spell types working fine.

I have yet to test Durations, Frequency, Target selection & the Buff Spells. Will report later when i have more time.
Link to comment
Share on other sites

Thanks braiton. Let me know when u have those fixed scorpious.

@Zeta: the way u made it sound was u wanted to make ur own engine and share it under a new name to the community. thats where it woulda been wrong. cause u need permission of all those who contributed cause their work is in it. srry for the misunderstanding.
Link to comment
Share on other sites

> @Zeta: the way u made it sound was u wanted to make ur own engine and share it under a new name to the community. thats where it woulda been wrong. cause u need permission of all those who contributed cause their work is in it. srry for the misunderstanding.

Its all good I'm just glad we got that worked out.

@Braiton thanks for testing this. I have not yet been able to add this successfully. I am still new to VB6 so is there anyway you might beable to PM me your source? That is if it is stock ES with this added. If so that would be great because then I would be able to do better tests.
Link to comment
Share on other sites

@Braiton:

> *New properties not saving correctly. When you want to edit the spell again, the spell type, target, duration and frequency will reset.

This one is an easy fix - an oversight on my part.

In the client, **modGameEditor  SpellEditorInit()**

after

```
    frmSpellEditor.scrlVitalMod.Value = Spell(EditorIndex).Data1

```
add

```
    frmSpellEditor.scrlDuration.Value = Spell(EditorIndex).Data2
    frmSpellEditor.scrlFrequency.Value = Spell(EditorIndex).Data3

```

> *Stun spell stuns yourself/or thinks the npc is already stunned since it will return "The Spell on X has failed" when casting for first time in an npc. I assume something similar could happen with the root spell but haven't tested it yet.

A couple of problems caused this, one is a double check for a condition (two different places) and the second time is a problem since the condition is always true when we get there.

The other was a case of the wrong sub being called.

In the server, get into **modSpells.bas** - yes, this is the 1200+ line module I added

In **StartNPCCurse()** find this and remove it:

```
' only one each of root and stun spell may be on at a time
    If MapNPC(pMap, Target).isRooted And Spell(SpellNum).Type = SPELL_TYPE_ROOT Then
        Call BattleMsg(Castor, "The spell on " & NPC(MapNPC(pMap, Target).num).Name & " has failed!", BRIGHTRED, 0)
        Exit Sub
    ElseIf MapNPC(pMap, Target).isStunned And Spell(SpellNum).Type = SPELL_TYPE_STUN Then
        Call BattleMsg(Castor, "The spell on " & NPC(MapNPC(pMap, Target).num).Name & " has failed!", BRIGHTRED, 0)
        Exit Sub
    Else

```
after

```
        Do
            If MapNPC(pMap, Target).Curse(I).SpellID = 0 Then
                C = I
            End If
            I = I + 1
        Loop While C = 0 And I < MAX_CURSES

```
remove

```
    End If
```
find

```
Sub StopNPCCurse(pMap As Long, NPC As Long, CurseID As Long)
```
and replace it with

```
Sub StopNPCCurse(ByVal pMap As Long, ByVal NPC As Long, ByVal CurseID As Long)
```
In **CheckAllExpiredSpells() **find

```
                If MapNPC(M, I).hasCurses = True Then
                    Q = 0
                    For C = 1 To MAX_CURSES
                        If MapNPC(M, I).Curse(C).SpellID > 0 Then
                        Q = Q + 1
                            If MapNPC(M, I).Curse(C).expires > 2 Then
                                MapNPC(M, I).Curse(C).expires = MapNPC(M, I).Curse(C).expires - 1
                                If MapNPC(M, I).Curse(C).freq > 0 Then
                                    If MapNPC(M, I).Curse(C).nextCast > 2 Then
                                        MapNPC(M, I).Curse(C).nextCast = MapNPC(M, I).Curse(C).nextCast - 1
                                    Else
                                        MapNPC(M, I).Curse(C).nextCast = MapNPC(M, I).Curse(C).freq
                                        AMT = CastSpellNPC(MapNPC(M, I).Curse(C).Castor, I, M, MapNPC(M, I).Curse(C).SpellID, False)
                                        MapNPC(M, I).Curse(C).restoreAmt = MapNPC(M, I).Curse(C).restoreAmt + AMT
                                    End If
                                End If
                            Else

```
the next line  is

```
                                Call StopNPCBuff(M, I, C)
```
replace it with

```
                                Call StopNPCCurse(M, I, C)
```

I'm not sure why it is stunning you unless you are in a map that allows player attacks and have targeted yourself or used an area spell.

> *Bind Spell not working. Activated the spell in a certain location, proceeded to get killed by an NPC but spawned on Class default location. Tried killing myself with a Kill atrribute too. Not working.

Death warp is handled in a script if you have scripting running. So it will continue to behave as always unless changed. There is a new command **WarpToBind()** you can use in scripting but I don't use it.

In my server I have taken that script call out and just call WarpToBind()

I have updated the tutorial and uploaded a corrected version of modSpells.bas for download.****
Link to comment
Share on other sites

Alright, tested quickly again and here's the sumary:

*Some new property values still not saving: you are only saving frequency and duration from what i looked on your code. Therefor the type of spell and Effect (the person who is being casted on) are still saving incorrectly. The type of spell will reset to cure and Effect will save, but check the Area Effect box while its at it too (thus saving it too)

*Stun now working. Duration too.

*Buffs work but wont continue working unless you address the first problem that is the property saving incorrectly. Don't worry,  the spell type will still remain as Buff even if its resetting, its not that. What is worrying me the most is that the Effect is being saved incorrectly and because of that will return an error.

IE: I choose Shield type, duration 10 secs, effect: castor. First time cast, everything is perfect. We edit it, Second time cast: RTE 380: Invalid Property Value and Highlights```
frmSpellEditor.chkArea.Value = Spell(EditorIndex).AE
```. Because it is saving the Effect property value wrong and its thinking the Buff spell is being cast as Area Effect and at the same time Castor only therefor returning an error.

Will continue testing later.
Also, in case you are wondering im still using 2.7\. And no, dont worry, i made the changes necesarry to get it to work without altering any piece of code.
Link to comment
Share on other sites

@Braiton:

> *Some new property values still not saving: you are only saving frequency and duration from what i looked on your code. Therefor the type of spell and Effect (the person who is being casted on) are still saving incorrectly. The type of spell will reset to cure and Effect will save, but check the Area Effect box while its at it too (thus saving it too)

> *Buffs work but wont continue working unless you address the first problem that is the property saving incorrectly. Don't worry,  the spell type will still remain as Buff even if its resetting, its not that. What is worrying me the most is that the Effect is being saved incorrectly and because of that will return an error.
>
> IE: I choose Shield type, duration 10 secs, effect: castor. First time cast, everything is perfect. We edit it, Second time cast: RTE 380: Invalid Property Value and Highlights```
> frmSpellEditor.chkArea.Value = Spell(EditorIndex).AE
> ```. Because it is saving the Effect property value wrong and its thinking the Buff spell is being cast as Area Effect and at the same time Castor only therefor returning an error.

The good news here is that it is actually working better than you think.

In order to avoid breaking existing spells, I chose to reuse Spell().AE instead of replacing it. Originally it contained values of 0 or 1 to indicate the spell is Area Effect or not. It now contains 1-4 where 1=Area Effect (maintaining current spell values), 2=target, 3=Castor, and 4=Party.

The line where you are saying the error occurs in **modGameEditor.bas SpellEditorInit()** should have been removed and replaced with

```
    If Spell(EditorIndex).AE = 1 Then
        frmSpellEditor.chkArea.Value = Checked
    ElseIf Spell(EditorIndex).AE = 2 Or Spell(EditorIndex).AE = 0 Then
        frmSpellEditor.chkTarget.Value = Checked
    ElseIf Spell(EditorIndex).AE = 3 Then
        frmSpellEditor.chkCastor.Value = Checked
    ElseIf Spell(EditorIndex).AE = 4 Then
        frmSpellEditor.chkParty.Value = Checked
    End If
```
I also noticed that there is a problem with Bind showing as type Summon and Scripted showing as Bind.  This is because I added Summon later and missed a change.

replace

```
        Case SPELL_TYPE_BIND
            typ = 13
        Case SPELL_TYPE_SCRIPTED
            typ = 14
```
with

```
        Case SPELL_TYPE_SUMMON
            typ = 13
        Case SPELL_TYPE_BIND
            typ = 14
        Case SPELL_TYPE_SCRIPTED
            typ = 15
```

> Also, in case you are wondering im still using 2.7\. And no, dont worry, i made the changes necesarry to get it to work without altering any piece of code.

Good, although that shouldn't be much of a problem since it doesn't look like much has changed in spells in a while.

All these fixes should now be corrected in the tutorial.
Link to comment
Share on other sites

Braiton, with your code fix, can you edit it and include the modules you're working in?

Because i can't find the first Select anywhere in any of my Server modules -.-

That and somehow i entered the code wrong originally and idk wtf is wrong now…
Link to comment
Share on other sites

@EclipseStalker:

> =/ It says HasSpells(index, Spellnum) and    If Player(index).SpellsLocked = True Then
> Compile Error:
> Method or Data not found

As far as I remember, neither of those were touched by the new code. You might have accidently deleted something or written over it?
Link to comment
Share on other sites

  • 3 weeks later...
@Scorpious2k:

> @Zamin:
>
> > OK. Works amazing. Except that it doesn't save the 'Spell ID'. A fix on this would be amazing :)
>
> I'm not sure what it is that it isn't saving…

OK, I'll be more specific.

Open Spell Editor in Game. Go to the "Animation/Sound" tab. The "Spell ID" does not save. You can change it and click on "Save Spell". When you come back, the "Spell ID" is changed back to 0\. This is what I was trying to say.

If you can fix this then perfect.
-Thanks in advance
Link to comment
Share on other sites

@Zamin:

> Open Spell Editor in Game. Go to the "Animation/Sound" tab. The "Spell ID" does not save. You can change it and click on "Save Spell". When you come back, the "Spell ID" is changed back to 0\. This is what I was trying to say.

Thanks, this is what I needed.

Strangely, I can't see where this value was ever saved! I don't see anywhere in the spell record where it would be stored.

I am working on a way to save it without breaking the spell record and requiring all spells to be redone. Give me a day or so.
Link to comment
Share on other sites

Hey, thanks for the other add-on. I see another problem. Small but doesn't hurt mentioning.

When you use the spell a few times with animations (Which work :p). WHen you open the spell editor, the animation, which is shown in the "Animation/Sound" tab also appears in the "Information" tab. This animation shows in the exact position but also in the "Information" tab. This overlaps the obvious in the "Information" tab.

This is a bit annoying, surly a silly glitch. And yes, this only does this after adding your add-on. If you can get a fix for this, then I'll call your spell-editor perfect. :)

-Thanks
Link to comment
Share on other sites

@Zamin:

> When you use the spell a few times with animations (Which work :p). WHen you open the spell editor, the animation, which is shown in the "Animation/Sound" tab also appears in the "Information" tab. This animation shows in the exact position but also in the "Information" tab. This overlaps the obvious in the "Information" tab.

I am trying, but I can't duplicate this.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...