Jump to content

Trying to edit a script .. but am I editing the right one?


Skyviper086

Recommended Posts

Hello

 

I'm trying to edit the scipt for Wasteland Defense mod basically I would like to have the range for the boundary markets pushed back considerably.

 

I see like "distancetomainlogic" 500 I punched in 5500 and when spawning the sign I couldn't see it . So now I'm wondering what line in Wasteland defense do I need to edit to set the distance I'm looking for the boundry markers to have?

 

I don't think about scripting but I'd appreciate it if you could point me in the right direction.

 

Thank you.

Link to comment
Share on other sites

If you elaborated a bit, people who don't have the mod could help as well.

 

What does the mod do? What do the boundary markers do in-game? What sign could you not see?

 

It may not be a script function you are looking for, generally "markers" are used in the Render Window of the GECK, though without more information I can't really help more than that.

Link to comment
Share on other sites

Okay,

 

Well the mod is called Wasteland Defense it lets you build a fort and then defend it against a hordes of attackers, either NCR, Mutans, Bos, or Raiders (or sometimes combined groups of these). The first thing you create is a water tower and many things you place in the game (in RTS style) have to be within a boundry of the water tower you can not build outside that boundry.

 

The boarder markers (labled patrol marker A-D in the GECK) set your "boundries" for your fort. You have to be a certain distance away from the water tower to set them however you can't bee too far away either. These markers in the mod do two things. One they are the patrol waypoints for the guards you hire to patrol your base they will walk from A-D patrolling the camp and destroy any enemy they enouncter. Two they serve as the spawn point for the raiding parties. Because they serve as the spawn point for the raiding parties I'm wanting to move the "boundry marker signs" much further away from my base to allow you more time to counter their attack (because they have a way of appearing and then in a matter or seconds half your base or settlement (if using Real Time Settler) is gone. Yes its exciting but at the same time (to my knowledge) it does not allow for ample room to build a large settlement that you would like to build.

 

In addition to pushing them (the boarder markers) back I would like to have a way for when a certain item is bough (a radar dish or sat com array that you see on Black Mountain) it can spawn a map marker at the raiding parties entry point to help you locate the attacking force better throughout the vast region you control.

 

Wasteland Defense works well with Real Time Strategy because while one is focused on building a settlemetn the other is focused on building a military installation which can be used to protect that settlement.

 

I'll be more than happy to clarify other things the best I cna if you need me to.

But basically the water tower controls how far away you can build something. The markers have to placed on the boundry of your encampment and I'm trying to double if not tripple their distance so the raiding parties will have some terrain to cover before getting to my base or settlement.

 

Thank you so much for taking the time to help out.

 

I found this but I can't edit in the GECK I can change numbers but I can't save the changes GECK keeps asking me if I want to save the changes and I click yes over and over again and nothing happens and the changes don't take place. But I think this is what I need to edit.

 

if BoundaryMarkers == 0

if Stage == 2 && Activemarker.GetDistance WaterWellRef > DistanceX && SettlementStarted == 1
ShowMessage aaaSettlementTooFar
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
elseif Stage == 2 && Activemarker.GetDistance WaterWellRef < DistanceX && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
endif

elseif BoundaryMarkers == 2

SHORT boundaryend
Set boundaryend to DistanceX + 3000

if Stage == 2 && Activemarker.GetDistance WaterWellRef > boundaryend && SettlementStarted == 1
ShowMessage aaaSettlementTooFar
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
elseif Stage == 2 && Activemarker.GetDistance WaterWellRef < boundaryend && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
endif

else

SHORT boundarystart
SHORT boundaryend
Set boundarystart to DistanceX + 1000 I'm thinking these numbers are what I need to change to increase distance.
Set boundaryend to DistanceX + 2000


if Stage == 2 && Activemarker.GetDistance WaterWellRef > boundarystart && Activemarker.GetDistance WaterWellRef < boundaryend && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
ShowMessage aaaSettlementBoundaryMarkerRange
else
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
endif

Link to comment
Share on other sites

I found this but I can't edit in the GECK I can change numbers but I can't save the changes GECK keeps asking me if I want to save the changes and I click yes over and over again and nothing happens and the changes don't take place.

 

That happens when the script you are trying to save has syntax errors, as GECKNV likes to keep you guessing. If the script you posted is the entire thing, start to finish, it won't save because there are several syntax errors. Otherwise, it could be because you need NVSE to save some of the command functions such as ShowMessage.

 

 

if BoundaryMarkers == 0

 

if Stage == 2 && Activemarker.GetDistance WaterWellRef > DistanceX && SettlementStarted == 1

ShowMessage aaaSettlementTooFar

Set DistanceXTooFar to 1

activemarker.sms aaaSettlementAMGlowGreen

activemarker.pms aaaSettlementAMGlowRed

elseif Stage == 2 && Activemarker.GetDistance WaterWellRef < DistanceX && SettlementStarted == 1

Set DistanceXTooFar to 0

activemarker.sms aaaSettlementAMGlowRed

activemarker.pms aaaSettlementAMGlowGreen

endif

 

elseif BoundaryMarkers == 2

 

SHORT boundaryend

Set boundaryend to DistanceX + 3000

 

I would also try fiddling with this line, increasing the 3000 in 100 unit steps, seeing what happens.

 

 

In addition to pushing them (the boarder markers) back I would like to have a way for when a certain item is bough (a radar dish or sat com array that you see on Black Mountain) it can spawn a map marker at the raiding parties entry point to help you locate the attacking force better throughout the vast region you control.

 

This mod has BoS patrols through the DC area, and it is possible to toggle their map markers on so you can see where they are, and the markers move in real time I believe. You could download this mod, see how it handles the map markers and recreate it for your own purposes. The trigger to activate this function would, of course, be whether or not you have the satellite dish.

 

Does the script define what DistanceX is? Does it define what the BoundaryMarkers values represent? In fact, could you post the entire script, start to finish, preferably in a Spoiler window?

Link to comment
Share on other sites

I didn't think about the NVSE :pinch: :facepalm: .... however I did find a quick and sloppy fix to this (I say sloppy because it requires another MOD) Apparently RTS can move things and not be pinned down by the distanceX clause. I say that for anyone you may encounter this problem and is looking for a quick solution.

 

However now that I started this process I'd like to see it finished (so I can get a sense of accomplishment :happy:)

 

Here is the "aaaSettlementMainLogic Script" in its entirity apparently the other things that I was editing that I could edit specified the distance between you and the object that you were placing so when i set them to 5500 some poor NPC across the wasteland was probably wondering why there was a sign floating in his face.

 

 

scn aaaSettlementMainLogicScript

FLOAT my
FLOAT mx
FLOAT mz
FLOAT distance
FLOAT md
FLOAT px
FLOAT py
FLOAT pz
FLOAT az
FLOAT ax
FLOAT activemarkerXAP
FLOAT activemarkerYAP
FLOAT activemarkerZAP
FLOAT activemarkerXAPFaceing
FLOAT activemarkerYAPFaceing
FLOAT activemarkerZAPFaceing
FLOAT DeleteXP
FLOAT XP
SHORT ZoomingON
SHORT ZoomingRotatingOnOff
SHORT ObjectManipulation
SHORT Stage
SHORT DistanceX
SHORT DistanceXTooFar
SHORT SettlementStarted
SHORT LockObjects
SHORT DisplayControls
SHORT ActivateKey
SHORT BoundaryMarkers
SHORT FenceControl
SHORT RememberRotation
SHORT PlaceOnce
SHORT PlacementTimer
SHORT StationaryGuardPlacement
SHORT randomguardroll
SHORT sguardr
SHORT VertibirdAnimation
REF activemarker
REF newguard
REF newguardmarker
REF currentref
REF CurrentVertibird
REF LastPlan

;;;;;;;;;;;; Projects variables

SHORT WaterWell
SHORT WoodenPallet
SHORT ShackA
SHORT ShackB
SHORT ShackC
SHORT MetalPallet
SHORT WoodFence
SHORT WoodStairs
SHORT WoodGate
SHORT BarricadeA
SHORT BarricadeB
SHORT MobileHome
SHORT SuppliesStorage
SHORT Table
SHORT PlayerHome
SHORT PlayerHomeDoor
SHORT GuardTower
SHORT MountedTurret
SHORT Barracks
SHORT Market
SHORT PatrolMarkerA
SHORT PatrolMarkerB
SHORT PatrolMarkerC
SHORT PatrolMarkerD
SHORT RaidAlarm
SHORT Bedroll
SHORT WindmillGenerator
SHORT StreetLight
SHORT SolarGenerator
SHORT StationaryGuardSniper
SHORT StationaryGuardAR
SHORT Armory
SHORT LookoutTower
SHORT Campfire
SHORT ScavengerTruck
SHORT VertibirdStrike
SHORT CommArray
SHORT WoodBeam
SHORT SecurityCamera
SHORT MedicTent

begin gamemode

;;;;;;;;;;;; Quest processing delay setting

if Stage == 2 && WoodFence == 0 && IsKeyPressed 46
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WaterWell to 0
Set WoodenPallet to 0
Set ShackA to 0
Set ShackB to 0
Set ShackC to 0
Set MetalPallet to 0
Set WoodFence to 0
Set WoodStairs to 0
Set WoodGate to 0
Set BarricadeA to 0
Set BarricadeB to 0
Set MobileHome to 0
Set SuppliesStorage to 0
Set Table to 0
Set PlayerHome to 0
Set PlayerHomeDoor to 0
Set GuardTower to 0
Set MountedTurret to 0
Set Barracks to 0
Set Market to 0
Set PatrolMarkerA to 0
Set PatrolMarkerB to 0
Set PatrolMarkerC to 0
Set PatrolMarkerD to 0
Set RaidAlarm to 0
Set Bedroll to 0
Set WindmillGenerator to 0
Set StreetLight to 0
Set SolarGenerator to 0
Set StationaryGuardSniper to 0
Set StationaryGuardAR to 0
Set Armory to 0
Set LookoutTower to 0
Set Campfire to 0
Set ScavengerTruck to 0
Set VertibirdStrike to 0
Set CommArray to 0
Set WoodBeam to 0
Set SecurityCamera to 0
Set MedicTent to 0
if LastPlan
Player.Additem LastPlan 1
endif
EnablePlayerControls
Set Stage to 7
endif


if Stage == 0
SetQuestDelay aaaSettlementMainLogic, 0
elseif Stage == 2
SetQuestDelay aaaSettlementMainLogic, .01
endif

if aaaSettlementDaysCounter.guardcap == 0
Set aaaSettlementDaysCounter.guardcap to 25
endif

if PlacementTimer < 0
Set PlacementTimer to 0
elseif PlacementTimer > 0
Set PlacementTimer to PlacementTimer - GetSecondsPassed
else
endif

;;;;;; enabled project follows players view

if BoundaryMarkers == 0

if Stage == 2 && Activemarker.GetDistance WaterWellRef > DistanceX && SettlementStarted == 1
ShowMessage aaaSettlementTooFar
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
elseif Stage == 2 && Activemarker.GetDistance WaterWellRef < DistanceX && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
endif

elseif BoundaryMarkers == 2

SHORT boundaryend
Set boundaryend to DistanceX + 3000

if Stage == 2 && Activemarker.GetDistance WaterWellRef > boundaryend && SettlementStarted == 1
ShowMessage aaaSettlementTooFar
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
elseif Stage == 2 && Activemarker.GetDistance WaterWellRef < boundaryend && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
endif

else

SHORT boundarystart
SHORT boundaryend
Set boundarystart to DistanceX + 1000
Set boundaryend to DistanceX + 2000

if Stage == 2 && Activemarker.GetDistance WaterWellRef > boundarystart && Activemarker.GetDistance WaterWellRef < boundaryend && SettlementStarted == 1
Set DistanceXTooFar to 0
activemarker.sms aaaSettlementAMGlowRed
activemarker.pms aaaSettlementAMGlowGreen
ShowMessage aaaSettlementBoundaryMarkerRange
else
Set DistanceXTooFar to 1
activemarker.sms aaaSettlementAMGlowGreen
activemarker.pms aaaSettlementAMGlowRed
endif

endif

if Stage == 2 && IsKeyPressed 44 && ZoomingON == 0 && ZoomingRotatingOnOff == 0
Set ZoomingON to 1
Set ZoomingRotatingOnOff to 1
elseif Stage == 2 && IsKeyPressed 44 && ZoomingON == 1 && ZoomingRotatingOnOff == 0
Set ZoomingON to 0
Set ZoomingRotatingOnOff to 1
else
endif

if Stage == 2 && IsKeyPressed 256 && ZoomingON == 1 && ObjectManipulation == 1
set distance to distance - 5
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 256 && IsKeyPressed 21 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerYAPFaceing to activemarkerYAPFaceing - 1
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 256 && IsKeyPressed 45 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerXAPFaceing to activemarkerXAPFaceing - 1
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 256 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerZAPFaceing to activemarkerZAPFaceing - 1
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 257 && ZoomingON == 1 && ObjectManipulation == 1
set distance to distance + 5
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 257 && IsKeyPressed 21 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerYAPFaceing to activemarkerYAPFaceing + 1
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 257 && IsKeyPressed 45 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerXAPFaceing to activemarkerXAPFaceing + 1
Set ZoomingRotatingOnOff to 0
elseif Stage == 2 && IsKeyPressed 257 && ZoomingON == 0 && ObjectManipulation == 1
set activemarkerZAPFaceing to activemarkerZAPFaceing + 1
Set ZoomingRotatingOnOff to 0
else

endif

if Stage == 2 && activemarker != 0

if DisplayControls == 0
ShowMessage aaaSettlementSetupControls
Set DisplayControls to 1
endif

DisablePlayerControls 0 0 1 0 0 0 1

set py to player.getpos y
set px to player.getpos x
set pz to player.getpos z
set az to player.getangle z
set ax to player.getangle x
activemarker.setangle x activemarkerXAPFaceing
activemarker.setangle y activemarkerYAPFaceing
activemarker.setangle z activemarkerZAPFaceing
set mz to (sin ax) * distance
set mz to pz - mz+80
set mx to (sin az) * distance
set my to (cos az) * distance
set my to py+my
set mx to px+mx
Activemarker.setpos y my
Activemarker.setpos x mx
Activemarker.setpos z mz
if PlacementTimer == 0
Set PlaceOnce to 0
endif

endif

if Stage == 2 && (StationaryGuardSniper == 1 || StationaryGuardAR == 1)
GuardPosRef.MoveTo Activemarker
endif

if Stage == 2 && VertibirdStrike == 1
VertibirdMarkerRef.MoveTo Activemarker
endif

;;;;;; project placement handling

if IsKeyPressed ActivateKey

if DistanceXTooFar == 0
if Stage !=0
if StationaryGuardSniper == 1 || StationaryGuardAR == 1
if GuardPosRef.isFormValid == 1
Set Stage to 5
endif
else
Set Stage to 5
endif
endif
endif

endif

if Stage == 2 && WoodFence == 1 && isKeyPressed 46
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WoodFence to 0
EnablePlayerControls
Set Stage to 7
if Player.GetItemCount aaaSettlementWoodFenceING > 1
SHORT fencecount
Set fencecount to Player.GetItemCount aaaSettlementWoodFenceING
Set fencecount to fencecount - 1
Player.RemoveItem aaaSettlementWoodFenceING fencecount
endif
Set RememberRotation to 0
endif

;;;;;; project will be placed

if Stage == 7
Activemarker.enable
Set Activemarker to 0
endif

if Stage == 5

Set Stage to 0

if WaterWell == 1
WaterWellRef.MoveTo Activemarker
WaterWellRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WaterWell to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set SettlementStarted to 1
aaaSettlementMapMarker.Enable
aaaSettlementMapMarker.moveTo Player
Set aaaSettlementMainQuest.WaterWellPlaced to 1
elseif WoodenPallet == 1
Activemarker.PlaceAtMe aaaSettlementWoodenPallet 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WoodenPallet to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif ShackA == 1
Activemarker.PlaceAtMe aaaSettlementShackA 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set ShackA to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif ShackB == 1
Activemarker.PlaceAtMe aaaSettlementShackB 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set ShackB to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif ShackC == 1
Activemarker.PlaceAtMe aaaSettlementShackC 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set ShackC to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif MetalPallet == 1
Activemarker.PlaceAtMe aaaSettlementMetalPallet 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set MetalPallet to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif WoodStairs == 1
Activemarker.PlaceAtMe aaaSettlementWoodStairs 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WoodStairs to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif WoodFence == 1
if PlaceOnce == 0
Activemarker.PlaceAtMe aaaSettlementWoodFence 1
Set Stage to 2
PlaySound aaaSettlementConstruction
Set PlaceOnce to 1
Set PlacementTimer to 6
endif
Set Stage to 2
elseif WoodGate == 1
Activemarker.PlaceAtMe aaaSettlementWoodGate 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WoodGate to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif BarricadeA == 1
Activemarker.PlaceAtMe aaaSettlementBarricadeA 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set BarricadeA to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif BarricadeB == 1
Activemarker.PlaceAtMe aaaSettlementBarricadeB 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set BarricadeB to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif SuppliesStorage == 1
Activemarker.PlaceAtMe aaaSettlementSuppliesStorage 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set SuppliesStorage to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.SuppliesStoragePlaced to 1
elseif MobileHome == 1
Activemarker.PlaceAtMe aaaSettlementMobileHome 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set MobileHome to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif Table == 1
Activemarker.PlaceAtMe aaaSettlementTable 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Table to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif PlayerHome == 1
Activemarker.PlaceAtMe aaaSettlementPlayerHome 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PlayerHome to 0
EnablePlayerControls
Set Stage to 7
Player.Additem aaaSettlementPlayerHomeDoorING 1 1
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.FortHQPlaced to 1
elseif PlayerHomeDoor== 1
Activemarker.PlaceAtMe aaaSettlementPlayerHomeOutDoor 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PlayerHomeDoor to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.FortHQDoorPlaced to 1
elseif GuardTower == 1
Activemarker.PlaceAtMe aaaSettlementGuardTower 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set GuardTower to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif MountedTurret == 1
Activemarker.PlaceAtMe aaaSettlementMountedTurret 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set MountedTurret to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
if aaaSettlementDaysCounter.solargeneratorplaced == 0
ShowMessage aaaSettlementPowerSourceRequired
endif
elseif Barracks == 1
Activemarker.PlaceAtMe aaaSettlementBarracks 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Barracks to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.BarracksPlaced to 1
elseif Market == 1
Activemarker.PlaceAtMe aaaSettlementMarket 1
HankAndersonMRef.MoveTo Activemarker
HankAndersonMRef.Enable
HankAndersonPosRef.MoveTo ActiveMarker
HankAndersonPosRef.Enable
FLOAT angleoffset
Set angleoffset to activemarkerZAPFaceing + 270
HankAndersonMRef.SetAngle Z angleoffset
HankAndersonPosRef.SetAngle Z angleoffset
Set aaaSettlementDaysCounter.citizencount to aaaSettlementDaysCounter.citizencount + 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Market to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.MarketPlaced to 1
elseif PatrolMarkerA == 1
PatrolMarkerARef.MoveTo Activemarker
PatrolMarkerARef.Enable
Activemarker.PlaceAtMe DefaultHumanPatrolIdleMarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PatrolMarkerA to 0
EnablePlayerControls
Set Stage to 7
Set BoundaryMarkers to 0
PlaySound aaaSettlementConstruction
elseif PatrolMarkerB == 1
PatrolMarkerBRef.MoveTo Activemarker
PatrolMarkerBRef.Enable
Activemarker.PlaceAtMe DefaultHumanPatrolIdleMarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PatrolMarkerB to 0
EnablePlayerControls
Set Stage to 7
Set BoundaryMarkers to 0
PlaySound aaaSettlementConstruction
elseif PatrolMarkerC == 1
PatrolMarkerCRef.MoveTo Activemarker
PatrolMarkerCRef.Enable
Activemarker.PlaceAtMe DefaultHumanPatrolIdleMarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PatrolMarkerC to 0
EnablePlayerControls
Set Stage to 7
Set BoundaryMarkers to 0
PlaySound aaaSettlementConstruction
elseif PatrolMarkerD == 1
PatrolMarkerDRef.MoveTo Activemarker
PatrolMarkerDRef.Enable
Activemarker.PlaceAtMe DefaultHumanPatrolIdleMarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set PatrolMarkerD to 0
EnablePlayerControls
Set Stage to 7
Set BoundaryMarkers to 0
PlaySound aaaSettlementConstruction
Set aaaSettlementMainQuest.PatrolMarkersPlaced to 1
elseif RaidAlarm == 1
RaidAlarmRef.MoveTo Activemarker
RaidAlarmRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set RaidAlarm to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif Bedroll == 1
Activemarker.PlaceAtMe aaaSettlementBedroll 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Bedroll to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif WindmillGenerator == 1
Activemarker.PlaceAtMe aaaSettlementWindmill 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WindmillGenerator to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif StreetLight == 1
Activemarker.PlaceAtMe aaaSettlementStreetLightOff 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set StreetLight to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
if aaaSettlementDaysCounter.solargeneratorplaced == 0
ShowMessage aaaSettlementPowerSourceRequired
endif
elseif SolarGenerator == 1
SolarGeneratorRef.MoveTo Activemarker
SolarGeneratorRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set SolarGenerator to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.solargeneratorplaced to 1
elseif StationaryGuardSniper == 1
GuardPosRef.MoveTo Activemarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set StationaryGuardSniper to 0
EnablePlayerControls
Set Stage to 7
Set StationaryGuardPlacement to 1
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.guardcount to aaaSettlementDaysCounter.guardcount + 1
Set aaaSettlementDaysCounter.citizencount to aaaSettlementDaysCounter.citizencount + 1
elseif StationaryGuardAR == 1
GuardPosRef.MoveTo Activemarker
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set StationaryGuardAR to 0
EnablePlayerControls
Set Stage to 7
Set StationaryGuardPlacement to 2
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.guardcount to aaaSettlementDaysCounter.guardcount + 1
Set aaaSettlementDaysCounter.citizencount to aaaSettlementDaysCounter.citizencount + 1
elseif Armory == 1
Activemarker.PlaceAtMe aaaSettlementArmory 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Armory to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.armoryplaced to 1
elseif LookoutTower == 1
Activemarker.PlaceAtMe aaaSettlementLookoutTower 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set LookoutTower to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif Campfire == 1
Activemarker.PlaceAtMe aaaSettlementCampfireOff 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set Campfire to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif ScavengerTruck == 1
ScavengerTruckRef.MoveTo Activemarker
ScavengerTruckRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set ScavengerTruck to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif VertibirdStrike == 1
VertibirdMarkerRef.MoveTo Activemarker
VertibirdRef.MoveTo PatrolMarkerARef 0, 0, 4320
VertibirdRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set VertibirdStrike to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementFixOnThatPos
Set BoundaryMarkers to 0
elseif CommArray == 1
Activemarker.PlaceAtMe aaaSettlementCommArray 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set CommArray to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif WoodBeam == 1
Activemarker.PlaceAtMe aaaSettlementWoodBeam 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set WoodBeam to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
elseif SecurityCamera == 1
SecurityCameraRef.MoveTo Activemarker
SecurityCameraRef.Enable
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set SecurityCamera to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.securitycameraplaced to 1
elseif MedicTent == 1
Activemarker.PlaceAtMe aaaSettlementMedictent 1
Activemarker.moveTo DeleteMarkerRef
set DeleteXP to Activemarker.getPos x
Activemarker.setPos x DeleteXP
Activemarker.disable
Set Activemarker to 0
Set MedicTent to 0
EnablePlayerControls
Set Stage to 7
PlaySound aaaSettlementConstruction
Set aaaSettlementDaysCounter.medictentplaced to 1
endif

endif

if StationaryGuardPlacement == 1 && Stage == 7

Set randomguardroll to GetRandomPercent

if randomguardroll < 33
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSSniperAAMTemplate
elseif randomguardroll < 66
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSSniperAF
else
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSSniperHM
endif

newguard.MoveTo GuardPosRef

Set newguardmarker to GuardPosRef.PlaceAtMe XMarker

Set StationaryGuardPlacement to 0

Set newguard to 0

elseif StationaryGuardPlacement == 2 && Stage == 7

Set randomguardroll to GetRandomPercent

if randomguardroll < 33
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSARAAMTemplate
elseif randomguardroll < 66
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSARAF
else
Set newguard to GuardPosRef.PlaceAtMe aaaSettlementFortGuardSARCF
endif

newguard.MoveTo GuardPosRef

Set newguardmarker to GuardPosRef.PlaceAtMe XMarker

Set StationaryGuardPlacement to 0

Set newguard to 0

endif

if Stage == 6
Set XP to Activemarker.getPos x
Activemarker.setPos x XP
Set ActivateKey to GetControl 5
if RememberRotation == 0
Set activemarkerXAPFaceing to 0
Set activemarkerYAPFaceing to 0
endif
Set Stage to 2
endif

end

 

 

I'll take a look at the other mod because that does sound exactly what I was looking for. Once again thank you so much for taking the time to do this

Link to comment
Share on other sites

It would seem that the key is in finding out what the BoundaryMarker values represent, as that section clearly deals with distance limitations, making the marker turn red and showing the "too far" message.

 

The DistanceX + 1000 and 2000 values would seem to relate to setting the patrol markers, but the DistanceX + 3000 could relate to enemy spawning perhaps? You say that the patrol markers are also spawn points, does that mean the enemies spawn inside your camp, or that the guards are patrolling outside? Do the enemies literally spawn on top of the guards' heads, or are they a little distance away? If it's the latter, I'd try whacking the 3000 up to 4000 and spawn some enemies. Bearing in mind you might have to rebuild your camp for the changes to take effect.

Link to comment
Share on other sites

It's the latter. You got it right the enemy spawn where the markers are and the patrol guards are scripted to walk between the markers so sometimes they encoutner enemy foces right on top of their heads. (I figured that own when I placed mines around the signs they enemy would spawn and then die. They spawn at the sign and then move the water tower (which is in the heart of your town)

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...