[SCRIPT] Military Base Response revamp v2.16 [2011-10-27]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

ThisIsHarsh wrote:Like I say, the "fort" in MBR is a M2, check out the tkvr.create and job.tkvr scripts to see how they work.

I like the general thing, it s nice to have fleet leaders :P

but the fort thing... if I can manage to create a zone where nothing else than a fort can be built in each sector... damn it s sad that I also need to start checking on the menus building first... and then maybe another time... :P

What tool you use to make you pck? maybe my work would go faster if I wasnt editing stuff directly in TC.

Thank you
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

There is no way to control station respawn positions caused by the TC engine. Best you could do is check if a station is spawned near your fort then move or destroy it.

Urgh. Never bother with the in-game script editor, except for very minor tweaks or debugging. Use Exscriptor instead. Just search for it, its listed in the X3R forum, but not the X3TC forum for some reason, but works for practically all X games.

To make pck files, use doubleshadow's mod manager. Create a temporary blank mod, add the script xml files to it, there will be an option to compress the files, then extract them out again. That's how I do it, maybe there is an easier way, but I don't know any.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I know it s not the best place to talk about this but since you ve been a great help so far...

I ve thought about my fort thing. It s not that desperate.

1-I need to create some (invulnerable) station wreck that is of type asteroid with a resources being other than nividium, ore, silicon and ice. Or I mod the universe to take one out for my purpose.

2-I need to create an orbital defence station that work like a mine (that can be deployed with a TL class ship) that could only be settled upon that special rock.

3-I need to create a script that detect the orbital station explosion and that create the station wreck mentioned on point 1.

4-Use a script like the one in Improved race to determine who s fort is in the sector to define the sector owner.

What do you think? is that possible or I m losing my time?

Thx
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I ve used Exscriptor to remake my scripts.. look like what you script in X3TC dosnt come out into script folder :O ... well at least I ll know for the next project.

Before I start palying into your scripts to add the 2 pirates to actives races, you planning on releasing a new version soon?

I ll check to add more stations possibilities to your outpost spawning fleet and try to fix the scouts problem for the 2 "new" races.

After that is set, I ll turn on to the fort thing.
I ve got the first point of the fort system figured out and seems to be working fine. If I can get a station that will work completely without having to create a cript that change a mine factory into the fort... that would be neat but Im not sure I will be able to do so... well at least I know a way to do it who may not be as elegant as the first one but that will work just fine.

Also could you tell me which is you man loop script pls?

thanks
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I would need your help on something...

I changed the way I planned to create a fort.

1- I want to put a fort station in each secter with the owning property to the owner of each sector.

2- I want to create a script that replace the fort station destroyed to a wreck type that I can find using a script to rebuild a fort station

3- I want to add a command to player TL class ship who would have a certain station in their freight bay.

no 1 should be easy, I ve been doing test ingame.
n3 should be doable.. I ve been checking into gatelessJump script so I should be able to replicate the command relatively easily.

2- is a problem. The ingame command for creating object dosn t seem to have a command to create wreck... Can you help me with that and also does you script no wreck would prevent me to create one wreck by way of scripting in?

thank you
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

There are two types of wreck.

There are the wrecks left behind when you destroy stations. These cannot be scripted into (or out of) the game.

There are other types of wrecks you see about, which you can click on and select and betty will say their name, etc. I would imagine you can spawn these, but I've not tried, maybe someone else can help there.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

hmmm....the paranid dont care that the sectors from preachers refuge --> dukes vision and trinity sanctum --> emperors ridge is under terran control.

they have yet to launch a counter attack.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

ThisIsHarsh wrote:There are two types of wreck.
There are the wrecks left behind when you destroy stations. These cannot be scripted into (or out of) the game.
I have the pleasure to tell you you can bring those wrecks to life... and destroy them too :P took me about 3H of testing but I finally have a prototype of wreck that serve my purpose.

I can now create a wreck that will secure the place of my fort station : ) and I got a script that remove that wreck and place the new station.

I only need to check for the command in the TL player class ship and to create a script that will make you general come to sector to destroy that station and lauch the script to have a TL bringing that station an lauching the script. It nice to see thing shaping up after so long of a stall :P
Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang »

Catra wrote:hmmm....the paranid dont care that the sectors from preachers refuge --> dukes vision and trinity sanctum --> emperors ridge is under terran control.

they have yet to launch a counter attack.
how about... you join the Paranid and well... have a general go there to claim the sector back for the Paranid?
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

Requiemfang wrote:
Catra wrote:hmmm....the paranid dont care that the sectors from preachers refuge --> dukes vision and trinity sanctum --> emperors ridge is under terran control.

