"Code" based mods for SWGEmu

Joined
Oct 13, 2010
Messages
108
I'm not sure if I have told you guys, but I am absolutely horrid at making custom textures, and I mean horrid. That being said, I was wondering if it's possible to mod particle effect files that don't require texture modification. (Not HLSL, I don't know it so I can't work on that lol)
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
MechWarrior001 said:
I'm not sure if I have told you guys, but I am absolutely horrid at making custom textures, and I mean horrid. That being said, I was wondering if it's possible to mod particle effect files that don't require texture modification. (Not HLSL, I don't know it so I can't work on that lol)
It's certainly possible! But i couldn't really tell you how, i don't know anyone who really knows the format of the particle files *cue uli* but there are lots of files you can edit, you should check the (quite incomplete) wiki :)
 

Tonberry

Inactive Staff
Joined
Aug 30, 2010
Messages
372
Yeah particles are a nice thing to change. I started a mod a while ago revolving around particles, introducing better hit particles for certain weapons. (The idea was to have stun/electric damaging weapons have a spark on hit, heat have a flame or sizzle, blast kick up some more dust and have a nastier hit sound and so on.)

I definitely don't know an awful lot about the .PRT format either and as am sure you've noticed, the wiki doesn't have anything useful either. Also as Davin suggested, I also recall Uli knows most of what is in PRT files.

Of course for particles, a lot of it still comes from the textures. :p When it comes to things like particles I think the way to do it properly would involve someone coming up with a GUI tool which you can live preview the values/textures you're changing as you do it in real time.
 
Joined
Oct 13, 2010
Messages
108
Tonberry said:
...the wiki doesn't have anything useful either.
I didn't even know said wiki existed.

