Fractal Softworks Forum

Starsector => Mods => Modding Resources => Topic started by: Cataphract22 on June 22, 2017, 09:07:29 PM

Title: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 22, 2017, 09:07:29 PM
26/06/2017: VERSION 0.3.3.0

It's still advisable to copy your /data and /graphics folders to local app data (see below), but I'm working on ironing out the major issues for cases where you don't do this.

-----------------------------------------------------------------------------


Hi all,

I've been working pretty hard for a while now getting this in a passable/working(?) alpha state, and I present to you:
Starsector Forge
v0.3.1.0
DOWNLOAD HERE (http://www.mediafire.com/file/syla04ous2lfrhd/StarsectorForge_0.3.3.0.zip)



So what does it do? Starsector Forge is intended to be a one-stop shop for creating new Starsector content. For now, you can create and edit new ships, skins, and variants. In the future, the feature list will be expanded to include wings, weapons, factions, styles, star systems, and more. This is a very early version. From the testing I've been able to do, everything should work fine. If (when) you encounter a bug, or a missing feature that you think needs to be here, please let me know and I'll get on it. This initial release is to introduce the tool, and fix up any egregious bugs before work begins on other features.


(https://preview.ibb.co/bSAUA5/shipeditor.png) (https://ibb.co/djL7xk)
Ship Editor (https://imgbb.com/)

(https://preview.ibb.co/iHiWtQ/weapon_Groups.png) (https://ibb.co/d0N205)
Variant Editor: changing weapon groups (https://imgbb.com/)



IMPORTANT INSTALLATION INSTRUCTIONS
Starsector Forge runs in a virtual sandbox, meaning that it can't read or edit files outside of its working directory without you giving it express permission. It's a limitation of the programming language/Windows, and not something I can change. What that means is that, if you want to get full value out of the tool, you will need to copy your mod folders, and the \data and \graphics folders from starsector-core, and paste them into %localappdata%\Starsector_Forge\. The Readme that comes in the download will explain in more detail. It'll still work without doing this, but you'll have to manually open files the first time you access them. It works nicer if you copy over the files, and there may be some bugs if you don't. //There ARE bugs. I'm ironing them out where I can, but it's recommended you copy folders over. The next version will mitigate this problem by duplicating data to the working directory.

On a similar note, because of the file handling, Starsector Forge will only work in Windows. Again, not something I can change. Sorry about that.


USING THE PROGRAM
The Readme file contains a list of common controls to use the editor, but the best way would probably be to just experiment - it shouldn't be too hard to get the hang of. You should know that everything is controlled with the left and right mouse buttons, the arrow keys, and shift/control/alt as modifiers. A tutorial and in-app control guides will come later. One thing that might not be so obvious is that you can right-click menu options when loading files to force the program to ask you for a file location. Usually it'll try to find the ship_data.csv/sprite/etc files on its own, but if you want to change them, right-click.

Most of the main menu options at the moment won't do anything. If clicking a button doesn't work, it's because it doesn't do anything yet. They all will eventually.

FEATURES


FUTURE FEATURES

*There's a tiny chance these won't be possible, but at the moment I'm confident.


KNOWN ISSUES

If you find other bugs, please let me know. I spend most of my time building the tool, and comprehensively testing it takes time away from creating (I'm so professional).

UPCOMING IN VERSION 0.4.0.0 (so far)


This release is still closed source. It's a complete mess, and won't be any help to anyone in its current state. I'm working on refactoring and cleanup when I can. I'll release the source eventually, bear with me (not that you'll really want to see it, others have written much nicer code).


A final note of thanks needs to go to Trylobot for the Ship Editor, and Deathfly for the updated Ship & Weapon Editor. I've obviously taken a few layout notes from their excellent tools, and I hope I'm not flooding the editor market with the Starsector Forge.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: CrashToDesktop on June 22, 2017, 09:35:53 PM
Ohh, this is interesting.  First EZ Faction, and now this.  As a modder who unfortunately doesn't know a lot about Java, I approve of all this stuff.  Hopefully you reach your goals! :) For my sake if anything, with the factions and systems, heh.  I'll have to check this out once I finish up with some other stuff.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 22, 2017, 10:01:50 PM
Thanks :)

The other editors won't be that hard really. The reason I chose to do the ship/skin/variant editors first was because they had the largest breadth of functions I'd need to build the Forge. They're all done now, and mostly functional, so the rest will come easily. I'll be taking some time to bug test and fix problems with the existing editors, then I'll add the others.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Midnight Kitsune on June 23, 2017, 08:14:00 AM
I don't see why we needed this when we already have DeathFly's editor. I would have done things that the current editor doesn't do instead of wasting time on this.
Also, with this needing us to copy files into other locations, it makes it kinda a pain in the ass to use... I figure most people would not use it versus the other editor. Sorry

...First EZ Faction...
Which is made by a modder that has the Quality and Bug Control level of Bethesda and he will not listen at all to advice of those that have more experience than him with mods. Also, "EZ Faction" still leaves the majority of the work for you to do and only takes care of the more simple things.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: CrashToDesktop on June 23, 2017, 09:28:49 AM
I don't see why we needed this when we already have DeathFly's editor. I would have done things that the current editor doesn't do instead of wasting time on this.
Also, with this needing us to copy files into other locations, it makes it kinda a pain in the ass to use... I figure most people would not use it versus the other editor. Sorry

Which is made by a modder that has the Quality and Bug Control level of Bethesda and he will not listen at all to advice of those that have more experience than him with mods. Also, "EZ Faction" still leaves the majority of the work for you to do and only takes care of the more simple things.
Someone sounds a bit grumpy. :)

The answer to both - competition breeds excellence.  Why bother to update it and make it better when you're the only one?  Have an urge to make something better, even if it's only for nodding and you're not making anything off of it.  I can say that much from my experience.

I'll honest, I haven't used trylobot's editor in years and haven't used Deathfly's - trylobot's was a bit clunky but did it's job.  This one, however, right off the bat has a nicer looking interface and has the potential to go beyond just making ships.  Don't just shoot it down on sight, will you?
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Tartiflette on June 23, 2017, 09:44:52 AM
Gee Midnight! Way to nuke someone's work for absolutely no reason! Deathfly's tool is not updated for 0.8.1 yet and missing some features, plus it's not perfect by a long shot. I can only welcome any alternative that makes modding easier.

BTW Cataphract, you mentioned the creation of star systems? If there is one thing that is difficult to do right now, it's to create a stable economy (even with the changes in 0.8 ) A lot of the values are buried in the game's code and even more are multiplied by various factors. So a tool that, from the market conditions, calculates the average input and output of a planet (or better a whole system, or even better a whole mod) would be of an immense help.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Thaago on June 23, 2017, 10:04:29 AM
This looks really neat! Thanks for sharing your work Cataphract.

Something we could really use, but might be difficult to make, is a mission editor. We COULD right now have all sorts of character driven missions in the game, but programming them is a pain.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: xenoargh on June 23, 2017, 11:22:56 AM
I really like this project :)

Will you be releasing the source so that others can extend / modify / maintain it?
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Midnight Kitsune on June 23, 2017, 01:43:58 PM
I was just pointing out things that I thought would be obvious for this mod. I wish Cata the best of luck with these mod tools, I really do. It is just that the way he chose to create a editor for ships and weapons when we already have one just felt strange. Yes it isn't updated to .72 but that never stopped others in the past when the old Trylobot editor wasn't updated
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 23, 2017, 03:25:49 PM
I was just pointing out things that I thought would be obvious for this mod. I wish Cata the best of luck with these mod tools, I really do. It is just that the way he chose to create a editor for ships and weapons when we already have one just felt strange. Yes it isn't updated to .72 but that never stopped others in the past when the old Trylobot editor wasn't updated


I understand, and this was one of the reactions I expected. I actually started this project after getting involved in the S&W editor. I made some updates, but Object BASIC is not a language I'm strongly familiar with. I got it in my head that building an editor in a language I know would allow me to work faster on changes/new features. At the moment you're right, apart from skins, wings, and a few other minor things, Forge doesn't do anything that S&WE doesn't - in fact in a couple places it falls down pretty hard (like not calculating OP yet). But like I said, I added those components first because I understood what they looked like and could just focus on programming the functionality.

As for having to move files, I'm pretty sure the same rule applies for the S&WE. You need to explicitly open a file before the program can load it without your instruction. That's why loading ships in S&WE doesn't load the image automatically until after you've done it manually. It's a pain, I agree. It'll work without it, but you'd have to manually open files the first time you use them. I honestly just haven't tested it fully, so to be safe i added the warning.

I really like this project :)

Will you be releasing the source so that others can extend / modify / maintain it?

I'm not against it. In fact, I'd love to, and it's certainly the plan. I want to stabilise the code first, then clean and comment what hasn't been done, then I'll get a repo going. Fair warning though: it isn't pretty. A lot of it is brute-forced, and all of it needs refactoring.

This looks really neat! Thanks for sharing your work Cataphract.

Something we could really use, but might be difficult to make, is a mission editor. We COULD right now have all sorts of character driven missions in the game, but programming them is a pain.

I'll look into it. I've begun tests for the faction editor to see exactly what I'm going to be able to do with this tool, and some of those will bleed over to a mission editor as well. I don't want to over-promise if I can't deliver. Some of the file handling stuff might be beyond the capability of the engine. If I can, I will.

...This one, however, right off the bat has a nicer looking interface and has the potential to go beyond just making ships.  Don't just shoot it down on sight, will you?

Thanks! Improving the user interface was one of my primary goals. There is still a lot of work to do in that regard, but I'm getting there. I still want to add mouse support for data editing, and proper text controls. Then there's hotkeys and menu buttons for part modifiers (arcs, angles, etc)...

If there's anything in the UI that's bugging you, let me know. I can look in to changing things.
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: c0nr4d1c4l on June 23, 2017, 03:54:33 PM
Would it be possible to feature tools for station modules?
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: cjuicy on June 23, 2017, 04:58:51 PM
Great work man! I can't wait to try this.

On a side note, the skin editor was a nice touch. :)
Title: Re: [0.81a] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 23, 2017, 09:11:33 PM
Would it be possible to feature tools for station modules?

Yes, definitely. I haven't looked into it too much, but from what I could tell from a cursory look, creating modular ships should be really simple. Added to the shortlist.

Great work man! I can't wait to try this.

On a side note, the skin editor was a nice touch. :)

Thanks! Let me know if it breaks :) The skin editor was a high priority for me, because I'm a terrible spriter, but love the idea of more diversity, so I was keen on the idea of making skins.

