internalmemory Posted December 18, 2014 Share Posted December 18, 2014 (edited) So I'm not exactly 'making' a mod but rather... Okay I'm wanting to add something to a mod. The mod I'm working with is: High Desert Tactical Gear by tredmeisterhttp://www.nexusmods.com/newvegas/mods/41410/? (and I'm using with conjunction):Expanded NCR tactical armor (uses first file as a base). By sajuuknightfallhttp://www.newvegasnexus.com/downloads/file.php?id=41969 ------------------------------------------------------------------- What this does is change the standard uniforms of NCR soldiers to look more modern and realistic and fitting. Although when you take the new NCR armor it doesn't disguise you as the NCR. Neither mods overwrite NCR armor, they only replace the NPC's with the new content. I have worked on a work around for such a disguise by going into HDTshop.esm and editing one single item in the mod "Armor / Headgear / BeretBadge Tiger" and I added the script: [NCRFactionOutfitWarningScript] This script gives you the prompt that says you are dressed as part of the NCR. And similar to default without the mod it removes all reputation with every town and every faction down to either 0 (undiscovered) or "neutral" to all factions INCLUDING the NCR which you're disguised as. -------------------------- My Goal --------------------------- What I want to do with the script is make it so it ADDS reputation on moment of script activation. So such as if you have 1-5 NCR Reputation, it will instantly have a base reputation set that makes you either "Accepted" or further by the NCR. I feel like if you wear faction armor and are disguised it shouldn't make your reputation with That faction 0, but rather it should automatically give you a 5-7 reputation score with that faction which makes you at least Accepted by them. The script below: scn NCRFactionOutfitWarningScriptfloat fUpdatedNegNCRfloat fUpdatedPosNCRfloat fUpdatedNegCLfloat fUpdatedPosCLfloat fUpdatedNegBoSfloat fUpdatedPosBoSfloat fUpdatedNegGKfloat fUpdatedPosGKfloat fUpdatedNegPGfloat fUpdatedPosPGBegin OnEquip Player ;Check to see if player was wearing faction armor. if DisguiseFactionPulseQuest.bFactionArmorEquipped == 0 ;Set variable to track wearing faction armor set DisguiseFactionPulseQuest.bFactionArmorEquipped to 1 ;Player was not wearing faction armor - so we store their reputation values, we don't need to clear it here, it'll get cleared below ;Store Reputations set DisguiseFactionPulseQuest.fNCRNegReputation to GetReputation RepNVNCR 0 set DisguiseFactionPulseQuest.fNCRPosReputation to GetReputation RepNVNCR 1 set DisguiseFactionPulseQuest.fLegionNegReputation to GetReputation RepNVCaesarsLegion 0 set DisguiseFactionPulseQuest.fLegionPosReputation to GetReputation RepNVCaesarsLegion 1 set DisguiseFactionPulseQuest.fBoSNegReputation to GetReputation RepNVBrotherhood 0 set DisguiseFactionPulseQuest.fBoSPosReputation to GetReputation RepNVBrotherhood 1 set DisguiseFactionPulseQuest.fKhanNegReputation to GetReputation RepNVGreatKhans 0 set DisguiseFactionPulseQuest.fKhanPosReputation to GetReputation RepNVGreatKhans 1 set DisguiseFactionPulseQuest.fPowderNegReputation to GetReputation RepNVPowderGanger 0 set DisguiseFactionPulseQuest.fPowderPosReputation to GetReputation RepNVPowderGanger 1 else ;Get Current Faction Values and add stored values set DisguiseFactionPulseQuest.fNCRNegReputation to GetReputation RepNVNCR 0 + DisguiseFactionPulseQuest.fNCRNegReputation set DisguiseFactionPulseQuest.fNCRPosReputation to GetReputation RepNVNCR 1+ DisguiseFactionPulseQuest.fNCRPosReputation set DisguiseFactionPulseQuest.fLegionNegReputation to GetReputation RepNVCaesarsLegion 0 + DisguiseFactionPulseQuest.fLegionNegReputation set DisguiseFactionPulseQuest.fLegionPosReputation to GetReputation RepNVCaesarsLegion 1 + DisguiseFactionPulseQuest.fLegionPosReputation set DisguiseFactionPulseQuest.fBoSNegReputation to GetReputation RepNVBrotherhood 0 + DisguiseFactionPulseQuest.fBoSNegReputation set DisguiseFactionPulseQuest.fBoSPosReputation to GetReputation RepNVBrotherhood 1 + DisguiseFactionPulseQuest.fBoSPosReputation set DisguiseFactionPulseQuest.fKhanNegReputation to GetReputation RepNVGreatKhans 0 + DisguiseFactionPulseQuest.fKhanNegReputation set DisguiseFactionPulseQuest.fKhanPosReputation to GetReputation RepNVGreatKhans 1 + DisguiseFactionPulseQuest.fKhanPosReputation set DisguiseFactionPulseQuest.fPowderNegReputation to GetReputation RepNVPowderGanger 0 + DisguiseFactionPulseQuest.fPowderNegReputation set DisguiseFactionPulseQuest.fPowderPosReputation to GetReputation RepNVPowderGanger 1 + DisguiseFactionPulseQuest.fPowderPosReputation endif if VFactionArmorTutorial == 0 ShowMessage VFactionOutfitTutorial set VFactionArmorTutorial to 1 endif ;Set NCR Alliance ShowMessage NCRFactionOutfitWarning ;SetEnemy VCaesarsLegionFaction PlayerFaction StartQuest DisguiseFactionPulseQuest ;Kicks the pulse placing quest setally PlayerFaction ArmorNCRFactionNV 1 1 player.addtofaction ARMORNCRFactionNVEnemy 0 ;Set BoS Alliance if they have joined the NCR if VStoryEventBoS == 1 setally ArmorBrotherhoodSteelFactionEnemy NCRFactionNV 1 1 setally ArmorBrotherhoodSteelFaction PlayerFaction 1 1 player.addtofaction ArmorBrotherhoodSteelFactionEnemy 0 endif ;Set GreatKhan Alliance if they have joined the NCR if VStoryEventKhans == 1 setally ArmorGreatKhansFactionNVEnemy NCRFactionNV 1 1 setally ArmorGreatKhansFactionNV PlayerFaction 1 1 player.addtofaction ArmorGreatKhansFactionNVEnemy 0 endif ;Clear Reputations SetReputation RepNVNCR 0 0.0 SetReputation RepNVNCR 1 0.0 SetReputation RepNVCaesarsLegion 0 0.0 SetReputation RepNVCaesarsLegion 1 0.0 SetReputation RepNVBrotherhood 0 0.0 SetReputation RepNVBrotherhood 1 0.0 SetReputation RepNVGreatKhans 0 0.0 SetReputation RepNVGreatKhans 1 0.0 SetReputation RepNVPowderGanger 0 0.0 SetReputation RepNVPowderGanger 1 0.0endBegin OnUnequip Player ;SetEnemy VCaesarsLegionFaction PlayerFaction 1 1 ;SetEnemy PlayerFaction ArmorNCRFactionNV 1 1 if player.GetEquipped FactionGearNVNCR == 0 ;Unset NCR Alliance StopQuest DisguiseFactionPulseQuest ;Stops the pulse placing quest SetEnemy PlayerFaction ArmorNCRFactionNV 1 1 player.RemoveFromFaction ARMORNCRFactionNVEnemy ShowMessage NCRFactionOutfitWarningOff ;UnSet BoS Alliance if they have joined the NCR if VStoryEventBoS == 1 SetEnemy ArmorBrotherhoodSteelFaction PlayerFaction 1 1 player.RemoveFromFaction ArmorBrotherhoodSteelFactionEnemy endif ;UnSet Khan Alliance if they have joined the NCR if VStoryEventKhans == 1 SetEnemy ArmorGreatKhansFactionNV PlayerFaction 1 1 player.RemoveFromFaction ArmorGreatKhansFactionNVEnemy endif ;Get Current Faction Values and add stored values set fUpdatedNegNCR to GetReputation RepNVNCR 0 + DisguiseFactionPulseQuest.fNCRNegReputation set fUpdatedPosNCR to GetReputation RepNVNCR 1+ DisguiseFactionPulseQuest.fNCRPosReputation set fUpdatedNegCL to GetReputation RepNVCaesarsLegion 0 + DisguiseFactionPulseQuest.fLegionNegReputation set fUpdatedPosCL to GetReputation RepNVCaesarsLegion 1 + DisguiseFactionPulseQuest.fLegionPosReputation set fUpdatedNegBoS to GetReputation RepNVBrotherhood 0 + DisguiseFactionPulseQuest.fBoSNegReputation set fUpdatedPosBoS to GetReputation RepNVBrotherhood 1 + DisguiseFactionPulseQuest.fBoSPosReputation set fUpdatedNegGK to GetReputation RepNVGreatKhans 0 + DisguiseFactionPulseQuest.fKhanNegReputation set fUpdatedPosGK to GetReputation RepNVGreatKhans 1 + DisguiseFactionPulseQuest.fKhanPosReputation set fUpdatedNegPG to GetReputation RepNVPowderGanger 0 + DisguiseFactionPulseQuest.fPowderNegReputation set fUpdatedPosPG to GetReputation RepNVPowderGanger 1 + DisguiseFactionPulseQuest.fPowderPosReputation endif ;If the player is not wearing ANY faction armor, do the following if (Player.GetEquipped FactionGearNVNCR == 0) && (Player.GetEquipped FactionGearNVCaesar == 0) && (Player.GetEquipped FactionGearNVBrotherhood == 0) && (Player.GetEquipped FactionGearNVGreatKhans == 0) && (Player.GetEquipped FactionGearNVPowder == 0) && (player.GetEquipped VMS18WhiteGloveMask == 0 || (Player.GetEquipped OutfitFormalWear == 0 && player.GetEquipped ArmorWhiteGloveSociety == 0)) ;Clear Wearing Faction Armor Variable set DisguiseFactionPulseQuest.bFactionArmorEquipped to 0 ;Update to Proper Reputation Values ;Set Reputation Values to Updated SetReputation RepNVNCR 0 fUpdatedNegNCR SetReputation RepNVNCR 1 fUpdatedPosNCR SetReputation RepNVCaesarsLegion 0 fUpdatedNegCL SetReputation RepNVCaesarsLegion 1 fUpdatedPosCL SetReputation RepNVBrotherhood 0 fUpdatedNegBoS SetReputation RepNVBrotherhood 1 fUpdatedPosBoS SetReputation RepNVGreatKhans 0 fUpdatedNegGK SetReputation RepNVGreatKhans 1 fUpdatedPosGK SetReputation RepNVPowderGanger 0 fUpdatedNegPG SetReputation RepNVPowderGanger 1 fUpdatedPosPG endifend;Restriction on Companions;Begin OnAdd CraigBooneREF; ShowMessage CompanionFactionArmorMsg; DropMe;EndBegin OnAdd RoseofSharonCassidyREF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd VeronicaREF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd LilyREF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd RaulREF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd ArcadeREF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd EDE1REF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd EDE2REF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd EDE3REF ShowMessage CompanionFactionArmorMsg DropMeEndBegin OnAdd RexREF ShowMessage CompanionFactionArmorMsg DropMeEnd I'm needing to find the code or add to the script which automatically gives you a high reputation to the NCR on the moment of equiping the item. I'm just not sure which line of coding that is. It appears that everything is either 0 or 1 which isn't a value but rather a binary.. But what do I know because it seems when you put faction armor on in the vanilla game it also makes your reputation with the faction 0 or 1 (so they could very well be values, not sure). Edited December 18, 2014 by internalmemory Link to comment Share on other sites More sharing options...
Ladez Posted December 18, 2014 Share Posted December 18, 2014 The player's current reputation with a faction is made up of two values, fame and infamy, as stated on the Fallout Wiki (emphasis added by me): Reputation is separated into two categories: Fame and Infamy. Fame is positive and infamy is negative. Both types of reputation are tracked separately, the combination of which determines your reputation with any given faction. The benefits and drawbacks of any given reputation depend on the group itself. You may receive discounts with merchants, provoke attacks from hired thugs, or simply be treated differently. GetReputation returns the current fame or infamy with a given faction. The second parameter should be a 1 or a 0, which respectively returns current fame and current infamy. Add/Remove/SetReputation work in the same manner, but they have an extra parameter that specifies the amount of fame or infamy (depending on the second parameter) to add, remove or set to. Understanding this separation of fame and infamy is important if you want to mod anything related to reputation. With this information, you should be able to use these functions to achieve what you want by modifying the script. And on a final note, it was unnecessary to post the entire script here, since I assume it is the vanilla version in its unmodified form, so anyone can simply look it up in the GECK. When posting scripts in the future, please don't make the whole thing read, it becomes very difficult to read that way. Instead use code tags around it, which makes it use a fixed-width font, preserves indentations and removes space between paragraphs. That is the optimal way of posting any form of code online. :) Link to comment Share on other sites More sharing options...
Recommended Posts