Encounters

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

I now managed turning off most spawns and that a heliotrope colony calls up to 6 enemy ships after destruction. :D

I want to apply this to all stations, but I would need to redefine every station and therefore .xml.
Is there an easier way to delete/override all <Encounter chance=""> tags in <stationstyp> ?
And how does overriding work in the Extensions-folder ? Do I just have to copy the rest of the station without the parts I want to delete ?
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

You'll need to override the entire station type tag for each station you want to change, and I am not sure that you can alter encounters other than rewriting the tags like they are.
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

That's bad. Hm, I would be great when George didn't have connected all spawns to the stationtyps. A mod turning of all spawns would therefor turn off all other mods, or they would turn on spawns ~_~

Well, I'm not sure how to understand "other than rewirting the tags like they are."
Do you mean I can just change the shiptyp of the encounter or copy them in the extension and change them there ??

edit: btw, I have some non-working code here ...

Code: Select all

<Globals>
	(block (randomizer)
		;RandomizerFunction
		(setq intRandomizer (lambda Nil
			(block (EncounterList randomizer)
				(setq EncounterList (objGetStaticData gSource "Encounter"))
				(block (randomizer roll)
					(setq roll (random 0 99))
					(switch
						(for i 1 (item (item EncounterList 0) 0)
						((ls roll (item (item EncounterList 0) i)) 									(setq randomizer i))
						)
					)
				)
			)
		))
		(setq intOnDestroyedCheck (lambda Nil
			; loading Encounterlist
			(block (EncounterList randomizer)
				(setq EncounterList 
				(objGetStaticData gSource "Encounter"))
				<!--(intRandomizer)-->
				(setq randomizer 3)
				;loop for gernerating all shiptypes
				(for i 0 
		(subtract (item (item EncounterList randomizer) 0) 1)
				;loop for generating the number of ships
				(for j 1 (rolldice 
(item (item EncounterList randomizer) (add (multiply i 4) 1))
(item (item EncounterList randomizer) (add (multiply i 4) 2))
(item (item EncounterList randomizer) (add (multiply i 4) 3))
					)
					(block (avengers)
						(setq avengers
							(sysCreateShip
								(item (item EncounterList randomizer) (add (multiply i 4) 4))
								(objGetNearestStargate gPlayerShip)
								(objGetSovereign gSource)
							)
						)
						(shpOrderAttack avengers gPlayerShip)
					)
				))
			)
		))
	)