Getting mirrors from loaded files is working now, as is removing built in mods on skins and a few other bug fixes. I'm doing some refactoring, but should have a new version up soon. I'm going to start digging into the Faction Editor today, so if that goes well I'll include that in the 4.0 release.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 26, 2017, 03:26:40 AM
Sorry bout the double-post, but just wanted to let everyone know there's a new version out. Mostly bug fixes, and some missing features. As always, let me know if you hit a bug.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: xenoargh on June 26, 2017, 10:44:41 AM
A couple of thoughts:

SSED used the "A" key to adjust auto / non for weapon groups, detecting which group we were on (essentially the same process you're doing for recording the clicks to change groups).  Perhaps add an Autofire / Fire Mode button over each group or keys that are a little more intuitive.

Mirroring is extremely useful, for weapons, hitboxes and engines, but it needs a quick way to turn it on / off.

It would be very nice if you followed SSED's usability feature of using the nearest weapon's settings to set the next weapon when creating a slot; huge time-saver on big ships with lots of little guns, etc.

I'm still not sure how we use your tool to set up Carriers.  That's one area where SSED hasn't been updated and we're having to do it manually ATM.

I'd really like to see a proper Weapon editor; SSED's version is not quite there; it won't show the animations for animated weapons, for example, it doesn't show the Missile graphics on the mounts, it doesn't show the recoil animation.

Same with Projectiles; this is a pretty simple area of SS, but having a visual editor would save tons of time when trying to tweak the look of our mods.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 26, 2017, 03:05:46 PM
A couple of thoughts:

SSED used the "A" key to adjust auto / non for weapon groups, detecting which group we were on (essentially the same process you're doing for recording the clicks to change groups).  Perhaps add an Autofire / Fire Mode button over each group or keys that are a little more intuitive.

Good idea. I wasn't really sure how I wanted to do it, so I just threw something in there. I don't like how it feels either.


Mirroring is extremely useful, for weapons, hitboxes and engines, but it needs a quick way to turn it on / off.

You can press F12 to toggle mirroring, but I don't think that's particularly great.

It would be very nice if you followed SSED's usability feature of using the nearest weapon's settings to set the next weapon when creating a slot; huge time-saver on big ships with lots of little guns, etc.

Yep! This was actually just an oversight :P All I need to do is un-comment a block of code and this is in.

I'm still not sure how we use your tool to set up Carriers.  That's one area where SSED hasn't been updated and we're having to do it manually ATM.

Wings can be added by going to Wings Mode, and using left and right arrow keys to add/remove a wing. Launch Bays are just weapons, with the type set to LAUNCH_BAY. As for the other x/y coords... to be honest I don't really understand how they work (I said I was making an editor, not that I knew what I was doing XD). I assume they're fighter spawning points? Quick clarification: can you have more than one set? as in, can there be more than 4 coords for a weapon? I can set up a Hangar Mode, like SSWE has, to add spawning spots. Won't take very long. For now, you can add the X2 and Y2 coords in the weapon data edit (right click). Let me know if there's something else I've missed to get carriers working.

Edit: Ah, I see. Yep, adding new 'hangars' is totally borked atm - I initially thought it was set up to create a rectangle area, but I see how it works now. That'll be right at the top of the list to fix!

Oh, and as for hints, I'll probably want to eventually add some better way to handle them, but don't know exactly how I want to do that. For now, you'll just have to add them into the Data Edit Mode manually.

I'd really like to see a proper Weapon editor; SSED's version is not quite there; it won't show the animations for animated weapons, for example, it doesn't show the Missile graphics on the mounts, it doesn't show the recoil animation.

Same with Projectiles; this is a pretty simple area of SS, but having a visual editor would save tons of time when trying to tweak the look of our mods.

Coming! (eventually!) I thought GM:S2 was a good engine choice partly because it natively handles animations and particles. When the Weapon Editor gets in, it will have animations right from the start. I haven't got a clue how projectiles/particles are currently drawn in SS, but my vision for the weapon editor is to have a Preview Mode showing it on a firing loop. Getting the Forge to replicate exactly how SS looks might be tricky, and there likely won't be support for flashy weapons, but the basic projectiles or beams shouldn't be a problem.


I was going to hold out for a while before doing a control/control guide pass, but I think I'd better do that next. So the next version will have updated hotkeys, rollover text, and on-screen control guides. It's obviously important for the flow to work well, so if you've got any other suggestions on how you'd want it set up, let me know.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: xenoargh on June 26, 2017, 06:29:17 PM
On the F12 key: agreed, that isn't intuitive.  SSED uses the space bar; works pretty nicely in the workflow.

Quote
I haven't got a clue how projectiles/particles are currently drawn in SS, but my vision for the weapon editor is to have a Preview Mode showing it on a firing loop. Getting the Forge to replicate exactly how SS looks might be tricky, and there likely won't be support for flashy weapons, but the basic projectiles or beams shouldn't be a problem.
Essentially, projectiles are drawn twice; once with the coreColor being applied to the graphic, once with the fringeColor, at a larger size.  Both sprites are additively rendered.

Missiles are simpler and yet more complicated.  They have a simple graphic component that just uses coreColor and is non-additive.  But they can also have an Engine when active.

As for weapons, they're very straightforward.  Barrels always move straight back, even if the shots come out at angles; if ALTERNATING, they alternate in the order the Offsets are declared (SS does some process to split multiple barrels in one sprite into quads, using the offsets to cut the sprite up).  The only weapons that don't obey that general rule are the animated weapons, which animate a frame per time-interval when active, essentially.  Modders can do even more complex things with code, but that's rather outside the scope of this project, heh.

But yeah, I'd love to see this become polished for the major use cases that are the core of building a Faction Mod:  ships and CSV entries, weapons, .PROJ files, Variant and Faction files.  If the code was cleaned up and the directory problem gets solved, it might be a replacement for SSED (SSED, btw, uses a text file to store where the SS directory is, etc.- and was also made with GameMaker).

The problem here is that when you get past ships, variants, weapons and projectiles, it's almost another project entirely, as SSED's developers have discovered. 

It'd be so much better if these things were each executed in different UIs; editing a ship's core variables in a spreadsheet is fairly efficient but only if you like spreadsheets and are savvy enough to spot spellling errorz that will cause a crash, such as selecting the wrong ID for a System, for example.  The issue here is that Alex has made this a somewhat-moving target, instead of using proper inheritance or safe values so that mods missing the new variables won't crash. 

Building a Faction file should be pretty straightforward- text entries guided by the UI, largely; a few methods in the UI guiding modders to create / link to the proper dependencies (for example, the "speeches" Factions give when you talk to them, the graphics files that show up in different UI contexts, etc.).
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 26, 2017, 09:40:13 PM
Thanks for the description :) That all seems pretty much how I expected. Won't be hard to do a projectile/weapon editor.

By SSED, do you mean the Ship & Weapon Editor? or another program? SSWE is Blitzmax, not GM. The file issue can be worked around, but not solved the way I'd want to - it's just not possible to allow the program to automatically load files without explicit user input, unless the files are in the working directory (at least for now). There is a config file that points to the various data and graphics folders, but there are a couple tiny bugs I need to iron out. I'm thinking I could probably get around the major problem however, in two ways: first, to have an installer copy the data and graphics folders and set up the working directory (which unfortunately means having an installer), and second to duplicate any mod data that's saved. So as a user, you'll be saving to the starsector mod dirs as normal, while behind the scenes the Forge is creating a "working copy" in the wd. It'll load from the wd, while you can save it wherever you like. It seems like a big issue atm (certainly is for me) so I'll see if that works.

The Faction Editor will likely have its own specialised UIs. It's of lesser importance than other editors (because it's just a pretty straightforward JSON edit for the most part), but I want to visualise it. You'll be able to see text, portraits and icons in some sort of context, and some indication of fleet compositions. It was going to come sooner rather than later, but there are too many polishing tasks to take care of first. Jumping over to a new JSON parser means that the *new* code is more elegant, but it's been bolted on top of the *old* code, which is going to be a handful to clean out.

