Makeing Maps and Co-ordinates.

The place to discuss scripting and game modifications for X Rebirth.

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

Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

Makeing Maps and Co-ordinates.

Post by Chayde »

Hi , I'm trying to make a map - i am following the tutorial Observe made as well as looking at all the excellent systems made bt several other people. I have a problem though .... I really don't understand the co-ordinate system , Where is 0x,0y,0y, especially in relation to the cluster , then the zone. when you put something in a zone you offset it , is that relative to the center of the zone? i have managed to have my system appear on the galaxy map but hevent got a gate in the normal universe. I think this may be due to getting the wrong co-ordinates. In the geme distances are measured in Kilometers , So .... what is the co-ordinate differance for 1 kilometer? <sigh> i'll keep working on it and Thankyuo to anyone that can help .

:?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

all distance units are in meters - the Game just adds the Si-Prefix. and the Position is always relative to the Parent Object (for Objects defined in a Zone it is relative to the Zone, for things defined in the Sector it is relative to the Sector etc.)

as for directions:

+X is right, -X is left, +Z is top of Map (or "North"), +Y is above Map (so Y is the depth Axis for Mapping)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Exavier724
Posts: 118
Joined: Fri, 12. Dec 03, 02:13
x2

Post by Exavier724 »

As UniTrader mentioned all distances are in meters. So 25km is 25000.

The coordinates also center based on the parent object.
Galaxy.xmlSets coordinates based on The center of the galaxy.
Clusters.xml treats whatever coordinate you set up in Galaxy as if it was the center point (0,0,0)
Sectors.xml & sechighway.mlx base their coordinates on whatever was set in Clusters as if it was the center point.
Zones.xml & zonehighways.xml are based on whatever was configured in the Sectors for the center point.

The one that makes things tricky is aligning things like the Regions located in the Clusters.xml file. Since not only do you have to account for the cluster level offset but also the sector offset. (1000000 sector + -10000 zone = 999000 for region to show up in the right zone)
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Exavier724 wrote:The one that makes things tricky is aligning things like the Regions located in the Clusters.xml file. Since not only do you have to account for the cluster level offset but also the sector offset. (1000000 sector + -10000 zone = 999000 for region to show up in the right zone)
i usually make a short LibreOffice Calc table for that, where i take the sums of 2, 3 or 4 lines (2 lines for Sector offset, 3 lines for Cluster offset and 4 Lines for Galaxy offset if its ever needed) on 3 rows.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

thanks

Post by Chayde »

thankyou for your help :) i'll keep working on it
TheDeliveryMan
Posts: 886
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

I prefer to specify coordinates in E notation like this:

Code: Select all

<position x="66.0E3" y="3.0E3" z="-481.0E3" />
<position x="-30.0E6" y="10.0E6" z="50.0E6" />
Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

Post by Chayde »

ok - i'm stuck . and i don't know why. If i knew why i wouldn't mind so much but not knowing why makes me feel stupid. Fairly obvoiusly i don't like feeling stupid. <sigh>. Can someone please enlighten me as to why , why ... WHY ! this isn't working .

in the zones.xml ---

<?xml version="1.0" encoding="utf-8"?>
<diff>

<add sel="/macros/macro[@name=tzoneCluster_D_Sector18_Zone45_connection/clustergate_homeworld_macro']/connections">
<connection name="clustergate_homeworld_cantaran" ref="gates">
<offset>
<position x="4539.8559570313" y="10000" z="25156.25" />
<quaternion qx="0" qy="0" qz="0" qw="1" />
</offset>
<macro ref="props_gates_anc_gate_b_macro" connection="space" />
</connection>

<connection name="props_gates_jumpbeacon_macro" ref="anything">
<offset>
<position x="5539" y="10000" z="15100" />
<quaternion qx="0" qy="0" qz="0" qw="1" />
</offset>
<macro ref="props_gates_jumpbeacon_macro" connection="space" />
</connection>

</add>

</diff>

At the moment i can't even check the rest of whay i have , because i can't get there without a gate. and i really don't know why the gate isn't appearing. I even made a googlesheets document to figure out which zones are which. (i have completed 1/2 of albion and all of devries) If anyone is interested ican link it for other people.

Thank you in advance.

Will
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hey Chayde,

Not sure if it's the only problem, but it looks like you're missing a ' here:

Code: Select all

[@name=tzoneCluster_D_Sector18_Zone45_connection/clustergate_homeworld_macro']
Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

Post by Chayde »

gah !! your right .. i'll try that now thankyou :)
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

also your xpath doesnt refer to the Vanilla files i think - if your work is based on another Extension it is maybe right, but i think your path should look more like this (note: i shortened it a bit since i prefer shorter parts only refering to nodes near to each other in the original File)

i think the sel path should be this:
<add sel="//macro[@name='tzoneCluster_D_Sector18_Zone45_connection']/connections">

on second thought even for a Mod your variant makes not much sense..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

AH ha

Post by Chayde »

ok .. i think i see what happened. i copy-pasted the location after typeing it it the galaxy.xml and included the gate as part of the location. D'oh

well , time to try it again.

Thankyou :)
Chayde
Posts: 15
Joined: Fri, 23. Jan 15, 21:21

<sigh> bah

Post by Chayde »

at this point in time i am just banging my head on a desk. i am going to create a new rebirth folder , uninstall the MOD's in it and start from scratch. Hopefully i can get a better result after a short break and working through it medhodically . In other news so i don't get too frustrated i am going to try another mod , first working through the excellent 3d models tutorial by Observe. I like the Splid M1 ship , and intend to try and upgrade it's weapons/shields so it's more viable as well as alter the placement of it's docking bay. I know i can make a mod work as i managed to make the "gangrene cheser" buildable in an Albion shipyard.

Thankyou to everyone for all your help and suggestions. No doubt i will be back on this thread as frustarted as ever soon ^.^ .

Will

Return to “X Rebirth - Scripts and Modding”