Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Totally stumped on the "New" spells.
Author Message
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #1
Totally stumped on the "New" spells.
I can't seem to find any documentation anywhere as to why most of the spells in the 65-88 area flat out don't work? (Sustenance, Chameleon, Forget, Gender Swap, Particle Form, etc)

I'm totally stumped because I can't find any documentation anywhere of anyone even mentioning they're broken/not working? I feel like I forgot to flip an on switch somewhere.

Also, for some of them that do work under normal circumstances like Hallucinate, I can't seem to attach to potions, and that's very annoying considering that was one of the reasons I wanted to use them.

Any ideas?

Here's my "Hallucination Potion" and "Gender Swap Potion "just for reference:
Code:
[ITEMDEF i_potion_Gender]
// This potion permanently changes your gender.
ID=i_bottle_WHITE
NAME=Gender swap
TYPE=t_potion
TDATA1=i_bottle_empty
RESOURCES=i_reag_blood_moss, i_reag_ginseng, i_reag_mandrake_root, i_reag_blackmoor, i_bottle_empty
SKILLMAKE=ALCHEMY 15.1

ON=@Create
    MORE1=s_Gender_Swap
    MORE2=100.0

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Gender Swap Potion

[ITEMDEF i_potion_hallucination]
ID=i_bottle_WHITE
NAME=Hallucination Potion
TYPE=T_POTION
TDATA1=i_bottle_empty
RESOURCES=i_reag_brimstone 5, i_bottle_water
SKILLMAKE=ALCHEMY 55.1

ON=@Create
MORE1=70
COLOR=079c

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Hallucination Potion

[Image: 4_Logo.png]
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 07-20-2012 01:18 PM by Rayvolution.)
07-20-2012 01:17 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #2
RE: Totally stumped on the "New" spells.
Okay so a long time ago EA was gonna do more Alchemy and a totally different Necromancy. These were going to clone the Alchemy but it got dropped. They could still be scripted.
07-20-2012 02:26 PM
Find all posts by this user Like Post Quote this message in a reply
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #3
RE: Totally stumped on the "New" spells.
Well, if that's the case; I can rewrite the spells myself (They're mostly going into potions anyway)

Guess that leads to another small issue though; why doesn't Hallucination work as a potion? It's a functional spell, but for some reason the flags wont register when it's attached to a potion, any ideas?

[Image: 4_Logo.png]
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
07-20-2012 02:54 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #4
RE: Totally stumped on the "New" spells.
Yes. Spells need to be scripted in a certain way to work as potions. I suspect not all internal spells have this in mind
Code:
[spell 154]
defname=s_warmth
name=Warmth
sound=1482
runes=BF
cast_time=1.0
resources=i_reag_sulfur_ash,i_reag_obsidian
rune_item=i_rune_warmth
scroll_item=i_scroll_warmth
flags=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG | spellflag_good
effect_id=i_fx_bless_effect
effect=10,25
duration=2*60,6*60
manause=6
skillreq=Necromancy 20.0
INTERRUPT=100.0,30.0

ON=@effect
IF (<ARGO.TYPE>==t_potion)
    obj=<src>
ELSE
    obj=<src.act>
endif
if <obj.findid.i_warmth_timer>
    obj.rescold -= <obj.findid.i_warmth_timer.tag.rescold>
    obj.findid.i_warmth_timer.remove
endif
local.lo=<strarg <serv.spell.<argn1>.effect>>
local.hi=<streat <serv.spell.<argn1>.effect>>
src.newitem i_warmth_timer
new.tag.rescold = <local.lo>+(((<local.hi>-<local.lo>)*<argn2>)/1000)
local.lo=<eval <strarg <serv.spell.<argn1>.duration>>>
local.hi=<eval <streat <serv.spell.<argn1>.duration>>>
new.tag.timer = <local.lo>+(((<local.hi>-<local.lo>)*<argn2>)/1000)
new.LINK=<obj>
IF (<ARGO.TYPE>==t_potion)
    IF (<OBJ.FINDLAYER.44>)
        OBJ.FINDLAYER.44.REMOVE
    endif
    new.layer=44
endif
trysrc <obj> new.equip


[itemdef i_warmth_timer]
ID=i_memory
name=Warmth Timer
TYPE=t_eq_script

on=@create
ATTR=attr_invis|attr_decay

on=@equip
link.rescold += <tag0.rescold>
timer = <tag.timer>

on=@timer
link.rescold -= <tag0.rescold>
remove
return 1

The bit with OBJ at the begining of @effect is the trick. We need to get the user in a slightly different way for potions. Also making the effect go to the potion layer if appropriate. The remove bit with the layer at the end is untested but the idea is that in Sphere rules you can be affected by one potion at a time, so we remove the existing one and make sure this effect will be considered a potion by future quaffings.

Scrolls and wands work fine by default. I haven't experimented with the default spells on equipment system as it's erratic even with internal spells.
(This post was last modified: 07-21-2012 07:33 AM by Anarch Cassius.)
07-21-2012 07:07 AM
Find all posts by this user Like Post Quote this message in a reply
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #5
RE: Totally stumped on the "New" spells.
I eventually ended up writing my own script (before I realized you gave me a darned good example to go by! lol) It looks like we used similar methods, but yours looks a lot more complicated (in a good way) than mine.

My script is actually very basic, but the potion effects I'm trying to emulate are pretty straightforward, I mainly was just looking for direct control over the potions and *not* have them tied to the normal spells at all.

I'm actually completely rewriting the entire alchemy skill tree, once I'm done i'll probably share it with the community Smile

But here's a small sample of a few of the potions; more for anyone else who needs/wants help. Disregard the Alchy/Mats requirements, I haven't balanced those yet.

