SWG Extension Loader & Settings Overrider (Add New Slash Commands!)

n00854180t

New Member
Dec 2, 2016
25
0
1
#1
I wrote an extension for SWGEmu client that injects a DLL which hooks the chat/mood/language part of command execution, as well as the function for echoing to the chat,  to implement new slash commands.

Currently, I've implemented a number of commands related to overriding the in-game graphics options and setting them to values above the default maximums.

Here's a list of commands my extension implements:

  • /globaldetail X - sets the Global Detail Level to X, valid ranges are 1-24. You must move the slider in Terrain options AFTER using this command.
  • </hdterrain|/highdetailterrain> X - sets the High Detail Terrain Distance to X, valid ranges are 1-50. You must move the slider in Terrain options AFTER using this command.
  • /radialflora X - sets the Radial Flora Distance to X, valid ranges are 1-256.
  • </ncflora|/noncollidableflora> X - sets the Non-Collidable Flora Distance to X, valid ranges are 1-128.
  • </vd|/viewdistance> X - sets the View/Rendering Distance to X, valid ranges are 512-4096.
  • </getvd|/getviewdistance> - Prints the current View/Rendering Distance value to the chat.
  • /getradialflora - Prints the current Radial Flora Distance value to the chat.
  • </getncflora|/getnoncollidableflora> - Prints the current Non-Collidable Flora Distance value to the chat.
  • </setall|/overrideall> <default|low|medium|high|ultra> - Sets all graphics settings to preset values. Type /overrideall help for info on each preset.
  • /exthelp - This command, which lists help info on available extension commands.
I like to use the /setall or /overrideall command to set it to the high preset, myself (/setall high).


Here's the VirusTotal. It does have some detections, but they show as "ProcessPatcher", which is because my program injects a DLL into the SWGEmu process.

https://www.virustotal.com/en/file/8dc2bb3ad1fa3001dd54f2dc7ed220282bd6d91df74c10d12e17a22d3b4fba79/analysis/1483248014/

Download

NEW! Source code for both the loader and DLL extension (releases section has binaries):

https://github.com/ChairGraveyard/SWGExtensionLoader
https://github.com/ChairGraveyard/SWGCommandExtension


or directly from the forum:
 

Attachments

Nov 20, 2012
7
0
0
#3
Hi, I'm struggling to get this working.

I've dropped both files in the swgemu directory and run the app but trying the commands in game it just says they're not recognised.

Am I missing something?
 
Dec 2, 2016
25
0
1
#5
Make sure to launch as admin guys, that's the main thing. If not it will just silently fail to inject because it can't access the client's process without admin privs.

Other caveats are that it may not work depending on what version of Windows you have (to do with the detour library) and right now it looks for the default SWGEmu client window's name (I'll be providing a config file for the loader soon that will let you specify the name instead, so it *should* work on unmodified client exes from other servers).

There's also a much more advanced version of this by TheAnswer, with way more features, that I'll be adding Lua support to soon and providing a binary for.

After I get the config file implemented and TA's DLL compiled, I'll provide a short video guide on making it all work. Sorry for the troubles guys!
 
Dec 2, 2016
25
0
1
#6
Update, get the new release from here: https://github.com/ChairGraveyard/GalaxyExtensionLoader/releases/tag/0.3

This includes TA's version of the extension DLL, which offers some extra commands and a smoother way to change the graphics settings (no messing with the slider required). Also included is a config.json file which allows you to change the window name that the loader will look for.

Do note that the commands are now subcommands of the /emu command, so use them as before, but like this: /emu hdterrain 40

This still needs to be run as admin!

Type /console in the chat to see the console for entering commands.

Also keep in mind that if the client you're using is for a custom server and they've made changes to the client exe file, this likely won't work (would need some effort to update the offsets), but if you're willing to test it, go into the config.json file and change the entry for windowName to the name of the window for your client).
 

jdavidlol

New Member
Jan 17, 2017
4
0
0
#7
I cant get this to work to save my life. The console just doesn't show up and none of the commands are accepted. I have tried starting it before and after SWG. I have run it as admin, and in compat modes for other versions of Windows. None of it works.. anyone else have luck?
 
Dec 2, 2016
25
0
1
#8
@jdavidlol - Try this: Click Start, type cmd, right click Console and open as administrator.

Then, cd to the directory that has the SWGExtensionLoader.exe in it, and run it (just type SWGExtensionLoader.exe and hit enter).