</Globals>
something is wrong with the RandomizerFunction, as it works well with a given randomizer.
I don't know if its possible to put a for function in a switch, but I needed it there to give randomizer different results depending on the rolled number.
I tried it without switch, did not work, too :(
Also wondered how to define the EncounterList for both functions ...
Last edited by Sheltem on Thu Mar 13, 2008 5:07 am, edited 1 time in total.
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

you can copy them into extensions, or you could simply change them in the .xmls, either way is fine.(but never touch the tdb).
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Code: Select all

			(setq intRandomizer (lambda Nil
				(block (EncounterList randomizer roll i)
					(setq EncounterList '(33 66 100)) 
		     			(setq roll (random 0 99))
		     			(setq i 0)
					(loop (ls i (count EncounterList))
						(block Nil
							(if (ls roll (item EncounterList i))                            
								(block Nil
									(setq randomizer i)
									(setq i 10000)
								)
							)
							(setq i (add i 1))
							randomizer
						)
					)
				)
			)) 
there is a working intRandomizer, alter (setq EncounterList '(33 66 100)) to suit your own needs

edit: wow the code even messes up the format it looks fine if you quote it
Crying is not a proper retort!
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

With help of Betel it now works.
After destruction of a station, a timer randomly calls spawns from given list for the particular destroyed station.
When you combine this with deletion of all <encounter > tags from all stations, b-liners would only be spawned after destruction of stations.

What do the others think about such an mod ???
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
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 am not sure it really does much to improve the game from what you describe. You are getting rid of the built in method to spawn encounters (from an active living station with traffic, trade and all that) and replacing it with a mod version that only spawns after station is destroyed.. (so they are some form of revenge only?) but with the same AI functions? So b liners now attack you from destroyed stations- why? It makes the clean up of a system more of an exploit (unless you STOP the spawns after a while, they will just be repeat kills for profit) And, unless you destroy a station there won't be any traffic from encounters, just station defenders. That seems a little less fun, to me.

Also, how many timers running at the same time? Doing how much script for each one? Is it really a good method to use timers in that fashion?
User avatar
Sheltem
Militia Lieutenant
Militia Lieutenant
Posts: 153
Joined: Tue Sep 04, 2007 1:44 pm

Well, yes this might be less fun when you can play through without giving a single shot except on the Iocrym, but at the moment it's really ANNOYING that the spawns are thrown at you anywhere anytime.
It would be more realistic when you would come upon enemys like you do with Huari and Ventari destroyers.
So this needs a change first. I need ideas in which direction it should be changed best ?

Maybe most sovereigns should not aim directly to kill you. So they don't spawn out of the gate initally.
When you destroy some of their ships a random number of spawns will be created for a random number of time which patrol for revenge on you.
If they don't find you they could jump out again and all is at it was before.
What should happen then when you destroy their station ? Should they be mad on you forever ? In the present mod, the timer only works in the particular sun system. Although he was stopped sometimes after playing another game ... don't know if the timer is resilient enough.

I don't know how timers affect the system. It might be necessary to stop the timer after a given time, but then I would be a bigger problem to get the player in direct fights.

remark: Althought it is a hostile universe but the player should not be encouraged to destroy every red dot ingame.
With the present system, he seeks for a method to turn of the b-liners, but he will become dissapointed that the destruction didn't change anything.
regards
Sheltem

What do you think about the endless stream of spawns ?

What about modding wandering spawns which dont attack the player directly ?
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

If one removes spawns from the game entirely I think you need to have 'ambient' enemies wandering around - otherwise you get the empty universe Periculi describes. However it does allow for the inclusion of many more enemy ships a LOT more, something like ten times as many - remember they are just wandering around and not even searching for you so most would be avoidable but occasionally you WOULD be forced into a fight, or at least a situation where getting into a fight is easier than running.

Ideally however I belive the problem lies with the inbuilt AI behavior, namely that.

a. Enemies are solely interested in you.
b. Enemies know where you are at all times and come straight to you (bee-lining)

If enemies would engage any target of opportunity and if they had to search for you (taking into account your last known position and direction - remember that if any enemy sees you he will tell the others where you are so you would NOT be able to hide forever) then it would fix it but otherwise it is a stopgap solution really.

I remember once someone (digdug I think) saying that it might be possible to implement a searching procedure in a mod - by having a marker as your last known position and making enemies patrol around it in increasingly larger circles.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I remember once someone (digdug I think) saying that it might be possible to implement a searching procedure in a mod - by having a marker as your last known position and making enemies patrol around it in increasingly larger circles.
yes, my idea was a timer on enemy ships that reset and place a marker at the location where the playership (or enemy sovereign ships) was spotted.
Then the spawns would be directed to patrol around the marker. A second timer could be used to recursively increase the patrolling radius if nothing is found.

This should works well because the players tend to travel in straight lines between stargates and planets/stations, so the markers will usually fall in between of common routes.


The problem is that it involves a huge amount of timers per system. Even with long times per each timer (30-50 seconds ?) this method would probably eat large amounts of computer resources.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Enemies coming right to you is only a problem when they aren't supposed to know where you are. Perhaps encounters should only be allowed to come into existence when an enemy "knows" where you are.

Here is an idea for a system that determines sovereigns that know where you are. First, a few terms:

"Trio": Ares, Ranx, CW.

Major Sovereigns: "Trio", Dwarg, Sung, Charon Pirates.

Minor sovereigns: all sovereigns that are not major.

Illegal sovereigns: BM, Sung, Charon Pirates, outlaws of all sorts, Sung Charon Pirates.


If you are ever seen, the sovereign that saw you will know where you are. Any encounters reasonably close (and at least one) will be able to come and attack/track (see below) you. Ways to be seen:

1. Come into LOS (line of sight) of any ship or station of that sovereign.

2. Come into LOS of any Major or corporate station. Two other Major or Minor sovereigns will know where you are. If the station is Trio, then a third sovereign will also receive information on your location.

3. If you come into LOS of any Trio Capship there is a 25% chance of another Trio sovereign knowing where you are.

4. Come into LOS of any non-military CW station (Illegal sovereigns only).

5. Come into LOS of any Illegal station (Illegal sovereigns only) there is a 50% chance that each other Illegal sovereign with a station in the system will know where you are.

6. If you come into LOS of a Minor station, there is a 50% chance that another Minor sovereign will also know your location.

Once you leave the LOS, the sovereigns guess which station/planet you are headed to next. Encounters may appear on the way to any or all of the nearest destinations as well as all of the routes to friendly stations (fairly near to what saw you if that happens). Encounters that get within 200 ls of you will attack you. A likely occurrence if you are seen is that a "tracking ship" (see below) will be spawned to follow you and draw encounters to you.

This will require ships that are ordered to "track" the player. The order "track" would mean "follow at a (specifiable) distance". Tracking ships would have a high perception and be able to notice you from ~200ls away. Any tracking ship should be faster than the player ship.

If you destroy an sovereign's capship, you may be subject to one or more "tracking ships" following you.

If you destroy one of their stations you will suffer an increase in size of all parties from that sovereign that come to attack you in the station. You will also have at least one party follow you as in the capship situation. If you have not destroyed any stations of a sovereign in a system, you may not have very many encounters at all.
Post Reply