Okay here it is, the new spell zip

Discussion in 'General Modification' started by darmagon, Nov 29, 2005.

Remove all ads!
  1. Zebedee

    Zebedee Veteran Member Veteran

    Joined:
    Apr 2, 2005
    Messages:
    1,755
    Likes Received:
    0
    re. Agetian's save. It looked like a 100% reproducible case of spell permancy. Darned odd. Tried casting spell in Hommlet, same results. On the last tick of the spell, the top and bottom 'flags' both reset to 14/14. The top 'flag' vanishes. the bottom one remains stuck on 14/14.

    This doesn't happen with my saved game with a consoled wizard which is perplexing.

    (minor: also tried out delayed fireball with agetian's save. Got the same result, so it's not a corrupt save issue with my initial game, doesn't rule out something specific to my system however).
     
  2. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Thanks for that Shiningted, but unfortunately, I already know all of that. I want to be able to get a handle on the data structure of the inventory in memory, and do things like loop over the objects in inventory in a script.

    For instance in tenser's transformation I wanted to be able give the caster martial weapon proficiency all as requried by the spell. couldn't figure out how to do that so i decided just to change the weapon type of all weapons in the caster inventory to quarter staff. In order to do that, given what I know, I would have to make item_find_by_proto or item_find calls for all the weapons available in the proto. There are a lot of weapons. And if more get added later after my spell is released I would have to go back and add the call for that new weapon. I ended up just using the item_worn_at so I could change the weapon type of what the caster is wielding. A fair enough solution I guess but not really satisfying......

    If I had access to the inventory I could just loop over all objects in it and find out which of those were weapons using obj_get_int and change their weapon types using obj_set_int.



    Anyway sorry for the information overload. This problem with the inventory has been haunting me since I started learning about modding this game and it keeps on coming up and it p***** me off to no end that I can't figure out how to get a handle on it in a script :)

    Darmagon
     
  3. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Okay, I have spent the day trying to find a way to make all of the spells foolproof. And it has been more like an exercise in the proof of fools. I am not going to list here everything I tried because the list would be too long and probably too much for anyone to even want to contemplate reading. But do you know what, again it comes back to, if I could get a handle on an inventory in a script, I would have no problem......Hmmmm.

    Anyway I am done for the day. Again the advice is the same. If you are using these spells: don't change maps and don't save games until the spell effects are done. Sometimes the spells work across saves or map changes and sometimes they don't.

    And as far as Agetian's problem goes I have no idea. Agetian, if you could e-mail me your saved game I could add it to the pool of things to investigate tomorrow.

    Darmagon
     
  4. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    Sure, I can, but I don't know your e-mail address... Maybe you can PM me your e-mail address so I can contact you?

    - Agetian
     
  5. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Okay all, been doing some serious rework of these spells given the nature of the problems. Have gone into an area that I started to explore with my research into protection from spells. Things were getting flaky, wide ranging and far-fetched with that stuff, which is why I decided to give up on protection from spells and a few other spells for now and concentrate on getting these spells done. However, some of the stuff I had done in that regard turns out to be useable with these spells. I had already kinda used some of it but for the reasons given above I gave up on that track and decided to go with a 'safer' route.

    The safer route turned out not to be so safe. As the problems with 'Tensers Transformation' et al. exhibit. So I have been experimenting with and enhanciing the less safe route and it is working out better than I had expected. So much for intuition :)
    Anyway, I am hoping to get everything into shape for a major re-release within a few hours or by tomorrow.

    Agetian>> got your save file but unless it is essential for you to keep it, it will soon be redundant. If you need the save fixed I will see what I can do about it. Oh, and maybe you might know the answer to this: does the game do a complete reload when you try to load a saved game if you already have a game loaded? or does it somehow try to do a minimal load of the differences between the games? I am not sure how that would work or even if it could work, but it might explain some of the inconsistencies I have been encountering.

    Anyway, just one more thing everyone. Delayed blast fireball has just become my favourite spell. You can pick up the spell object and take it wherever you want (so long as you don't change maps ) drop it, and have the spell fire from there, as per the spell description.(there might be a problem if you take it too far. )I may even be able to overcome the map change problem.:)

    Oh and bye-the-way, and with reference to the above, does anyone have any idea about the limitations of the the various game.obj_list functions? game.obj_list_vicinity seems to get me almost everything on the game display unless they are not in line of site of the location (although sometimes it will get those too, I think) obj_list_range (which I would think would give me everything within the stated range) usually gives me less than vicinity does, obj_list_cone seems to be the most useful if I set the degree argument to 360 but sometimes doesn't give stuff out of line of sight and might have other problems I am not sure about yet.

    Darmagon
     
  6. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    That'd come in handy, especially as a lot of other spells (invisability sphere for example) also suffer with the same problem.
     
  7. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Don't know if my solution can be applied to those problems as my spell requires the existence of a spell object..... Hey wait a minute. Well no, I don't really know, I would have to look into it. Let me get my stuff done and maybe I'll have a look.

    Actually, no, on second thought Allyx it is not the same thing. Invisibility sphere acts like cloudkill and some other spells which were the ones giving me the major headaches when working on protection from spells. I can't get a handle on their activity. To get a handle I would have to rewrite their scripts completely( at least as far as I can see right now.) Sorry.

    Darmagon
     
  8. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Okay guys. it is going to be tomorrow before the new versions of the spells are done. Not sure exactly when but, at best, after 6:00 pm GMT, Tuesday Dec. 6, 2005.

    Darmagon
     
  9. Zebedee

    Zebedee Veteran Member Veteran

    Joined:
    Apr 2, 2005
    Messages:
    1,755
    Likes Received:
    0
    Looking forward to it :)
     
  10. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    I'm quite sure that the game makes a lot of .dif files in the saved game that store differences between the mobile objects, sectors, and other stuff in the game. So, the saved game pretty much contains differences between the default map data and the information in the objects updated during playing. However, I'm not sure about a situation when you already have the game loaded. I'm not really positive about the fact that the game would try to load only the differences between the currently loaded game and the game stored in a saved game being loaded, since it would make the initially made .dif files almost useless, and will complicate the loading scheme. However, I'm not exactly sure about it.

    - Agetian
     
  11. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    Damn special cases. Okay here is the deal: I have run into a snag with tensers transformation. I want to be able to change the weapon type of the weapon the caster is wielding so that he or she can use it without penalty. (the spell calls for givng the caster proficiency with all weapons the same as a fighter but I don't know how to do that.) Changing the weapon type is easy, and marking the particular weapon to be found later so I can change things back is also easy. But finding the weapon to change later on is the difficult part. I need to be able to find the proto id of the weapon but there is no function which does that. I can get the name of the weapon but that is not always the same thing. Some of the weapons in the protos do have the name defined, and in most such cases the name is the same as the proto id. For the weapons that don't have the name defined the fix is easy, though tedious and time consuming. For those, I just have to go through protos.tab and enter the proto id in the name field. Like I said easy but time consuming and very tedious.( I guess I could write a program that would do it, but that might take as long as doing it manually and as a one time thing wouldn't be worth it.) For the weapons that have names defined which are different from the proto id ( only half a dozen or so) I can just code as special cases in the spell script. My worry is if any 'new' weapons get added and the person who adds them doesn't know about this problem. If they disregard the name field as unnecessary or if they decide to give a name that is not the same as the protos id then that weapon won't work with this spell.

    AFAIK the name attribute is the only attribute I can use in this regard. If anyone knows of another attribute that will give me the proto id and not just the name, let me know. I have tried using obj_get_int(obj_f_prototype_handle) but that gives me a CTD (both when I use the variable name and when I use the actual value (429).

    If no one has any ideas then I am going to go ahead and change the protos to make all of the weapon names (except for the special cases as noted above) equal to the proto id and rely on future modders to do the same..

    Needless to say this is going to delay my re-release as my testing is going to have to come after this change.

    EDIT: bye-the-way does anyone know if new weapons with names that don't match the protos number have been added to the game by any modders? I don't see why this would be the case ( I don't see why any of the names are different from the protos numbers to begin with :confused: )

    EDIT: One more thing does anyone know if any of the names for anything in the protos overlaps with any of the weapon proto numbers? Damn this is getting complicated. I may have to exclude the weapon thing from a new release until all of this is cleared up. Thx.

    Darmagon
     
    Last edited: Dec 6, 2005
  12. Cujo

    Cujo Mad Hatter Veteran

    Joined:
    Apr 4, 2005
    Messages:
    3,636
    Likes Received:
    1
    I'll start adding to the name field for all the new weapons I make t omake life easier for you.
     
  13. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    True, especially with Kalshane redoing the whole protos.tab, it would have to be done twice. BUT if someone did it, (and for NPCs) it would make all our lives easier in future. Not your job, Darmagon, just something for us all to keep in mind.
    There is npc.item_transfer_to_by_proto(pc,####), can you fashion a get function out of this?
     
  14. darmagon

    darmagon stumbler in the dark

    Joined:
    Mar 22, 2005
    Messages:
    295
    Likes Received:
    0
    No but thanks for trying Ted:) I am using pc.item_worn_at(3) (3 is the weapon slot) in OnSpellEffect to get a handle on the weapon wielded. It could be any weapon in the game and I need to get its proto number so I can find it again in OnEndSpellCast. and reverse the changes. If I had some way to get a handle on the inventory things would be whole lot easier. (whoa, that last sentence was just like deja vu all over again :))

    Anyway the protos is changed and may have to be rechanged again and again and again..... And I have started testing but I have to get to work now so will be back at it after that.

    Darmagon
     
  15. bradrinwi

    bradrinwi Established Member

    Joined:
    Mar 18, 2005
    Messages:
    226
    Likes Received:
    0
    darmagon talked to allyx and i MIGHT have a simple workable solution to the wish spell..


    cast wish (the script for wish places a magic object called genie in your inventory)

    using genie.. can do one of two things...1st option...

    it offers you a coice of magical effects...
    (i know there is a limit to the number of different ones.. so if you want to run a poll etc your call)

    second option.. genie when used summons an other more specific item.... into your inventory if you can work a way to choose specifc magic effect.../item spawned..OR maybe the main genie contains a string array of various lessor genies.(items)yes i got this idea from the bag of holding being discussed..... with a limited life span..
    so the caster would then choose per trader menu.. which specifc wish he wanted...


    so basically a magic item is spawned in your inventory and when used the item places a second item in your inventory...
    or a npc trader called genie is spawned..and offers you an array of magic items each with one one use wish effect...
    might want to talk to the guys working on bag of holding cause this is kinda like that....

    allyx and blue i think..

    has to be easier than hacking the radial menu and dll to heck...
    though im gonna have to do that once i rebuild my research

    for other reasons...

    yes this does limit you to 5 or 20 possible effects..unless you make wish into a bunch of spells each one with one effect..then youd have like 20 9th lvl spells and have to pre decied which wish to memorize unless your a sor

    but even with a limit i suspect polling would show marked preferences and obvious trends for how wish would be used.. given the limits of parser and the toee engine tobeing with...


    should work i think..
    and it would avoid the dialoge box crashes especially if you didnt use one

    could spiff it up with a voice track.."your wish my lord"or some such nonsense
     
Our Host!