Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Redbull

Pages: [1]
1
Modding Resources / Re: .ship/.variant editor
« on: March 27, 2012, 07:50:37 AM »
Just popping in to say that I'm still very busy but havn't forgotten about this. Sorry about registration and search etc not working, I totally forgot to start up the php server. However all data is intact and (now) working properly again.

2
Modding Resources / Re: .ship/.variant editor
« on: March 09, 2012, 01:57:11 AM »
I can't seem to be able to upload ships, keeps giving me a big fat "DENIED - INVALID IMAGE!"

I've checked that it has the right path to the image of the ship but still the same error.. is it the wrong filetyp? .png?

Would make fine tuning ships easier if I could just load them directly from the site..

Also something seems to be odd when trying to move/add hardpoints or turrets..

When i hit set from clicked, it adds 14 decimals.... 14! As far as I'm concerned there don't need to be any decimals..

I fixed the invalid image error, it was just firing all the time for no particular reason.

I've been busy, and still am, with real-life stuff but I'll try to update the editor reasonably soon.

3
Modding Resources / Re: .ship/.variant editor
« on: February 06, 2012, 03:16:35 PM »
Dumb question: If I make a mod and add weapons to it, will it show in the weapons tab?

It won't, the lookup just displays the standard weapons. The weapons are still just files and not actually in the database which makes it iffy to add custom ones at the moment.

*ahem* i am having the same problem killvanya. i've made my first ship with .ship and .variant files in respective folders with different names (batbarge.ship and batbarge_Broadside.variant) tried adding it to a mission and the game crashes at the loading screen  >:(  also i've done all of this on a mac.

edit: fixed

I can't help you with adding the ships/variants to missions since I don't really know much about that part. I just provide a tool to make the actual creation of them easier.

In addition, I watched from your thread and just to be clear; the json parser does not care about whitespace (spaces, tabs, linebreaks) - unless you're planning on editing the json directly the step of prettifying it is not needed.

Hey Redball, I have a problem where when I try and select a weapon slot, it selects all of them. I've tried restarting my browser and also a different browser. Is there an issue with having more than 20 slots on a ship? Or having more than 3 launch bays? Just wondering?

Mago

Edit: Fixed just needed to name the weapons

Yeah it doesn't check to make sure the weapons have unique IDs, which is required. Should probably add that.

4
Modding Resources / Re: .ship/.variant editor
« on: February 01, 2012, 12:16:40 PM »
Is it possible to make it so that the json isn't all packed into one line, or am I doing something wrong?

It is, but since it's mostly comestic I hadn't planned on doing it. I suggest using pretty-print.org.

5
Modding Resources / Re: .ship/.variant editor
« on: January 19, 2012, 08:39:20 PM »
Update to v5. This is mostly a back-end update, however there are a couple new features.

Fancy ship listing;

To load a ship, click on it.

A similar variant listing;

Loads the same way as ships.

