I've been trying to get the Fallout 2 scripting language down lately as I've been doing some minor modding of my RP 1.2 installation, and I'm hoping someone can give me a few pointers. I mostly like to add small, subtle things to the game that enhance the roleplaying aspect (which is what I enjoy most about Fallout/Fallout 2), and right now I've been working on making the player-character's relationship with Miria from Modoc more complex if the player chooses/is forced to marry her.
I'd say my scripting skills are at the beginner level, although I was able to completely tear apart the script from the latest "Miria Mod" (which, with all due respect to the various modders who have worked on it over the years, is in really bad shape at this point) and rebuild it line by line so that it now looks and works like all the other recruitable npc scripts (no "special" party change/armor change nodes needed, etc, in addition to several bugs fixed). Now that my "base" script for Miria is in good shape, I'm ready to start finishing the remaining additional parts I want but am not sure how to proceed. I'm certainly not looking for anyone to write any code for me, as figuring out how to do that on my own is as important (at this point) to me as actually finishing the job and getting it in the game. Rather I'm just looking for some general guidance on the best way to go about getting the end result I want.
The basic idea of what I'm doing with Miria is to give some depth to her character, and make her less a caricature and more like a "real" (simulated) wife. She'll have some basic desires, and her opinion of whether or not she has a good marriage with the player-character will vary depending on how these desires are addressed by the player. There are also variations on the relationship for good vs evil player-characters (an "evil" pc's dialogue with her is on the abusive side while a "good" pc offers her warm words, an evil pc can slap her around with a chance each time she'll get fed up and either leave or hit back, while if a good pc hits her she's so upset by such unexpected behavior she files for divorce the first time, etc).
Most of that is all done (and all the dialogue for the everything is written and formatted), but I'm not sure about how to do the remaining part where I try to simulate her wifely needs and expectations. Basically there are three subsets or kinds of dialogues the player can have with her:
1) Miria expects certain things from her spouse. Keeping in mind that "time" is very distorted/accelerated during gameplay, I've come up with the following for her (all accomplished through dialogue nodes):
--She wants the player-character to have a talk about how she's doing/how she generally feels at least once for every two months of in-game time that passes;
--She expects the player-character to have sex with her at least once for every two months of in-game time that passes (a female pc has an extra option to have a girly gab-fest with her, if desired, as a substitute for sex);
--She wants the player-character to give her a compliment her on her beauty at least once for every two months of in-game time that passes;
--She expects the player-character to express (non-sexual) affectionate feelings toward her at least once for every two months of in-game time that passes.
2) Miria has a general level of satisfaction or discontent with her marriage to the player-character that she's more than happy to discuss during conversations. Her opinion-level is mostly determined by whether all the conditions in (1) are met on a regular basis, but also modified based on whether the player-character is addicted to drugs, is a slaver, is a made-man for a New Reno gang, or has a bad general rep (-500 or worse). Although she's generally a supportive wife who appreciates her spouse doing whatever is necessary to support her, she'll nag about these last four things as they all worry her.
3) Based on the status of (2), Miria has changing opinions and dreams about the future of her marriage and her future life in general that she's willing to discuss with the player. The way that I play the game (which, again, is heavy on the roleplaying emphasis), her wifely input about what she'd like her life to be like after the player-character "saves the world" will help shape some of my decisions about what to do in the game. She has several different visions of her most desirable future, which will vary from game to game.
The main question I have is, what's the best general way to approach implementing (1), (2), and (3)? I'm thinking I should make four new global variables to store the most recent game time that each requirement in (1) is performed, and then use these stored times as the basis for checks to update (2). The current status of (2) would then be stored in a fifth global variable which can be checked to determine where she's at with (3).
I realise these sort of "sim" type additions aren't popular with everyone, but this mod is for my own game and I certainly wouldn't ask anyone else to endure it; I just need some help on the technical side. As I said earlier, I'm an amateur when it comes to scripting. I'm not sure if the methods I have in mind will work, or if there are far better ways to implement the whole thing or any part of it. For example, can/should local rather than global variables be used for anything here? Any general suggestions/tips/alternatives about the whole general approach I outlined above would be very helpful.
I don't want to get off course right out of the gate, but another issue I'm looking at is the way a divorce by Father Tully in New Reno is handled by game. After a divorce there, the script of the pc's spouse is actually destroyed and replaced by a very simple "ex-spouse" script, presumably due to a difficulty in making significant instant changes to an active character (i.e. Miria) based on what happens in a second character's (ie Father Tully's) script. I have other things in mind here and would like the Miria script to remain intact and active after a New Reno divorce. What sorts of things would need to be considered, technically, to address that situation?
Thanks in advance for any advice anyone has to offer on these issues.
I'd say my scripting skills are at the beginner level, although I was able to completely tear apart the script from the latest "Miria Mod" (which, with all due respect to the various modders who have worked on it over the years, is in really bad shape at this point) and rebuild it line by line so that it now looks and works like all the other recruitable npc scripts (no "special" party change/armor change nodes needed, etc, in addition to several bugs fixed). Now that my "base" script for Miria is in good shape, I'm ready to start finishing the remaining additional parts I want but am not sure how to proceed. I'm certainly not looking for anyone to write any code for me, as figuring out how to do that on my own is as important (at this point) to me as actually finishing the job and getting it in the game. Rather I'm just looking for some general guidance on the best way to go about getting the end result I want.
The basic idea of what I'm doing with Miria is to give some depth to her character, and make her less a caricature and more like a "real" (simulated) wife. She'll have some basic desires, and her opinion of whether or not she has a good marriage with the player-character will vary depending on how these desires are addressed by the player. There are also variations on the relationship for good vs evil player-characters (an "evil" pc's dialogue with her is on the abusive side while a "good" pc offers her warm words, an evil pc can slap her around with a chance each time she'll get fed up and either leave or hit back, while if a good pc hits her she's so upset by such unexpected behavior she files for divorce the first time, etc).
Most of that is all done (and all the dialogue for the everything is written and formatted), but I'm not sure about how to do the remaining part where I try to simulate her wifely needs and expectations. Basically there are three subsets or kinds of dialogues the player can have with her:
1) Miria expects certain things from her spouse. Keeping in mind that "time" is very distorted/accelerated during gameplay, I've come up with the following for her (all accomplished through dialogue nodes):
--She wants the player-character to have a talk about how she's doing/how she generally feels at least once for every two months of in-game time that passes;
--She expects the player-character to have sex with her at least once for every two months of in-game time that passes (a female pc has an extra option to have a girly gab-fest with her, if desired, as a substitute for sex);
--She wants the player-character to give her a compliment her on her beauty at least once for every two months of in-game time that passes;
--She expects the player-character to express (non-sexual) affectionate feelings toward her at least once for every two months of in-game time that passes.
2) Miria has a general level of satisfaction or discontent with her marriage to the player-character that she's more than happy to discuss during conversations. Her opinion-level is mostly determined by whether all the conditions in (1) are met on a regular basis, but also modified based on whether the player-character is addicted to drugs, is a slaver, is a made-man for a New Reno gang, or has a bad general rep (-500 or worse). Although she's generally a supportive wife who appreciates her spouse doing whatever is necessary to support her, she'll nag about these last four things as they all worry her.
3) Based on the status of (2), Miria has changing opinions and dreams about the future of her marriage and her future life in general that she's willing to discuss with the player. The way that I play the game (which, again, is heavy on the roleplaying emphasis), her wifely input about what she'd like her life to be like after the player-character "saves the world" will help shape some of my decisions about what to do in the game. She has several different visions of her most desirable future, which will vary from game to game.
The main question I have is, what's the best general way to approach implementing (1), (2), and (3)? I'm thinking I should make four new global variables to store the most recent game time that each requirement in (1) is performed, and then use these stored times as the basis for checks to update (2). The current status of (2) would then be stored in a fifth global variable which can be checked to determine where she's at with (3).
I realise these sort of "sim" type additions aren't popular with everyone, but this mod is for my own game and I certainly wouldn't ask anyone else to endure it; I just need some help on the technical side. As I said earlier, I'm an amateur when it comes to scripting. I'm not sure if the methods I have in mind will work, or if there are far better ways to implement the whole thing or any part of it. For example, can/should local rather than global variables be used for anything here? Any general suggestions/tips/alternatives about the whole general approach I outlined above would be very helpful.
I don't want to get off course right out of the gate, but another issue I'm looking at is the way a divorce by Father Tully in New Reno is handled by game. After a divorce there, the script of the pc's spouse is actually destroyed and replaced by a very simple "ex-spouse" script, presumably due to a difficulty in making significant instant changes to an active character (i.e. Miria) based on what happens in a second character's (ie Father Tully's) script. I have other things in mind here and would like the Miria script to remain intact and active after a New Reno divorce. What sorts of things would need to be considered, technically, to address that situation?
Thanks in advance for any advice anyone has to offer on these issues.