StarSystem for my mod

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

I have a question
1. How to make a new system connected with St.Katharine?
2. How to make the Stargate to that new system spawn in asteroid in St.Katharine?
3. How to add special encounter to the new system?
4. How to make the node in galactic map is placed in right side of St.Katharine?
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
User avatar
TheLoneWolf
Militia Captain
Militia Captain
Posts: 802
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

Idk much. As SKS is a pre made system, you can add the stargate anywhere you like in its .xml. And you know how to position it.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

if you want to dynamically create a stargate to your system in St Kathrine without overriding the st kathrine system to place your stargate in, you have to do like the Huari system:

- first in OnGlobalTopologyCreated use sysAddStargateTopology to create the topology node to your system
- then in OnGlobalSystemCreated when you enter st kathrine, sysCreateStargate to place the stargate in the system.

using this, you can create your own topology branches and attach them to vanilla systems.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

3.to make a special encounter in your system, prepare a station that will bear the code of the special event, if you don't want a special station to appear in your system, you can always use a station disguised as a wreck (like xenophobes code) or as an asteroid.
you can then place all the events you need in it with their triggers (could be recon, could be attacking, could just be automatic when you enter the system)


4. the position of the node on the starmap is described in the <SystemMap> <Node>
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

digdug wrote:3.to make a special encounter in your system, prepare a station that will bear the code of the special event, if you don't want a special station to appear in your system, you can always use a station disguised as a wreck (like xenophobes code) or as an asteroid.
you can then place all the events you need in it with their triggers (could be recon, could be attacking, could just be automatic when you enter the system)


4. the position of the node on the starmap is described in the <SystemMap> <Node>
Ok, thanks...
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

digdug wrote:if you want to dynamically create a stargate to your system in St Kathrine without overriding the st kathrine system to place your stargate in, you have to do like the Huari system:

- first in OnGlobalTopologyCreated use sysAddStargateTopology to create the topology node to your system
- then in OnGlobalSystemCreated when you enter st kathrine, sysCreateStargate to place the stargate in the system.

using this, you can create your own topology branches and attach them to vanilla systems.
Edit: Please give me Example...
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Here's an example for posterity:

Code: Select all

		<Events>
			<OnGlobalTopologyCreated>
				(block Nil
					;(sysAddStargateTopology [nodeID] gateID destNodeID destGateID)
					(sysAddStargateTopology "SK" "GateToHuaramarca" "Huaramarca" "Inbound")
					)
			</OnGlobalTopologyCreated>
			<OnGlobalSystemCreated>
				(block Nil
					;(sysCreateStargate unid pos gateID [destNodeID destGateID])
					(sysCreateStargate &stUnchartedMajellenStargate; (sysVectorPolarOffset Nil 0 0) "GateToHuaramarca" )
					)
			</OnGlobalSystemCreated>
		</Events>
Stick those events in any unid and it should work.
The idea of the function is that you go from nodeID to destNodeID. GateID and destgateID are the names of the stargates in the nodeID system and destNodeID respectively.

These node ID's are found in Transcendence_Source, which can be found by decompiling Transcendence with Transdata from the command line.

(sysAddStargateTopology "SK" "GateToHuaramarca" "Huaramarca" "Inbound")

"SK" is the node of St. Katharine's Star found in HumanSpaceMal.xml.
If you have Notepad ++, press ctrl+f, then under "find in files" google for "St. Katharine" without quotes. Set your directory to Transcendence_Source. This lets you look at the Vanilla xml to potentially find the node ID of the system.

Here is the topology code for St. Kat's:

Code: Select all

		<Node ID="SK" x="228" y="20">
			<System
					name=			"St. Katharine's Star"
					level=			"4"
					attributes=		"humanSpace, mainline, stKatharine"
					>
				<System UNID="&ssStKatharine;"/>
			</System>
		</Node>
Here you can clearly see that Node ID="SK".

"GateToHuaramarca" is the name of the gate in St. Kat's that leads to Huaramarca.

"Huaramarca" is the node ID of Huaramarca.
Here is the topology code for Huaramarca found in Huari.xml

Code: Select all

		<Node ID="Huaramarca" x="-139" y="453">
			<System 
					name=			"Huaramarca"
					level=			"6"
					attributes=		"huari, humanSpace, noAutoGateCreate"
					>
				<System UNID="&ssHuaramarca;"/>
			</System>

			<Stargates>
				<Stargate Name="Inbound"  DestID="[Prev]"/>
			</Stargates>
		</Node>
"Inbound" is the name of the stargate you want "GateToHuaramarca" to connect to. If there are multiple stargates, make sure to connect them properly!


Warning! Connecting multiple gates to one gate might cause issues. Normally, if you use sysAddStargateTopology and sysCreateStargate on a preexisting gate G going to gate F travel will be bidirectional unless gate F was already connected to gate E during topology generation.
Then the map is like this:
E<->F<-G

You can use this not as a bug, but as a trick to simulate one-way stargates by connecting stargate A to stargate B, then have stargate B go to stargate C.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

Thank you RPC :)
But I have other question,
The Stargate is placed in outer orbit, how to place it in inner orbit, in asteroid belt exactly?
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

That's hard to do actually. I think you can just use SysfindObject on asteroids and put it on the nearest one.

try :
(item (sysFindObject nil "S:d +asteroid;") 0) and use that object as the center for a SysVectorPolarOffset, aka:
(sysVectorPolarOffset (item (sysFindObject nil "S:d +asteroid;") 0) (random 0 359) (random 10 40))


If you're lucky you get it next to the closest asteroid belt, if you're unlucky the station is next to a stray asteroid that's close to the star.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

Thank you! Thank you! Thank you! You helped me. It working!
And now, I will start develop my mod again...
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Many thanks, digdug and RPC. I can use this as well. Nice work :D .
Stupid code. Do what I want, not what I typed in!
Post Reply