You've been super helpful though! Thanks for adding stuff to my ever-expanding list :P It's always simpler on paper.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Originem on June 29, 2017, 07:55:38 PM
I do actually not want to have the process of "copy my data", changing outside of my mod folder.
Wait for new version.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: CrashToDesktop on June 29, 2017, 07:58:20 PM
I do actually not want to have the process of "copy my data", changing outside of my mod folder.
Wait for new version.
Why is this somehow an issue?  I literally cannot see a reason outside of the second a half it takes to copy and paste from one window to another, and if that's your problem, you've got other things to worry about. :P
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: Cataphract22 on June 29, 2017, 10:23:09 PM
I do actually not want to have the process of "copy my data", changing outside of my mod folder.
Wait for new version.
Why is this somehow an issue?  I literally cannot see a reason outside of the second a half it takes to copy and paste from one window to another, and if that's your problem, you've got other things to worry about. :P

Eh, it's inelegant. Once it's done you're pretty much good to go, but I can see how it's a bit of a pain. Anyway, I've made some modifications, and for most use cases it works without copying over. Still have a few things to clear up, and I need some way to force a recheck/reload because of the way it handles duplicate names. But new version should be out soonish.
Title: Re: [0.81a] [0.3.3.0] Starsector Forge: modding tools for ships, skins, variants+
Post by: lechibang on October 23, 2017, 09:29:45 AM
So when is this getting updated? I'm looking forward to creating custom factions with it.