Aller au contenu

Photo

Custom Runes - adding a weapon glow effect


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

#1
z9dragon

z9dragon
  • Members
  • 6 messages
Does anyone have any idea how to add an effect to a rune so that it makes a weapon glow?

I'm trying to make a Nature rune that has the same glowing effect as deathroot extract. But I've already looked at both deathroot extract and a frost rune in the toolset, and neither of them has a script or effect that says anything about weapon glow.

I've already added a nature rune to the game and it works fine, but it has no glowing effect. If someone could tell me what poisons and runes have that my rune doesn't, I'd really appreciate it.

Modifié par z9dragon, 18 novembre 2009 - 11:07 .


#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
If those items don't have the fx, I'd suggest looking at the generic weapon scripts, if there are any. Frost runes and Frost Weapons lend the same effect to the weapons so it is possible that the fx are generated by the weapon scripts and not the individual effects.

I haven't checked this yet so this is just a shot in the dark.

#3
Phaenan

Phaenan
  • Members
  • 315 messages
I haven't looked into it yet (I should and will soon tho) but basically runes properties are added to the item when it's equiped and removed when it's unequiped, as described somewhere in the enchantment_h include. You may want to have a look on that applyonequip~ish routine, it may hold some clues. :o

#4
z9dragon

z9dragon
  • Members
  • 6 messages
thanks for the suggestion timelord. I just found a script called effect_enchantment_h.nss in the _Game effects\\Effects folder under scripts which looks like it has to do with rune and poison effects. it says:



// -----------------------------------------------------------------------------

// Enchantment (temporary weapon enchantments)

// -----------------------------------------------------------------------------

#include "core_h"



const int ENCHANTMENT_FIRE = 3000;

const int ENCHANTMENT_COLD = 3001;

const int ENCHANTMENT_LIGHTNING = 3002;

const int ENCHANTMENT_STONE = 6084;

const int ENCHANTMENT_TELEK = 6085;

const int ENCHANTMENT_HOLY = 6086;

const int ENCHANTMENT_FIRE_COATING = 3003; // 2 fire damage per power

const int ENCHANTMENT_COLD_COATING = 3004; // 2 cold damage per power

const int ENCHANTMENT_LIGHTNING_COATING = 3005; // 2 electricity damage per power

const int ENCHANTMENT_NATURE_COATING = 3006; // 2 nature damage per power

const int ENCHANTMENT_SPIRIT_COATING = 3007; // 2 spirit damage per power

const int ENCHANTMENT_VENOM = 3008; // 1 nature damage per power, 0.1 slow per power for 5s (unresistable)

const int ENCHANTMENT_DEATHROOT_EXTRACT = 3009; // 1 nature damage per power, 2s stun per power (resistable)

const int ENCHANTMENT_CROW_POISON = 3010; // 2 nature damage per power, 0.1 slow per power for 5s (unresistable), 2s stun per power (resistable)

const int ENCHANTMENT_SOLDIERS_BANE = 3011; // 5 stamina damage per power (non-mages only)

const int ENCHANTMENT_MAGEBANE = 3012; // 5 mana damage per power (mages only)

const int ENCHANTMENT_DEMONIC_POISON = 3013; // 5 spirit damage per power

const int ENCHANTMENT_QUIET_DEATH = 3014; // 10 nature damage per power, instant kill creatures 20% or less max health



plus a bunch of other stuff, but since I'm not a scripter, I really have no idea what the other stuff means, If someone could look at that and tell me if theres something that i could maybe ad to this script to make another rune, that would be helpful.

#5
Dmuse

Dmuse
  • Members
  • 44 messages
All that is giving you is the number that the engine associates with the ENCHANTMENT_DEATHROOT_EXTRACT name that is used internally. So you've learned that ENCHANTMENT_DEATHROOT_EXTRACT and the value 3009 are interchangeable. You're on the right track though.



Might want to look through some of the weapon and/or equip/unequip scripts for a switch statement looking for a value of 3009 if you don't see anything about ENCHANTMENT_DEATHROOT_EXTRACT.



[Haven't looked into the code myself, but just giving you an insight into the programming logic here and what I would exepect to see and where.]

#6
z9dragon

z9dragon
  • Members
  • 6 messages
Where exactly would I find the weapon equip scripts? I'm pretty new at this, never having attempted scripting at all before.

#7
Sunjammer

Sunjammer
  • Members
  • 926 messages
I suspect you will first have to make a new itemproperty for you visual effect (use the Cold VFX entry as a guide) and then create a new item using the Rune - Weapon base item type and add that effect to it. However I suspect that the damage runes have VFXs built in (as they did in NWN) so it may become a fight between your damage rune and the VFX rune as to which visual effect wins.

#8
z9dragon

z9dragon
  • Members
  • 6 messages
Where do i find the Cold VFX entry? I can make a new vfx but I cant find any folder that has them in it in the palette window.

#9
Georg Zoeller

Georg Zoeller
  • Members
  • 188 messages
be careful to not reuse the ids used by the enchantment spells. if you do, your effects would be removed when any such spell ends.

#10
z9dragon

z9dragon
  • Members
  • 6 messages
Well, I've figured out how to add a Poison VFX to a weapon or rune by using the on-hit effects menu to add poison, but since runes use on-hit effects for damage, sunjammer was right in that a single rune cant have both damage and VFX on it. But for now I'm fine with just having that VFX on the weapon. However if anyone figures out how to make a rune that has both through scripting, I would like to know.

Thanks for the help guys.

#11
aliastasia

aliastasia
  • Members
  • 258 messages
I know this is an old post and all, but I am cruising through the fora to see if the rendering engine supports emissive maps - that'd save some scripting at least? Does anyone know if it does?



/A

#12
DarthParametric

DarthParametric
  • Members
  • 1 412 messages
Yes. You can see it in effect on the Blood Dragon armour.

#13
aliastasia

aliastasia
  • Members
  • 258 messages
brilliant - I'll go download it now. thx muchly :-)



/A