Skip to content

Commit

Permalink
Add mod files
Browse files Browse the repository at this point in the history
  • Loading branch information
osvein committed Nov 27, 2017
1 parent 4802dd6 commit 0cc390b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PlantRandomizer - Main.achlist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"Data\\SCRIPTS\\WorkshopObjectRandomizerScript.pex",
"Data\\Scripts\\Source\\User\\WorkshopObjectRandomizerScript.psc"
]
Binary file added PlantRandomizer.esp
Binary file not shown.
8 changes: 8 additions & 0 deletions PlantRandomizer.modinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Categories" :
[
"Workshop"
],
"Description" : "Randomizes the scale and rotation of plants placed in the workshop\r\n\r\nLets you plant crops quickly without sacrificing variation\r\n\r\nhttps://github.com/osvein/FO4_PlantRandomizer\r\n",
"Title" : "Plant Randomizer"
}
12 changes: 12 additions & 0 deletions Scripts/Source/User/WorkshopObjectRandomizerScript.psc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Scriptname WorkshopObjectRandomizerScript extends ObjectReference Const
{Sets random scale and z angle on objects when placed in the workshop}

float angleMin = 0.0 const
float angleMax = 360.0 const
float scaleMin = 0.8 const
float scaleMax = 1.1 const

Event OnWorkshopObjectPlaced(ObjectReference akReference)
self.SetAngle(0, 0, Utility.RandomFloat(angleMin, angleMax))
self.SetScale(Utility.RandomFloat(scaleMin, scaleMax))
EndEvent

0 comments on commit 0cc390b

Please sign in to comment.