New mod - allows you to switch sovereigns

Freeform discussion about anything related to modding Transcendence.
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

http://xelerus.unrealcrystal.com/index.php?s=mod&id=40

For example, if you use an ares imitation ROM, you become a member of the Ares Orthodoxy and an enemy of the Commonwealth. A normal imitation ROM will return you to normal, but if you don't have one on hand, a commonwealth imitation ROM will do just fine.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Interesting idea. Simple too- looking at the mod script- wish that would work for Player Ships as easily. Or could it?
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

Periculi wrote:Interesting idea. Simple too- looking at the mod script- wish that would work for Player Ships as easily. Or could it?
Edit: I think I understand: you just need to add an OnCreate tag to a ship.
Sponge
Militia Commander
Militia Commander
Posts: 250
Joined: Sun Jan 28, 2007 7:51 pm

This seems pretty cool. I'll have to try it out later. You didn't happen to make all friendly stations dock-able, did you?
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

Well..

Can't really make them all un-dockable, can I?
Sponge
Militia Commander
Militia Commander
Posts: 250
Joined: Sun Jan 28, 2007 7:51 pm

Hm.. I haven't looked at the XMLs in a long time, so I'm not too sure how sovereigns work anymore. I'll try to explain it a bit more clearly. If you were aligned with the Ares, and you docked at one of their stations, would they have anything to offer like the Commonwealth?
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

No. To do that in an extension would require me to override all the stations defined in the source XML by redefining them in an extension, and that would take a lot of work. You aren't supposed to be able to dock at enemy stations, so when you do so, you get to loot it, regardless of whether the station's actually destroyed or not.

Edit: You know, if george implements sovereign-switching into the game, that would probably be quite interesting.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

If I only could be taught the basics of dockscreens...
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

Once you understand the code, it's pretty simple, though I admit I had some trouble with them at first.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

could you give me some examples? I have been thinking of doing a pirate sovereign mod...
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

From my mod: (copy into Notepad first)

It's very incomplete, but I'm hoping it'll give you the idea of how dockscreens work.