they have yet to launch a counter attack.
how about... you join the Paranid and well... have a general go there to claim the sector back for the Paranid?
cause he'll get steamrolled in a few seconds.

the problem is that the terrans are moving through paranid space 100% uncontested, are holding the sectors 100% uncontested, and are only roadblocked when they encroach onto a sector directly bordering a military outpost, and after theyre done the paranid military that stopped them leaves untill they try to take the sector again, instead of doing the logical thing and retaking their sectors.

the split dont seem interested in helping them either. :P
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

so far I ve choose the OTAS HQ for my fort station model and the goner temple half construct model for my wreck... somehow I could not spawn all the stations models wreck... there is mostly just dock and factory wrecks model in the librairy I ve acceeded. So for test that shoulf be fine.

My question is how I should implement the fort within every sectors.

Should I hardcode location which I know how to do but has a lot of draw back since if another mod add or remove sector it won t work and there is also the problem of having stations already at the location of my future fort station....

anyone can help me on that?
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

collision avoidance will make sure all stations arent clipping into eachother when you jump into a sector, just gotta be in a sector with no stations so you make sure all forts are placed properly.
Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra »

collision avoidance will make sure all stations arent clipping into eachother when you jump into a sector, just gotta be in a sector with no stations so you make sure all forts are placed properly.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

maybe for the stations but what about debris, asteroids and other thing of this type? when testing I could create a station that was in collision with an asteroid.... which mean it was destroyed soon after it s creation


Im thinking that maybe a default postion of x = 0, y = 15Km, z = 0
should work fine. Mostly all sector stations are builded under that level and 15Km is not that far...
ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh »

You can loop all sectors (whatever mod) using the "get max sectors in x/y direction" commands and "get sector from universe index: x= y=". You can check "$sector->exists", to block against blank sectors in the map, and of course check "$sector->get owner race".

There is no collision avoidance for station placement, only ships.

Check my plugin.mbase.x.god.bases script, subCreateBase. Basically it uses the command "get all stationary objects", then loops through finding a valid position, extending the range if necessary.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

1st test running perfectly : )


I scripted a fort station generator that do all the station placing and the script of what happen when the station is destroyed and when is constructed.


Everything work. All sector got one : )

Now I can resume the modding of you script to create fleet at the fort station location and put these target as the prime target for the generals.

: ) I dunno it if the rest of the work will be as easily to do but so far Im very impressed :P
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

3 questions:

1-
Where do you call script which you want to be run from time to time?

I mean that If I want a script to be run let s say every 15 sec, where would I put it? is there a program loop somewhere?

2-
$flags.station = [Find.Multiple] | [Find.Enemy]

what does that do?

3-
{Station 2016} which seem to be a class station

what does it represent in term of stations
ie: all non military use station

thank you
FriedTrix
Posts: 63
Joined: Fri, 13. Jan 06, 03:12
x4

Post by FriedTrix »

I need some help.

I sucessfully combined a sector owner defined map by way of owning a specific station(static within the sector) with ThisIsHarsh package(base response) and I will be needing 1 station file (station named like 'Sector Fortress' or 'Star Fort' or 'Sector HQ'). Price, ware and capacity... I leave it to the one who can provide me with that station.

If it s possible, I would also like a 'special' object with about the same size and that look like the wreck of the station created. With a name that represent the station that s destroyed. I dont think you can use the object class station to do so since I need it to be 'invulnerable' and 'undockable'.

Thanks
Last edited by FriedTrix on Wed, 13. Oct 10, 04:07, edited 1 time in total.
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hi,

Noticed a slight bug, though maybe it's intended behaviour...

I was in Asteroid belt and it got invaded by both the Split and the Paranid, as per my relation settings. Odd odd thing was that the Split and Paranid ships jumped in via the North and East Trans-Orbital Accelerators as well as the expected South gate...someone's not following the rules there! ;)

Cheers,

Scoob.
aka1nas
Posts: 1414
Joined: Thu, 7. Jul 05, 05:17
x4

Post by aka1nas »

Not sure if this is expected behavior, but I had pretty much every race invade Xenon Sector 347 at around the same time. They've been fighting a massive nonstop battle there for a gameday or two, with something like 15 capital ships present. However, they never seem to actually take the sector. Is this due to the Xenon continually spawning ships there, or because they all have navies in the sector? The Split and Terran both have capitals taking potshots at each other, for example.

I've made a small fortune and scraped together a small fleet from the salvage (Managed to sneak out a Q, 4 M6s, and a bunch of fighters due to NPC Bailing). :D

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”