ModTheGalaxy Client -- A PreCU Client with offline terrain loading

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
Got tired of having to log into Nova each time to test client side things, such as .WS or .TRN modifications, so I've made a few modifications in Uli's old client and hacked this together. I've also modified 'ui_scene_selection.inc' slightly, to allow for an easier selection of scenes (terrain files) if you have multiple. Also mucho thanks to Uli for always being there for technical questions and pointers, regarding asm in this case!


What it does, is basically it enables two UI buttons that allow the user to load 'Scenes' without needing to be connected to a server and then to teleport around the planet based on a set coordinate map inside of a .txt file.

What it doesn't do, first of all, it is not a hack or can be used as such. Teleporting only works in 'singleplayer'. Secondly, 'singleplayer' is very raw and basic, don't expect to play, see mobs, fight or do anything game like. I've only made this so we have a quick access to the ingame renderer and system to easily test client side modifications or content, be it actual terrain files, snapshots, simple texture modifications, meshes, etc.





How-To's
  • Installation
    Simply extract all the files inside the .7z archive to your PreCU SWG directory.


  • Loading a 'Scene'
    When you open the client, you should see the 'Load Scene' button:


    Once clicked, you should be greeted by the 'Scene Selection' window:


    Then simply select a scene, hit next and you're done! You could also create a character, but it only sticks around while you're in the 'singleplayer'.


  • Teleporting to a location
    By default, you load at '0, 0, 0' (Unless you specifically set it in 'sLocal.cfg') on the planet that you've previously selected. If you want to teleport elsewhere on the map, simply open your 'Game Menu' (Ctrl+Esc) and you should see the 'Locations' button:


    Once clicked, you should be greeted by the 'Locations' window:


    Select the planet you're on, then the location where you want to teleport to and hit 'OK'!

    Note: It is possible to teleport to other planets, but I found it extremely unreliable/unstable. I haven't figured out the exact reason why it crashes, sometimes it works flawlessly. I'll try to eventually fix it if I'm able, but one thing I've noticed, either you only teleport after having been 'in game' for a while (It seems to lessen the crash on load) or you could try logging on on Nova for example, traveling to another planet, disconnecting, loading up a scene again and then teleporting across planets seems to work most of the time. But this process takes longer than simply 'Disconnecting' from the scene and selecting a new one.


  • Add or modify the coordinate map
    This is fairly straight forward, open 'locations.txt' and take a look at how I set it up, then just follow that example. I generated them based on the clientpoi and the clientregion datatables and the .STF strings they access, but you can enter anything really, as long as you follow the 'syntax':
    • If you use the '_' character in display names, it will be translated into a space in game, so for example: 'City:_Bela_Vistal' would look like 'City: Bela Vistal' in game.
    • Planets: use 'P', tab or space, terrain filename (without extension or path) and the display name, so as an example for 'terrain/corellia.trn': P corellia Corellia
    • Locations: use 'L', tab or space, display name, tab or space, XYZ coordinates, so for example: L City:_Coronet -178 0 -4504
    I've noticed that, if you modify it while ingame and simply close and reopen the Locations window, it pulls the updated content.


  • Adding in more scenes
    Go to 'ui/' and open up the 'ui_scene_selection.inc' and find/scroll down until you see 'DataSource', and right after the following '>' you'll find the individual <Data ... /> blocks for each scene, here you can simply remove, add to or in between the existing ones as long as you follow the following template:

    Code:
    						<Data
    							description='descriptionText'
    							displayname='displayName'
    							filename='terrain/terrainName.trn'
    							Name='terrainName'
    							screenshot='screenshots.screenshotsName'
    							Size='128,64'
    						/>
    • description - The description of the scene, can be anything, because displayname doesn't seem to work, use as the 'visual name'.
    • displayname - Unsure how to actually get this to display
    • filename - The filepath to the .trn file.
    • Name - The internal name, I'd keep it the same as the actual name of the filename.
    • screenshot - The 'preview' picture of the scene, you can find already set up ones (Or add new ones to it) further up in the file, search for 'Name='screenshots'', then look at the <image .../> blocks. Once you've chosen one, for example 'space', enter it here like: 'screenshots.space'.
    So for a complete example, if you have a .TRN named 'mtg_test', you'd set it similar to this:

    Code:
    						<Data
    							description='Mod The Galaxies Test'
    							displayname='MTG Test'
    							filename='terrain/mtg_test.trn'
    							Name='mtg_test'
    							screenshot='screenshots.swamp'
    							Size='128,64'
    						/>


  • Other options
    At the moment there are only really 5 settings you might want to tweak, they can be found at the top inside of 'sLocal.cfg'
    • loginClientID - This sets your 'Username', I've put Local as default so it saves any UI changes made in game and doesn't lose them everytime. You can find the settings in 'profiles/Local/single_player/'.
    • avatarSelection - This links to the object template that you want to spawn as, you can change this to nearly anything I believe. Note that unless you modify them, the turnRate will usually be worse than the default object/creature/player/ objects.
    • freeChaseCameraMaximumZoom - This sets how far you can zoom out with your camera. The SWG default is normally 1.
    • singlePlayerStartLocationX - This sets your starting X coordinate, in case you want to keep loading somewhere specific. If you set this, it applies to all 'scenes' you load in, so be aware of that. The SWG default is 0.
    • singlePlayerStartLocationZ - This sets your starting Z coordinate (Not height, that is set automatically). The SWG default is 0.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
