Alt-Miria Mod Updated for Restoration Project 2.3

Discussion in 'Fallout General Modding' started by Endocore, Dec 26, 2013.

  1. Endocore

    Endocore Look, Ma! Two Heads!
    Modder

    Mar 14, 2010
    As Author, Visionary, Dreamweaver... plus Actor once said:

    I've updated my alternate Miria mod for compatibility with killap's RP 2.3. The mod is available here, and includes all necessary files as well as the addition of combat taunts I long ago wrote for Miria. The mod has been tested thoroughly, but if any bugs occur please report them here. This version of the Miria mod never really had a formal title, probably resulting in some confusion in the past, so unless anyone has a better idea I say we call this version "Endocore's Miria mod" from now on to distinguish it from its many cousins. I offer my thanks to all those who have contributed over the years to making Miria a more worthy spouse for the Chosen One, and whose work provided inspiration and guidance for this version even though I parted ways with the technical details of past Miria embellishments. Thanks as well is due to killap, from whose optimized RP scripts I copied many technical details of this present endeavor.

    My angle on the Miria mod reiterates the traditional material that's been around for ages, but also includes an expanded marriage simulation for role-playing purposes. As previously discussed, Miria develops her own ideas about the couple's future, and shares these goals with the Chosen One if their relationship blossoms. Perhaps more importantly for many players, the Chosen One can now have sex with Miria (if she's also in the mood for love). These features are of course in addition to all the standard fare old-timers expect from any Miria mod (Miria levels up gaining competence, changes her appearance based on armor worn, can be asked to wait in towns, etc). In the protos I've provided, as Miria levels up her primary skills are in Small Guns and Energy Weapons. Yet even at her maximum level she's hardly any kind of badass (her ultimate Strength is only 5 unless she wears Power Armor or takes Buffout). I like this approach because the player-character must still make an effort to take care of/protect Miria.

    Any players may further customize Miria to their own tastes by following along with my article on the subject. Except for the inclusion of combat taunts, the present files are merely a tangible expression of the material discussed in the article. For those interested in such things, the only significant change required to bring the mod into compatibility with the RP 2.2/2.3 was to make new protos, as the slots previously stipulated were claimed by new killap critters.


    For those using older versions of the RP, some time ago I added a partial download of this mod for RP 1.2/2.0 to the NMA Files section, and Nirran made a full version compatible with RP 2.1.2 that can be found on his site.

    In the current version I've also included my script and msg for Cassidy, because in my game he offers some conversation about married life if the Chosen One is married (as well as some back-story I imagined for Cassidy). An added benefit some may appreciate on this count is that when I wrote that bit (years ago) I also fixed the 1.02d bug (still present in the latest UP and RP) that prevents the player-character from talking to Cassidy about the latter's dislike of Myron; without this change you'll never hear the deprecated bit of Dravean's voice acting for those long-lost original content lines. The mod also includes my updated script and msg for random encounter trappers, as the standard trapper script breaks if Miria is waiting halfway across the map and the player-character offers to trade Miria's charms for gecko pelts.


    FAQ

    Q: Do I need to start a new game after installing the mod?
    A: Yes, because the mod uses new global variables (found in vault13.gam).

    Q: [Something about this mod] is dumb!
    A: Read my technical article and make your own scintillating version.

    Q: [Something about this mod] is offensive!
    A: Read my technical article and make your own innocuous version.

    Q: This mod would be way cooler if Miria could [do something novel].
    A: I probably agree, but I either didn't have time to do that myself or else I have in fact done it for my own (heavily customized) game but didn't have time to investigate compatibility with the latest RP. The Miria mod is the whole community's property, and many fine folks have made contributions over the years. I encourage everyone to make the mod their own and explore new territory in their own versions of the material.

    Q: Is this mod compatible with vanilla Fallout 2 1.02d, or the Megamod, or...
    A: Nope, but you can easily make your own adaptation by reading my tutorial. The Megamod already has a traditional Miria mod, and for other cases I think anyone not playing the RP or Megamod these days is likely also the sort who simply isn't interested in a Miria mod or any other sort of mod, period.

    Q: If Miria isn't wearing any armor and I force her to equip certain weapons through the dialogue screen, the game crashes when I end the dialogue, or when I move the cursor over her, or when she starts to walk somewhere.
    A: Yep, so don't do that-- let her pick her own weapon if combat begins when she isn't wearing any armor.
    This is a long-standing engine facet, and though in theory a few hundred lines of script could eradicate the issue I don't see the point when all that's required is a smidge of self-awareness by the player about wtf he's doing while playing the game. Another solution is to change the basic (unarmored) sprite used by Miria to a model with more weapon animations available. For example the new blonde or red-headed heroine animations in the Appearance Mod would be nice for Miria after she's married, but the reason I didn't do this is the prudence of renaming all the animation files after copying them to art\critters (too much typing). If anyone wanted to do this, you'd only have to change a single line in mcmiria.int talk_p_proc to effect the change basic change. Note as well that thanks to a change by Darek that makes npcs put away their weapons after changing their armor, one need never worry about an older problem that caused related crashes in B-Team mods.

    Q: If you make a Miria mod, you have to make a Davin mod too.
    A: Feel free to make your own; my articles should give you most of the info you need to make or modify any npc follower. If you need help getting started with Davin, someone (I think it was Tom9k, but maybe I'm wrong) once made such a mod that anyone could probably update. Since longtime reading of this forum tells us 99.9 percent of all Fallout 2 games are played as a male Chosen One, I personally don't think a Davin mod is worth much effort-- and writing a proper "romance novel" to inspire plausible player-character fondness for Davin would take a fair bit of effort. Another problem is basic biology-- a female Chosen One will probably start to worry if her husband doesn't knock her up after years of in-game time, and using a heavy-handed "your womb is as barren as the accursed wasteland in which you live" characterization infringes too much for my taste upon the player's right to imagine his own character. Yet as very few players would ever have the role-playing panache to stop playing the game with a self-imposed imaginary "We settled down in a hut somewhere after I got preggers" ending and imposing such an ending would be rather unreasonable, if the only practical alternative is female pc sterility I think the matter is simply best left not addressed at all. Whether Miria practices family planning off-stage we likewise know not, but this narrative case is different-- she has her own ideas and agendas on any number of issues, and I think the approach I took in her characterization leaves ample room for the player's imagination to fill in any sorts of details the player desires in any particular playthrough.

    Q: I don't understand how to use these files. I need an autoinstaller version.
    A: If copying a few files from one directory to another seems overwhelming, perhaps you should stop playing Fallout 2 and instead use your time to learn at least the basics of how to use your computer's operating system.

    Q: Once in a great while when I'm talking to Miria about our relationship the screen isn't big enough to show the particular option I want.
    A: This is a rare occurrence, and is due to my use of randomization in dialogue. Some lines are longer than others, very occassionally several long lines happen to be randomly selected at the same time, and heavily randomized outcomes are hard to pervasively test. The script rigorously does not afford any instances where the interface will become "stuck" in a circular dialogue, however, so if this does happen to you just pick a fluff option and then return to the serious subject you wanted to discuss-- the line you want will almost certainly be shown in the displayed area the second time around.

    Q: I installed the mod, and everything seems to be working, but I don't understand what to do. Is there a walkthrough?
    A: As in the standard game, obtaining Miria's hand in marriage requires either a Charisma of 8 or a good reputation in Modoc plus 7 Charisma. Beyond that, however, this mod is about role-playing-- so there are no objectively "better" or "worse" outcomes. Do what you want, and explore the long-term consequences of your behavior. If you want to be a loving, supportive spouse to Miria-- go for it. If you want to be a wife-beating scoundrel-- that's your business. The mod will attempt to accomodate whatever characterization of the Chosen One you pursue, and the "best" outcome is simply one with which you as player are satisfied during any particular playthrough. In general, though, the mod follows the overall practices of Fallout 2 itself-- if you're playing a villain, you need to apply more imagination to your playthrough as explicit declarations and options from the game itself aren't nearly as frequent as in heroic-themed playthroughs. I regret I haven't had time to develop the Tully-divorce angle or the Leslie/Angela Bishop adultery angles, because I think both are interesting territory in regard to Miria, but perhaps someone else will take up the gauntlet to add even more depth to Miria.



    Merry Christmas to all.

    [HR][/HR]

    Edited 29 August 2015

    Link to files updated.




    [HR][/HR]
    .
     
    Last edited: Aug 29, 2015
    • [Like] [Like] x 3
  2. El Barto 227

    El Barto 227 Mutant Noob

    Dec 25, 2013
    This looks interesting. I'm new to Fallout 2 (And after playing 1, 2 & NV I cannot even touch Bethesda's trainwreck anymore), and while the whole joke marriage thing was amusing, I'd rather RP an actual relationship. so thank you!

    Edit: Is this the Miria mod from your tutorial thingy on Vault-Tec labs?
    Edit: Re-read, yes it is. Woohoo! Couldn't get the mapper working. But I'll try this.
     
    Last edited: Dec 26, 2013
  3. mobucks

    mobucks moobs Orderite

    May 22, 2010
    thanks for this
     
  4. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    Cool, good job Endocore! But, but did I just read that there is a bug that I wasn't aware of... gah, bugs still haunt me. ;) Hmm, perhaps a hot fix is in order before the end of the year. I did find another minor unofficial patch issue that might as well be addressed before I take a long leave of absence.
     
  5. Darek

    Darek is currently unavailable

    Jan 7, 2008
    @ killap,
    LOL, you know people like to mention old bugs just after every new release.
    @Endocore,
    While I still think Miria should really just be a joke, it sounds intriguing. I think I will try it out on my next run.
     
    Last edited by a moderator: Jan 9, 2016
  6. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    Haha, honestly this has happened on more than one occasion. Looks like I might update again before the end the year to have things on a clean slate. And put my mind at ease too. ;)
     
  7. Endocore

    Endocore Look, Ma! Two Heads!
    Modder

    Mar 14, 2010
    The game itself is sort of like the wasteland-- the struggle goes on forever.
    :lol:

    For those who are sticklers on detail, the mcmiria.int in this mod doesn't include two of killap's most recent changes. One is very minor and I didn't bother because in the case of Miria it isn't relevant (spouses ignore the reaction system, or should) and the other (extra strength bonuses from Ms. Kitty) is something I like to occasionally use as an exploit (I rarely use the car).
     
  8. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    And FYI, Endocore, I'll be releasing a minor update that incorporates the lost Cassidy lines that you mentioned, as well as a fix for him when talking about why you are traveling the wasteland. Two fixes there actually. One for a mistake I made and another for a vanilla bug. I can send it your way now (pm me) or you can wait for the update coming out by Dec 31st.
     
  9. CPL

    CPL Still Mildly Glowing
    Modder

    Mar 16, 2013
    Thanks, I'll check this out. I have some older version that probably has been mutated over the years since I've done my own mod tinkering here and there. It's probably a good thing you put this on Atomic Gamer since I've forgotten about that sight and it has very old log on info for me on there I need to change.

    I remember the old Cassidy dialog about Myron. I always wondered what happened to it and why it was removed.
     
  10. Makenshi

    Makenshi Ahoy, ye salty dogs!

    Jul 28, 2006
    I will definitely try it on my next playthrough, thank you very much
     
  11. FOvet

    FOvet Wandering the Wastelands

    Aug 26, 2012
    I'm about to try this right now! It looks like a great mod, and I've always wanted a better follower than the ones they give you in FO2, so a Maria edit ought to be just what I was looking for! Plus, I love what you've described for her personality and all that--good job, I can't wait to check it out!
     
  12. Nick Dahl

    Nick Dahl First time out of the vault

    Jan 1, 2014
    What line or lines would I need to add to Miria's scripts to get her to use the redhead appearance mod? I've been hoping to find a way to do this for a while now. Miria always looked so generic in her armor, especially compared to armored Vic, Sulic and Cassidy.
     
  13. Endocore

    Endocore Look, Ma! Two Heads!
    Modder

    Mar 14, 2010
    @Nick Dahl

    You'd have a six step process to do what you want:

    1) Copy all the red-headed lady frm files to a new folder. Rename them all, getting rid of the initial __ characters and replacing them with something else (maybe, RW). This is what I meant when I said it was too much typing for me. :cry:

    2) After renaming all the animation files, copy them to Fallout2\data\art\critters.

    3) Update the text file critters.lst in data\art\critters so the new animation is included. You'll want to put the basic animation name you made in step 1, an 11 so the animation uses the right body-part hit lines, and a 1 so characters using the animation can run. If you look at the format of other entries in critters.lst, you'll see right away what needs to be done.

    4) Decompile the script mcmiria.int from my mod.

    5) The armor change process takes place in the final lines of talk_p_proc. You'll need the artfid number from the red-headed lady animations you renamed (the easiest way to get this is to change an existing critter-- but not Miria or any other npc who can join the party-- to use the animation in the mapper and observe the corresponding change in the text file in Fallout2\proto\dev\critters, then change it back). Basically all you'll do, then, is insert this artfid number into Miria's script so she'll use your new animation in place of her existing nfpeas animation. In other words in the script, change the line:

    op_metarule3(107, op_self_obj(), 16777252, 0);

    to instead say:

    op_metarule3(107, op_self_obj(), XXXXXXXX, 0);

    where XXXXXXXX is the artfid number for your red-headed lady animation. You can use whichever you want (Vault suit, leather armor, tribal outfit, etc). Note if you use FSE for script editing the line (op_metarule3(107, op_self_obj(), 16777252, 0);) may look slightly different (since I use Ruby), but you should be able to easily see what's happening.

    6) Compile your changed mcmiria.ssl and put the resulting new mcmiria.int back into Fallout2\data\scripts, and enjoy the fruits of your labors.
     
    Last edited by a moderator: Jan 9, 2016
  14. ThegreatBenDoyle

    ThegreatBenDoyle First time out of the vault

    Apr 10, 2012
    If you guys dont mind waiting a month or two I'm currently making unique armor graphics for the leather jacket and armor and metal armor for Miria I'm 1/12th of the way finished.
     
  15. Nick Dahl

    Nick Dahl First time out of the vault

    Jan 1, 2014
    I'm using Rainman's redhead girl animations as a base for what I'm changing. All the animation files are named hfrjmp or some variation of that, no need to remove __. I also added all 756 animation files to the Fallout2\data\art\critters file.

    All the file names have been added to the critters.lst files like this: hfrjmpaa,11,1. I've decompile mcmiria.int in FSE.

    However, I am completely lost at step 5. The animations I'm using adds all suits of armor that don't come with a helmet so it's not just one set of animations. Not sure if that changes anything as far as artfid's go, as I've never tried to program this before. I don't know what an artfid is or how to get one by changing a critter. Or how to change a critter for that matter.

    Could you break down Step 5 further for somebody who has no idea what they're doing?
     
  16. Endocore

    Endocore Look, Ma! Two Heads!
    Modder

    Mar 14, 2010
    My advice wasn't very good or clear above (written from memory rather than looking at any files), so don't feel bad. If you have all the red-headed animation files named without a line _ character and not named as an exact duplicates of the regular female hero animations, that's a very good start.

    You may need a few reference files for codes and so forth, and you'll also need the Fallout2 mapper.

    1) Find the portion of the mcmiria script that deals with armor changes (sounds like you already did that). In talk_p_proc, we're talking about these lines:

    Code:
    if (op_critter_inven_obj(op_self_obj(), 0) != LVar1) then
    begin
      if (op_critter_inven_obj(op_self_obj(), 0) == 0) then
      begin
        op_metarule3(107, op_self_obj(), 16777252, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6000, 6001)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 1) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 379)) then
      begin
         op_metarule3(107, op_self_obj(), 16777221, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6005, 6006)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 232) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 3)) then
      begin
         op_metarule3(107, op_self_obj(), 16777217, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6025, 6026)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 349) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 348)) then
      begin
        op_metarule3(107, op_self_obj(), 16777287, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6030, 6031)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 240) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 380) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 2)) then
      begin
         op_metarule3(107, op_self_obj(), 16777223, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6015, 6016)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 74) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 265)) then
      begin
        op_metarule3(107, op_self_obj(), 16777222, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6010, 6011)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 239) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 17) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 381)) then
      begin
        op_metarule3(107, op_self_obj(), 16777219, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6020, 6021)), 8);
      end
      else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 524) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 113)) then
      begin
        op_metarule3(107, op_self_obj(), 16777218, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6035, 6036)), 8);
      end
      else if (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 554) then
      begin
        op_metarule3(107, op_self_obj(), 16777320, 0);
        op_float_msg(op_self_obj(), op_msg_string(106, op_random(6040, 6041)), 8);
      end
                restock_obj := op_critter_inven_obj(op_self_obj(), 1);
                op_debug_msg("armour pid == " + op_obj_pid(restock_obj));
                op_rm_obj_from_inven(op_self_obj(), restock_obj);
                op_add_obj_to_inven(op_self_obj(), restock_obj);
     end
    
    They'll look a little bit different in FSE, but should still be recognizable. Basically within each section (marked with begin/end), the lines:

    if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == XXX)

    are a check of what armor the character is putting on, and XXX is the item code (found in the text file itempid.h that comes with the Fallout 2 mapper). The lines:

    op_metarule3(107, op_self_obj(), YYYYYYYY, 0);

    specify what animation the character will use while wearing the armor being put on. These YYYYYYYY numbers are artfid numbers. Normally you could find them in the text file artfid.h that comes with the Fallout 2 mapper, but in this case we are adding new animations so we need to get this new artfid number another way. The best way to do this is to use the Fallout 2 mapper. I'll stop here for a moment-- do you have the mapper installed and have you used it before?


    *****

    Edited:

    I may not be online tomorrow, so I decided to add this bit based on the assumption Nick and many others aren't using the mapper and therefore can't check proto text output files in Fallout2\dev\proto for artfid numbers (i.e. use "the easy way").

    If you're not familiar with the mapper, there's another way to get the artfid numbers needed-- careful counting. In the directory Fallout2\data\art\critters you should see all the red-headed lady animations you procured previously, as well as the file critters.lst to which you added entries such as hrjmps,11,1 and so forth. One thing to note about animation names is that they should not be longer than eight characters plus the extension .frm, so you may want to check this for the red-headed lady files you got (a typical valid name would be something like hrjmpsaa.frm and so forth).

    An animation's artfid number is its line number in this file critters.lst plus 16777216. When you're counting, it's important to remember that the first line (should be "reserv") is line ZERO (rather than "line 1" as one might expect). Starting with zero, then, count the number of lines in critters.lst one by one until you get near the end where you previously added the red-headed animation sets. Just as an example (you many have named things slightly differently or put your lines in different order):

    HMBOXL,11,1 = in killap's unmodified critters.lst for RP 2.3 this is line 149 therefore 149 + 16777216 = artfid 16777361
    HMBOXB,11,1 = in killap's unmodified critters.lst for RP 2.3. this is line 150 therefore 150 + 16777216 = artfid 16777362
    hrjmps,11,1 = if you haven't previously modified critters.lst, this is line 151 = the artfid of the animation on this line is 16777363.
    hrlthr,11,1 = if you haven't previously modified critters.lst, this is line 152 = the artfid of the animation on this line is 16777364.
    hrcmbt,11,1= if you haven't previously modified critters.lst, this is line 153 = the artfid of the animation on this line is 16777365.

    You'll need to actually count the lines rather than rely on my guidance here-- I have already made numerous changes to my own critters.lst file and for some reason didn't include any of the art directory in the "backup vault" of killap's original files I otherwise keep (oops), so I'm only guessing that HMBOXB,11,1 is in fact line 150.

    If you don't have FrameAnimator2 to actually look at the animations to see what they are, the codes in the filenames typically follow the format:

    XXjmps = person XX in Vault 13 jumpsuit
    XXlthr = person XX in leather armor mk 1 or any leather armor if there's no separate set for leather mk 2
    XXcmbt = person XX in combat armor
    XXmaxx = person XX in a leather jacket
    XXmetl = person XX in metal armor
    XXprim = person XX in a tribal outfit

    For more info on the animation codes, check out the NMA Fallout Modification FAQ here at the website. The last two letters in the file name are codes for what person XX is doing in that particular animation (standing idly, drawing a gun, shooting a gun, etc).

    If we were to notionally (for example purposes) replace some of the code numbers in the script with words, then, a model of the script:

    Code:
    begin
     if (op_critter_inven_obj(op_self_obj(), 0) == 0) then
     begin
      op_metarule3(107, op_self_obj(), 16777252, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6000, 6001)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 1) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 379)) then
     begin
      op_metarule3(107, op_self_obj(), 16777221, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6005, 6006)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 232) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 3)) then
     begin
      op_metarule3(107, op_self_obj(), 16777217, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6025, 6026)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 349) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 348)) then
     begin
      op_metarule3(107, op_self_obj(), 16777287, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6030, 6031)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 240) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 380) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 2)) then
     begin
      op_metarule3(107, op_self_obj(), 16777223, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6015, 6016)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 74) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 265)) then
     begin
      op_metarule3(107, op_self_obj(), 16777222, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6010, 6011)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 239) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 17) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 381)) then
     begin
      op_metarule3(107, op_self_obj(), 16777219, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6020, 6021)), 8);
     end
     else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 524) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 113)) then
     begin
      op_metarule3(107, op_self_obj(), 16777218, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6035, 6036)), 8);
     end
     else if (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 554) then
     begin
      op_metarule3(107, op_self_obj(), 16777320, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6040, 6041)), 8);
     end
     restock_obj := op_critter_inven_obj(op_self_obj(), 1);
     op_debug_msg("armour pid == " + op_obj_pid(restock_obj));
     op_rm_obj_from_inven(op_self_obj(), restock_obj);
     op_add_obj_to_inven(op_self_obj(), restock_obj);
    end
    
    would look like this (don't put this actual syntax into your script, the computer won't understand what you're talking about):

    Code:
    begin
     if not wearing any armor then
     begin
      change Miria's animation to use artfid blonde peasant girl (16777252)
      have Miria say "I took off all my armor" or whatever is in lines 6000 and 6001 of mcmiria.msg
     end
      otherwise if putting on leather armor (item code 1) or leather armor mark 2 (item code 379) then
     begin
      change Miria's animation to use artfid woman in leather armor sprite (16777221)
      have Miria say "I'm wearing leather armor now"
     end
     otherwise if putting on power armor (item 3) or hardened power armor (item 232) then
     begin
      change Miria's animation to use power armor (16777217) artfid
      have Miria say "I'm wearing power armor now"
     end
     otherwise if putting on advanced power armor (code 349) or APA mk 2 (code 348) then
     begin
      change Miria's animation to use advanced power armor (artfid 16777287)
      have Miria say "I'm wearing APA now"
     end
     otherwise if putting on tesla armor (itempid 240) or metal armor mk 2 (itempid 380) or metal armor (itempid 2) then
     begin
      change Miria's animation to use woman in metal armor (16777223)
      have Miria say "I'm wearing metal armor now"
     end
     otherwise if putting on leather jacket (74) or combat leather jacket (265) then
     begin
      change Miria's animation to use woman in leather jacket (16777222)
      have Miria say "I'm wearing a leather jacket now"
     end
     otherwise if putting on BOS combat armor (239) or combat armor (17) or combat armor mk 2 (381) then
     begin
      change Miria's animation to use woman in combat armor (artfid 16777219)
      have Mira say "I put my combat armor on"
     end
     otherwise if putting on bridgekeeper's robe (item code 524) or purple robe (item code 113) then
     begin
      change Miria's animation to use a person in a purple robe sprite (animation with artfid 16777218)
      have Miria say "I look frumpy in this purple robe" or something similar from line 6035 or line 6036 of her msg file
     end
     otherwise if putting on environmental armor (note I don't think this is actually available in the game, but this line won't hurt anything)
     begin
      change Miria's animation to use person in environmental armor (16777320)
      have Miria say "I put the enviromental armor on"
     end
    
    and so forth.

    To summarize, then, all you need to do is match up each item code line (for example, 1 or 379 is leather armor) and replace whatever artfid number is in that section with the artfid number of the new animation you want to use. So for example if the first line you added to critters.lst was hrprim,11,1 and you had never previously added any other animations to critters.lst, the artfid for red-headed tribal woman would be 16777363. Therefore to set Miria's appearance when she's not wearing any armor to red-headed tribal woman, you'd change the first section under consideration in the script to read:

    Code:
     if (op_critter_inven_obj(op_self_obj(), 0) == 0) then
     begin
      op_metarule3(107, op_self_obj(), 16777363, 0);
      op_float_msg(op_self_obj(), op_msg_string(106, op_random(6000, 6001)), 8);
     end
    
    or something similar (follow whatever particular format exists when you decompiled the script with FSE-- I can't check because since I don't use FSE I don't even have it installed anywhere).

    After you compile the finished script and put it in Fallout2\data\scripts, if you've already started playing then you'll probably have to backtrack and reload to a saved game from before you entered Modoc for the first time (because this is when the original code in Miria's script mcmiria.int was first loaded into the game). If you then talk to her once she's in your party and ask her to change her armor, if she doesn't have any armor at all she'll thereafter use whatever new animation you specified for unarmored appearance (whether it was vault suit, tribal outfit, whatever). Whenever she wears any kind of armor, she'll use any new animation you specified in the other lines (for leather, for metal, etc) if you changed those as well.

    *****

    For those using the mapper, note you won't be able to see (in the mapper) new animations added to art\critters past nmkrom because killap made a boo-boo and changed the names of two now deleted animations to "unused" instead of "reserv." If you edit the two lines and replace unused with reserv, you'll thereafter be able to see animations listed after these two lines in the mapper. Note you can't just delete the unused lines or else the artfid numbers of everything below them will get screwed up. Our NMA animators are always hard at work and there are plenty of great animations out there like men and women in blue and brown combat armor, some groovy robots named Freewheeling Andy and Richard, and all kinds of other stuff that you may want to add and work into your modded game somehow.

    *****

    I found one minor bug and one peculiarity in Miria's script. Despite playing a number of games with the mod, I never noticed these before due to the mod's heavy use of randomization. If you're currently playing with the mod, they're both trivial (especially if you know about them, by reading this), so I don't think they're anything to fret over. I'll release an update, but I want to wait until killap releases his final RP update so I don't have to keep checking if revisions are needed over and over again. If you're a scripter and want to fix them yourself rather than wait for me, the two relevant lines are in Node2600 of mcmiria.int.

    Anyway, here's the deal on these two issues:

    1) If Miria decided she wants to move to Vault City (only a 1 in 9 chance), the script incorrectly checks the town reputation in Vault 13 (bug). If the player-character has a good rep in both towns or a bad rep in both towns, the bug will never even be noticed. Otherwise, Miria may oddly report that she wants to move to VC when the pc has slaughtered everybody there, or may continue to say she wants a gypsy lifestyle even though she secretly wanted to move to VC. Fixed for unreleased update.

    2) A complex swirl of issues surrounds Vault 13, but under many circumstances the player will never even notice. If Miria decided she wants to move to Vault 13 (only a 1 in 9 chance) and the pc has V13 quests in progress, Miria may oddly comment that all the deathclaws are dead. Perhaps in addition to making a delicious gecko stew she's also a prophet? After restoring the voice module in the computer and killing Dr. Schreiber at Navarro, her dialogue will automatically change to correctly say the pc made friends with the deathclaws. On the other hand if Schreiber is not assassinated in time to prevent Horrigan's raid on the vault, then her comment that the deathclaws are dead will by coincidence become accurate. In other words, there's a small window of potential gameplay where her comment about dead deathclaws may not make any sense. I haven't yet decided how to deal with this as none of the game's existing global variables have direct relevance in this peculiar instance, and players who play an "optimized strategy" game (arriving at V13 the first time with the voice module in hand and Schreiber already dead) would never get a chance to see the disparity anyway. I'll figure out something for this rare case before making an update.
    In other words, if you're playing the mod and Miria has said she wants to move anywhere except Vault City or Vault 13, you will not be affected in any way by either of these minor issues, so don't worry about them at all. Go ahead and live happily ever after (or not, whichever you prefer) in the Den, NCR, Modoc, Redding, Reno, Arroyo, or a modest patch of ground somewhere in the wasteland.
     
    Last edited: Jan 22, 2014
    • [Like] [Like] x 1
  17. Nick Dahl

    Nick Dahl First time out of the vault

    Jan 1, 2014
    OK, very helpful. Turns out a real easy way to count the artfid number is to copy and paste the critters.lst file from notepad into Excel, and excel will count for you. Two last questions I hope you can answer:
    1) The animations I'm using has an extra set for leather armor, one set for the original and another for the MKII leather armor. How would I code that into the armor change code without disrupting anything?
    2)Each animation actually has dozens per set, listed as hfrprmaa, hfrprmab, hfrprmac, etc., which i assume is to mark out different facing, moving and acting positions for animation. Should I use the artfid I calculated for the first one in the list (hfrprmaa, for example) and hope the code just does what it needs to do, or do I need to compile them into one complete set of animations somehow?
     
  18. Endocore

    Endocore Look, Ma! Two Heads!
    Modder

    Mar 14, 2010
    @Nick Dahl

    1) You could certainly add separate lines for additional animations of any sort if you'd like. Assuming you don't have the mapper and thus can't refer to an itempid file, you could look at this one instead. Though not from killap's RP (not even for Fallout 2, in fact) and thus not something you'd want to rely on in many cases, in this particular case of armor the data is identical.

    Basically, then, if for example you have a different leather armor animation you want to use for leather mk 2, and if for example we say the artfid of the leather mk 1 set is 88888888 and the artfid of the leather mk 2 set is 99999999, then you'd modify the script in the following way. Change:

    Code:
    else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 1) or (op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 379)) then
      begin
         op_metarule3(107, op_self_obj(), 88888888, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6005, 6006)), 8);
      end
    
    into two sections:

    Code:
    else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 1) then
      begin
         op_metarule3(107, op_self_obj(), 88888888, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6005, 6006)), 8);
      end
    else if ((op_obj_pid(op_critter_inven_obj(op_self_obj(), 0)) == 379) then
      begin
         op_metarule3(107, op_self_obj(), 99999999, 0);
         op_float_msg(op_self_obj(), op_msg_string(106, op_random(6005, 6006)), 8);
      end
    

    2) The last two letters before the .frm needn't be considered in the case we're discussing; as you said they're for facing, different frames of the same animation, and so forth. In your critters.lst file you only want to list the animations by the first six letters (in your case hfrprm, hfrjmp, etc).

    @ThegreatBenDoyle

    Cool. Are you relating those to the black-haired peasant lady animations from (was it Josan who made them?), or something different of your own design?
     
    Last edited by a moderator: Jan 9, 2016
  19. Nick Dahl

    Nick Dahl First time out of the vault

    Jan 1, 2014
    Alright that clears up a lot of my confusion. I have an .ssl file now, all I need is a way to compile it. Unfortunately FSE just gives me error messages saying it's incompatible with 64 bit windows, so I'm going to try something different. Hopefully Open Watcom will work, but if not, a recommended compiler program would be appreciated.
     
  20. NovaRain

    NovaRain Casual Modder

    Mar 10, 2007
    If your ssl doesn't have those "op_" functions/commands, you can use the script editor by Timeslip. Just download the modder's pack.
    The included compiler has a preprocessor embeded, so it's pretty much standalone. No need to install Ruby or Watcom stuff.