Dehu
VTMB Mod Creator
Global Moderator
Poster
    
Posts: 316
|
 |
« Reply #5 on: August 01, 2009, 08:24:00 AM » |
|
Here is a walkthrough tutorial for anyone else that wants to play around with changing companion stats or adding companions that dont come with the mod by default:
1) Start new game (Skip Intro) 2) From Tutorial, open console and use the "map" command to teleport to the map where your character is. For this example I will do Copper:
map sm_peir_1
(The list of maps autopopulates when you type map)
3) Once in the map, type "picker" in the console. 4) Walk up to the NPC you want to make a companion. There should be a name field on the information box that appears around them. 5) Open console and type:
npc = FindEntityByName("<NPCNAME>")
so for Copper, I type:
npc = FindEntityByName("Copper")
6) In console type "npc.model". This will return the model string of the NPC. For copper, it returned:
'models/character/npc/unique/Santa_Monica/Copper/Copper.mdl'
Write this value down, or highlight it and hit CTRL + C to copy to the clipboard. You will need it later
7) In console type:
companion.addToParty(npc)
This will add the NPC to you party. If you possess them at this point, the game will report that they are human and have (basically) no stats.
8 ) Save your game while you are NOT possessing the new NPC. 9) Exit the game 10) Open up the file
<VTMB INSTALL>\Vampire\python\statutil.py
11) Add the model string to the IDLookup Table:
Around line 76, you should see the end of the IDLookup table. The IDLookup table translates NPC model strings to a unique number which we in turn use as a row number in the stats table (also located in statutil.py).
You need to add the model string that you wrote down earlier to the end of the Lookup and assign it the next sequential number.
If you copied it to the clipboard, I recommend pasting it after the last entry first. Then make a copy of the last entry (Highlight, copy to clipboard, paste). Change the model string of the newly pasted entry to the new NPC's model. Update the number and correct the end of the previous line so that it indicates continuation (remove end of table bracet "}", add comma and forward slash).
For copper, the last 2 lines looked like:
"models/character/monster/boo":43, \ "models/character/npc/unique/santa_monica/copper":44}
Notes: - Copper's model string does NOT include the .mdl file. The model string should be the DIRECTORY that contains the NPC's model - There should be no capital letters in the model string.
12) Add a new corresponding entry to the stats table:
Around line 152, you should see the end of the stats table. Create a new entry at the end. The easiest way is to once again, copy+paste the last entry and then correct the end of the next-to-last row so that it is no longer the end of the table. In this case, the stats table is a python structure called a tuple, which uses ")" instead of "}" to indicate the end of the structure.
For testing, I then simply update the name of the last entry to the name of the NPC. I can come back later once I test to change Coppers stats and powers to be whatever I want.
For copper, the last 2 lines of stats looked like:
("Boo" ,18 ,2 ,9999 ,( ....... ,-1 )), \ ("Copper" ,18 ,2 ,9999 ,( ....... ,-1 )))
(Obvisouly "......." just means the line was too long, so I truncated for this example).
You can now restart VTMB, reload your save game and when you possess Copper, you should see the new stats.
|