Sat Apr 26, 2003 11:40 pm by CaseWorker
Well, after two hours or so of screwing around I've got an idea of what was wrong... if anyone else is curious here's what I've got on trade lanes:
The number of rings is inconsequential to the lane itself, although the game will have docking issues if you make a one-ring lane. The main component of a trade lane is its lane zone. The code for a zone is as follows:
[zone
nickname = Zone_Ar01_Tradelane_1
pos = -80000, 1000, 50000
rotate = 30, 270, 0
shape = BOX
size = 520, 520, 60520
comment = . Tradelane to nowhere
lane_id = Ar01_1
tradelane_down = 5
sort = 4
toughness = 10
density = 6
repop_time = 15
max_battle_size = 0
pop_type = major_tradelane
relief_time = 15
faction_weight = li_n_grp, 1
As you can tell, I copied most of this out of an existing system, so there's some clutter. Here's the breakdown:
nickname: this can be anything to my knowledge, as long as it is unique
pos: these are the x, y, z coordinates of the first ring in your lane
rotate: this is the orientation of the first ring in your lane - in this case my ring points slightly upward and to the 'east'
shape: leave this alone for now, I'm experimenting with non-BOX lanes but so far all I've gotten is "Dock Denied"
size: 520 is the default docking distance, and the box is already rotated to face in the direction of your first ring. This means the only coordinate you need to mess with is the depth, or z-coord. This MUST be as long as your trade lane, as this zone must encompass all of the rings in your lane.
comment: unnecessary, but useful sometimes
lane_id: make sure this is unique as well
Everything else has to do with encounters and interaction and such. For example, toughness has to do with the number of hits a ring can take before going down, and repop_time is how long before it comes back up. Mess with these based on your system density, traffic, etc...
The rest of your lane code has to do with the rings themselves. Here's a general format...
[Object
nickname = Ar01_Trade_Lane_Ring_1
ids_name = 260758
pos = -80000, 1000, 50000
rotate = 30, 270, 0
Archetype = Trade_Lane_Ring
ids_info = 66170
next_ring = Ar01_Trade_Lane_Ring_2
reputation = li_n_grp
tradelane_space_name = 252673
behavior = NOTHING
difficulty_level = 4
loadout = trade_lane_ring
pilot = pilot_solar_hard
[Object
nickname = Ar01_Trade_Lane_Ring_2
ids_name = 260758
pos = -65858, 10000, 50000
rotate = 30, 270, 0
Archetype = Trade_Lane_Ring
ids_info = 66170
prev_ring = Ar01_Trade_Lane_Ring_1
next_ring = Ar01_Trade_Lane_Ring_3
reputation = li_n_grp
behavior = NOTHING
difficulty_level = 4
loadout = trade_lane_ring
pilot = pilot_solar_hard
[Object
nickname = Ar01_Trade_Lane_Ring_3
ids_name = 260758
pos = -37574, 30000, 50000
rotate = 30, 270, 0
Archetype = Trade_Lane_Ring
ids_info = 66170
prev_ring = Ar01_Trade_Lane_Ring_2
reputation = li_n_grp
tradelane_space_name = 252674
behavior = NOTHING
difficulty_level = 4
loadout = trade_lane_ring
pilot = pilot_solar_hard
The first lane should have a next_ring but not a prev_ring. The middle lanes should have both. The final lane should have a prev_ring but not a next_ring. Also, the first ring and last rings should have tradelane_space_name set to the ids_name strings of their destinations. Freelancer automatically names each of the rings along the way based on which side of the ring you are on. The rotations on all of the rings should be the same. The positions should place the rings in a line. Basic trigonometry is all you need for this part. If anyone's desperate I'll post a guide on that, but there's some information on it elsewhere on the forums.
I don't know how interested anyone else is in the idea of angled trade lanes, multi-level systems, that sort of thing, but I've been messing with it and encountered only one problem... When going up an angled trade lane (or vertical, for that matter), the ship faces in the correct direction. When going down, however, the ship tilts upwards at the same angle, but while moving downwards. It's an aesthetic problem unless you happen to be in a cruiser that crashes against the lane mid-flight. I'm sorting through code to see if I can correct this, but I'd really appreciate any help anyone else can provide.