new encounters code help please

Freeform discussion about anything related to modding Transcendence.
Post Reply
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

I'm struggling with the new encounters feature. I think I know what it can do but I can't make it work. That 'whoosh' sound was all the info flying straight over the top of my head when I read the Encounter Guidelines ticket on the Ministry!

Using Semesta as an example (thanks DigaRW) what would the code need to be to have mostly Semesta stations in the Semesta chain but also to have some Semesta stations occurring one or two systems either side of Charon and Draconis?
Semesta.jpg
Semesta.jpg (18.59 KiB) Viewed 6044 times
I don't get the relationship between the attributes in the TopologyProcessor code and the Encounter code in stations and attributes in NodeID code. :?
I hope someone has a few minutes to give an example because I want to use this feature in mods.
Stupid code. Do what I want, not what I typed in!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 I feel I should apologize for the current station spawning system, since I’m the one who pushed for it. It was the only way to keep both George’s and Wolfy’s stations from showing all over The Backroads in places they had no business being. <.< >.> <.<;

 …Aaand I guess that means it’s up to me to help out on this…

 Unfortunately, it’s not really easy to limit topology to being mostly Semesta stations, it tends to be either standard distribution or nothing at all. Probably the easiest way to go about that would be to make stations that inherit from the vanilla stations, but change the encounter frequencies to make them less common.

 As for the <TopologyProcessor> and attribute part, the first thing is to get the processors set up. It’ll actually be slightly trickier on this due to the even number of systems, since it makes the territory slightly lopsided no matter which node you start from.

Code: Select all

	<SystemMap unid="&tpSemestaSpace;"
		displayOn="&smHumanSpace;"
		>

		<!-- Any system within two gates of Sokyo or Welborn. -->

		<TopologyProcessor priority="primaryColony">
			<System attributes="semestaSpace">
				<Criteria>
					<DistanceTo nodeID="Sokyo" min="0" max="2"/>
				</Criteria>
			</System>
			<System attributes="semestaSpace">
				<Criteria>
					<DistanceTo nodeID="Welborn" min="0" max="2"/>
				</Criteria>
			</System>
		</TopologyProcessor>
	</SystemMap>
 This will have one system of overlap between the two at Banda, but that’s fine; as long as all of the systems get marked as “semestaSpace”, it’ll all work.

 To make the Semesta stations appear in only the marked systems, the following needs added to in the <Encounter> tag:

Code: Select all

systemCriteria="+semestaSpace"
 The vanilla-inherited station copies would need a slightly different version of that to keep them limited to only the new systems:

Code: Select all

systemCriteria="+semestaSpace; -mainline"
 Also, I know you didn’t ask for this, but if you were wanting to mark Nusantara as a special node — HQ, capital, or whatnot — you could add this:

Code: Select all

		<TopologyProcessor priority="primaryColony">
			<System criteria="+nodeID:Nusantara" attributes="semestaHQ"/>
		</TopologyProcessor>
 This would make it easier to create a specific station that can only appear in that specific system or, conversely, add “-semestaHQ” to the systemCriteria of encounters you want to prohibit.

 Do note that, with the above, no vanilla encounters will happen in those systems. At all. If you want to add things like pirates, outlaws, Corporate stations, or any other such, you’ll need to either add the attribute in their systemCriteria with another topology processor or include them in the stations you make inheriting versions of.

 Also note that I haven’t checked if attributes like “commonwealthSpace” get added using the DistanceTo feature. If they do and use St. Katherine’s Star as a starting point, “commonwealthSpace” will get run into the Semesta systems, and there’s just no getting around it. Before you ask: No, there is no current way to remove attributes from systems. That’s something you’d have to pester George about adding in and I heartily encourage you to do so.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
User avatar
DigaRW
Militia Captain
Militia Captain
Posts: 517
Joined: Thu Jul 30, 2015 3:10 pm
Location: The place where I belong
Contact:

Oh man, I have been struggling to figure out how to make new feature of out-of-plane asteroid working. Now encounters stuff?

Well, it will be a long way ahead to finishing my mods. :lol:
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Post Reply