Dynamic Systems

Freeform discussion about anything related to modding Transcendence.
Post Reply
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?

For Dynamic Systems, I want the sovereigns to do two things:
1. Build stations
2. Send attack fleets

I want to know what the community thinks on how the Transcendence economy works. Is it based on 'ores' ? In that case, it would make sense if the Ranx/Ringers etc created some kind of mining station and started mining efforts that way.
I want to know how to have the Ranx, from a random fortress in a system, start building stations according to criteria such as "+ 50 asteroids in the area of 50 ls".
Any ideas on how to imlplement this in code?

I will have two ways to send attack fleets:
1. Patrols
Patrols will be sent to locate enemy stations. Then, once found, a decision will be made as to whether it is a military installation. If yes, then an attack fleet will be sent to destroy it.

2. RPC[sovereign name here]RetaliateOnDestroy
example: RPCCommonwealthRetaliateOnDestroy
A function called upon destruction (something like intCorporateOnDestroy) that sends an attack fleet on destuction of a station. However, I want to control what is sent to destroy something by evaluating two variables:
a.the destroyer's strength:
If the destroyer was something like a Phobos, I want to send the appropriate level attack fleet to destroy it.
b.retaliation level:
this is to evaluate how much military activity has been going on. whenever RPCCommonwealthRetaliateOnDestroy has been invoked, it increases the retaliation in that level (so say a Xenophobe Worldship kills two CW stations, then the CW sends in an Aquila+ 5 Britannias.)
I also want this level to decrease if now activity has occured (so after 5 minutes, it goes down one level, like from 3 to 2).
Retaliation level
(1- 5)gunships
this is the lowest level of retaliation, sending the appropriate sovereign gunships (like Ronin/whatever in early systems, Centurion+omniTeV in later systems for CW) to eliminate minor threats
(6-9)- more gunships
This is the next level, and the retaliation is two squads of whatever is sent in level 1.
(10-13)- Cruiser
Cruisers (like the Aquila) will be sent to destroy AOrderGiver (the attacker).
(14-15) Dreadnought
A Dreadnought will be sent to destroy AOrderGiver.
(25)- Capital???
A capship will be sent to clean out the whole system (I want to see this ingame!)

So... any ideas?
I won't be able to double check suggestions though (read my hiatus thread) but these ideas have been floating in my head for quite a while.
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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

TSB will have stuff like this for its tactical AI (and a larger overall topology-spanning system for its strategic AI), but I'm not sure how easily it could be ported into vanilla.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
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?

Wolfy: elaboration, please!
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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Nothing to elaborate on yet; I'm still working out the exact functionality.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

You've got some great ideas, very ambitious ideas!

It's certainly possible to have factions build new stations, but the timescale involved would not fit with vanilla. The construction of a minor station could take years with most of the station being built in modules and shipped to the final location for assembly.

Script wise, it wouldn't be too difficult, selecting an appropriate build site for a certain type of station might be difficult if you want to be very picky.

I DO like the retaliation idea and it would be much easier to write.
I would use the onDestroy event of the station to find aDestroyer (the ship that destroyed the station) and find any other ships allied with that one in some proximity, like its wingmen, escorts whatever.
Mark all of them and then order some/all allied ships in the system to group together and attack. Gate in more ships if necessary or desired.

Of course, there's many ways to handle it. This is just one idea.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

you can use the

Code: Select all

[code]
[/code] tags to show it without losing your formatting - its rather hard to read it w/o.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
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?

Wolfy: I don't know how to delete posts, so please delete the previous two posts by me. Thanks!

Prophet:
1. hmm... I wanted to create stations to increase a sovereign's prescence in a system.
Instead of creating stations, how do I increase a sovereign's presence in a certain system?

2. So how do I label friendly ships in the area? sysFind ???

Here's my idea for Retaliate: [using pseudocode right now]

Code: Select all

use a virtual station to store all the retaliate levels, then have a 
objrecurringtimer event to deescalate every 5 min
Virtual Station will have:
<OnCreate>
	(block Nil
		(ObjSetData "CWRetaliate" 0)
		(;add the deescalate timer)
		)
