Jump to content


CourseForge Script Patch For locating Rogue Pins & Tees - Updated

  • Please log in to reply
4 replies to this topic

#1 Larrykuh


    Advanced Member

  • Members
  • PipPipPip
  • 175 posts

Posted 24 June 2017 - 03:51 AM

It seems I somehow missed adding the updated "FileUtilUI.cs" script to the Unity package. If you have downloaded and installed the patch, download and install this updated package. The link is at the bottom of this message.


A couple months ago I became frustrated when I built a course, loaded it into JNPG, only to realize I had turned the meshes off and found Hacker Harry and the ball were floating above a strange looking terrain. Sound familiar? After this happened several times, I decided to look at the scripts to see if a warning message could be displayed during the pre-build tests. While in the scripts, I decided to fix the test for pins not placed on a green spline. It was giving me hole 59, 36, etc., even though I only had 18 holes defined. Of course I began looking for the bad pin starting on hole 1 only to find it was on hole 18. What was happening is it was using the index of the pin in the Pins table as the hole number rather than the actual hole number.


An additional modification was to rename the tee, pin, shot point, etc. identifiers for holes 1 thru 9 to have a leading zero. That way when you turn DEBUG ON, a search for h01 gives you only the objects for hole 1, and they are not intermixed in a list of objects for holes 10 thru 18 as they were previously.


Larry (axe360) recently started to use the patched scripts and located a bug in the original CF script that terminated the pre-build tests if a pin was accidentally placed on the terrain, not on a spline. I had to fire up Visual Studio and learn how to activate the debugger, and fortunately found the culprit line of code. Then I decided to expand the tests for tees that were not placed on a tee spline. We now have tests to display all Rogue pins and tees.


This image demonstrates all of the enhanced messages:



The patch overwrites the "FileUtilUI.cs" and "CourseBase.Plant.cs" scripts located in the Project->Perfect Parallel folder. I believe Challenge tees will be reported as Rogue tees. If that is a problem, I can probably exclude them from the tees test.



  • worrybirdie likes this

#2 axe360


    Advanced Member

  • Members
  • PipPipPip
  • 6,015 posts
  • LocationSo Cal U.S.A.

Posted 24 June 2017 - 02:03 PM

It's an Amazing tool, is a tremendous help. Thank you Larry for this.. I recommend Every one install it and hopefully it will soon be a part of Course Forge install Package. Awesome tool!!

Should at the very least be a Pinned Topic.


It' so simple, just install it and forget about it, when you compile, read the warnings like we do every time and if you accidentally misplaced a tee or pin, it Warns you and tells you where they are.


If Anyone has ever had to hunt down a rogue pin, you will thank Larrykuh, big time, for this addition.

In Progress: Tortolita/Wild Burro @ Dove Mountain AZ  https://www.thegolfc...vemountain.com/

Released Courses:

Real-Aronimink GC PA-Amana-Colonies GC IA

Fictional-The Grinder Anytown U.S.A.


Acer Predator G3-710
Intel Icore5-6400 2.70Ghz Quad-Core
Win10 64-Bit
8gb DDR4 Mem.




#3 worrybirdie


    Advanced Member

  • Members
  • PipPipPip
  • 877 posts
  • LocationPismo Beach, California

Posted 24 June 2017 - 06:52 PM

LK, this looks like a great improvement!

#4 Larrykuh


    Advanced Member

  • Members
  • PipPipPip
  • 175 posts

Posted 25 June 2017 - 10:14 PM

I somehow missed adding the most important script, "FileUtilUI.cs", to the Unity package. This is the script where all the magic is located. See the bottom of the first message in this topic to get the updated package.

#5 Dace


    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 21 August 2018 - 08:02 PM

Awesome tool Larry.  Thank you very much

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users