Sector Mapping

The place to discuss scripting and game modifications for X²: The Threat.

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

bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

Sector Mapping

Post by bevin2007 »

Can anyone please help a new modder. I am looking for a map of sectors. BUT. it has to say their coordinates. The only one I know is Cloudbase North West. It's location is x=0, y=2. If not is there a way to get a code set to operate in Cloudbase North West to be changed to operate in current sector.
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

Sorry. I don't quite understand your question.

You want a sector map with coordinates? I don't know any. I use external Galaxy Editors that report the coordinates.
But it's pretty easy to get the coordinates: they start on the upper left with 0,0 (Kingdom End). Going to the right, the x-value increases. Thus, Rolk's Drift is 1,0. Going down, the y-value increases, thus Three Worls is 0,1 and Cloudbase NW is 0,2. The lower right corner sector is 19,14.
If not is there a way to get a code set to operate in Cloudbase North West to be changed to operate in current sector.
This sounds like you want to script something, don't you? And a famous script operating in Cloudbase NW is galaxy.Example.initplayership... :D
--------------------------------

[ external image ]
bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

Post by bevin2007 »

Well yes i saw that script and used the code from that to get the coordinates for Cloudbase NW.
bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

Post by bevin2007 »

But how do you get a script to run in each sector.
bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

Post by bevin2007 »

Just so you know. I am Scripting at a massive scale to create an Artifical Life Thinga maboby. If i ever finsh i will email you a copy.
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

Code: Select all

But how do you get a script to run in each sector.
This can be easily done by looping over all sectors of the map:

Code: Select all

001  $MaxSecX = get max sectors in x direction
002  $MaxSecY = get max sectors in y direction
003     
004  $SecX = 0
005  while $SecX < $MaxSecX
006      $SecY = 0
007      while $SecY < $MaxSecY
008         $SelSec = get sector from universe index: x=$SecX, y=$SecY
009         if $SelSec
010            // do whatever you want to do in this sector
011         end
012         inc $SecY = 
013   @   = wait 10 ms
014      end
015      inc $SecX = 
016  @  = wait 10 ms
017  end
It's important to check that there's actually a sector at the given location (this is done in line 009).
--------------------------------

[ external image ]
bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

Post by bevin2007 »

Thank You for that. I look forward to sending you an email with this AI engine attached. Also do you have any suggestions of things I could possibly put in. If i got the time I was also going to Create an M0 Class range of ships for each race. Can you help me with the specs for these as i am a little confused as to what I give them.
User avatar
Shadow dream
Posts: 1840
Joined: Thu, 1. Mar 07, 11:39
x3tc

Post by Shadow dream »

As you know how to script I think it is a good idea if you'd join our modding-team. Chris is our only scripter atm and our mod is based on lots of scripts...
If you are interested just register at our forums (-> sig) and post a short application here. (Just something simple as "hello, I saw you're working on a great piece of work and I think you could need a scripter to help you out")

Shadow
Wahre Gentlemen behalten sogar umzingelt von Löwen ihren Leitsatz: Ladies first.
Wann lernt die Gesellschaft endlich, dass Geld erst die Probleme macht, die wir haben?
[ external image ]
Topic - Gallery - Forum - Freiheit
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

Also do you have any suggestions of things I could possibly put in.
Well, what do you actually do? A massive AL plugin... But what does it do?
If i got the time I was also going to Create an M0 Class range of ships for each race. Can you help me with the specs for these as i am a little confused as to what I give them.
That pretty much depends on your liking, I'd say :D.

But be aware that X2 doesn't support a proper M0 class. The M0 class the X2Editor lists merely changes the icon of the ship in radar and map view. You need to use patch14 to define the ship. The M0 type in patch14 doesn't work as I had expected.
I defined M0 class ships as M1 in patch14 and as M0 in X2Editor. For the scripting engine, this ship is a M1, but it it displayed as a M0 ship...
--------------------------------

[ external image ]
bevin2007
Posts: 10
Joined: Sun, 17. Jan 10, 00:41

X2 Editor

Post by bevin2007 »

I would love to help with your modding and would like you to know that I have scrapped any idea of a AI engine as it would take too long and i am am not experienced enough. However if you want me I would be glad to help with pandora mod. Though my ability's aren't good. i could learn to create ships though. I have installed the x2 editor but it is missing some files. is this even the program I need.
User avatar
Chris Gi
Posts: 960
Joined: Wed, 20. Sep 06, 09:57
x3tc

Post by Chris Gi »

I found scripting much easier than creating ships. You need some time to master the modelling program - and to get a model that is both good looking and has a decent polygon count. And texturing is even worse...

If you're really interested in helping, register at our homepage, introduce yourself and tell us what you want to do.
--------------------------------

[ external image ]

Return to “X²: The Threat - Scripts and Modding”