YanL Posted March 13, 2018 Share Posted March 13, 2018 hello A perk who does the following: When you pick it, you can wear Legion uniforms without them functioning as faction armors. would that probably need a script? I'm scouring the geck here, but I do not even know where to start, to tell you the truth. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 13, 2018 Share Posted March 13, 2018 It's certainly possible. You may or may not decide it's actually worth the headache, but you can do it. For this, I looked at the scripting for the faction armours, and I don't think I would bother, personally, but if you really want to, there's a lot you'd have to do, and more so if you don't want to modify the vanilla record (personally, I never modify vanilla records unless there is literally no other way). I don't really have the time to think about it, but I thought a bit in hopes of coming up with a simple way, and the first thing that came to mind was using this function:https://geckwiki.com/index.php/FakeScriptEvent So, maybe a quest script that will unfortunately (I think) always need to be running, and have it fake unequipping the armour from the relevant form list (FactionGearNVCaesar I think it was) any time one is equipped. Have you never written a script? If this works, you want: scn ThisIsTheNameOfYourScript ref LegionArmour Begin GameMode if player.getequipped FactionGearNVCaesar set LegionArmour to player.GetEqObj 2 LegionArmour.FakeScriptEvent "OnUnequip" player endif EndI wrote this without proofing it or thinking much. If it doesn't work, then SO LONG SUCKER. (I'll help you later when I have more time.) Link to comment Share on other sites More sharing options...
dubiousintent Posted March 13, 2018 Share Posted March 13, 2018 There is a mod called "Faction ID Cards" which "Adds faction ID cards and removes factions from armor". Sounds like what you want, though it isn't a perk/trait. If you don't acquire the "Faction ID Card", you don't get identified as part of the faction just because of what you are wearing. -Dubious- Link to comment Share on other sites More sharing options...
YanL Posted March 13, 2018 Author Share Posted March 13, 2018 It's certainly possible. You may or may not decide it's actually worth the headache, but you can do it. Don´t know man. it's being hard to balance this whole faction armor thing. This is a mod for the Legion which is based on the concept of the armor of the Centurion, applied to almost all members.You can see the whole gang here, still alpha and Lucius will not have this salvaged APA http://i67.tinypic.com/2e14qid.jpg Would you mess with this guys? Armor is the bread and butter, but the mod will have more things. - The perks for example. They will be exclusive to someone with a good relationship with the Legion. Here came the first problem. If you advance level, but are wearing a suit of them, you do not have the option to choose the perk, because the reputation is set to neutral. Okay, I solved by messing with the disgase script and now it does not affect the good reputation, only the bad. - Other problem. I have prepared a "pre order pack" for a character who wants to be part of the Legion when starting the game. Problem is that this is purely fanfiction. You do not REALLY belong to the gang, however much you are in a faction uniform, the Legion does not treat you as one of them on the first date, nor do you have adequate answers in the dialogues. I think I will solve this by making sure the armor you get is from a citizen of their territory, soon, without the faction script. Getting the script out of all the clothes is not very elegant either. If you are Legion, NCR must shoot you at sight, you dont have the right to infiltrate amoung them, dressed as a bloody legionary. This topic was to solve this problem. When choosing the trait / perk 'Master frumentarii' or something like that, you can wear your Legion clothes and not be attacked, as your disguise ability is supreme. This would avoid the tedious process of changing clothes every time you want to go to the Strip, for example. And that would not disturb the faction. I think if you take out the faction script for all armors, the IA package of NCR soldiers will not recognize the guys as enemies. I guess. Dubious posted an interesting mod. It would be something like this, but in reverse. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 13, 2018 Share Posted March 13, 2018 (edited) I don't know how using a quest in a perk functions, but that script probably needs to go there. It should probably turn off the Faction Disguise pulse quest, or whatever it's called. I think that quest gets started any time you equip faction armour and that it's written into the script of the individual armour, so turning it off should be fine. In fact, it may even be included in the OnUnequip block we're trying to fake, so don't worry about it now. If you get that message when the perk is otherwise working, that's why. And now, let's improve the script slightly: scn ThisIsTheNameOfYourScript ref LegionArmour int DeFactioned Begin GameMode if player.getequipped FactionGearNVCaesar if DeFactioned == 0 set LegionArmour to player.GetEqObj 2 LegionArmour.FakeScriptEvent "OnUnequip" player Set DeFactioned to 1 endif elseif player.getequipped FactionGearNVCaesar == 0 set DeFactioned to 0 endif End If faking that block functions as I hope and think it would, that's all you need. But the mod Dubious posted is a great idea if it doesn't touch the vanilla records, which I kind of expect it to do. Edit:Rereading, I realise you've already modified the disguise script? In that case, although I'm very much against modifying vanilla records, you can just modify it more to account for your perk. Another idea is once the player gets the perk, replace all the faction armours in the game with versions that don't have that script. This is simple. Just run a script that loads all armour into an array variable, and run a foreach that removes their scripts or replaces them with ones that don't have scripts or whatever. I'm trying to think of how to account for modded armours with this method. I've never used this, but it may be the function to call on any armours that the array finds that meet your criteria:https://geckwiki.com/index.php/SetScriptDisabled Also rereading, I'm not completely sure what you are trying to do. Is it just making Legion armours not behave as faction armours once you have the perk? or something more? Edited March 13, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
YanL Posted March 14, 2018 Author Share Posted March 14, 2018 Also rereading, I'm not completely sure what you are trying to do. Is it just making Legion armours not behave as faction armours once you have the perk? This. But only for those who have the perk. I have not yet had the opportunity to put your script into practice, but thanks for the effort you put in this thread. Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 14, 2018 Share Posted March 14, 2018 No bother. We're talking about functions I've never personally used, so it makes sense it won't work right initially. Just post back when that happens and I'm sure we can fix it. All the better if you can provide some debugging results (like, is the quest running when it should be, are the variables being flipped, all that). If you're already modifying the script of the Legion faction armours, you can just use an if statement to make sure that stuff happens only when the player doesn't have that perk. But this method doesn't account for modded armours that don't use that script, and has the potential to lose conflicts with mods that modify the script themselves. Fortunately, this probably won't come up too often. If you want to use the array method, we have to come up with the thing that constitutes an armour as faction armour. The form list is one way, but even that's a little unclean, given the way I'm sure some mods just modify that record without scripting it at run-time. My other worry with this method is that maybe a modded armour (or even a vanilla one, though I don't think so) is using its script for more than faction stuff, meaning that disabling the script would break whatever functionality was intended there. Still, if you do want to use the array method, let me know and I'll help you. Arrays are a little complex at first, but so useful. Link to comment Share on other sites More sharing options...
YanL Posted March 14, 2018 Author Share Posted March 14, 2018 (edited) Huummmmmmm........ Did not have thinking about a formlist. Probably the easy way to do this Or "If you're already modifying the script of the Legion faction armours, you can just use an if statement to make sure that stuff happens only when the player doesn't have that perk" Looks like a great solution too. How can we do that? About modded armor. I will be honest here. I don't care. Much more easy to someone download the geck take off the script from a armor mod then you and I break our heads thinking in a solution Edit: wrote this in my celphone, looks like the letters came out diferent and small. Strange. Edited March 14, 2018 by YanL Link to comment Share on other sites More sharing options...
EPDGaffney Posted March 14, 2018 Share Posted March 14, 2018 (edited) I think the easiest thing to do is maybe you post your edited version here. But if you'd like to take a crack at it yourself, you basically just take everything in the script and enclose it in an if statement, like this: Original block: Begin 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 ShowMessage CaesarsLegionFactionOutfitWarning StartQuest DisguiseFactionPulseQuest ;Kicks the pulse placing quest setally ArmorVCaesarsLegionFaction PlayerFaction 1 1 player.addtofaction ArmorVCaesarsLegionFactionEnemy 0 ;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.0 end My edits in caps: Begin OnEquip Player IF PLAYER.HASPERK YOURLEGIONFACTIONPERK == 0 ;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 ShowMessage CaesarsLegionFactionOutfitWarning StartQuest DisguiseFactionPulseQuest ;Kicks the pulse placing quest setally ArmorVCaesarsLegionFaction PlayerFaction 1 1 player.addtofaction ArmorVCaesarsLegionFactionEnemy 0 ;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.0 ENDIF end You'd want to do that for every block most likely. And in case you're unaware of what a 'block' is, it's every time a bunch of scripting commands start with Begin and finish with End. All the text enclosed in those two words is called a block. Edit: Just remembered I was meant to be checking that the player didn't have the perk, so I've corrected it now. Edited March 14, 2018 by EPDGaffney Link to comment Share on other sites More sharing options...
YanL Posted March 14, 2018 Author Share Posted March 14, 2018 (edited) Let me see if I understand. When the player have the perk, your alteration nullifies the entire script? It sounds 99% perfect. It'll do what I want. Only little problem is to conflict with mods that also change this script. But I can not cover the entire world. Edited March 14, 2018 by YanL Link to comment Share on other sites More sharing options...
Recommended Posts