Troika needs your help if... (please read)

Discussion in 'General Modification' started by Sol Invictus, Dec 3, 2003.

Remove all ads!
  1. Wauthan

    Wauthan Member

    Joined:
    Nov 24, 2003
    Messages:
    15
    Likes Received:
    0
    Thanks for the link Zhuge. It sure cleared up a lot of questions I had. Any more gems like that one?

    So in short I can assume the following.

    - InvenSource.mes is a sort of failsafe file. Whenever an NPCs inventory is reset the game checks this file in order to see what items that should be in it.

    - The inventory of an NPC is only reset if another file, not a .mes, tells it to do so. This file might also contain the countdown for this to happen.

    - The only inventories that DO reset at this moment are some of the shops. Homlet smith and leatherworker, Otis and potion vendor in Nulb.

    - Some mystery file is responsible for listing what items that are added to (and deducted from?) an NPCs inventory. Prime example is Elmo who gains a Battleaxe+1, Medium shield +2 and chainmail+1. Or {4098},{6051}and {6049}. I guess this is what happens to Scorpp as well since he keep putting the crossbow in his hand.

    - In order to get Scorpp to not use the crossbow I would first need to identify what file is responsible to resetting npc inventory. Then add a line to it that refer to Scorpp so he will be reset quickly after the module is loaded. Then edit his line in InvenSource.mes so he loses the Crossbow or give him a magical reachweapon that's more potent. And to finish it off I need to find the unknown file that adds items to the inventory so that when Scorpp joins the Crossbow would be back in his inventory again. Pheew!
     
  2. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    I can't figure out Scorpp's case but I think I can throw some light on Elmo's case.

    Look up py00091elmo.py (scr section of ToEE4.dat)

    It has the following lines:

    def elmo_joins_first_time( attachee, triggerer):
    triggerer.money_adj(-20000)
    create_item_in_inventory( 6049, attachee )
    create_item_in_inventory( 6051, attachee )
    create_item_in_inventory( 4098, attachee )
    # game.fade(600,0,0,1)
    attachee.item_wield_best_all()
    return SKIP_DEFAULT

    That's how Elmo gets the items.
    Through a create_item_in_inventory( x, attachee ) Python line where x is the object or item number.
     
  3. Shin

    Shin Established Member

    Joined:
    Oct 7, 2003
    Messages:
    115
    Likes Received:
    0
    I came to the same conclusion as you Z, and therefore, I added a magic sword to Spugnoir, started a new game, went directly to him for checking. The result was disapointing, for there was no sword in his inventory.
     
  4. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Ok, ok... with my very limited intelligence and my non-existent programming knowledge I really can't figure it out why InvenSource.mes refuses to work (if it is the file responsible at all in the first place). ???
    Who knows it may be hardcoded. Probably not though.

    Anyway how about a little shift in our aims and use Wauthan's approach. Instead of figuring out InvenSource.mes, how about playing with Python scripts. Can we take that crossbow away first and give it back later when he joins? I'm no good at all with Python though. Any suggestions?

    The relevant script here would be py00177scorpp.py
     
  5. Bob the Elf

    Bob the Elf Member

    Joined:
    Nov 21, 2003
    Messages:
    28
    Likes Received:
    0
    I'm not sure when you guys kept bashing your heads on invensource.mes, I'm very sure of what I wrote in my previous post :).

    As for getting scorpp not to use the crossbow, good luck. From what I've seen it's tied to the AI that auto equip npcs with their best weapons (not the weapon they are most proficient with), in this case a crossbow +1 or +2 I'm not too sure.

    The only thing you could do with a script would be to remove the crossbow completly, perhaps a dialog option to buy it and the scroll of control plant...


    -edit- and if you want a good proof that invensource.mes works change the inventory of a random encounter npc like pirates and go hunting. I havent tried it but I'm sure it'll work :p
     
    Last edited: Dec 5, 2003
  6. Shin

    Shin Established Member

    Joined:
    Oct 7, 2003
    Messages:
    115
    Likes Received:
    0
    Yes, I or anyone else could make changes in the dialogue script so that when you talk to Scorpp for the first time, he then gives you both the crossbow and the spell scroll. But before getting to that ugly solution, I'd like to see if Smoret or Nguyen or anyone else mind unveiling the secret of the foggy ToEE mechanism
     
  7. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    I was thinking more of making changes to a .py file.
    I suppose we could use the same create_item_in_inventory command to give back the crossbow but we need to delete that crossbow in the first place. Couldn't find a delete_item_in_inventory command in Phalzyr's list of Python commands.

    Found:
    obj.object_flag_set(OF_OFF)
    obj.object_flag_unset(OF_OFF)

    Have no idea if these work though...

    If we have no other way, editing .dlg will have to do. Then again probably leaving Scorpp as he is after changes 1-4, might be just as satisfactory.


    We could work on something else in the meantime if we're stuck on this one. Say Amulet of Mighty Fists +X. It currently gives +X to attack bonus but doesn't give +X to damage. Any ideas on how to get around this one?
     
  8. Bob the Elf

    Bob the Elf Member

    Joined:
    Nov 21, 2003
    Messages:
    28
    Likes Received:
    0
    I dont think there's much we can do with the amulet unless you know where the different enhancement bonus are stored (ie where's the code that dictate how + to CHA is applied, etc).

    The only think I can think of right now would probably only make things worse and would be to give it a flat +1 +2 etc... that's would be applied to any class tho.
     
  9. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    The bonuses are currently coded as:
    Col171 Amulet of Mighty Fists
    Col172 X (enhancement of amulet)

    No idea on how or where they store it but the output comes out as an AB bonus only.

    It's not class specific. Non-Monks can use it if they are fighting unarmed. It should work on unarmed attacks and natural weapons (that means shapeshifted druids, ie bear claws, etc) but it should NOT stack with weapon bonuses.

    Is there some way to block out both hand slots when the amulet is equipped? If we could do that we could just slap on a regular enhancement bonus and would not need to worry about it being stacked with weapon bonuses.

    Col61 (equipped slots) for the amulet is:
    OIF_WEAR_RING_PRIMARY OIF_WEAR_RING_SECONDARY
    OIF_WEAR_NECKLACE

    Any suggestions for altering this and whether it could be done?
     
  10. Bob the Elf

    Bob the Elf Member

    Joined:
    Nov 21, 2003
    Messages:
    28
    Likes Received:
    0
    Yes I've seen this part, but the problem is that AFAIK we dont have access to the the code for "Amulet of Mighty Fists" bonus, all we can do is play with the col 172 and 173 (the attack and dmg bonus). Since the bonus isnt coded properly, toying with it's property is somewhat pointless.
     
  11. Shin

    Shin Established Member

    Joined:
    Oct 7, 2003
    Messages:
    115
    Likes Received:
    0
    Agreed, we need the access to the program lines that describes the *feat* : "Mighty Fists".

    If we could put our hands on source codes for correction like that one day.... OMG! :D We finally can add/correct/modify D&D rulesets!!! :D
     
  12. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Posted an update regarding:
    1)Scrolls uncopyable to spellbook
    2)Spell unscribable to scrolls

    Resolved quite a number some of which were still not covered in v2.0 Co8 patch. Hopefully these are the last.

    However there is still one uncopyable scroll which is till bugging me, namely {9467}{Scroll of summon monster I}
    Col312 seems Ok at first glance. Not sure what else is causing it to be uncopyable.

    EDIT: Oops, forgot to say that the update was posted at the Unfixed problems sticky thread. Sorry.
    Umm... any ideas regarding Summon Monster I?
     
    Last edited: Dec 6, 2003
  13. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Yo, guys! C'mon let's discuss somethin'. It's too quiet again. In fact, it's so quiet that Ausir decided to do something really drastic just to stir you guys up. <tongue firmly in cheek wink>
    Uhh... yeah, it means if we don't start doing something active, the mod forum will be next... <gulp>

    Scared now?!? :p

    Ok, anyway, I've just mailed Steve Moret the first list:

    ITEMS
    1)Fixed problems with armor/shield skill check penalties (post patch) [14+ items]
    2)Fixed misc issues with item weight (Col51)/price Col52)/magical flags (Col50) [9 items]
    3)Fixed issues with uncopyable spells [10 spells], unscribable scrolls [3 scrolls], scrolls with no spell prerequisites [1 scroll], uncraftable wands [1 wand]
    4)Fixed enhancement bonus of Holy Longsword
    5)Modified stats for Great Cleaver
    6)Changed all javelins to 1 handers
    7)Partial fix for Javelin of Lightning
    8)Partial fix for Potions of Eagle's Splendor, Heroism, Superheroism
    9)Suggested fix for Chime of Opening
    10)Suggested fix for Oohlgrist's emerald belt
    11)Fixed Monks not proficient in halfling sianghams
    12)Fixed Blue Elven Chain not given as reward for Tillahi's rescue
    13)Pouch of Bullets added to Brother Smyth and Otis's store inventories and suggested putting in Plate Gloves and Plate Boots

    QUESTS
    1)Fixed Romag's 1st quest allows acknowledgement of killing snake even if you had not done so.
    2)Fixed Romag's 3rd quest allows acknowledgement of killing Belsornig even if you had not done so.

    SPELLS
    1)Fixed duration for Ice Storm
    2)Fixed duration for Guidance
    3)Fixed duration for Silence

    CREATURES
    1)Nerfed Scorpp's stats to reflect 3.5e SRD better and to prevent parties hiring Scorpp from being overpowered


    Everything should be in but whether he'll accept it is entirely up to him.

    So the next item on the agenda is figuring out whether we can make Bracers non-stackable. Anyone wanna give it a shot?

    In case you don't want to work on that one, howzabout working out scroll and wand DCs and effects. So far data on this has been rather inconsistent. I hope we can get the matter clarified.


    P/S - just kidding, Ausir... couldn't help myself... oh well it was a pretty slow forum anyway... :p
     
  14. zhuge

    zhuge Established Member Veteran

    Joined:
    Sep 27, 2003
    Messages:
    484
    Likes Received:
    0
    Currently Dismissal can still be cast on non-extraplanar creatures though its DC has been corrected.

    Tested spell on a PC. PC can't be dismissed. So the line:
    probably works Ok.

    Tested spell on an NPC (Paida). Paida fail Will save and is Dismissed.

    Tested spell on Paida after altering line:
    to

    Spell now doesn't affect Paida.

    So it appears there may be something wrong with the criteria:

    target_item.obj.npc_flags_get( ONF_EXTRAPLANAR )

    since it allows non-extraplanar NPCs to register as extraplanar ones.

    Any ideas what this criteria should be?
     
    Last edited: Dec 12, 2003
  15. rex_blade

    rex_blade Established Member

    Joined:
    Oct 9, 2003
    Messages:
    168
    Likes Received:
    0
    Yeah, i added some new items to Smyths shop before commenting those lines out and they showed up for the most part ok. However nobody else's inventories would update. Now, after correctly commenting out the instructions at the beginning of the fiel, other shop keepers STILL do not update their inventories.

    I believe that what is supposed to happen is that after you buy and item, the game engine waits a period of time and then checks the invensource.mes file and updates the inventory. So say you bought a red cloak from the tailor
    and he only as has one. but you have 2 party members that you want to put red cloaks on. Well as it currently stands, you can't. Becuase the tailor does not update his inventory.

    Also: just for the sake of mentioning: There is a cloak of resitance +4 in the descriptions.mes file. I haven't yet checked the protos to see if it really gives +4.

    I really hope troika fixes the shopkeeper bug. I would like nothing more than to add some new hoodless cloaks/robes and some new armors that i've been thinking of.
     
    Last edited: Dec 15, 2003
Our Host!