Code:
[ITEMDEF i_potion_minor_agility]
ID=i_bottle_small_full
NAME=Minor Agility Potion
TYPE=T_POTION
TDATA1=i_bottle_small_empty

RESOURCES=i_reag_blood_moss, i_bottle_small_water
SKILLMAKE=ALCHEMY 15.1

ON=@Create
COLOR=046
MORE1=s_Agility_potion
MORE2=10

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Minor Agility Potion

[ITEMDEF i_potion_moderate_agility]
ID=i_bottle_medium_full
NAME=Moderate Agility Potion
TYPE=T_POTION
TDATA1=i_bottle_medium_empty

RESOURCES=i_reag_blood_moss, i_bottle_medium_water
SKILLMAKE=ALCHEMY 15.1

ON=@Create
COLOR=046
MORE1=s_Agility_potion
MORE2=15

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Moderate Agility Potion

[ITEMDEF i__potion_major_agility]
ID=i_bottle_large_full
TYPE=T_POTION
NAME=Major Agility Potion
TDATA1=i_bottle_large_empty

RESOURCES=i_reag_blood_moss 3, i_bottle_large_water
SKILLMAKE=ALCHEMY 35.1

ON=@Create
COLOR=046
MORE1=s_Agility_potion
MORE2=20

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Major Agility Potion

[Spell 90]
DEFNAME=s_Agility_Potion
NAME=Agility
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG |

SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0
ON=@Effect
   IF (<SRC.RESTEST i_mem_agility_potion>)
      SRC.CONSUME i_mem_agility_potion
   ENDIF
   SERV.NEWITEM i_mem_agility_potion
   NEW.MORE2=<ACT.MORE2>
   SRC.EQUIP <NEW>
   NEW.TIMER=300

[ITEMDEF i_mem_agility_potion]
ID=i_memory
NAME=agility
TYPE=t_eq_script
ON=@Equip
   SRC.SYSMESSAGE You feel very quick on your feet...
   SOUND 503
   EFFECT 3,i_fx_heal_effect,1,17,0
   SRC.DEX=<SRC.DEX> +<MORE2>
ON=@UnEquip
   SRC.SYSMESSAGE The effects seem to dissipate.
   SOUND 503
   EFFECT 3,i_fx_heal_effect,1,17,0
   SRC.DEX=<SRC.DEX> +-<MORE2>
ON=@Timer
   REMOVE
   RETURN 1

Code:
[ITEMDEF i_potion_hallucination]
ID=i_bottle_small_full
NAME=Hallucination Potion
TYPE=t_potion
TDATA1=i_bottle_small_empty
RESOURCES=i_reag_blood_moss, i_reag_ginseng, i_reag_mandrake_root, i_reag_blackmoor,

i_bottle_small_water
SKILLMAKE=ALCHEMY 15.1

ON=@Create
COLOR=07f1
MORE1=s_Hallucination_Potion
MORE2=100.0

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Hallucination Potion

[Spell 89]
DEFNAME=s_Hallucination_Potion
NAME=Hallucination
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG |

SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0
ON=@Effect
   IF (<SRC.RESTEST i_mem_hallucination_potion>)
      SRC.CONSUME i_mem_hallucination_potion
   ENDIF
   SERV.NEWITEM i_mem_hallucination_potion
   SRC.EQUIP <NEW>
   NEW.TIMER=60

[ITEMDEF i_mem_hallucination_potion]
ID=i_memory
NAME=hallucination
TYPE=t_eq_script
ON=@Equip
   SRC.SYSMESSAGE You feel very strange...
   SOUND snd_Z_END_MYSTERY1
   EFFECT 3,i_fx_bless_effect,1,17,0
   SRC.FLAGS -statf_hallucinating
ON=@UnEquip
   SRC.SYSMESSAGE The effects seem to dissipate.
   SOUND snd_Z_END_MYSTERY1
   EFFECT 3,i_fx_bless_effect,1,17,0
   SRC.FLAGS +statf_hallucinating
   SRC.FIX
ON=@Timer
   REMOVE
   RETURN 1

Code:
[ITEMDEF i_potion_resurrection]
ID=i_bottle_medium_full
NAME=Resurrection
TYPE=T_normal
TDATA1=i_bottle_medium_empty
RESOURCES=i_reag_blood_vial 25, i_bottle_medium_water
SKILLMAKE=ALCHEMY 95.0

ON=@Create
COLOR=079a

ON=@DCLICK
Target Who would you like to revive?
Return 1

On=@targon_item
SRC.MESSAGE That is not a character!
RETURN 1

On=@targon_ground
SRC.MESSAGE That is not a character!
RETURN 1

On=@targon_char
IF (<SRC.TARG.UID>==<SRC.UID>)
SRC.MESSAGE You can't use that on yourself!
ELSE
IF <SRC.TARG.DISTANCE>>1
SRC.MESSAGE You are too far away!
ELSE
SRC.TARG.SPELLEFFECT s_resurrection 100.0
SRC.EMOTE sprinkle the resurrection potion on <SRC.TARG.NAME>
SRC.NEWITEM i_bottle_empty
SRC.ACT.BOUNCE
REMOVE
RETURN 1
ENDIF

CATEGORY=Infinity Items
SUBSECTION=Potions
DESCRIPTION=Resurrection Potion

[Image: 4_Logo.png]
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
07-21-2012 03:15 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #6
RE: Totally stumped on the "New" spells.
Actually yours is better in one way. I should be using the @unequip trigger and just removing it on recast.

Whether you want the layer 44 interaction depends on whether you want potion effects to stack or not.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
07-21-2012 05:55 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)