Code: Select all

	<StationType UNID="&stDeviantBase;"
			name=				"Deviant Base"
			sovereign=			"&svDeviant;"
			abandonedScreen=	"&dsAbandonedStation;"
			dockScreen=			"Main"
			dockingPorts=		"8"
			canAttack=			"true"

			multiHull=			"true"
			armorID=			"&itCollectivePlate;"
			maxHitPoints=		"500"
			hitPoints=			"500"
			fireRateAdj=		"40"
			repairRate=			"2"
			shipRepairRate=		"3"
			ejectaType=			"&vtWreckEjecta;"

			attributes=			"enemy, populated"
			level=				"3"
			alertWhenAttacked=	"100"

			definiteArticle=	"true"
			>

		<Image			imageID="&rsStations8;" imageX="0" imageY="192" imageWidth="256" imageHeight="256"/>

		<Devices>
			<Device deviceID="&itCollectiveDisintegrator;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveExpander;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveLauncher;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveDeflectorB;"/>
		</Devices>

		<Ships>
			<Ship count="2d4+2" class="&scCollectiveGunship;" orders="patrol" patrolDist="15"/>
			<Ship count="2d4+2" class="&scCollectiveBomber;" orders="patrol" patrolDist="15"/>
		</Ships>

		<Items>
			<Item count="1d2+1" item="&itCollectiveDeflector;"/>
			<Item count="2d2+2" item="&itCollectivePlate;"/>
			<Item count="1d2" item="&itCollectiveDisintegrator;"/>
			<Item count="1d2" item="&itCollectiveRepulsorWave;"/>
			<Item count="1d2" item="&itCollectiveExpander;"/>
			<Item count="1d2" item="&itCollectiveLauncher;"/>
			<Item count="50d50" item="&itHelium3FuelRod;"/>
			<Item count="50d50" item="&itHelium3FuelRod;"/>
			<Table>
				<Lookup chance="40" count="1" table="&trConsumables4;"/>
				<Lookup chance="40" count="1" table="&trMinorItem4;"/>
				<Lookup chance="20" count="1" table="&trMajorItem4;"/>
			</Table>
		</Items>

		<DockingPorts>
			<Port x="-6"	y="114" />
			<Port x="75"	y="103" />
			<Port x="117"	y="70" />
			<Port x="148"	y="-5" />
			<Port x="135"	y="-68" />
			<Port x="75"	y="-124" />
			<Port x="7"		y="-143" />
			<Port x="-89"	y="-116" />
			<Port x="-127"	y="-72" />
			<Port x="-142"	y="8" />
			<Port x="-120"	y="58" />
			<Port x="-58"	y="103" />
		</DockingPorts>

		<DockScreens>

			<Main
				name=			"=(objGetName gSource)"
				>

				<OnInit>
					(intDeviantInit "Main")
				</OnInit>

				<Panes>
					<Default>
						<Initialize>
							(block (desc playerRank)
								; Make sure playerRank variable is initialized
								(setq playerRank (objGetData gPlayerShip "collectiveRank"))
								(if (not playerRank)
									(block Nil
										(setq playerRank 0)
										(objSetData gPlayerShip "collectiveRank" playerRank)
										)
									)

								; Set the greeting based on the player's rank
								(setq desc "")

								(switch
									(eq playerRank 1)
										(setq desc (cat desc "Station personnel rush by, almost knocking you over and spilling some of your coffee onto your shirt."))

									(eq playerRank 2)
										(setq desc (cat desc "A few people stop to congratulate you and to shake your hand."))

									(eq playerRank 3)
										(setq desc (cat desc "something"))

									(setq desc (cat desc "You are in a nondescript station. You wonder why there are so few people around."))
									)
								(scrSetDesc gScreen desc)
								)
						</Initialize>

						<Actions>
							<Action name="Request to meet leader" key="R">
								(block (playerRank)
									(setq playerRank (objGetData gPlayerShip "collectiveRank"))

									(switch
										; If you've accepted the offer
										(eq playerRank 1)
											(scrShowPane gScreen "MissionInProgress")

										; If you've taken down communications
										(eq playerRank 2)
											(scrShowPane gScreen "Leader2")

										; If you haven't met the leader yet
										(scrShowPane gScreen "Leader")
										)
									)
							</Action>

							<Action name="Buy items" default="1" key="B">
								(block Nil
									(setq gPrevScreen "Main")
									(setq gMargin intBlackMarketBuyPrice)
									(setq gShowCriteria "*")
									(scrShowScreen gScreen "&dsExchangeBuy;")
									)
							</Action>

							<Action name="Laboratory" key="L">
								(block (playerRank)
									(setq playerRank (objGetData gPlayerShip "collectiveRank"))

									(switch
										; If you've at least met the leader
										(gr playerRank 0)
											(scrShowPane gScreen "Laboratory")

										; If you haven't met the leader yet
										(scrShowPane gScreen "AccessDenied")
										)
									)
							</Action>

							<Action name="Increase rank" key="I">
								(block (rank)
									(setq rank (objGetData gPlayerShip "collectiveRank"))
									(objSetData gPlayerShip "collectiveRank" (add rank 1))
									(objAddItem gPlayerShip (itmCreate &itCollectiveIdenROM; 1))
									(scrShowPane gScreen "Default")
									)
							</Action>

							<Action name="Undock" cancel="1" key="U">
								<Exit/>
							</Action>

						</Actions>

					</Default>

					<Leader
							desc=""So, you're trapped here, with no stargate to get you out. I can help. but first, you have to do something for me. See, I'm the head of a group of people who have rebelled against the leading power in this system, the Collective Empire."">

						<Actions>
							<Action name=""No thanks."" cancel="1" key="N">
								<ShowPane pane="Default"/>
							</Action>
							<Action name=""I'll hear what you have to say."" key="I">
								<ShowPane pane="Accept1"/>
							</Action>
						</Actions>
					</Leader>

					<Accept1
							desc=""We call ouselves the Deviants. We're quite limited in number, which is why we need your help. We need you to infiltrate and sabotage the Collective's main communications array, which should seriously hinder their operations."">

						<Actions>
							<Action name=""Please go on."" key="P">
								<ShowPane pane="Accept2"/>
							</Action>
						</Actions>
					</Accept1>

					<Accept2
							desc=""Simply locate the Collective base; they'll let you in as long as you have an identification chip, which we have already placed in your ship's cargo hold. Report back to us after you're done and we'll show you how to exit this system."">

						<Actions>
							<Action name=""Very well."" cancel="1" key="V">
								(block (rank)
									(setq rank (objGetData gPlayerShip "collectiveRank"))
									(objSetData gPlayerShip "collectiveRank" (add rank 1))
									(objAddItem gPlayerShip (itmCreate &itCollectiveIdenROM; 1))
									(scrShowPane gScreen "Default")
									)
							</Action>
						</Actions>
					</Accept2>

					<Leader2
							desc=""Congratulations! The Collective's main communications array is down. This should give us a major advantage in the upcoming battle. However, I need you to complete another mission for me before I let you go. Locate and destroy an ambush party nearby."">

						<Actions>
							<Action name=""I'm on it."" cancel="1" key="I">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</Leader2>

					<Laboratory
							desc="You arrive at the laboratory. A man greets you. "Here, we develop experimental technology for use in our war. Feel free to take a look around; I'll even sell you the things you want." You peruse the display, wondering what you should inquire about.">
							
						<Actions>
							<Action name="Teleporation" cancel="1" key="T">
								(block (playerRank)
									(setq playerRank (objGetData gPlayerShip "collectiveRank"))

									(switch
										; If you've done enough missions
										(gr playerRank 3)
											(scrShowPane gScreen "Teleport")

										; If you haven't met the requirement yet
										(scrShowPane gScreen "AccessDenied2")
										)
									)
							</Action>

							<Action name="Leave" cancel="1" key="L">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</Laboratory>

					<Teleport
							desc=""We've recently been trying to cannibalize the technology found in a stargate, and we've developed one-way devices that will teleport you to another system. Well.. pick a system. Any system."">

						<Actions>
							<Action name=""I want to go to Elysium."" key="E">
								<ShowPane pane="TransportElysium"/>
							</Action>

							<Action name=""I want to go to Eridani."" key="R">
								<ShowPane pane="TransportEridani"/>
							</Action>

							<Action name=""How do I get back here?"" key="H">
								<ShowPane pane="TransportReturn"/>
							</Action>

							<Action name="Leave" cancel="1" key="L">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</Teleport>

					<MissionInProgress
							desc=""Well, what are you waiting for? You have a job to do."">

						<Actions>
							<Action name=""I'm on it."" cancel="1" key="I">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</MissionInProgress>

					<AccessDenied
							desc="This area seems to be off-limits. You cannot enter.">

						<Actions>
							<Action name="Leave" cancel="1" key="L">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</AccessDenied>

					<AccessDenied2
							desc=""I'm sorry, but you can't come in here."">

						<Actions>
							<Action name="Leave" cancel="1" key="L">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</AccessDenied2>
				</Panes>
			</Main>

		</DockScreens>

	</StationType>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

