I was trying to get this to work stand-alone in 1.1, in the "All Loot" mode. However, I ran into to 2 problems. One, the orbit autopilot code wanted an RPCFindAngle function that I found in Dynamic Systems, but not in this mod. Second, the "all loot" mode would fail and start to spam the screen on wrecks that just had damaged equipment. This is easy to reproduce in Eridani with wrecked Centauri.
This was the patch I used to get it working:
Code: Select all
--- "Utility Items/UtilityItems.xml" 2013-06-09 22:34:38.000000000 -0700
+++ ../UtilityItems.xml 2013-11-30 23:20:24.244011059 -0800
@@ -28,6 +28,22 @@
(item list 4)
)
))
+ (setq RPCFindAngle (lambda (Object1 Object2)
+ (block (Lobject1 Lobject2)
+ (if
+ (gr (ObjGetDistance Object1 Nil) (ObjGetDistance Object2 Nil))
+ (block Nil
+ (setq greater Object1)
+ (setq lesser Object2)
+ )
+ (block Nil
+ (setq greater Object2)
+ (setq lesser Object1)
+ )
+ )
+ (sysVectorAngle (sysVectorSubtract (ObjGetPos greater) (ObjGetPos lesser)))
+ )
+ ))
)
</Globals>
@@ -305,7 +321,7 @@
(Not (eq wreck &stMRADSensor;))
(Not (eq wreck &stLogBuoy;))
(Not (eq wreck &stMajellenStargate;))
- (gr (count (objGetItems wreck "*N")) 0)
+ (gr (count (objGetItems wreck "*")) 0)
;there are no docked items:
(eq (count (staGetDockedShips wreck)) 0)
)
@@ -318,9 +334,9 @@
)
(enum (objGetItems wreck "*") Loot
(block (aNumber)
- (setq aNumber(count (objGetItems wreck "*N")))
+ (setq aNumber (count (objGetItems wreck "*")))
;(PrintTo 'log "Number itms!")
- ;(PrintTo 'log (count (objGetItems wreck "*N")))
+ ;(PrintTo 'log (count (objGetItems wreck "*")))
;(PrintTo 'log (ls (objGetMass wreck) (add (ObjGetData gPlayership "ThresholdMass") 0) ))
(if
(and
@@ -342,7 +358,7 @@
(if
(and
(eq (ObjGetData gPlayership "AutoScuttle") "on")
- (eq (count (objGetItems wreck "*N")) 0)
+ (eq (count (objGetItems wreck "*")) 0)
(ls (objGetMass wreck) (add (ObjGetData gPlayership "ThresholdMass") 0) )
)
(block Nil
@@ -357,13 +373,13 @@
;looted= say so
(block (agreement agreement2 spaceleft)
;(PrintTo 'log "Number itms!")
- ;(PrintTo 'log (count (objGetItems wreck "*N")))
+ ;(PrintTo 'log (count (objGetItems wreck "*")))
;(PrintTo 'log (ls (objGetMass wreck) (add (ObjGetData gPlayership "ThresholdMass") 0) ))
(if
(and
(eq (ObjGetData gPlayership "AutoScuttle") "on")
(ObjIsAbandoned wreck)
- (eq (count (objGetItems wreck "*N")) 0)
+ (eq (count (objGetItems wreck "*")) 0)
(ls (objGetMass wreck) (add (ObjGetData gPlayership "ThresholdMass") 0) )
(not (eq &stNavBeacon; (objGetType wreck) ))
(not (eq &stNavSign; (objGetType wreck) ))
@@ -1383,4 +1399,4 @@
</StationType>
-</TranscendenceExtension>
\ No newline at end of file
+</TranscendenceExtension>
And thanks a lot for the mod, the autopilot in particular was cool to watch!
Cheers,
CyberSoul