</OnCreate>
Stations will have:
<OnDestroy>
	(block Nil
		(setq Agressor aOrderGiver)<--- that's how it looks like in intCorporate OnDestroy
		(switch
			(leq (sysGetLevel) 4)
				(block Nil
					(switch
						(leq (ObjGetData "CWRetaliate" ) 5) <--I can't do this because CWRetaliate isn't stored on the ship, right? So I'll have to use registerforevents to send the data?
						(block Nil
							(setq CWAttackSquad1
								(sysCreateShip [;at the nearest gate] &scRoninC)<-- Can you do this? intCorporateOnDestroy only has one ship- the Cruiser- and I havem't been able to test it out
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								)
							(shpOrder CWAttackSquad1 'attack Aggressor)
							)
						(leq (ObjGetData "CWRetaliate" ) 9) 
						(block Nil
							(setq CWAttackSquad1
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &scRoninC)
								(sysCreateShip [;at the nearest gate] &lightIAV)
								(sysCreateShip [;at the nearest gate] &lightIAV)
								(sysCreateShip [;at the nearest gate] &lightIAV)
								)
							(shpOrder CWAttackSquad1 'attack Aggressor)
							)
						;etc...
						)
					)
			(geq (sysGetLevel) 5)
				(block Nil
					(switch
						(leq (ObjGetData "CWRetaliate" ) 5) 
						(block Nil
							(setq CWAttackSquad1
								(sysCreateShip [;at the nearest gate] &scCenturion)
								(sysCreateShip [;at the nearest gate] &scCenturion)
								(sysCreateShip [;at the nearest gate] &scCenturion)
								(sysCreateShip [;at the nearest gate] &scCenturion)
								(sysCreateShip [;at the nearest gate] &scCenturion)
								(sysCreateShip [;at the nearest gate] &scCenturion)
								)
							(shpOrder CWAttackSquad1 'attack Aggressor)
							)
						)
					)
			)
		)
</OnDestroy>

As you can see, the code is in 2 parts:

1.creating a list of ships
	a. if syslevel is less than 4, the CW will send out ronins/whatevers
	Retaliation level: (all of these are squadrons of 6 ships)
		(1- 5)Ronin/C
		(6-9)Ronin/C+ light IAV
		(10-13)Medium IAC
		(14-15)Heavy IAV
		(25)Manticore
	b. is syslevel is greater than 5 the CW will send Centurions
	Retaliation level: (all but the CSC are squadrons of 6)
		(1- 5)Centurion+ omniTeV9
		(6-9)Centuron/X
		(10-13)Britannia
		(14-15)Aquila+ 5 Britannias
		(25)CSC <Continent name> (Maybe CSC Black Sea, CSC Galapagos, etc.)

2.creating a fleet and  sending it to attack the attacker <-- NO CLUE how to get the ships in a squadron.
I need to know how to identify ships in the area to add to the fleet, and how to have them behave in an appropriate way.
I'll fix the code later (I have a more updated version on my clipboard. :?: Yes. I know. I have begun modding on paper.)
Last edited by RPC on Sat Mar 12, 2011 4:15 am, edited 1 time in total.
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.
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?

Also, I need to know how to simulate mining for the Ranx... maybe I can PM Bobby for his mining auton.
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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

Ok, I deleted them for you.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
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?

Aparrently Bobby didn't write the mining auton, it's Apemant. So can I just use the code and give him credit? (I pm'ed him anyway- he last visited the forums on Mon Jun 07, 2010, so he should still be around. )
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
Aury
Fleet Admiral
Fleet Admiral
Posts: 5421
Joined: Tue Feb 05, 2008 1:10 am
Location: Somewhere in the Frontier on a Hycrotan station, working on new ships.

He hasn't been here since june? :?
That doesn't seem right. I thought I recall seeing him around not long before the forums went down.
(shpOrder gPlayership 'barrelRoll)
(plySetGenome gPlayer (list 'Varalyn 'nonBinary))
Homelab Servers: Xeon Silver 4110, 16GB | Via Quadcore C4650, 16GB | Athlon 200GE, 8GB | i7 7800X, 32GB | Threadripper 1950X, 32GB | Atom x5 8350, 4GB | Opteron 8174, 16GB | Xeon E5 2620 v3, 8GB | 2x Xeon Silver 4116, 96GB, 2x 1080ti | i7 8700, 32GB, 6500XT
Workstations & Render machines: Threadripper 3990X, 128GB, 6900XT | Threadripper 2990WX, 32GB, 1080ti | Xeon Platinum 8173M, 48GB, 1070ti | R9 3900X, 16GB, Vega64 | 2x E5 2430L v2, 24GB, 970 | R7 3700X, 32GB, A6000
Gaming Systems: R9 5950X, 32GB, 6700XT
Office Systems: Xeon 5318Y, 256GB, A4000
Misc Systems: R5 3500U, 20GB | R5 2400G, 16GB | i5 7640X, 16GB, Vega56 | E5 2620, 8GB, R5 260 | P4 1.8ghz, 0.75GB, Voodoo 5 5500 | Athlon 64 x2 4400+, 1.5GB, FX 5800 Ultra | Pentium D 3.2ghz, 4GB, 7600gt | Celeron g460, 8GB, 730gt | 2x Athlon FX 74, 8GB, 8800gts 512 | FX 9590, 16GB, R9 295x2 | E350, 8GB | Phenom X4 2.6ghz, 16GB, 8800gt | random core2 duo/atom/i5/i7 laptops
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Wolfy wrote:He hasn't been here since june? :?
That doesn't seem right. I thought I recall seeing him around not long before the forums went down.
He was on IRC not long before or after.
Image
Image
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

You can make a ship act like a ferian using the "ferian" controller.

Place this code inside your mining station:

Code: Select all

<Ships>
    <Ship count="3d6" class="[yourMiningShip]" orders="mine" controller="ferian"/>
</Ships>
IF you want to get more advanced you'll have to write an event handler.

Spawning squads:

Code: Select all

(block (shipType theLeader)
  ;; first off, determine what kind of ships you'll be spawning
  ;; this looks pretty intimidating, but there's other ways of managing it
  (setq shipType
    (switch
      (leq 'RetaliationLevel 4)
         (if (leq (sysGetLevel) 4)
               &scRonin;
               &scCenturion;
         )
     (leq 'RetaliationLevel 8)
         (if (leq (sysGetLevel) 4)
              &scLightIAV;
              &scCenturionX;
         )
     ...
    )

  ;; you have a ship class now, lets start spawning
  ;; start with the squad leader
  (setq theLeader (sysCreateShip shiptype somewhere somesov)
  (shpOrder theLeader 'attack target)
  
  ;; now you take care of the escorts
  (for i 1 6
    (block (shp)
       (setq shp (sysCreateShip shiptype ...)
       (shpOrder shp 'escort theLeader random 10)
    )
  )
)


Sorry if that's not clear, I wrote it in a hurry, will edit later if necessary.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
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?

I know about the ferian controller, but they don't really mine, they just wander around asteroid to asteroid. Apemant's mining auton mines the ores out of it, then gathers the ore, making the miners look like they are doing something.
I really liked how much more dynamic your code created the squadron.
I just have a couple questions about the code:

Code: Select all

(block (shipType theLeader)
  ;; first off, determine what kind of ships you'll be spawning
  ;; this looks pretty intimidating, but there's other ways of managing it
  (setq shipType
    (switch
      (leq 'RetaliationLevel 4)
         (if (leq (sysGetLevel) 4)
               &scRonin;
               &scCenturion;
         )
     (leq 'RetaliationLevel 8)
         (if (leq (sysGetLevel) 4)
              &scLightIAV;
              &scCenturionX;
         )
     ...
		)
	)<!-- add one here?-->

  ;; you have a ship class now, lets start spawning
  ;; start with the squad leader
  (setq theLeader (sysCreateShip shiptype somewhere somesov)
  (shpOrder theLeader 'attack target)
  
  ;; now you take care of the escorts
  (for i 1 6 <!-- can you explain what this does?-->
	(block (shp)
		(setq shp (sysCreateShip shiptype ...)
		(shpOrder shp 'escort theLeader random 10) <!-- what does random 10 mean? does it mean 10 ls?-->
			)
		)
	)
	")"<!-- add one here?-->
")"<!-- add one here?-->
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
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Sorry, I was rushing in the earlier post so I will break down the code now.

Code: Select all

(setq shipType
    (switch
      (leq 'RetaliationLevel 4)
         (if (leq (sysGetLevel) 4)
               &scRonin;
               &scCenturion;
         )
     (leq 'RetaliationLevel 8)
         (if (leq (sysGetLevel) 4)
              &scLightIAV;
              &scCenturionX;
         )
     ...
      )
   )
This first part is where you collect information like system level and retaliation level and using that data pick what kind of ship you need to spawn. No ship is actually created, we just store the unid away in the local variable called "shipType". This section will become much bigger with all the different retaliation levels you specified, I just used two for demo purposes.

Code: Select all

  (setq theLeader (sysCreateShip shiptype somewhere somesov)
  (shpOrder theLeader 'attack target)
Here we make one ship. IT will be designated as the leader and is ordered to attack. You can get fancy and add some more orders to the queue if necessary. We save the leader's ship in another local variable called "theLeader" because we will need it later. The other benefit of spawning the leader separately is that it can be a different ship type than its escorts. (Aquila with Brittanica escorts?! )

Code: Select all

(for i 1 6 <!-- can you explain what this does?-->
   (block (shp)
      (setq shp (sysCreateShip shiptype ...)
      (shpOrder shp 'escort theLeader random 10) <!-- what does random 10 mean? does it mean 10 ls?-->
         )
      )
   )
This is the equivalent of a loop function to make spawning multiple ships easier.
"For" function on xelerus
the 6 means it will run 6 times, executing the code in the following block each time.

Inside the block we do 2 things:
1. create the ships
2. order them to escort the leader

again, you can queue up some more orders if needed. I would recommend at least adding a gate order because if the leader is killed, theses ships will turn into flying bricks.


Hope that clears it up a bit?
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
Post Reply