As you might have noticed, there's a field for uploader. This is because you can now upload ships and variants to the server. You'll have to register to upload your stuff (so I can keep track of who's allowed to update what) but it's completely painless, it only requires a name and a password. If you want to update something you've already uploaded, simply upload it again.

6
Modding Resources / Re: .ship/.variant editor
« on: January 19, 2012, 11:40:59 AM »
Everytime I try to assign weapons in the variant tab it clears the id after I
click off of it and reassigns undefined to it

I think what you're doing is deselecting the slot. It's a multiple select, and every slot you want assigned to the group needs to be selected at the same time. Having 4 weapons selected (i.e. in a group) might look like this;


Ctrl-click to select or deselect a slot without affecting the others. If you deselect a slot the value is lost. Hope this helps.

Edit: In other news, I see a few people have tried out the upload functionality. It's in active development so it might have unexpected results now and then until it's finished. I'm planning to move to that system entirely after I figure out a good way to sort and display variants and if you have opinions on this I'd be glad to hear them.

7
Modding Resources / Re: .ship/.variant editor
« on: January 16, 2012, 05:29:53 PM »
Updated, most importantly it's now online after getting Alex's permission. It should now work on pretty much every modern browser, and operating system, without any setup. Going online also meant that I could make a proper save-as function, you no longer have to copy-paste the JSON, and that you'll always be using the most up-to-date version. Check it out.

8
Modding Resources / Re: .ship/.variant editor
« on: January 15, 2012, 12:56:57 PM »
I don't have a mac, so I can't say for sure, but unzipping the mac version and putting the editor in Starfarer.app/Contents/Resources/Java works. If you for some reason can't select files within the Starfarer.app folder I suggest you copy the data and graphics folders to somewhere else and put the editor there instead so your file structure looks like editor-folder/data, editor-folder/graphics, editor-folder/starfarer.html. That will also work.

9
Modding Resources / Re: .ship/.variant editor
« on: January 12, 2012, 05:49:55 PM »
I put together an ugly hack. It will now load, to the best of its abilities, variant files that don't conform to the parser. I also made the weapon lookup give more details.


10
Modding Resources / Re: .ship/.variant editor
« on: January 12, 2012, 09:34:46 AM »
Hi, actually we can't open variant files?

The thing is, the variant files that come with the game aren't valid JSON. It's just a matter of a few commas and possibly comments here and there, but the parser still does not like it. For example, if you try to load the unmodified wolf_Assault variant
Code
{
"displayName":"Assault",
"hullId":"wolf",
"variantId":"wolf_Assault",
"fluxVents":0,
"fluxCapacitors":0,
"mods":[], # array of strings

# mode is either LINKED or ALTERNATING
# slot ids (WS ***) must match what's in the .ship file
"weaponGroups":[
{"mode":"LINKED",
"weapons":{
"WS 001":"irpulse",
"WS 002":"irpulse",
"WS 003":"irpulse",
   },
},
{"mode":"LINKED",
"weapons":{
"WS 004":"pulselaser",
   },
},
{"mode":"ALTERNATING",
"weapons":{
"WS 005":"annihilator",
"WS 006":"annihilator",
   },
},
],
}
it'll throw an error during parsing. The fixed version (comments and trailing commas removed) looks like this
Code
{
"displayName":"Assault",
"hullId":"wolf",
"variantId":"wolf_Assault",
"fluxVents":0,
"fluxCapacitors":0,
"mods":[],
"weaponGroups":[
{"mode":"LINKED",
"weapons":{
"WS 001":"irpulse",
"WS 002":"irpulse",
"WS 003":"irpulse"
   }
},
{"mode":"LINKED",
"weapons":{
"WS 004":"pulselaser"
   }
},
{"mode":"ALTERNATING",
"weapons":{
"WS 005":"annihilator",
"WS 006":"annihilator"
   }
}
]
}
and will load successfully. You can check if a file will parse by using jsonlint.com and correct the errors that pop up there. The variants exported by the editor will always load successfully as its using the built-in serializer. I know this is a hassle, but there isn't really anything I can do about it short of putting together an ugly hack.

11
Modding Resources / Re: .ship/.variant editor
« on: December 28, 2011, 12:56:49 PM »
I put some light documentation up, check the link in the OP. If anyone has something they want me to add, or feel is unclear, just tell me.
Next up, making the variant editing less awkward.

12
Modding Resources / Re: .ship/.variant editor
« on: December 28, 2011, 12:03:42 PM »
Yeah I think I figured it out. It seems like Chrome is much more restrictive towards local pages than the other browsers, which is why it won't work. This is to stop malicious local content but in our case it works against us.
Apparently you can "fix" it by using the switch --allow-file-access-from-files but I had no luck with that. The other way is to run a local http server and put it all on there. I hate to say it, but the easiest solution is probably to use another browser.

13
Modding Resources / Re: .ship/.variant editor
« on: December 28, 2011, 11:10:12 AM »
Quote from: Alex
Took me a little while to figure out how it works - in particular, "set from clicked". What it looks like it does is get the *last* point you clicked on in the ship view - I expected it to require you to click on a point. It might be helpful if the "clicked" point was highlighted somehow on the ship view.

Yeah, that is how it works. I agree that it could be implemented better and I'll try making it easier to use.

Quote from: Alex
Also, it would be great if this let you create a whole new ship - i.e., load up just the image, without a data file.

You can do this now, just put in the (relative) path to the sprite and go to town.

Quote from: Zarcon
how do I get the Reset All button to become a Save button?

I removed all the save buttons in favor of having it automatically save changes.

Quote from: Zarcon
So I went ahead and copied out the JSON code that was generated, and made a new .ship file from that, and then did the same with the .variant file.  That worked fine, but clearly I missed the boat at some point, and is most likely an easier way to do this ha ha.

No, you're doing it right. As far as I know, which isn't very since I'm learning javascript as I go, there isn't a way to give the data to the user as a file. If I'm wrong, I'd love to hear about it. Oh and speaking of the JSON window, you can edit that directly too if you want to.

Quote from: Zarcon
Also, my methodology of downloading the starfarer.html was just to save the source of the website that you directed me to with the above link, was that the correct download approach?

Yep!

I'm glad you people like it, and it seems like the biggest issue is that it's a bit hard to figure out. I'll write up some documentation after I've tracked down, or given up on, the Chrome bug.

14
Modding Resources / Re: .ship/.variant editor
« on: December 27, 2011, 10:12:33 AM »
You should be able to open .ship files without any fuss by selecting them with the file input thingy and then clicking "Load ship". The JSON parser doesnt like the .variant files already in the game, since they have comments and some commas in odd places. If that's what you're doing you'll need to run it through jsonlint.com until it validates.

That all said, I've only tested it on the latest firefox (e: and Opera) so there may be cross-browser issues I havn't noticed. What exactly is it that's not working?

e2: Yeah, looks like it's not working in Chrome. Firefox and Opera both work, I havn't been able to test IE9 - I'm going to try to fix whatever issue chrome is having but for now it looks like you'll have to use another browser. Sorry.

15
Modding Resources / .ship/.variant editor
« on: December 27, 2011, 01:36:12 AM »
As a sort of intro to javascript I decided I'd write a ship editor, I think it turned out alright. Here is a picture;


Changelog
v5
  • Added upload functionality
  • Added graphical ship and variant listing
  • Improved loading of non-parsing variants
  • Moved ships, variants and their sprites to database
v4
  • Moved the whole shebang online
  • Added save as for the generated .ship/.variant files
  • Added load from file for ship sprites
  • Added load from list of standard ships/variants
  • Fixed compatability with Chrome
  • Moved weapon lookup to utilities

v3
  • Loads variants with malformed JSON
  • Added more information to weapon lookup

v2
  • Added cursor
  • Changed how variant weapon groups are assigned
  • Added weapon lookup
  • Added visible engine trails

Starfarer Ship Editor
Documentation (somewhat outdated)

I hope someone finds this useful and if you have any questions/comments go right ahead.

Pages: [1]