589ghoster said:
Is it possible to edit terrain height map? If so how?
Wrong thread? But yes, it is. Better ask in one of the threads about terrain modification.

Edit: Just realized how old that reply was, my bad.
 

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
Just tried it and it worked fine for me??
 

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
We can set up a mirror if problems persist - seems fine to me too though.
 

drdax

Member
Joined
Jun 11, 2015
Messages
133
holy X-Wing Chewwie ! Just found this in my n00B phase of terrain editing! Thank you so much for this!
 

drdax

Member
Joined
Jun 11, 2015
Messages
133
couple of questions: updated

1. figured it out lol -> client: install in the PreCU SWG directory, that the client game directory?

2. figured it out lol -> working on a new planet, I want to use the off line editor to see the objects in the .WS file I am working on ....so do i need to go thru all the steps to add the planet, compile a new TRE... OR can i just add the files and modify - using the tool to view along the way ?

UPDATE: so I have Complied a new TRE- added to the client side file sLocal.cfg file ..... it works now- just don't have an object at 0.0 lol.

Can't wait for a terrain builder app ..... /cough /cough .....how is that coming ?

Thanks!

Sorry so many things from the n00bTerrainGuy :)
 

drdax

Member
Joined
Jun 11, 2015
Messages
133
another question:

I created new objects and included in the same TRE with the TRN / WS file and added to the slocal.cfg file.
When loading, the Viewer Client crashes

If I remove the custom object - the client loads fine and can see TRN and WS like normal.

Note: if I have post 14.1 objects from the MTG TREs, no issue, loads / displays fine.

What should I check or edit?
 

Vossk

New Member
Joined
Nov 17, 2021
Messages
15
does this still work? can i use a different client? the link to uli's old client doesnt work
 

Sytner

Administrator
Staff member
Administrator
Joined
Sep 18, 2010
Messages
426
does this still work? can i use a different client? the link to uli's old client doesnt work
It still works, use the 'Download it here' link not the old link to Uli's thing.

It is a modified client, so you can't use a different one - any other client version would need modifying in the same way.
 

Vossk

New Member
Joined
Nov 17, 2021
Messages
15
It still works, use the 'Download it here' link not the old link to Uli's thing.

It is a modified client, so you can't use a different one - any other client version would need modifying in the same way.
Thanks for the reply Sytner! :D
 
Top Bottom