Reditude Posted July 27, 2012 Share Posted July 27, 2012 i rearm the guards too so it doesnt matter horribly which stationary guards are kept just so long as they arent causing crashes, i also think itd be a cool idea if they paced a bit so they dont seem so inhuman. Link to comment Share on other sites More sharing options...
AgraveldTor Posted July 28, 2012 Author Share Posted July 28, 2012 I have compared the stationary guard script from the V1.7 alternitive file to the 1.8 Version. V1.7 alt uses an old script and looks stable to my untrained eyes.V1.8 has more components to its script, including a large section just for "thismarker" ref. Heres what i mean.V1.7 alt stationary Guard Script scn aaaSettlementStationaryGuardScriptv1.7 SHORT Button SHORT Active SHORT recalled SHORT rearmed SHORT healed SHORT count SHORT doonce FLOAT posx FLOAT posy FLOAT posz begin onload if doonce == 0 Set posx to GetPos x Set posy to GetPos y Set posz to GetPos z Set doonce to 1 endif end begin onactivate if getdead == 1 if IsActionRef player == 0 RemoveAllItems ScavengerTruckRef 0 disable markfordelete else ShowMessage aaaSettlementBodyControl Set Active to 1 endif else Activate endif end begin gamemode if aaaSettlementFortRaid.healguards == 1 && healed == 0 ResetHealth Set aaaSettlementFortRaid.recalltimer to 5 Set healed to 1 endif if aaaSettlementFortRaid.rearmguards == 1 && rearmed == 0 if GetItemCount Ammo308 > 0 Set count to GetItemCount Ammo308 RemoveItem Ammo308 count endif if GetItemCount WeapSniperRifle > 0 Set count to GetItemCount WeapSniperRifle RemoveItem WeapSniperRifle count AddItem WithAmmoSniperRifleLoot 1 endif if GetItemCount Ammo5mm > 0 Set count to GetItemCount Ammo5mm RemoveItem Ammo5mm count endif if GetItemCount WeapNVAssaultCarbine > 0 Set count to GetItemCount WeapNVAssaultCarbine RemoveItem WeapNVAssaultCarbine count AddItem WithAmmoNVAssaultCarbineLoot 1 endif AddItem LootGrenadeFrag10 1 Set aaaSettlementFortRaid.recalltimer to 5 Set rearmed to 1 endif if healed == 1 && aaaSettlementFortRaid.recalltimer == 0 Set aaaSettlementFortRaid.healguards to 0 Set healed to 0 endif if rearmed == 1 && aaaSettlementFortRaid.recalltimer == 0 Set aaaSettlementFortRaid.rearmguards to 0 Set rearmed to 0 endif if Active == 1 Set Button to GetButtonPressed if Button == 0 Activate Set Active to 0 elseif Button == 1 disable markfordelete Set Active to 0 elseif Button == 2 Set Active to 0 endif endif end begin onCombatEnd if isincombat == 0 SetPos x posx SetPos y posy SetPos z posz endif end begin onDeath Set aaaSettlementDaysCounter.citizencount to aaaSettlementDaysCounter.citizencount - 1 Set aaaSettlementDaysCounter.guardcount to aaaSettlementDaysCounter.guardcount - 1 if GetCauseOfDeath == -1 disable markfordelete endif end V1.8 Stationary Guard Script scn aaaSettlementStationaryGuardScriptV1.8 SHORT Button SHORT Active REF thismarker SHORT Timer SHORT recalled SHORT rearmed SHORT healed SHORT count SHORT doonce FLOAT dx FLOAT dy FLOAT dz FLOAT d2 begin onload if isFormValid == 1 && doonce == 0 if thismarker == 0 && aaaSettlementMainLogic.newguardmarker != 0 Set thismarker to aaaSettlementMainLogic.newguardmarker Set aaaSettlementMainLogic.newguardmarker to 0 endif Set doonce to 1 endif end begin onactivate if getdead == 1 if IsActionRef player == 0 RemoveAllItems ScavengerTruckRef 0 disable markfordelete else ShowMessage aaaSettlementBodyControl Set Active to 1 endif else Activate endif end begin gamemode if aaaSettlementFortRaid.healguards == 1 && healed == 0 ResetHealth Set aaaSettlementFortRaid.recalltimer to 5 Set healed to 1 endif if aaaSettlementFortRaid.rearmguards == 1 && rearmed == 0 if GetItemCount Ammo308 > 0 Set count to GetItemCount Ammo308 RemoveItem Ammo308 count endif if GetItemCount WeapSniperRifle > 0 Set count to GetItemCount WeapSniperRifle RemoveItem WeapSniperRifle count AddItem WithAmmoSniperRifleLoot 1 endif if GetItemCount Ammo5mm > 0 Set count to GetItemCount Ammo5mm RemoveItem Ammo5mm count endif if GetItemCount WeapNVAssaultCarbine > 0 Set count to GetItemCount WeapNVAssaultCarbine RemoveItem WeapNVAssaultCarbine count AddItem WithAmmoNVAssaultCarbineLoot 1 endif AddItem LootGrenadeFrag10 1 Set aaaSettlementFortRaid.recalltimer to 5 Set rearmed to 1 endif if healed == 1 && aaaSettlementFortRaid.recalltimer == 0 Set aaaSettlementFortRaid.healguards to 0 Set healed to 0 endif if rearmed == 1 && aaaSettlementFortRaid.recalltimer == 0 Set aaaSettlementFortRaid.rearmguards to 0 Set rearmed to 0 endif if aaaSettlementFortRaid.resetguards == 1 && recalled == 0 if isFormValid == 1 && thismarker.isFormValid == 1 if thismarker thismarker.disable thismarker.markfordelete endif endif kill disable markfordelete Set aaaSettlementFortRaid.recalltimer to 5 Set recalled to 1 endif if Active == 1 Set Button to GetButtonPressed if Button == 0 Activate Set Active to 0 elseif Button == 1 disable markfordelete Set Active to 0 elseif Button == 2 Set Active to 0 endif endif if getdead == 0 if isFormValid == 1 && thismarker.isFormValid == 1 && thismarker set dx to getpos x set dx to dx - thismarker.getpos x set dy to getpos y set dy to dy - thismarker.getpos y set dz to getpos z set dz to dz - thismarker.getpos z set d2 to dx * dx + dy * dy + dz * dz if isFormValid == 1 && d2 > 4096 && (GetInSameCell player || Player.GetInSameCell WaterWellRef || Player.GetInSameCell RaidAlarmRef || Player.GetInSameCell PatrolMarkerARef || Player.GetInSameCell PatrolMarkerBRef || Player.GetInSameCell PatrolMarkerCRef || Player.GetInSameCell PatrolMarkerDRef) if thismarker.isFormValid == 1 && thismarker if getdead == 0 && isincombat == 0 MoveTo thismarker endif endif endif endif else if isFormValid == 1 && thismarker.isFormValid == 1 if thismarker thismarker.disable thismarker.markfordelete endif endif endif end begin onCombatEnd if isFormValid == 1 && thismarker.isFormValid == 1 if getdead == 0 && isincombat == 0 && thismarker MoveTo thismarker endif endif end begin onDeath if isFormValid == 1 && thismarker.isFormValid == 1 if thismarker thismarker.disable thismarker.markfordelete endif endif Set aaaSettlementDaysCounter.citizencount to aaaSettlementDaysCounter.citizencount - 1 Set aaaSettlementDaysCounter.guardcount to aaaSettlementDaysCounter.guardcount - 1 if GetCauseOfDeath == -1 if isFormValid == 1 && thismarker.isFormValid == 1 if thismarker thismarker.disable thismarker.markfordelete endif endif disable markfordelete endif end Link to comment Share on other sites More sharing options...
kunun Posted July 28, 2012 Share Posted July 28, 2012 It might be worth also comparing those two to the other version of the completely stationary guards in 'Wasteland Defense v1-7 FULL', to see the changes he made that time in order to promote stability. Sorry I'm little help when it comes to scripting, I can follow some of it, but a lot means nothing to me. I'm guessing we need somone who really knows his scripting to help. I wouldn't know where to start with identifying an element that causes 'higher chance of corrupting save files and crashing'. Since it's only the 1.7 alternate moving guards that we know to be stable, it might be best to stick with these for now and put up with the falling through tower floors issue. I wonder what the difference is between turret and npc behaviour, because turrets tend to stay where you put them. Link to comment Share on other sites More sharing options...
AgraveldTor Posted July 29, 2012 Author Share Posted July 29, 2012 Ok so i have spent all day cramming script terminology, uses and all lil idiocincricys (However you spell it) into my head.Did a few test runs on a test esp, then went back to figuring out WD. Now the fun part. After altering the Stationary Guard ScriptI went to save it and, what do you know, Geck wont save the script. I've searched Google, i've spent the rest of my day searching the nexus. So, sorry but fixing the stationary guard script is gunna take a bit longer. @kunun - I have all three. There are some differences but the biggest one i noticed it that V1.7 orig and V1.8 both have a timer, But V1.7 Alt doesn't.we know he said and i quote:-Removed stationary guard timers and replaced it with a new distance system (should be more stable)But the really weird thing is, to me anyway, that V1.7 orig and V1.8 both have "ref thismarker" section at the bottom of their scripts but the "stable" V1.7 Alt doesn't. So, i have no idea if it is just me or what. Im gunna put a call out for a more experianced scripter to come help me and i will stick to building things and ppl. Im sorry to all reading this, if a tone or mood is in my writing, plz dont worry, im staying with this project. Link to comment Share on other sites More sharing options...
Reditude Posted July 29, 2012 Share Posted July 29, 2012 it sounds as though you may have discovered the problem with the stationary guards, which if so a big congratulations i wonder if we can get a scripter to come in to at least check your work? Link to comment Share on other sites More sharing options...
AgraveldTor Posted July 29, 2012 Author Share Posted July 29, 2012 I can do it myself but my problem is that i cant save scripts while modding WD.Im using Geckpu and its not saying theres a problem so i dont know.I will figure it out when i get back from taking the kids to school. Link to comment Share on other sites More sharing options...
Reditude Posted July 30, 2012 Share Posted July 30, 2012 I've been looking for scripters but haven't had much luck at all so far. hows it comin on your end? Link to comment Share on other sites More sharing options...
AgraveldTor Posted July 30, 2012 Author Share Posted July 30, 2012 Between working on WD and RTS, i am not bored. Though my head is starting to hurt from figuring out their processes. But, for WD, i have created 4 more enemy raiders, multiple blueprints and im working on a faction look-alike system.I got the idea from here. But that mod is .txt docs. Im trying to work it into the player comp inside the house so you dont have to use the console on every guard. Link to comment Share on other sites More sharing options...
Reditude Posted July 30, 2012 Share Posted July 30, 2012 sounds like your having a blast. im going to keep looking for scripters as well i really want to see this thrive and i know it has the potential to be the number 1 mod. Link to comment Share on other sites More sharing options...
AgraveldTor Posted July 30, 2012 Author Share Posted July 30, 2012 (edited) Like i said before, im having problems saving the altered original scripts. So i have made the new raiders but i cant include them in the raid script, same with the blueprints.I have been scouring the net for solutions but the best i can find is to use Geckpu. So im am gunna try somethings today and see what i can come up with. But i am having a blast. WD and RTS are great mods and since noone is working on them, i thought i might take the reigns and keep them going. Edited July 30, 2012 by AgraveldTor Link to comment Share on other sites More sharing options...
Recommended Posts