Help: editing the invensource.mes file makes game QTD

Discussion in 'General Modification' started by 0rion79, Jun 9, 2005.

Remove all ads!
  1. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    Modders, did this happen to you too?
    Whenever I try to change the values in that file to Elmo, the game always quits do desktop everytime I start it. I use only the Co8 protoed 2-4-3 and nothing else.
    An example is: {Elmo: 100,4112} Is there anything wrong in this? I don't understand.
     
  2. Morpheus

    Morpheus Mindflayer Veteran

    Joined:
    Nov 11, 2003
    Messages:
    539
    Likes Received:
    1
    Dunno exactly, but maybe there's a conflict with other game code that expects Elmo to have certain items?

    Elmo's is the only line you have changed?
     
  3. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,009
    Likes Received:
    255
    I was under the impression that invensource.mes is connected to a whole bunch of .mob files, I tried adding a few items to barter lists but they dont show up.
     
  4. Morpheus

    Morpheus Mindflayer Veteran

    Joined:
    Nov 11, 2003
    Messages:
    539
    Likes Received:
    1
    Yeah, normally the stuff in invensource.mes is overridden by .mob files. Editing invensource.mes has absolutely no effect on most shop inventories (except for the few that refresh over time, like the blacksmith shop). However, it seems strange that this should cause a CTD in Elmo's case.
     
  5. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    No, I didn't yet for a lack of time.
    This is a pity, because I wished to make Elmo to start with a magic axe (1d6 x 3)+1 and a buckler+1 all instead of the large shield+2, so that to make him more interesting (he likes axes) and with an equipment more in line with his ranger class and 2-weapons fighting style, but it looks like that it involves editing too many files. Maybe it is just up for me and I wonder why Troika's did things so complicated instead than making a column in the protos for monsters' equipment. (1 slot x head, 1 for cloacks, 1 for main weapon, 1 for shield and so on)
    As well for the balor: the original one uses a vorpal longsword+1 and a flamming wip+1, that I created using a spiked chain, and I wished him to be stronger and fight with 2 weapons, but 1 thing is editing the protos to fix, for example, a will of the wisp. Another one editing all those files.
     
    Last edited: Jun 10, 2005
  6. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Also tried to edit barter lists, also failed, and also heard from Agetian its a mob thing.

    Ummm Orion, what about Elmo's .py file, 00091 for memory. That assumes certain items are present i think. (Just a suggestion off the top of my head).
     
  7. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    Code:
    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
    
    def equip_transfer( attachee, triggerer ):
    	itemA = attachee.item_find(6011)
    	if (itemA != OBJ_HANDLE_NULL):
    		itemA.destroy()
    		create_item_in_inventory( 6011, triggerer )
    	itemB = attachee.item_find(6016)
    	if (itemB != OBJ_HANDLE_NULL):
    		itemB.destroy()
    		create_item_in_inventory( 6016, triggerer )
    	create_item_in_inventory( 7001, attachee )
    	return RUN_DEFAULT
    Ok, this is what I found in the py file but I have no idea about how to mod it nor what would happen with another value. More, is this a file somehow linked with mod files? I assume that I should extract those files from somewhere, but I've no idea about how to.
    Ah... I tried to add a puny item to Balor, but it QTD again.
    ID is for.....
    6011: leather boots
    6016: cloth armor
    6049: chainmail +1
    6051: shield+2
    4098: battleaxe +1
    7001: silver coins
    Everything looks regular but I don't understand why there should be a cloth armor in elmo's inventory.
    It is a pity that Livonya is not posting anymore due to interent connection problems, she would know what to do since she already builded up the revenge quest team, including the 2-weapons fighting assassin.

    Ok, I did some more test: those py files are the main files for NPCs' equipment and Word is enough to modify them without altering the format. I changed elmo's shield into a masterwork buckler and it worked fine, even if I have the suspect that he "equiped" it only when he reached the party. BUT in his inventory there are a magic dagger and 3 pearls too that comes from nothing: they are not listed in the py file or at least I didn't see them.
    More, I don't understand why all that long scrypt for cloth armors and leather boots. Wouldn't it be better just to delete them? I found Liv's assassin.py file but I can't recognize any particular string related about adding weapon X to secondary weapon. I wonder if the game automatically assigns the lightest one to the secondary hand if the NPC has the 2 wepon-fighting feats listed in the protos. let's do someother test BUT please poste something if you have some useful clue.
     
    Last edited: Jun 10, 2005
  8. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Does anyone find the font here slightly SMALL? :doh:

    Elmo having 2 sets of gear goes back to the module: in this case, it is simply that he has 'used' the money u gave him to buy new armour (of course he had his magic mail already, but u gotta pay to see his hand).

    Looks like I was wrong about the items in his pack, they are simply created on the spot and no won't cause the CTD.

    O btw... u r modding in Word? That sounds bad, it will save as a Word document rather than leaving it as a .mes (i think...) Have u tried just using Notepad? And when u say u get a CTD, when? When it is initially loading up (the blue bar is going along after the opening movies)? This means either trying to load a broken .mes file, or an internal call from a 'rules' file to a 'descriptive' file that doesn't have a matching entry.

    Think about it. If you are sure the file makes sense as it is, ask yourself, what other file might be trying to read it?
     
  9. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    "Looks like I was wrong about the items in his pack, they are simply created on the spot and no won't cause the CTD." Yeah, you are right: infact killing him won't allow me to loot any of the items that he has when I hire him.
    now the questions are:
    1 - where an hell did he brought 3 magic items for only 200 GC, when the Brother Smith sells only normal and masterwork items?
    2 - where are the items owned by default from a NPCs, then?

    About Word, I don't know what to say: I expected the game to QTD and istead it worked fine, switching Elmo's +2 shield wih my masterwork buckler.
    I experimented the QTD problem when I edited the invensource.mes file with the protos editor, since adding, removing or replacing any item will cause my game to QTD when loading the blue bar (like loading a broken file).
     
  10. Morpheus

    Morpheus Mindflayer Veteran

    Joined:
    Nov 11, 2003
    Messages:
    539
    Likes Received:
    1
    Hey Ted, you can change the forum style to one with larger fonts, or even back to the good old vBulletin3 standard one. Just scroll down all the way until you see a dropdown list to the left.

    0rion79: You shouldn't edit those files in Word, really. If you absolutely have to, make sure to save them as plain text files.

    Another suggestion: Instead of editing one of the existing inventories, just add a new inventory line at the bottom of invensource.mes and then adapt the invensource number in protos.tab accordingly. That worked fine for me.
     
  11. Cujo

    Cujo Mad Hatter Veteran

    Joined:
    Apr 4, 2005
    Messages:
    3,636
    Likes Received:
    1
    ...what he said

    :imwithstu
    Yeah Ted you were here when the changes happened, there was almost instantly a thread about it, and if your not talking about the forum style, then no its fine and dandy.

    [edit] *here = online when it happened
     
    Last edited: Jun 10, 2005
  12. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    Morpheus, thanks for the clue, but, using D&D words, I'm going through modding with no skill points but with intelligence modifier only :)
    So, I would glady appreciate if you could post a sample and anyway, why should I do that? If I ADD items, then there is the risk that many characters will get overburdened soon.
    Ah, for me the fonts are fine.
     
  13. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,746
    Likes Received:
    375
    Thanks Morpheus, wondered what that drop-down list was for :p

    Orion, Elmo DOESN'T buy the magic gear, its his own. He just wants your money, so he says, "I can come but i got no gear, gimme 200gp", u give him the money, and then he turns up with a bunch of magical stuff that he supposedly bought on E-bay for a real bargain. Its all part of his drunken oaf routine - of course, he is really an experienced warrior with equipment to match.
     
  14. 0rion79

    0rion79 Established Member

    Joined:
    Apr 9, 2005
    Messages:
    573
    Likes Received:
    0
    Good explanation: I dind't know that e-bay could reach in parallel-universes too :D
    Anyway, I still have my ideas very confused about how to add items to NPCs and how to have an NPC using 2 different weapons.
     
Our Host!