Aller au contenu

Photo

Creating new spells and talents


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

#1
Signo Vir

Signo Vir
  • Members
  • 91 messages
I've run into a bit of a road block in creating new spells and talents.

modifying skills -- easy
creating upgrades -- easy
copying a skill -- fail
creating new skill -- fail

Take, for example, creeping aura, merril's spec skill. If you copy everything but give it a new id, label, pre-requisite, and set the icon position appropriately, you would *think* it would work. but for some reason it does not. Same goes for Anders' skill Blood of my enemy (aka Fuelled Rage).

Has anyone successfully created a new skill that uses the existing scripts? I'm getting concerned that the scripts use the IDs in a big switch-case statement to determine how to act.

Which brings me to my next question.... since we don't have the script source for DA2 how do we create and compile new scripts? Is it possible?

#2
Noctaris

Noctaris
  • Members
  • 143 messages
I've had zero luck creating new active skills, but I've also been primarily just been stumbling around in the dark. I've been able to achieve functions (e.g. I wanted to create a Circle of Healing spell; got the targeting circle using Mythal's Favor as a base. The spell was castable, but had no effect whatsoever).

My understanding (read: assumption) is that the .ncs contains the actual functions for each spell ID, with a select few properties hanging out in the various .gda files.

My experience with trying to create new skills so far has been pretty akin to building an entire car except the motor.

I've also noticed some other oddities. Back-to-Back and Vendetta only work for actual Rogues, for example. If you try and use them with a Warrior or Mage, they disappear for an instant and reappear in place.

Modifié par Noctaris, 18 avril 2011 - 09:43 .


#3
Signo Vir

Signo Vir
  • Members
  • 91 messages

Noctaris wrote...
The spell was castable, but had no effect whatsoever).


This, precisely, has been my experience as well.

I tried make an aura of fire based on creeping aura and while the animation (stolen from fireball) worked, the spell itself did nothing. It was a sustained ability, took the reserved mana, icon remained, etc, but no actual damage dealt.

Edit: I should probably add that Xatmos on Dragon age nexus has release a couple of mods (weapon swap and lock bash) that use scripts, I was, however, under the impression that such scripts relied on the other scripts to compile properly

EDIT: corrected name. I had mis-attributed the mods mentioned.

Modifié par Signo Vir, 19 avril 2011 - 04:13 .


#4
xatmos2

xatmos2
  • Members
  • 41 messages
Uh, actually those are MY mods, and I am not MagnusB last I checked. To compile scripts for DA2 you need to make the DA2 version of script.ldf available to the DA Toolset. There are posts on this forum that explain how to do this, the Modding Tools sticky will get you there.

Adding/duplicating a new skill is easy, the difficulty seems to lie in attaching it to an existing tree or creating new trees. For example, add a skill with no prereqs and simply add it using AddAbility in a module script, that should work as expected. In my mods I only add abilities to execute some function at the player's demand, so all I do in my ability scripts is listen for the events 1006 or 1007 which are fired when an ability is used.

#5
Signo Vir

Signo Vir
  • Members
  • 91 messages
ahh, quite right. I should've double checked the name first. My sincere apologies. I've fixed the post above to correct the error.

I am able to add skills to existing trees -- at least graphically. the skill effect itself is what seems to be failing and I would guess that is mostly a property of dae_mage_*.ncs not supporting the new ability.

I know where to get the new ldf at least. I'll see if I can find the instrucitons you referred to in the modding tools thread. That said, I also prefer the way your mods are packaged as addins. Seems like a much cleaner solution.

#6
squidney2k1

squidney2k1
  • Members
  • 1 445 messages
I just want the Arishok's skills.

#7
Signo Vir

Signo Vir
  • Members
  • 91 messages
The arishok's talents are:

413001
413002
413003
413004
413005
413006
413007
413008

open the console, type:
runscript addtalent 413001

Modifié par Signo Vir, 19 avril 2011 - 05:25 .


#8
Signo Vir

Signo Vir
  • Members
  • 91 messages
nix that actually. You can add the talents but they aren't functional

#9
Noctaris

Noctaris
  • Members
  • 143 messages
Most of the NPC talents aren't, per my note about Back-to-Back and Vendetta not working for non-Rogues. There's a variable or switch somewhere that checks for the user's class, or something along those lines.

#10
Killjoy Cutter

Killjoy Cutter
  • Members
  • 6 005 messages
The programming for this game seems to be somewhat over-complex in terms of constantly checking things that don't need to be checked -- it's starting to sound almost as if it was purposefully programmed to make modding harder.

Why have skills check against the user's class if 98% of users will never even try to assign non-class skills to their Hawkes?

Why have spell cooldowns that don't work correctly if the caster is holding a non-staff weapon?

Why have the Carver / Bethany situations constantly go back and check against Hawke's class to see which sibling should be there?

Modifié par Killjoy Cutter, 19 avril 2011 - 03:26 .


#11
SerKnightly

SerKnightly
  • Members
  • 16 messages

Signo Vir wrote...
I am able to add skills to existing trees -- at least graphically. the skill effect itself is what seems to be failing and I would guess that is mostly a property of dae_mage_*.ncs not supporting the new ability.

Yep. To get effects to work, you'll have to create a new spell script, and create a new HandleImpact case corresponding to the label you assigned the spell in abi_base.gda.

Some pseudocode:
void _Handlempact(struct EventSpellScriptImpactStruct stEvent)
{
    switch(stEvent.nAbility)   
   {        
      case MOD_AURAOFFIRE: 
       {//do stuff here}              
       break;    
    }
}

void main()
{
   event e = GetCurrentEvent();
   int eType = GetEventType(e);

   switch(eType)
   {
      case EVENT_TYPE_SPELLSCRIPT_IMPACT:
      {
           _HandleImpact(e);
      }
     break;
   }
}

I'm a bit too lazy to give a full, verbose example implmentation of a spell, but that's the cursory overview. Still working on creating new trees myself.

Modifié par SerKnightly, 20 avril 2011 - 04:14 .