LuciusConfucius Posted September 26, 2011 Share Posted September 26, 2011 Hello people!So I found the NCR and BoS Commander Mod (http://www.newvegasnexus.com/downloads/file.php?id=40281) and loved the good behaviour of it, but I disliked all the restrictions and the speed the bodies disappeared. So I changed that, now I have made it possible to get a lot more soldiers of each soldier type, and you can use both BoS and NCR at the same time, you won't require any reputation either.(At least that's my theory, see my question under the first code).I also changed the way the soldiers disappear/die, simply by increasing the time, it will now take a long time for their bodies to disappear, you can visit an old battlefield several hours later and they will still be there.However, I belive this is something so insanely easy to do, so I feel a bit suspicious as to why no other modder has done it yet? Therefore I would like some help from a scripter to look over my code and see if I have messed something up.I haven't written anything new at all, just changed some values. (Look underneath the codes for their respective questions) CommanderMenuScr:scn CommanderMenuScr int Btn int TrooperCount int RangerCount int PatrolRangerCount int HeavyTrooperCount int TrooperLimit int RangerLimit int PatrolRangerLimit int HeavyTrooperLimit int BoSInitiateCount int BoSKnightCount int BoSPaladinCount int BoSScribeCount int BoSInitiateLimit int BoSKnightLimit int BoSPaladinLimit int BoSScribeLimit ref SpawnedSoldier short MenuWaiting short VertiMenuWaiting short BoSVertiMenuWaiting short Active short doOnce short MenuID short Command int DoneCounter int AllSoldiers short VertibirdWaiting short BoSVertibirdWaiting short VertiDispatched int HotKey short HotkeyMenuWaiting short IsBoS float YPos begin GameMode if doOnce == 0 player.additem CommanderRadio 1 set HotKey to 34 set doOnce to 1 endif if MenuWaiting == 1 set MenuWaiting to 0 set Active to 1 if IsBoS == 1 showmessage CommanderBoSMainMenu else showmessage CommanderMainMenu endif endif if HotkeyMenuWaiting == 1 set HotkeyMenuWaiting to 0 set MenuID to -2 set Active to 1 showmessage CommanderRadioHotkeyMenu endif if IsKeyPressed HotKey == 1 && MenuWaiting == 0 && Active == 0 set MenuWaiting to 1 endif if VertiMenuWaiting == 1 set VertiMenuWaiting to 0 set Active to 1 set MenuID to 4 if player.getreputationthreshold RepNVNCR 1 == 0 set TrooperLimit to 100 elseif player.getreputationthreshold RepNVNCR 1 >= 0 set TrooperLimit to 100 else set TrooperLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 >= 0 set RangerLimit to 100 else set RangerLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 == 0 set HeavyTrooperLimit to 100 elseif player.getreputationthreshold RepNVNCR 1 >= 0 set HeavyTrooperLimit to 100 else set HeavyTrooperLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 >= 0 set PatrolRangerLimit to 100 else set PatrolRangerLimit to 50 endif showmessage CommanderVertibirdMenu TrooperCount TrooperLimit RangerCount RangerLimit HeavyTrooperCount HeavyTrooperLimit PatrolRangerCount PatrolRangerLimit endif if BoSVertiMenuWaiting == 1 set BoSVertiMenuWaiting to 0 set Active to 1 set MenuID to 4 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 set BoSInitiateLimit to 100 set BoSKnightLimit to 100 else set BoSInitiateLimit to 50 set BoSKnightLimit to 50 endif if player.getreputationthreshold RepNVBrotherhood 1 >= 0 set BoSPaladinLimit to 100 else set BoSPaladinLimit to 50 endif if player.getreputationthreshold RepNVBrotherhood 1 >= 0 set BoSScribeLimit to 100 else set BoSScribeLimit to 50 endif showmessage CommanderBoSVertibirdMenu BoSInitiateCount BoSInitiateLimit BoSKnightCount BoSKnightLimit BoSPaladinCount BoSPaladinLimit BoSScribeCount BoSScribeLimit endif if VertibirdWaiting > 0 set VertibirdWaiting to VertibirdWaiting + 1 if VertibirdWaiting == 6 CommanderVertibirdMarkerRef.placeatme CommanderVertibirdAir 1 0 0 endif if VertibirdWaiting == 10 set VertibirdWaiting to 0 endif endif if BoSVertibirdWaiting > 0 set BoSVertibirdWaiting to BoSVertibirdWaiting + 1 if BoSVertibirdWaiting == 6 CommanderVertibirdMarkerRef.placeatme CommanderBoSVertibirdAir 1 0 0 endif if BoSVertibirdWaiting == 10 set BoSVertibirdWaiting to 0 endif endif if Command != 0 if IsBoS == 1 set AllSoldiers to BoSInitiateCount + BoSKnightCount + BoSPaladinCount + BoSScribeCount else set AllSoldiers to TrooperCount + RangerCount + HeavyTrooperCount endif if DoneCounter >= AllSoldiers if Command == 4 if IsBoS == 1 set BoSInitiateCount to 0 set BoSKnightCount to 0 set BoSPaladinCount to 0 set BoSScribeCount to 0 else set TrooperCount to 0 set RangerCount to 0 set PatrolRangerCount to 0 set HeavyTrooperCount to 0 endif endif set Command to 0 endif endif if Active == 1 set Btn to GetButtonPressed if Btn == -1 Return elseif MenuID == -1 if Btn == 0 if GetNumKeysPressed == 1 set HotKey to GetKeyPress 0 endif endif set MenuID to 0 elseif MenuID == -2 if Btn == 0 set MenuID to -1 showmessage CommanderMainHotkeyMenu Return elseif Btn == 1 set MenuID to -3 showmessage CommanderSoldierHotkeyMenu Return elseif Btn == 2 set MenuID to -4 showmessage CommanderSoldierTypeMenu Return endif elseif MenuID == -3 if Btn == 0 if GetNumKeysPressed == 1 set CommanderSoldierMenuQuest.HotKey to GetKeyPress 0 endif endif set MenuID to 0 elseif MenuID == -4 if Btn == 0 set AllSoldiers to BoSInitiateCount + BoSKnightCount + BoSPaladinCount + BoSScribeCount if IsBoS == 1 && AllSoldiers > 0 showmessage CommanderSoldierTypeErrorBoS else set IsBoS to 1 endif elseif Btn == 1 set AllSoldiers to TrooperCount + RangerCount + HeavyTrooperCount + PatrolRangerCount if IsBoS == 1 && AllSoldiers > 0 showmessage CommanderSoldierTypeError else set IsBoS to 1 endif endif set MenuID to 0 elseif MenuID == 0 if IsBoS == 1 if Btn == 0 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSInitiateCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderBoSInitiate 1 SpawnedSoldier.moveto player 2500 2500 10 set SpawnedSoldier to 0 set BoSInitiateCount to BoSInitiateCount + 1 else showmessage CommanderBoSInitiateLimitMsg endif elseif Btn == 1 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSKnightCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderBoSKnight 1 SpawnedSoldier.moveto player 2500 2500 10 set SpawnedSoldier to 0 set BoSKnightCount to BoSKnightCount + 1 else showmessage CommanderBoSKnightLimitMsg endif elseif Btn == 2 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSPaladinCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderBoSPaladin 1 SpawnedSoldier.moveto player 2500 2500 10 set SpawnedSoldier to 0 set BoSPaladinCount to BoSPaladinCount + 1 else showmessage CommanderBoSPaladinLimitMsg endif elseif Btn == 3 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSScribeCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderBoSScribe 1 SpawnedSoldier.moveto player 2500 2500 10 set SpawnedSoldier to 0 set BoSScribeCount to BoSScribeCount + 1 else showmessage CommanderBoSScribeLimitMsg endif elseif Btn == 4 if VertiDispatched == 0 CommanderVertibirdMarkerRef.moveto player 150 150 CommanderVertibirdSoldierRef.moveto player 100 150 set VertiDispatched to 1 set BoSVertibirdWaiting to 1 else showmessage CommanderVertibirdDispMsg endif endif else if Btn == 0 if (player.getreputationthreshold RepNVNCR 1 == 0 && TrooperCount < 50) || (player.getreputationthreshold RepNVNCR 1 >= 0 && TrooperCount < 50) if GetRandomPercent >= 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderTrooper 1 else set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderTrooperFemale 1 endif SpawnedSoldier.moveto player 2500 2500 10 set SpawnedSoldier to 0 set TrooperCount to TrooperCount + 1 else showmessage CommanderTrooperLimitMsg endif elseif Btn == 1 if player.getreputationthreshold RepNVNCR 1 >= 0 && RangerCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderRanger 1 SpawnedSoldier.moveto player 1900 1900 10 set SpawnedSoldier to 0 set RangerCount to RangerCount + 1 else showmessage CommanderRangerLimitMsg endif elseif Btn == 2 if (player.getreputationthreshold RepNVNCR 1 == 0 && HeavyTrooperCount < 50) || (player.getreputationthreshold RepNVNCR 1 >= 0 && HeavyTrooperCount < 50) if GetRandomPercent >= 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderHeavyTrooper 1 else set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderHeavyTrooperFemale 1 endif SpawnedSoldier.moveto player 1900 1900 10 set SpawnedSoldier to 0 set HeavyTrooperCount to HeavyTrooperCount + 1 else showmessage CommanderHeavyTrooperLimitMsg endif elseif Btn == 3 if player.getreputationthreshold RepNVNCR 1 >= 0 && PatrolRangerCount < 50 set SpawnedSoldier to CommanderMarkerSpawn.placeatme CommanderRangerPatrol 1 SpawnedSoldier.moveto player 1900 1900 10 set SpawnedSoldier to 0 set PatrolRangerCount to PatrolRangerCount + 1 else showmessage CommanderRangerPatrolLimitMsg endif elseif Btn == 4 if VertiDispatched == 0 CommanderVertibirdMarkerRef.moveto player 150 150 CommanderVertibirdSoldierRef.moveto player 100 150 set VertiDispatched to 1 set VertibirdWaiting to 1 else showmessage CommanderVertibirdDispMsg endif endif endif if Btn == 5 set MenuID to 1 showmessage CommanderMarkerMenu return elseif Btn == 6 set MenuID to 2 showmessage CommanderOrdersMenu return endif elseif MenuID == 1 if Btn == 0 CommanderMarkerRef1.moveto player elseif Btn == 1 CommanderMarkerRef2.moveto player elseif Btn == 2 CommanderMarkerRef3.moveto player endif set MenuID to 0 elseif MenuID == 2 if Btn == 0 set Command to 1 elseif Btn == 1 set Command to 2 elseif Btn == 2 set Command to 3 elseif Btn == 3 set MenuID to 3 showmessage CommanderSoldierMarkerMenu return elseif Btn == 4 set Command to 4 endif set MenuID to 0 elseif MenuID == 3 if Btn == 0 set Command to 5 elseif Btn == 1 set Command to 6 elseif Btn == 2 set Command to 7 endif set MenuID to 0 elseif MenuID == 4 if IsBoS == 1 if Btn == 0 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSInitiateCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderBoSInitiate 1 set BoSInitiateCount to BoSInitiateCount + 1 endif elseif Btn == 1 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSKnightCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderBoSKnight 1 set BoSKnightCount to BoSKnightCount + 1 endif elseif Btn == 2 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSPaladinCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderBoSPaladin 1 set BoSPaladinCount to BoSPaladinCount + 1 endif elseif Btn == 3 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 && BoSScribeCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderBoSScribe 1 set BoSScribeCount to BoSScribeCount + 1 endif endif else if Btn == 0 if (player.getreputationthreshold RepNVNCR 1 == 0 && TrooperCount < 50) || (player.getreputationthreshold RepNVNCR 1 >= 0 && TrooperCount < 50) if GetRandomPercent >= 50 CommanderVertibirdSoldierRef.placeatme CommanderTrooper 1 else CommanderVertibirdSoldierRef.placeatme CommanderTrooperFemale 1 endif set TrooperCount to TrooperCount +1 endif elseif Btn == 1 if player.getreputationthreshold RepNVNCR 1 >= 0 && RangerCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderRanger 1 set RangerCount to RangerCount +1 endif elseif Btn == 2 if (player.getreputationthreshold RepNVNCR 1 == 0 && HeavyTrooperCount < 50) || (player.getreputationthreshold RepNVNCR 1 >= 0 && HeavyTrooperCount < 50) if GetRandomPercent >= 50 CommanderVertibirdSoldierRef.placeatme CommanderHeavyTrooper 1 else CommanderVertibirdSoldierRef.placeatme CommanderHeavyTrooperFemale 1 endif set HeavyTrooperCount to HeavyTrooperCount + 1 endif elseif Btn == 3 if player.getreputationthreshold RepNVNCR 1 >= 0 && PatrolRangerCount < 50 CommanderVertibirdSoldierRef.placeatme CommanderRangerPatrol 1 set PatrolRangerCount to PatrolRangerCount + 1 endif endif endif if Btn == 4 set MenuID to 0 set Active to 0 return endif if IsBoS == 1 if player.getreputationthreshold RepNVBrotherhood 1 >= 0 set BoSInitiateLimit to 100 set BoSKnightLimit to 100 set BoSScribeLimit to 100 else set BoSInitiateLimit to 50 set BoSKnightLimit to 50 set BoSScribeLimit to 50 endif if player.getreputationthreshold RepNVBrotherhood 1 >= 0 set BoSPaladinLimit to 100 else set BoSPaladinLimit to 50 endif showmessage CommanderBoSVertibirdMenu BoSInitiateCount BoSInitiateLimit BoSKnightCount BoSKnightLimit BoSPaladinCount BoSPaladinLimit BoSScribeCount BoSScribeLimit else if player.getreputationthreshold RepNVNCR 1 == 0 set TrooperLimit to 100 elseif player.getreputationthreshold RepNVNCR 1 >= 0 set TrooperLimit to 100 else set TrooperLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 >= 0 set RangerLimit to 100 else set RangerLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 == 0 set HeavyTrooperLimit to 100 elseif player.getreputationthreshold RepNVNCR 1 >= 0 set HeavyTrooperLimit to 100 else set HeavyTrooperLimit to 50 endif if player.getreputationthreshold RepNVNCR 1 >= 0 set PatrolRangerLimit to 100 else set PatrolRangerLimit to 50 endif showmessage CommanderVertibirdMenu TrooperCount TrooperLimit RangerCount RangerLimit HeavyTrooperCount HeavyTrooperLimit PatrolRangerCount PatrolRangerLimit endif set YPos to CommanderVertibirdSoldierRef.GetPos Y + 0.01 CommanderVertibirdSoldierRef.SetPos Y YPos return endif set Active to 0 endif endWhere I changed all:if player.getreputationthreshold RepNVFACTION 1 >= 3TOif player.getreputationthreshold RepNVFACTION 1 >= 0Where the "faction" is either bos or ncr.This enables me to recruit any soldier with no reputation, but I have not yet tested it WITH reputation. My question is: Will the player still be able to recruit even if he has gained rep with the specified FACTION? AND CommanderNPCScr:scn CommanderNPCscr short doOnce short Following short Waiting short Patrolling short Leaving short GTM1 short GTM2 short GTM3 short MenuCmd short GlobalCmd ref CT short WaitForDel float TimerDel float TimerDisable short PlSneak begin OnActivate if IsActionRef player == 1 if getdead == 0 && WaitForDel == 0 set CommanderSoldierMenuQuest.TargetRef to GetSelf set CommanderSoldierMenuQuest.MenuWaiting to 1 elseif GetDead == 1 showmessage CommanderDeadMsg elseif WaitForDel == 1 showmessage CommanderLeavingMsg endif else Activate endif end begin OnDeath if GetIsID CommanderTrooper == 1 || GetIsID CommanderTrooperFemale == 1 set CommanderMainMenuQuest.TrooperCount to CommanderMainMenuQuest.TrooperCount -1 elseif GetIsID CommanderHeavyTrooper == 1 || GetIsID CommanderHeavyTrooperFemale == 1 set CommanderMainMenuQuest.HeavyTrooperCount to CommanderMainMenuQuest.HeavyTrooperCount -1 elseif GetIsID CommanderRanger == 1 set CommanderMainMenuQuest.RangerCount to CommanderMainMenuQuest.RangerCount -1 elseif GetIsID CommanderRangerPatrol == 1 set CommanderMainMenuQuest.PatrolRangerCount to CommanderMainMenuQuest.PatrolRangerCount -1 elseif GetIsID CommanderBoSInitiate == 1 set COmmanderMainMenuQuest.BoSInitiateCount to CommanderMainMenuQuest.BoSInitiateCount - 1 elseif GetIsID CommanderBoSKnight == 1 set CommanderMainMenuQuest.BoSKnightCount to CommanderMainMenuQuest.BoSKnightCount - 1 elseif GetIsID CommanderBoSPaladin == 1 set CommanderMainMenuQuest.BoSPaladinCount to CommanderMainMenuQuest.BoSPaladinCount - 1 elseif GetIsID CommanderBoSScribe == 1 set CommanderMainMenuQuest.BoSScribeCount to CommanderMainMenuQuest.BoSScribeCount - 1 endif set WaitForDel to 1 end begin GameMode if WaitForDel == 1 if TimerDisable < 2000 set TimerDisable to TimerDisable + GetSecondsPassed else disable 1 set TimerDisable to -10 endif if TimerDel < 5000 set TimerDel to TimerDel + GetSecondsPassed else set WaitForDel to 0 set TimerDel to 0 set TimerDisable to 0 MarkForDelete endif endif if doOnce == 0 set Following to 0 set Waiting to 1 set Patrolling to 2 set Leaving to 3 set GTM1 to 5 set GTM2 to 6 set GTM3 to 7 setav Variable04 Following evp set doOnce to 1 endif if IsInCombat set CT to GetCombatTarget if CT == player || CT.GetPlayerTeammate == 1 || CT.GetInFaction FollowerFaction == 1 stopcombat CT endif endif if CommanderMainMenuQuest.Command != 0 set GlobalCmd to CommanderMainMenuQuest.Command if GlobalCmd == 1 setav Variable04 Following elseif GlobalCmd == 2 setav Variable04 Waiting elseif GlobalCmd == 3 setav Variable04 Patrolling elseif GlobalCmd == 4 setav Variable04 Leaving set WaitForDel to Waiting elseif GlobalCmd == 5 setav Variable04 GTM1 elseif GlobalCmd == 6 setav Variable04 GTM2 elseif GlobalCmd == 7 setav Variable04 GTM3 endif evp set CommanderMainMenuQuest.DoneCounter to CommanderMainMenuQuest.DoneCounter + 1 endif if CommanderSoldierMenuQuest.TargetRef == GetSelf && CommanderSoldierMenuQuest.Command != 0 set MenuCmd to CommanderSoldierMenuQuest.Command if MenuCmd == 1 setav Variable04 Following elseif MenuCmd == 2 setav Variable04 Waiting elseif MenuCmd == 3 setav Variable04 Patrolling elseif MenuCmd == 4 setav Variable04 Leaving set WaitForDel to 1 elseif MenuCmd == 5 setav Variable04 GTM1 elseif MenuCmd == 6 setav Variable04 GTM2 elseif MenuCmd == 7 setav Variable04 GTM3 endif evp set CommanderSoldierMenuQuest.Command to 0 endif if getav Variable04 == Following if IsSneaking == 1 && player.IsSneaking == 0 SetForceSneak 0 elseif IsSneaking == 0 && player.IsSneaking == 1 SetForceSneak 1 endif endif endWhere the original if TimerDisable < 2000value was2ANDWhere the originalif TimerDel < 50005So as you can see I simply increased these a whole lot (from 2 and 5 to 2000 to 5000). I tested it ingame and shot and killed a couple of my units in goodsprings, then I went to Victors House(or cabin or whatever) wich is empty and waited for 3-5 days, when I came out, they were gone. Wich is good. Now I wonder, will this method cause any errors, or clog up saves in anyway? Or will the deleting process work after loading a save aswell?(Ex: some of your men die, you save exit, and come back and wait a couple of days, and they will still disappear?) I stopped working on this. If anyone wants to continue this, you can modify it and reupload it. Giving credits to me also would be appreciated.This is the quote from the author of NCR and BoS Commander, and I will also contact him prior to uploading this, but I just wanted to get the above questions straight before I move on. IF I even move on, I have not decided that yet. Link to comment Share on other sites More sharing options...
Recommended Posts