map mod

Freeform discussion about anything related to modding Transcendence.
Post Reply
muffildy
Anarchist
Anarchist
Posts: 19
Joined: Fri Jul 15, 2011 1:16 am

Hello, i found a map mod and downloaded it, but it doesnt give 100% chance of finding everything.
I wanted someone to tell me how to rewrite this code:
<Invoke>
(block (obj mappedAll mapEnemy)
(setq mappedAll True)

; Compute the probability of mapping an enemy station
(switch
(geq (sysGetLevel) 7)
(setq mapEnemy 0)

(geq (sysGetLevel) 3)
(setq mapEnemy (subtract 360 (multiply 72 (subtract (sysGetLevel) 2))))

(setq mapEnemy 360)
)

; Iterate over all stations in the system
(enum (sysFindObject gSource "Ts") obj
(switch
(and (objIsEnemy gSource obj) (gr (add (objGetDestiny obj) 1) mapEnemy))
(setq mappedAll Nil)

(objHasAttribute obj "uncharted")
(setq mappedAll Nil)

(objSetKnown obj)
)
)

(if mappedAll
(objSendMessage gSource Nil "Sir, map download is complete")
(objSendMessage gSource Nil "Map download is interrupted sir, we only mapped major stations")
)
)
so that it would always return map download is complete.
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

The whole code is mostly working on deciding which stations not to map. Code that will make it always scan everything can be simplified to this:

Code: Select all

(enum (sysFindObject gSource "Ts") obj
	(objSetKnown obj)
)
Just run that and everything is mapped
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
muffildy
Anarchist
Anarchist
Posts: 19
Joined: Fri Jul 15, 2011 1:16 am

excellent! thank you
Post Reply