Using numberAppearing AND Particle effect

Freeform discussion about anything related to modding Transcendence.
Post Reply
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 2:30 pm

Code: Select all

numberAppearing
, in my opinion, the most useful element when creating quest items and/or limiting item spawning.

But I have some doubts:

1. Does numberAppearing guarantee that the object will be spawned the specified number of times?
i.e
Does

Code: Select all

numberAppearing=    "5"
mean that the object will spawn exactly 5 times, and not 3 times or 8 times?

2. Does numberAppearing work on stations and ships?

3. More importantly, does it work on virtuals? Like if I'd like to spawn an Xenophobe encounter by disguising a virtual station as wreck, and I want that to happen only AND exactly once in 'X' level systems?


The "particle" effect.

So what are its exact characteristics?
How is the particle effect of the new APA and the particle effect of PK25 different?
What if I want another effect (like thermoExplosion) to take place after an object has been hit by 50% of the fired particles. How can I program that?
Last edited by TheLoneWolf on Sat May 21, 2016 3:08 pm, edited 2 times in total.

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 2:58 pm

I think maybe I've confused maxAppearing with numberAppearing (iirc it isn't a thing) so I'm changing the thread to another question.

User avatar
AssumedPseudonym
Militia Captain
Militia Captain
Posts: 957
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

Sat May 21, 2016 3:02 pm

 The numberAppearing value is for items only. It’s typically a dice range, though an integer would also work. It defines how big a stack of the item will be created when it is spawned on an object.
 On the other hand, maxAppearing is used on stations. I think it has to be an integer, but don’t quote me on that. It means that no more than that number of that type of station will appear in the entire game, though there can be fewer.
Image

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
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 3:04 pm

3. it might work with virtual stations but if you want something that specific you should retool my code here.

What you can do is add more checks in the if function:

Code: Select all

 <StationType UNID="&stVirtualStation;"
        name=               "Virtual Station"
        virtual=            "True"
        >
       <Events>
          <OnGlobalSystemCreated>
             (block Nil
                (sysCreateStation &stVirtualStation; nil)
                (if
                   ;(eq (sysGetName) "name of the system you want")
                   (and
						(if (gr (sysGetLevel) 5))
						(not (eq (TypGetData &stVirtualStation; "Alreadyspawned") "True"))
					)
                      (block Nil
                         ;here is where you spawn either a ship or a station
                         ;(sysCreateShip unid pos sovereignID [eventHandler])
                         ;(sysCreateStation unid pos [eventHandler])
                         (sysCreateStation &stAresShipyard; (sysVectorPolarOffset Nil 0 0))
						 (TypSetData &stVirtualStation; "Alreadyspawned" "True")
                         )
                   )
                )
          </OnGlobalSystemCreated>
       <Events>
    </StationType>
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 3:12 pm

I was wondering. I don't know TLISP, but you guys use "Nil" and "nil" many times. What do they do?

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 3:18 pm

https://wiki.kronosaur.com/modding/xml/weapon_devices
http://wiki.kronosaur.com/modding/xml/effects
Old reference to weapon creation and weapon effects.

How is the particle effect of the new APA and the particle effect of PK25 different?

Code: Select all

	<Weapon
				type=				"particles"
				damage=				"plasma:300; WMD:7"
				
				fireRate=			"80"
				hitPoints=			"30"

				deviceSlots=		"2"
				powerUse=			"3000"
				sound=				"&snRecoillessCannon;"
				>
			
			<ParticleSystem
					style=				"comet"
					emitLifetime=		"1"
					emitRate=			"150"
					emitSpeed=			"50-70"
					emitWidth=			"50"
					
					particleLifetime=	"120"
					particleEffect=		"&efPlasmaParticleDefault;"
					>
			</ParticleSystem>
			
			<Effect>
				<ParticleSystem
						style=				"jet"
						fixedPos=			"true"
						emitRate=			"2-4"
						tangentSpeed=		"-8-8"
						particleLifetime=	"10"
						XformTime=			"30"
						>
					<ParticleEffect>
						<Orb
								instance=			"owner"
						
								style=				"smooth"
								animate=			"fade"
								radius=				"20"
								lifetime=			"10"
								intensity=			"20"
						
								blendMode=			"screen"
								primaryColor=		"#feff00"
								secondaryColor=		"#ff7f00"
								/>
					</ParticleEffect>
				</ParticleSystem>
			</Effect>
		</Weapon>
APA uses a single shot and <ParticleSystem:

PK25 uses multiple shots of a single image (look at particleCount= "1d11+44" particleSpreadAngle="15" and the single<effect> tag referring to a single <particle> effect tag ):

Code: Select all

<Weapon
				type=				"particles"

				damage=				"kinetic:25; WMD:1"
				fireRate=			"16"
				missileSpeed=		"40"
				lifetime=			"60"
				powerUse=			"150"

				particleCount=		"1d11+44"
				particleSpreadAngle="15"
				sound=				"&snRecoillessCannon;"
				>

			<Effect>
				<Particle
						style=			"line"
						primaryColor=	"#ccf7ff"
						secondaryColor=	"#2e3233"
						/>
			</Effect>
		</Weapon>
What if I want another effect (like thermoExplosion) to take place after an object has been hit by 50% of the fired particles. How can I program that?
Not sure, maybe if you have time check out <HitEffect>. The problem is it requires knowledge of how many projectiles hit one source which I don't know how to do.
I was wondering. I don't know TLISP, but you guys use "Nil" and "nil" many times. What do they do?
Nil is another name for nil. It means nothing, but depending on the context it could be a string representing nil or a boolean (nil vs true).

Also, AssumedPseudonym and I are on IRC right now, if you want realtime help click 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
digdug
Fleet Admiral
Fleet Admiral
Posts: 2600
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Sat May 21, 2016 3:32 pm

when working with station encounters, there is also another way to make it unique:
this is taken from the tinkerers station:

Code: Select all

<Encounter
				levelFrequency=		"uccuu r---- ----- ----- -----"
				locationCriteria=	"+asteroids, -asteroidbelt"
				unique=				"inSystem"
				minAppearing=		"1"
				enemyExclusionRadius="50"
				/>
unique="inSystem" will guarantee that the tinkers station will appear only once (if it appears) per system.

unique can also accept:
unique="inSystem | inUniverse | false"

inUniverse will guarantee that your encounter will spawn only once / game topology.

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 3:39 pm

:o I never knew that <ParticleSystem existed!

Can I put <HitEffect> inside events?

Thanks for the top up! But my @#$! Symbian (these dudes for their super battery) can't handle IRC :( next month I'll be there to bug you to death on IRC for sure!

@digdug
Thanks for your help!
While using inUniverse, is there any way so that the station is bound to spawn once? Like a 100% chance to spawn once?

Post Reply