Soulforged wrote:It's actually scripting related too. I want to know if there's any commands or functions available to:
1- Take XP points from the player character. I want to place this command on the dialogs. I know how to give players an increase in their stats through commands (pc.BumpStat ("[StatName]", "#")), but I don't know how to decrease them permanently, except for Humanity (wich is FindPlayer().HumanityAdd(-1), thuogh it doesn't work with other stats).
I spent about an hour trying to figure this one out. I don't have a solution for you, and I don't think there is one. It looks like the mechanics just aren't there. When the game awards experience to the player, it uses the AwardExperience() function. This function takes a string argument which corresponds to a name in the experiencetables.tx file found in the Vampire\vdata\system folder. How much xp is given to the player is determined by the experience tables. All values in the experience tables are positive, and trying to change them to negative doesn't work.
Alternatively, you could use a little math in tandem with the giftxp command. Giftxp sets the player's current experience to a specified ammount, overwring whatever was there previously. If the player has 10 xp and you want to reduce it by 2, giftxp 8 would do the trick. You can calculate what value to use with the giftxp command with a simple subraction.
pc = __main__.FindPlayer();
newXP = pc.experience - x
giftxp newXP
Where x is the ammount of experience you want to take away from the player. This approach doesn't work either. The giftxp command will only take 0 or a positive integer as an argument. Try to pass it anything not an integer, like a variable name, and it becomes confused. Doing this from within the console results in the player's xp being set to 0. Doing it in a script gives you a syntax error.
No matter how you try to script it, you would still end up having pass a variable to giftxp, which just doesn't work.
You might try asking this on the modding forum over at planetvampire. Those guys have a lot more experience hacking at this game than I do. Wesp, the guy who makes the unofficial patches, includes his e-mail address in the patch notes. He might know a way this can be done.
2- Restore all Vitae Points or at least increase the rate at wich they heal in a particular situation. I want to make an script that gets called everytime you enter your haven (any of them) and restores all your vitae points. If anyone knows at least how to increase its healing rate in a particular situation (that is, not on the system, because I know how to do that, but through an script wich runs and then breaks everytime), I could achieve the same effect.
I need something cleared up for this one. Do you know a console command to restore health or increase the player's regen rate? I've been trying to find one forever with no luck. If you do know one, then all you'd have to do is execute the command in a script, then attach the script to a logic_auto node in the sm_apartment_1.bsp the la_hub_1.bsp map files. You can do this by using the Map Tools tab of Turfster's .vpk extractor. Open the map file and search for "posterCheck()," a function that runs every time you enter a haven to see which posters should be up. You should find something like this:
{
"classname" "logic_auto"
"spawnflags" "0"
"OnMapLoad" ",,,0,-1,malkTalkToTV(),"
"OnMapLoad" ",,,0,-1,posterCheck(),"
"OnMapLoad" ",,,0,-1,unlockHaven(),"
"OnMapLoad" ",,,0,-1,heatherHaven(),"
"origin" "-56.3879 -37.2917 921"
}
Well, that one's actually taken from the Skyline apartments map, but it's close enough. Add another line that copies the posterCheck() line exactly, but replace posterCheck() with the script you wrote that calls the health restoring command. Then just click on "Write New Data" and you're done.
This would make your script run once every time you enter your haven. Excercise extreme caution when tampering with your map files. The slightest mistake can result in serious errors. Make a backup of the files first so you can restore them if something goes wrong. Also, you'll have to start a new game after changing anything in the map files. Maps change as you progress in the game. Items and NPCs dissappear, or new ones show up. All of this is recorded in your saved game files. Changing the maps then loading a previously saved game will result in all kinds of weird bugs.