Learning how to get a new spell in game

Discussion in 'General Modification' started by vampiricpuppy, Jun 7, 2009.

Remove all ads!
  1. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    Ahhh, you're trying to scribe a spell? Thats item creation: try casting "Summon Allyx", or fiddle with any file that has a variant on 'item creation' in its name. Feel free to add any of my spells in there too, I always forget that part ;) You may even have to create the relevant scrolls in protos.tab.

    (Also, I got sidetracked at work and didn't get to test your effects: instead of letting me stay at work and waste time modding, my dang boss sent me out to dinner and to play laser tag. The fiend! And I got pwned :sadblinky)
     
  2. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    noooooooooooooooooooooooooooooooo

    not 'scribe scroll' or anything.

    Just select the spell from the available spells at level up.

    It's automatically greyed out for some reason i cant fathom.
     
  3. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    after checking every file multiple times, im convinced that theres either another file i need to do, or another line that im not aware of.

    Are there any files that arent on that list allyx posted that i need to look at?

    i already did the help.tab stuff.
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    http://www.co8.org/forum/showthread.php?t=3826&highlight=jesse%27s+spells

    Hey VP, the above link is to one of Jesse Heinig's new spells threads. He was (is, not like he's dead or anything) a very thorough guy in terms of documentation. He created several new spells, and the attachments for same are in that thread. They should include every file needed to add a spell. I referenced his work when I switched Suggestion to Charm Monster or whatever it was and everything came out fine.

    Apologies if you've already seen the thread.
     
  5. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    could it be the lack of sound values?

    i have yet to create any entries in snd_spells.mes...


    hmmmmmmmmmmmmmmmmmm

    edit: oooh gaear, cheers - checking it now :D
     
  6. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    Don't believe that would be an issue - audio is pretty much an afterthought for everything in this engine.
     
  7. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    hmmmmmm >_< checked out those files and they look mostly like what ive been doing. Going to try a couple of things though.
     
  8. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    ok, well trying the one difference from Jesse's stuff i could see, didnt change anything :(

    trying the sound thing you said wouldnt work, didnt work :p

    i'm going to give up for the night, and try some more tomorrow.
     
  9. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    This is probably a long shot, and i very much doubt its a problem, but there is a number gap in the entries between spells 784 and 800 (ie there are no line entries of intervening numbers in spell.mes for example)

    Would that cause an issue?
     
  10. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    Ok, i did put the extra fields in the relevant areas... at first it made the game CTD, then i removed the entry at 801, because it didnt seem to be implemented, and that stopped the CTDS.

    Curiously, when i level up a wizard/sorcerer and try to select the spell, it is greyed out, but once i fill the available spell choices (or spell choices/3rd level for sorc) it un-greys. I then remove a choice and it re-grey's out :roll:

    [​IMG]

    and on a side note, the help.tab entries work fine :)

    [​IMG]
     
  11. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    ok, one of the other spells i've been playing around with, Electric Jolt (sor/wiz 0) works, sort of. :bored:

    In it's current state, it automatically goes into a wizard's spellbook at level 1 as a cantrip lvl 0 spell, but sorcerers cannot choose it from the lvl 0 list >_<

    Still, it is memorizable, and castable, so at least not all is lost

    here's the wizard working with it:

    [​IMG]

    and here's the sorcerer not working with it :p

    [​IMG]
     
  12. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    Also, the game seems to have created a Spell804 - Electric Jolt.pyc (as well as the original .py version) file in the data/scr folder.

    None of the other spells have this :confused:

    edit: after running the game again, the file is gone >_> la la la
     
    Last edited: Jun 12, 2009
  13. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    ok after looking at jesse's stuff i still have nothing to go on.

    As far as i am concerned, my spells should be working >_<

    going to post what i've done... The only thing i can think of right now is trying an earlier number slot and seeing if i get different results if i precede some of the final spells in the list... or some naming problem in my file names that i cant quite nut out.

    just to clarify, jesse's spells used the following files:

    data/mes/spell.mes
    data/rules/spell_enum.mes
    data/rules/spells/xxx - yyyyyy.txt
    data/scr/Spellxxx - yyyyyy.py

    a couple less files than i've done, so ive covered all his bases at least. i've also done spelllist.mes and help.tab entries.

    anyways:

    spell.mes

    [​IMG]

    and

    [​IMG]

    for the spelllist.mes entries, there are the following (showing all 3 spells i've worked on)

    [​IMG]

    and the spell_enum.mes entries, i've added in extra entries for 5802 and 20802, as that seems to be the trend for all other spells :)

    802

    [​IMG]

    5802

    [​IMG]

    20802

    [​IMG]

    you should also note that in all the files i've created blank xxx | {} entries for lines that have nothing in them, just to see if that would help :roll:

    the help.tab entries all work fine, so i wont list those.

    here is my final .txt file

    filename: 802 - Scintillating Sphere.txt

    location data/rules/spells

    Code:
    School: Evocation
    Descriptor: Electricity
    Level: Sor 3
    Level: Wiz 3
    Component: V
    Component: S
    Casting Time: 1 action
    Range: Long
    Saving Throw: None
    Spell Resistance: Yes
    Projectile: Yes
    flags_Target: Range
    inc_flags_Target: Self
    inc_flags_Target: Other
    exc_flags_Target: Dead
    exc_flags_Target: Non-critter
    mode_Target: Area
    radius_Target: 20
    ai_type: ai_action_offensive
    and here is the final script

    file name: Spell802 - Scintillating Sphere.py

    location: data/scr/

    Code:
    from toee import *
    
    def OnBeginSpellCast( spell ):
    	print "Scintillating Sphere OnBeginSpellCast"
    	print "spell.target_list=", spell.target_list
    	print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
    	game.particles( "sp-evocation-conjure", spell.caster )
    
    def OnSpellEffect( spell ):
    	print "Scintillating Sphere OnSpellEffect"
    
    	game.particles( 'sp-Scintillating Sphere-conjure', spell.caster )
    
    def OnBeginRound( spell ):
    	print "Scintillating Sphere OnBeginRound"
    
    def OnBeginProjectile( spell, projectile, index_of_target ):
    	print "Scintillating Sphere OnBeginProjectile"
    
    	#spell.proj_partsys_id = game.particles( 'sp-Scintillating Sphere-proj', projectile )
    	projectile.obj_set_int( obj_f_projectile_part_sys_id, game.particles( 'sp-Scintillating Sphere-proj', projectile ) )
    
    def OnEndProjectile( spell, projectile, index_of_target ):
    	print "Scintillating Sphere OnEndProjectile"
    
    	remove_list = []
    
    	spell.duration = 0
    	dam = dice_new( '1d6' )
    	dam.number = min( 10, spell.caster_level )
    
    	game.particles_end( projectile.obj_get_int( obj_f_projectile_part_sys_id ) )
    	game.particles( 'sp-Scintillating Sphere-Hit', spell.target_loc )
    
    	for target_item in spell.target_list:
    
    		if target_item.obj.reflex_save_and_damage( spell.caster, spell.dc, D20_Save_Reduction_Half, D20STD_F_NONE, dam, D20DT_ELECTRICITY, D20DAP_UNSPECIFIED, D20A_CAST_SPELL, spell.id ):
    			# saving throw successful
    			target_item.obj.float_mesfile_line( 'mes\\spell.mes', 30001 )
    		else:
    			# saving throw unsuccessful
    			target_item.obj.float_mesfile_line( 'mes\\spell.mes', 30002 )
    
    		remove_list.append( target_item.obj )
    
    	spell.target_list.remove_list( remove_list )
    	spell.spell_end( spell.id )
    
    def OnEndSpellCast( spell ):
    	print "Scintillating Sphere OnEndSpellCast"pellCast
     
  14. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    tried entering in a spell at 595 instead of 802+, the game started to CTD, so i removed the changes, but the CTDs remain >_< grarrrr!
     
  15. vampiricpuppy

    vampiricpuppy cuddly nosferatu

    Joined:
    Dec 4, 2006
    Messages:
    565
    Likes Received:
    0
    fixed the ctds, back to where i was...

    >_<
     
Our Host!