CosmicGerbil I want to make a new class where the player can steal the souls of monsters and imbue them into weapons to create special, sentinent weapons. I thought of creating some skills, such as:

Soul-steal. This allows the player to capture a soul as he kills a monster.

Store. The souls can be stored inside a gem. This is McKelly's idea :) There should be different levels of gem; the more powerful the gen, the better soul it can hold.

Imbue. This is where you take a soul from a gem and imprison it inside a weapon.

Could any of this be done in T2? Or would it need to be done in T3.

Thanks from CosmicGerbil

CosmicGerbil OK here is a more sensible question :)

Is it possible to write a script so that when you kill a monster a "soul object" is created. I am thinking of the symbiant power where you can turn a mold into an object to wear it and the game remembers what type of mold it is. I think I could code it so that when you kill a monster, an object appears, but I need it to be the soul of the monster you have just killed.

Thanks from CosmicGerbil

The Wanderer

Actually, it sounds an awful lot like corpse preservation - except that the default percentage is zero, rather than 10.

Wanderer Through

CosmicGerbil Heh "soul preservation" :) I talked about that on the forum...here is a link http://forum.t-o-m-e.net/viewtopic.php?t=7309 Unfortunately it can't be coded into T2, however I am working on coding the soul preservation skill into T3.

Sorgath Why can't it be coded in T2? Just add a function to HOOK_MONSTER_DEATH to test if the dead monster can drop a soul and if so then use a random number to decide wheather or not to drop a soul object. If you decide to drop one then extract the monsters position and drop a soul object there. Personally I think it would be better to automatcially store all souls together in some sort of Soul Cage amulet or ring etc... rather than have them as physical objects

CosmicGerbil I think I could code the actual dropping of a soul when you kill a monster, but I wasn't sure how to code in the function that looked up what monster had been killed and returned the type of soul.

Sorgath The paramater sent to HOOK_MONSTER_DEATH is m_idx, the index in the monsters array to the monster just killed. Using monster(m_idx) would return the actual monster then you could do something like this....

variable_to_store_monster_idx = monster(m_idx).r_idx

variable_to_store_monster_ego = monster(m_idx).ego

etc...

If you wanted to drop actual objects then those variables would be paramaters like soul_object.pval and soul_object.sval of course you would need to use soul_object = create_object(TV_SOUL, whatever sval you want)

Once you have the object with all the variables you need to determine what the original monster was like, determening the type of soul created would be no different than if you were determening it straight from the monster. Instead of sending r_idx, ego, etc... to your soul getting function you would send the object variables like pval that store these values. Then in your soul getting function you look up what kind of monster it was and extract all the extra information you need like what flags it has or what blows it has.

CosmicGerbil Can you create new TVAL's? I have tried before and I couldn't get them to work :(

I will have another go anyway. Actually I had better read through all the old "soul" posts, because I've forgotten some of the many ideas I have been given, lol ;) I must try to get organised again (?) :D

Sorgath It's been so long since i've tried to create a tval that i can't even remember if I got it working or not. I still maintain however that soul objects would be a bad way to do this, A soul has always been considdered an immaterial object, to have one drop and be capable of being picked up, destroyed, thrown etc... seems rather unusual.

CosmicGerbil Well MCKelly had an idea of a soul gem to store souls in. There would be 5 different types of gem with type 1 only being able to store weak monsters souls (such as yeeks) and type 5 being the best gem that could store unique monsters' souls. This could remove the need for a soul object, so just as a monster died you could trap it's soul in the gem. So HOOK_MONSTER_DEATH would have to delete the empty sould gem and return a soul gem with a monster's soul inside. Was this what you meant by a soul cage, ring or amulet?

Sorgath Yes, that's very similar to the way i was thinking of doing it only i was going to store more than one soul in an object which would be more difficult. But you don't have to delete the old soul gem and create a new one. Just modify the existing one.

CosmicGerbil Would that be similar to the lua script for creating the items of Eternity? Sorry to sound so dumb, this is the most ambitious class so far for Gerband ;)

Sorgath I wasn't aware there was a lua script for creating the items of eternity. But you would probably do souls this way.

HOOK_MONSTER_DEATH = function(m_idx)

end

Thanks for writing that up :) It still looks ambitious for me...you don't fancy helping me design the new class do you? If you don't want to or if you are too busy that's OK.

I don't know about creating new TVALS, but I reckon soul gems could be stored under the TVAL for amulet. So they would look like this:

 SV_AMULET_SOULGEM_1             31 
 SV_AMULET_SOULGEM_2             32  
 SV_AMULET_SOULGEM_3             33
 SV_AMULET_SOULGEM_4             34
 SV_AMULET_SOULGEM_5             35

Here is an example of a soul amulet

N:163:Minor Soul Gem 
G:":d
I:40:31:0
W:1:0:3:5000
A:1/0
D:This gem allows you to store the soul of a weak monster inside, if you have the skill to do so.

Sorgath I'm already fiddling around with several minor tome related things i've been meaning to do for a while now including my own, somewhat different system of imprisoning monsters in items as well as the idea of creating spells from the spirits of slain monsters (provided i can make a decision on how such a system should work) so i'm not really free to create the whole class and magic system but if you can pin down exactly how you want this magic system to work and how you want to implement it then i'd be happy to write some bits and pieces of code for you.

CosmicGerbil Groovy, OK thanks lots :) I have still got to read through all the old souls posts and ideas that people have given me. I think I'll add up a new thread with what I finally decide on for the new class. I don't want to leave out any ideas I have been given, but I have so many and there are some I'm pretty sure can only be coded in T3. So I had better get on with that now, lol :) Hope all your coding is going well :)

Module Developers Discussion/question about new class (last edited 2006-07-15 11:49:00 by host86-142-44-69)