How to create factions 101

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
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?

Fri May 20, 2016 2:14 am

1. Create your sovereign
Template:

Code: Select all

	<Sovereign UNID="&svCSCAntarctica;"
			name="CSC Antarctica"
			alignment="constructive chaos"
			>
		<Language>
			<Text id="WatchYourTargets">"\"Cease fire! Cease fire or we will engage\""</Text>
		</Language>

		<Relationships>
			<Relationship sovereign="&svAres;" disposition="neutral" mutual="true"/>
			<Relationship sovereign="&svGaianTerraformers;" disposition="neutral" mutual="true"/>
		</Relationships>
		<Events>
			;(put faction related events here. See &svCommonwealthFleet; for an example.)
		</Events>
	</Sovereign>
To create your Sovereign, you need to pick:
A. Your sovereign alignment, detailed here.
B. Set sovereign relationships.
C. Add special events for sovereign-specific achievements, etc.

2. Once that's done, all you have to do is either add that sovereign when you spawn a ship or station.
For ships, you can specify a default sovereign using defaultSovereign=""
Example:

Code: Select all

<ShipClass UNID="&scAquilaCruiser;"
			manufacturer=		"Pacific Defense Corporation"
			class=				"Aquila"
			type=				"cruiser"
			defaultSovereign=	"&svCommonwealthFleet;"

			size=				"220"
			mass=				"26000"
			cargoSpace=			"1000"
			thrustRatio=		"1"
			maxSpeed=			"16"

			cyberDefenseLevel=	"8"
			explosionType=		"&vtThermoExplosion3;"

			attributes=			"capitalShip, commonwealth, commonwealthFleet, commonwealthMilitary, genericClass"
			>
......

	</ShipClass>
For stations, you can specify a default sovereign using sovereign=""
Example:

Code: Select all

<StationType UNID="&stCSCTaskForceEncounter;"
			name=				"(CSC Task Force)"
			sovereign=			"&svCommonwealthFleet;"
			shipEncounter=		"true"
			scale=				"ship"

			attributes=			"fleet,friendly,envAir,envEarth,envFire,envWater"
			levelFrequency=		"----- -ucu- ----- ----- -----"
			maxAppearing=		"2-4"
			unique=				"inSystem"
			locationCriteria=	"+outerSystem, -planetary"
			enemyExclusionRadius="50"
			>
.....
You can set sovereign preferences using sovereign functions:
(objSetSovereign obj sovereignID) -> True/Nil
(sovSetDisposition sovereignID targetSovereignID disposition)
The options for disposition are:
"friend"
"neutral"
"enemy"

When your sovereign is fleshed out, all you have to do is add stations, ships, and items.
Optionally you can also script missions, but that's a topic for another tutorial.
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
TheLoneWolf
Militia Captain
Militia Captain
Posts: 799
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

Sat May 21, 2016 4:39 pm

How to make my faction enemy to every other faction? How to make that faction friendly to just the player?

User avatar
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?

Sat May 21, 2016 4:48 pm

From George's post, you can try setting

Code: Select all

 alignment="collective" 
Then in relationships set:

Code: Select all

 <Relationship sovereign="&svPlayer;" disposition="friend" mutual="true"/>
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
TheLoneWolf
Militia Captain
Militia Captain
Posts: 799
Joined: Thu Nov 28, 2013 5:03 pm
Location: Aboard the CSS Radiant

Sun May 22, 2016 1:33 am

Those alignment thingies. I've seen "constructive chaos" and "destructive chaos". Idk what they do. Will try "collective".

NMS
Militia Commander
Militia Commander
Posts: 387
Joined: Tue Mar 05, 2013 8:26 am

Sun May 22, 2016 9:09 am


Post Reply