how does one customize spells?
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
how does one customize spells?
I've got a few questions related to spells. Also this is my first time scripting...
First off, I tried to create a clone of the weapon of power that shoots spectral blobs instead of lightning, as a portable puzzle solving tool. I switched the spell that the clone casts from "powerbolt" to "blob" (because I saw that blob was on the list of spells in the asset pack). When I tried using the weapon in the preview window, it gave me the error "spell 'blob' not found." I tried it again with fireball and that worked. How do I make a weapon that successfully shoots a blob?
I also tried making a clone of the powerbolt spell that used the blob particle system, but the dungeon editor wouldn't even load that. Is it possible to make custom spells?
Also, is there a way to make new rune combinations to essentially create new spells? Like an unlock door spell that you cast in front of a door to make it open.
A "speak language" spell would be interesting too. Have some text on the wall that if you don't cast "speak language" then it just shows up as gobblygook, but if you cast the spell then it becomes readable. On a similar note, it would be great to have text that you could only read if you have a certain race in your party. The wall text is written in lizardman speak, so if you have a lizardman, you don't have to cast speak language to read it. I think I could figure out racial language based on party, but using runes to grant this ability is where I have no idea.
Also, I had some issues cloning objects with unique effects. I cloned the Orb of Radiance, but the new orb didn't illuminate anything. This made me question how you would create objects with unique effects, like the staff that increases poison damage. It'd easy to make items that increase elemental resistance or modify stats, but items like the shaman staff that grant you the specific ability "Improved Poison Bolt" seems trickier. How would you let an item grant something like that? (and radiate light like the orb should?)
If anyone could give me a few pointers as to how to get started on these issues, I'd appreciate it.
First off, I tried to create a clone of the weapon of power that shoots spectral blobs instead of lightning, as a portable puzzle solving tool. I switched the spell that the clone casts from "powerbolt" to "blob" (because I saw that blob was on the list of spells in the asset pack). When I tried using the weapon in the preview window, it gave me the error "spell 'blob' not found." I tried it again with fireball and that worked. How do I make a weapon that successfully shoots a blob?
I also tried making a clone of the powerbolt spell that used the blob particle system, but the dungeon editor wouldn't even load that. Is it possible to make custom spells?
Also, is there a way to make new rune combinations to essentially create new spells? Like an unlock door spell that you cast in front of a door to make it open.
A "speak language" spell would be interesting too. Have some text on the wall that if you don't cast "speak language" then it just shows up as gobblygook, but if you cast the spell then it becomes readable. On a similar note, it would be great to have text that you could only read if you have a certain race in your party. The wall text is written in lizardman speak, so if you have a lizardman, you don't have to cast speak language to read it. I think I could figure out racial language based on party, but using runes to grant this ability is where I have no idea.
Also, I had some issues cloning objects with unique effects. I cloned the Orb of Radiance, but the new orb didn't illuminate anything. This made me question how you would create objects with unique effects, like the staff that increases poison damage. It'd easy to make items that increase elemental resistance or modify stats, but items like the shaman staff that grant you the specific ability "Improved Poison Bolt" seems trickier. How would you let an item grant something like that? (and radiate light like the orb should?)
If anyone could give me a few pointers as to how to get started on these issues, I'd appreciate it.
Re: how does one customize spells?
I want to help, but I'm to tired. I'll look at this in the morning.
Mind posting your custom sword scripts
and your custom spell scripts.
I'mma read into the definition of the Ord of Radiance and likely fall asleep on my keyboard.
Mind posting your custom sword scripts
and your custom spell scripts.
I'mma read into the definition of the Ord of Radiance and likely fall asleep on my keyboard.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
-
SpacialKatana
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: how does one customize spells?
1: Add this line to your init.lua file in mod_assets\scripts
import "mod_assets/scripts/spells.lua"
2.Create a file in mod_assets called spells.lua
3.Without giving away too much, paste in a spell from the asset pack (the one shown was "fireball") and rename the name field to say "fireball_mega" eg:-
I also changed the attackPower field from 30 to 300.....you get the idea. You can change it's speed,colour etc.
(By adding a new particle file as well, you can also change its look completely btw, but it's a bit advanced for what you need).
4. In a cloned wyvern replace rangedAttack = "lightning_bolt", with rangedAttack = "fireball_mega",
5. Stay clear of the angry wyvern
Hope this helps.
import "mod_assets/scripts/spells.lua"
2.Create a file in mod_assets called spells.lua
3.Without giving away too much, paste in a spell from the asset pack (the one shown was "fireball") and rename the name field to say "fireball_mega" eg:-
Code: Select all
defineObject{
name = "fireball_mega",
class = "ProjectileSpell",
particleSystem = "fireball",
hitParticleEffect = "fireball_hit",
lightColor = vec(1, 0.5, 0.25),
lightBrightness = 15,
lightRange = 7,
lightHitBrightness = 40,
lightHitRange = 10,
castShadow = true,
launchSound = "fireball_launch",
projectileSound = "fireball",
hitSound = "fireball_hit",
screenEffect = "fireball_screen",
projectileSpeed = 7.5,
attackPower = 300,
damageType = "fire",
--cameraShake = true,
tags = { "spell" },
}(By adding a new particle file as well, you can also change its look completely btw, but it's a bit advanced for what you need).
4. In a cloned wyvern replace rangedAttack = "lightning_bolt", with rangedAttack = "fireball_mega",
5. Stay clear of the angry wyvern
Hope this helps.
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
Re: how does one customize spells?
That's pretty much what I tried to do. I tried with your script and wyvern example but when the wyvern attempts to breath I get the error "warning! unknown spell: fireball_mega"
I also attempted to do this with the weapon of power:
To shoot this spell:
With the same result: "warning! unknown spell: blobshot"
I also tried making the spell a clone of powerbolt:
With the same result, "warning! unknown spell: blob_shot"
So how do I make it recognize these unknown spells?
----------------------------------------------------------------------
Also, this was my clone of the Orb of Radiance. I basically just made it look like the Zhandul Orb and took away the spellcraft requirement, but it doesn't illuminate the area like the original does. Looking at the script for the original orb, I don't see anything in it that would make it glow, so I'm wondering where the scripting that makes that happen exists in the base game.
I also attempted to do this with the weapon of power:
Code: Select all
cloneObject{
name = "blob_shooter",
baseObject = "power_weapon",
uiName = "The Light Blaster",
description = "Shoot out concentrated globs of light",
spell = "blobshot",
}Code: Select all
defineObject{
name = "blobshot",
class = "ProjectileSpell",
particleSystem = "blob",
hitParticleEffect = "blob_hit",
lightColor = vec(0.25, 0.5, 1),
lightBrightness = 15,
lightRange = 7,
lightHitBrightness = 40,
lightHitRange = 10,
castShadow = true,
launchSound = "blob_launch",
projectileSound = "blob",
hitSound = "blob_hit",
projectileSpeed = 15,
attackPower = 0,
--cameraShake = true,
tags = { "spell" },
}
I also tried making the spell a clone of powerbolt:
Code: Select all
cloneObject{
name = "blob_shot",
baseObject = "powerbolt",
particleSystem = "blob",
hitParticleEffect = "blob_hit",
lightColor = vec(0.25, 0.5, 1),
lightBrightness = 15,
lightRange = 7,
lightHitBrightness = 40,
lightHitRange = 10,
castShadow = true,
launchSound = "blob_launch",
projectileSound = "blob",
hitSound = "blob_hit",
projectileSpeed = 15,
attackPower = 0,
--cameraShake = true,
tags = { "spell" },
}
So how do I make it recognize these unknown spells?
----------------------------------------------------------------------
Also, this was my clone of the Orb of Radiance. I basically just made it look like the Zhandul Orb and took away the spellcraft requirement, but it doesn't illuminate the area like the original does. Looking at the script for the original orb, I don't see anything in it that would make it glow, so I'm wondering where the scripting that makes that happen exists in the base game.
Code: Select all
cloneObject{
name = "super_magic_orb",
baseObject = "magic_orb",
uiName = "The Ultimate Orb",
requiredLevel = 0,
description = "You cannot comprehend its power",
gfxIndex = 157,
model = "assets/models/items/zhandul_orb.fbx",
willpower = 10
}
Last edited by Shloogorgh on Sat Sep 22, 2012 4:03 pm, edited 1 time in total.
Re: how does one customize spells?
Code: Select all
cloneObject{
name = "blobshot",
baseObject = "blob",
particleSystem = "blob",
hitParticleEffect = "blob_hit",
lightColor = vec(0.25, 0.5, 1),
lightBrightness = 15,
lightRange = 7,
lightHitBrightness = 40,
lightHitRange = 10,
castShadow = true,
launchSound = "blob_launch",
projectileSound = "blob","I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
Re: how does one customize spells?
Tried with a cloned object, that didn't work.
And let me reiterate: having my weapon of power shoot the spell "blob" doesn't even work. Yet blob is on the asset list for spells. Maybe because it's not classified as a projectile spell? In any case, I get the same error: "warning! unknown spell: blob"
I can change the spell the weapon launches to other projectile spells from the asset list, but so far I haven't successfully gotten it to accept a custom spell
And let me reiterate: having my weapon of power shoot the spell "blob" doesn't even work. Yet blob is on the asset list for spells. Maybe because it's not classified as a projectile spell? In any case, I get the same error: "warning! unknown spell: blob"
I can change the spell the weapon launches to other projectile spells from the asset list, but so far I haven't successfully gotten it to accept a custom spell
-
SpacialKatana
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: how does one customize spells?
It maybe hard coded what spells monsters can fire....I've cloned powerbolt and it fires from spawners okay, so the new spell is being read from the file correctly
I also have crowerns firing fireballs, but that was done by cloning a wyvern(it has a ranged attack) and then swapping its model out.
You need to be devious to get stuff working....
I also have crowerns firing fireballs, but that was done by cloning a wyvern(it has a ranged attack) and then swapping its model out.
You need to be devious to get stuff working....
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
Re: how does one customize spells?
Has anyone successfully gotten a monster or weapon to use a custom spell?
-
SpacialKatana
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: how does one customize spells?
Their monster def list states:-
rangedAttack: the ranged attack to perform when “ranged_attack” animation event is triggered. Must be one of the following: “lightning_bolt”, “lightning_bolt_greater”, “ice_shards”, “fireball”, “fireball_greater”, “poison_bolt”, “frost_arrow”.
I take it from this that monster spells are hard-coded, so it looks like making new spells, at least for monsters cannot currently be done.
Guys, change this please !!!
rangedAttack: the ranged attack to perform when “ranged_attack” animation event is triggered. Must be one of the following: “lightning_bolt”, “lightning_bolt_greater”, “ice_shards”, “fireball”, “fireball_greater”, “poison_bolt”, “frost_arrow”.
I take it from this that monster spells are hard-coded, so it looks like making new spells, at least for monsters cannot currently be done.
Guys, change this please !!!
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
Re: how does one customize spells?
An unrelated question regarding textures.
I wanted to make variations on the orbs, a green orb and a white orb, but I screwed up somewhere along the way.
First, I edited the dds files and put the custom ones in the mod_assets texture folder. Then I copied the model files for the zhendal orb and the orb of radiance and put the copies in the mod_assets models folder, renamed as "air_orb.model" and "earth_orb.model."
Then I created clones as the items:
And finally I used this script in the materials.LUA:
But in the game the orbs still have the textures of the Zhendal orb and the orb of radiance, so where did I go wrong?
I wanted to make variations on the orbs, a green orb and a white orb, but I screwed up somewhere along the way.
First, I edited the dds files and put the custom ones in the mod_assets texture folder. Then I copied the model files for the zhendal orb and the orb of radiance and put the copies in the mod_assets models folder, renamed as "air_orb.model" and "earth_orb.model."
Then I created clones as the items:
Code: Select all
cloneObject{
name = "air_orb",
baseObject = "magic_orb",
uiName = "Air Element Orb",
model = "mod_assets/models/air_orb.fbx",
requiredLevel = 0,
description = "You cannot comprehend its power",
gfxIndex = 69,
willpower = 10
}
cloneObject{
name = "earth_orb",
baseObject = "magic_orb",
uiName = "Earth Element Orb",
model = "mod_assets/models/earth_orb.fbx",
requiredLevel = 0,
description = "You cannot comprehend its power",
gfxIndex = 69,
willpower = 10
}Code: Select all
defineMaterial{
name = "air_orb",
diffuseMap = "mod_assets/textures/air_orb_dif.tga",
specularMap = "mod_assets/textures/air_orb_spec.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 20,
depthBias = 0,
}
defineMaterial{
name = "earth_orb",
diffuseMap = "mod_assets/textures/earth_orb_dif.tga",
specularMap = "mod_assets/textures/earth_orb_spec.tga",
doubleSided = false,
lighting = true,
alphaTest = false,
blendMode = "Opaque",
textureAddressMode = "Wrap",
glossiness = 20,
depthBias = 0,
}