This should let you see what it's outputting - if it just says "Finding SWG Window..." it's not finding the window (make sure your client's window name is correct in config.json, the default is "SwgClient").

If that still isn't working, the following information will help me debug:

* Windows version
* SWG Window Name
* What server you're playing on
* What you've done to try and run it thus far (in your case I've got this already @jdavidlol)
 

jdavidlol

New Member
Jan 17, 2017
4
0
0
#11
n00854180t said:
Try running it from the command line like I mentioned.
I assure you, I did as you instructed. If I open it before SWG it closes but it does not work in game. Ill double check again when I get home later.
 
Dec 2, 2016
25
0
1
#12
The point of running it in the command line was so you could tell me the output :p

Run it after you get all the way in game and have loaded into your character.
 
Dec 2, 2016
25
0
1
#13
RE: SWG Extension Loader & Settings Overrider (Add New Slash Commands!)

Alright, here's a guide since people are having so much trouble:

1) Launch SWG Emu and Login

[img=500x354]http://i.imgur.com/2jSyNPK.jpg[/img]


2) Run Galaxy Extender (as Admin)



A message should show up in the chat box: 



3) Once it's loaded (the above message appears) type /console into the chat window



A console window should appear that looks like this:

[img=500x388]http://i.imgur.com/7BphG5X.png[/img]

4) Issue a command from the available list into the console and hit enter, such as "/emu setall high" to set the graphics settings beyond the defaults:



A message like this one should be printed to the console, and your graphics settings should change (might not be noticeable at first unless you flip between them):



That's it!
 
Dec 2, 2016
25
0
1
#14
BTW guys, if you're running on a server other than Basilisk, make sure that your SWG client window title is correct in config.json - the default is "SwgClient", if you need to get yours open the game and hover over it in the taskbar and it should say near the top of the little thumbnail. Go into config.json and replace "SwgClient" with whatever your client's window title is.

Another caveat is that currently the extension doesn't seem to work on Windows 10. I'll be working on an update to fix that this weekend.
 
Dec 2, 2016
25
0
1
#16
roman6 said:
Edit*
Never mind. Make sure  C Runtime is up to date and working.
Can you link the runtime you used? It's hard for me to tell requirements like that since every machine I use already has development tools installed.

Thanks :)
 

roman6

New Member
Jan 7, 2017
10
0
1
#17
n00854180t said:
roman6 said:
Edit*
Never mind. Make sure  C Runtime is up to date and working.
Can you link the runtime you used? It's hard for me to tell requirements like that since every machine I use already has development tools installed.

Thanks :)

Ah man i still can't get it to work :s  "MSVCP140D.dll is missing from your computer"

I'm on Win7. I have only tried the most current Runtime versions. 

Ill try some other ones out later and let you know..
 
Dec 2, 2016
25
0
1
#18
roman6 said:
n00854180t said:
roman6 said:
Edit*
Never mind. Make sure  C Runtime is up to date and working.
Can you link the runtime you used? It's hard for me to tell requirements like that since every machine I use already has development tools installed.

Thanks :)

Ah man i still can't get it to work :s  "MSVCP140D.dll is missing from your computer"

I'm on Win7. I have only tried the most current Runtime versions. 

Ill try some other ones out later and let you know..
https://www.microsoft.com/en-US/download/details.aspx?id=48145

Should be this one you need. Let me know if installing that helps.
 

Sytner

Administrator
Staff member
Administrator
Moderator
Sep 18, 2010
385
26
48
#19
RE: SWG Extension Loader & Settings Overrider (Add New Slash Commands!)

Not sure how practical it would be on either side but I'd love to see this tool get all the functions from Timbab's toolbox (https://www.youtube.com/watch?v=sOuSb48d9Oc).

Great work so far though :).
 

Valkyra

Moderator
Staff member
Moderator
Aug 31, 2010
199
12
18
#20
n00854180t said:
BTW guys, if you're running on a server other than Basilisk, make sure that your SWG client window title is correct in config.json - the default is "SwgClient", if you need to get yours open the game and hover over it in the taskbar and it should say near the top of the little thumbnail. Go into config.json and replace "SwgClient" with whatever your client's window title is.

Another caveat is that currently the extension doesn't seem to work on Windows 10. I'll be working on an update to fix that this weekend.

Any update on the Windows 10 issue? I saw TA mention that it worked for him in IRC in 10, wondering if anything has been done yet.