got something simple? Like one dockscreen with three choices:

one that takes you to buy items
one that takes you to a dockscreen that says "hello world"
one that undocks you.
e_____e
Miner
Miner
Posts: 33
Joined: Sun Sep 30, 2007 6:40 pm

Code: Select all

			<!-- Station: Deviant Base -->

	<StationType UNID="&stDeviantBase;"
			name=				"Deviant Base"
			sovereign=			"&svDeviant;"
			abandonedScreen=	"&dsAbandonedStation;"
			dockScreen=			"Main"
			dockingPorts=		"8"
			canAttack=			"true"

			multiHull=			"true"
			armorID=			"&itCollectivePlate;"
			maxHitPoints=		"500"
			hitPoints=			"500"
			fireRateAdj=		"40"
			repairRate=			"2"
			shipRepairRate=		"3"
			ejectaType=			"&vtWreckEjecta;"

			attributes=			"enemy, populated"
			level=				"3"
			alertWhenAttacked=	"100"

			definiteArticle=	"true"
			>

		<Image			imageID="&rsStations8;" imageX="0" imageY="192" imageWidth="256" imageHeight="256"/>

		<Devices>
			<Device deviceID="&itCollectiveDisintegrator;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveExpander;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveLauncher;" omnidirectional="true"/>
			<Device deviceID="&itCollectiveDeflectorB;"/>
		</Devices>

		<Ships>
			<Ship count="2d4+2" class="&scCollectiveGunship;" orders="patrol" patrolDist="15"/>
			<Ship count="2d4+2" class="&scCollectiveBomber;" orders="patrol" patrolDist="15"/>
		</Ships>

		<Items>
			<Item count="1d2+1" item="&itCollectiveDeflector;"/>
			<Item count="2d2+2" item="&itCollectivePlate;"/>
			<Item count="1d2" item="&itCollectiveDisintegrator;"/>
			<Item count="1d2" item="&itCollectiveRepulsorWave;"/>
			<Item count="1d2" item="&itCollectiveExpander;"/>
			<Item count="1d2" item="&itCollectiveLauncher;"/>
			<Item count="50d50" item="&itHelium3FuelRod;"/>
			<Item count="50d50" item="&itHelium3FuelRod;"/>
			<Table>
				<Lookup chance="40" count="1" table="&trConsumables4;"/>
				<Lookup chance="40" count="1" table="&trMinorItem4;"/>
				<Lookup chance="20" count="1" table="&trMajorItem4;"/>
			</Table>
		</Items>

		<DockingPorts>
			<Port x="-6"	y="114" />
			<Port x="75"	y="103" />
			<Port x="117"	y="70" />
			<Port x="148"	y="-5" />
			<Port x="135"	y="-68" />
			<Port x="75"	y="-124" />
			<Port x="7"		y="-143" />
			<Port x="-89"	y="-116" />
			<Port x="-127"	y="-72" />
			<Port x="-142"	y="8" />
			<Port x="-120"	y="58" />
			<Port x="-58"	y="103" />
		</DockingPorts>

		<DockScreens>

			<Main
				name=			"=(objGetName gSource)"
				>

				<OnInit>
					(intDeviantInit "Main")
				</OnInit>

				<Panes>
					<Default
							desc="lol, wut?">

							<Action name="Buy items" default="1" key="B">
								(block Nil
									(setq gPrevScreen "Main")
									(setq gMargin intBlackMarketBuyPrice)
									(setq gShowCriteria "*")
									(scrShowScreen gScreen "&dsExchangeBuy;")
									)
							</Action>

							<Action name="fgsfds" key="L">
								<ShowPane pane="hello"/>
							</Action>

							<Action name="Undock" cancel="1" key="U">
								<Exit/>
							</Action>

						</Actions>

					</Default>

					<Hello
							desc="hello world">

						<Actions>
							<Action name="leave" cancel="1" key="N">
								<ShowPane pane="Default"/>
							</Action>
						</Actions>
					</Hello>
				</Panes>
			</Main>

		</DockScreens>

	</StationType>

	<Globals>
		(block Nil
		
			(setq intDeviantInit (lambda (prevScreen)
				(block Nil
					(setq gPrevScreen prevScreen)

					; Docking
					(switch
						; If the ship is radioactive then refuse dock
						(shpIsRadioactive gPlayerShip)
							(scrShowScreen gScreen "&dsRefuseContamination;")
						)
					)
				))
			)
	</Globals>
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

thanks, I'll work through that when I have time (if I ever have time...)
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 really like the concept of this mod! I keep thinking up little stealth mission ideas.. and firmly believe that switching sovereigns should be a transcendence staple. In fact, I am so excited about it I want to try making some dock screens that cater to a stealth mission kind of concept.

The cloaking kind of concept- to pass through enemy territory safely- is a big plus for me, but do you think it would be difficult to build in a timer and maybe some kind of fail-check against getting spotted/hacked and having the sovereign cloak switch you back to svPlayer? The risk factor could make it much less of an exploit item and more of a playable strategy, imho.
Post Reply