Using sysGetSystemType and sysGetName-

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

I have been testing out the new functions to explore the topology and return information about upcoming systems.

Code: Select all

		<Invoke>
		(block (sysID sysName sysType sysStar)
		  (setq sysID "A6")
		  (setq sysName (sysGetName sysID))
		  (setq sysType (sysGetSystemType sysID))
		(switch
			(eq sysType &ssEarthSpaceStandard;)
				(setq sysStar "Standard")

			(eq sysType &ssEarthSpaceRedDwarf;)
				(setq sysStar "Red Dwarf")

			(eq sysType &ssEarthSpaceAsteroids;)
				(setq sysStar "Asteroids")

			(eq sysType &ssEarthSpaceDesert;)
				(setq sysStar "Desert")

			(eq sysType &ssEarthSpaceNebulae;)
				(setq sysStar "Nebulae")

			(eq sysType &ssEarthSpaceVolcanic;)
				(setq sysStar "Volcanic")

			(eq sysType &ssEarthSpaceIceRing;)
				(setq sysStar "Ice Ring")

			(eq sysType &ssEarthSpaceBinary;)
				(setq sysStar "Binary")
		)

	(objSendMessage gPlayership nil (cat sysName " is a system type " sysStar )) 

		
		)
		</Invoke>
This little invoke can be used in a ROM type of item to spit out the name and system type of a given system. In the code above the system ID is set to A6, but that can be any of the nodes- or all of them: By using sysGetNodes, a list is returned of all the nodes in the game, which could then be looped through and the name and system type can be returned and stored for various uses later- such as letting you know the Star type (each system design element has a static star type, so if we know that it is a RedDwarf system, then we know there is a Red Dwarf in the system.)

This was impossible in 098d, in fact- to even get a mapping system to work I had to prepare a data table that could be used to look up the information that these simple functions make easy, fast and fun.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

wow that's neat!
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Combine that with the (sysGetNodes), (sysGetStargates), (sysGetStargateDestination) functions and you can pull out the entire topology network with system names and system types.

Very, Very Cool!

This will be put to good use in an upcoming Network Mapper device mod I am building, which will also offer the player the ability to flag systems and write notes on a system to keep track of things in the game they would want to keep track of.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

Maybe toss in a list of all "explored" stations too?
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

:lol: Maybe just toss it in?
Rambling I wrote: pfft.. just toss it in.. doesn't even know what that would entail, does Wolfy? Oh, no.. methinks Wolfy does not.. does Wolfy know how tricky it is to get a network map together and displayed in a dockscreen? ..maybe not! ugh! no idea..none at all.. and just toss in tracking all the explored stations.. sheesh.. grumble grumble grumble
Post Reply