Normally when I mod I mostly do modifications that are more functionality and behavior based as opposed to graphical based, but since most of that in SWGEmu is server-side (and Emu isn't complete yet) I can't really mod the game content other than graphics :/
 

Tonberry

Inactive Staff
Joined
Aug 30, 2010
Messages
372
The Wiki is quite clearly listed among our forums and we often refer people to it. As Davin said it is incomplete but its definitely a good reference depending on what format you're working with. There is quite a lot can be done with client side stuff, if you're creative enough. In fact SWG has a little too much client side really.

Of course for many of the things you're thinking of do require a few server-side changes too, though with the current state of the OR for lots of things you just to make sure the server loads your new TRE.

In any case, there is plenty of client side code changes you can make, or bytecode I suppose would be a more fitting term. There are plenty of formats to explore as you'll see listed in our wiki. If you don't want to get involved with those formats then UI files are an option and I guess that counts as code. Not many have done a lot with UI in the past but its definitely something flexible if you put the time in.
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
If somebody knows about hex editing, it's for sure Uli.
Don't worry he hates texturing too. :p

As Greenberry said, you could try your luck with the UI files, basically XML like EQII, and since there is no editor for SWG UI files (like EQII and its UIBuilder), you'll have to do it all by hand, but that's not really a problem is it?
 
Joined
Oct 13, 2010
Messages
108
Kayliaah said:
As Greenberry said, you could try your luck with the UI files, basically XML like EQII, and since there is no editor for SWG UI files (like EQII and its UIBuilder), you'll have to do it all by hand, but that's not really a problem is it?
It partially is in the sense that I would have to constantly boot the game to check and try any changes (which would require a server to be online, and currently Emu servers don't have 100% duty cycles as well as having to wade through character selection and world loads) as opposed to having a GUI app which can simulate and reflect changes in real-time.
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
MechWarrior001 said:
Kayliaah said:
As Greenberry said, you could try your luck with the UI files, basically XML like EQII, and since there is no editor for SWG UI files (like EQII and its UIBuilder), you'll have to do it all by hand, but that's not really a problem is it?
It partially is in the sense that I would have to constantly boot the game to check and try any changes (which would require a server to be online, and currently Emu servers don't have 100% duty cycles as well as having to wade through character selection and world loads) as opposed to having a GUI app which can simulate and reflect changes in real-time.
Well how do you think I did it?
I must've loaded onto a SWGEmu server thousands of time, after a while you get pretty fast at this, 7 seconds to logout and quit the client, restart it and load into the game.

Disable world preloading and caching for fast loading, add your username to the config file so you only have to type your password, be sure to have few toons or locate the one you want to use, once you've done that it's really easy.


Good thing with textures you can use the ingame command /reloadtextures, for colorramps a hard logout/login loads the modified ones in real time, but yeah for things like UI editing or hex editing, you can't avoid restarting the client.

You can always switch between servers, I used to work on my UI mods on Core3 only, it was a pain really, then Liberator came along and Nova was still up, when all were offline I had to resort to using other servers from other communities, even ANH's.

You just have to want to work on it, if you're just messing around without a goal then yeah it'll get old pretty quickly.

I wish we had a UIBuilder for SWG, but SOE never bothered, and the Inc Editor for SWG was never finished and the prototype is glitchy as hell and incomplete.
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
Actually, there is technically a UI Editor for SWG, made by SOE :p It's called UIBuilder and it is the editor they made for EQ2 you mentioned :) The UI system is I would guess built on the same engine and so this program can be used for editing SWG UI files, the only problem is that it's very buggy, one important bug is that if the files have linebreaks in them (or something similar, I can't really remember) the program will refuse to open them until the file is fixed. :)

If anyone would care to take a look at it and figure out what makes it tick and perhaps develop a program that will automatically format inc files to its requirements then I've uploaded it for you here: http://www.modthegalaxy.com/downloads/tools/UIBuilder.zip :)
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
WHAT ARE YOU SAYING DAVIN?!
That I've been wasting my o so precious time? :(

Well I've tried using the UIBuilder with SWG UI files and it never worked, I assumed the files were too different thus not compatible with EQII's UIBuilder, but if you say there is a "way" to load the SWG UI files through some trick then I'm all ears.

I'll take a look.



EDIT: HOLY CARP I GOT IT.
EDIT 2: Nope, doesn't work.
EDIT 3: YES IT DOES, I got it all wrong! Ugh, UIBuilder doesn't allow drag and drop of files onto the interface, you need to Open them manually. -_-

EDIT 5:

Yeah, I got it, it's going to be an extreme pain to adapt the format so that the SWG files can be loaded properly in EQII UIBuilder, and since the UIBuilder cannot load .inc files they have to be saved as .xml files and then back to .inc for the SWG Client to load them, which isn't a problem.
The good thing is, as far as I can tell by testing the files, once their format is rearranged for UIBuilder, the files don't need to be changed back to SWG's style.

The pain right now is that you have to manually edit pretty much each line of code and rearrange them, which means hundreds to thousands of lines of code to edit manually, and right now I don't know if it's worth the trouble imo.
Personally I know I'll go faster in doing it all manually.

I wonder why SOE fucked up so much with SWG, they could've made the system less of a hassle by using EQ's system, the SWG UI files are clearer when viewing in an editor but that's it.

The guy who made TRE Explorer also made that INC Editor I was talking about, and now I see it, it looks and works exactly the same as UIBuilder and loads the current SWG files in their own format, but again the biggest problem is that the editor was never finished and included into TRE Explorer, a big shame.



I'll try rearranging a "small" UI file if I can be bothered and see what can be done, but my fingers hurt just by thinking about it.


Big thanks to Davin for "showing me the way".
 

Tonberry

Inactive Staff
Joined
Aug 30, 2010
Messages
372
Well one thing good came out of this thread at least lol. Thanks Davin, even I wasn't aware UIBuilder was viable for use with SWG, to a degree anyway. ;)

I may even look into this at some point.
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
Sorry I didn't mention it sooner :blush: But yeah, as it stands it's still quicker to edit them by hand though as I said someone with very little coding knowledge could develop a program to automatically format them properly, I might try it myself if no one else fancies it but I won't really be home for a couple of weeks so it'll have to wait until then :)

Also, if I remember correctly you are right Kay in that once the formatting has been changed SWG can still load the files without reverting to its own formatting.

Of course the best option would be for someone clever to develop a nice new program with a fancy interface that is designed specifically for SWG but I doubt this will happen since a lot of the UI relies on stuff inside the client there's not much you can ADD to it beyond new server interfaces (though I did once add a button to toggle autorun as an experiment :D).
 
Joined
Oct 13, 2010
Messages
108
DavinFelth said:
Of course the best option would be for someone clever to develop a nice new program with a fancy interface that is designed specifically for SWG but I doubt this will happen...
I'm taking C++ this next semester in college; after I complete the course (or two) I could try.
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
DavinFelth said:
Sorry I didn't mention it sooner :blush: But yeah, as it stands it's still quicker to edit them by hand though as I said someone with very little coding knowledge could develop a program to automatically format them properly, I might try it myself if no one else fancies it but I won't really be home for a couple of weeks so it'll have to wait until then :)

Also, if I remember correctly you are right Kay in that once the formatting has been changed SWG can still load the files without reverting to its own formatting.

Of course the best option would be for someone clever to develop a nice new program with a fancy interface that is designed specifically for SWG but I doubt this will happen since a lot of the UI relies on stuff inside the client there's not much you can ADD to it beyond new server interfaces (though I did once add a button to toggle autorun as an experiment :D).

If you plan on making a tool to make it all automatic then be my guest. :D
I got it perfectly now, thanks to Notepad++'s tricky tricks to make it semi automatic, I restarted from scratch and it took me around 5 minutes for ~300+ lines of code, the tricky part will be when I want to do the same with other files that contain more than 3000 lines lol.

Until then, I'm going to mess with UIBuilder and see what can be done (sadly SWG isn't as extensible as EQII), and if you really want to take a shot at that tool or anyone else, I'll try to make a template so you know what has to be changed.


Almost forgot, the picture. :D

http://img854.imageshack.us/img854/7711/uibuilder.png
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
Ahh sweet, nice work Kay :D

Might as well post up that template for reference, will possibly download VE tonight and have a crack at making an app :)
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
I'll do some more testing with heavier files to be sure they can be edited properly, then I'll see about that template, though I don't know how I could make it not too messy lol.
 

Uli

Moderator
Staff member
Moderator
Joined
Aug 30, 2010
Messages
208
Kay bug me sometime today or tomorrow and then bug me on sunday about it
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
Uli said:
Kay bug me sometime today or tomorrow and then bug me on sunday about it
It's ok Uli, I got this :p

Though if I have trouble I'll let you know :D
 

Kayliaah

Relic
Joined
Aug 30, 2010
Messages
322
Go go go, let's see who's the fastest and most reliable, the winner... gets to be the one who finished it first!

Seriously though, I'll bug you Uli be sure of that lol.
I'll bug you too Davin for the sake of bugging someone out.

I was playing some FNV and it crashed, and since I'm mad I'll go back to trying out UIBuilder with another file, wish me luck.
 

DavinFelth

Administrator
Staff member
Administrator
Joined
Aug 29, 2010
Messages
165
Pfft, Uli's already released loads of things, *I* want to do something useful for a change :D

Ahh I love Fallout, only ever played little bits of it though (can't remember which one lol), CBA buying a console or upgrading my graphics enough to get it for myself though :rolleyes:

Good luck :p
 
Top Bottom