Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Help Desperately Needed  (Read 7095 times)

Veronw

  • Ensign
  • *
  • Posts: 16
    • View Profile
Help Desperately Needed
« on: February 23, 2012, 11:00:18 PM »

Hello, first time poster here, got the game a couple of weeks ago and loved it. Thought I would try my hand at adding my own ship into the game to see how I could fiddle with it, however I have run into a considerable problem. The past thirty two attempts I have made to create a successful .ship file have apparently failed. I tried using the unofficial .ship data editor and the .ship/.variant editors to create the .ship file, and both of them result in different crash error messages.

The unofficial one resulted in a [KEY] exception, which I was unable to determine the meaning of. The second .ship editor resulted in a series of ship.cvs errors which culminated in me replacing an existing ship with the design I was attempting to mod in. THIS however, resulted in a [path/to/sprite] resource, not found in starfarer.res (shortened the error message for sake of brevity). I have gone through at least a dozen attempts at ensuring that the .ship file is correctly looking for the .png file in the location it should be. I have also attempted to change that location thinking it could just be an error uploading from that folder. Recreating the .ship file and accessing the .png image from various locations have also had similar failures. I have checked numerous times to ensure that there are no misspellings (just calling the ship Test) and that all files are following the appropriate formats. 

So far, no luck, and after six hours, I have given up and come here seeking assistance.
Help would be extremely appreciated!  :)
Logged

arcibalde

  • Admiral
  • *****
  • Posts: 1730
    • View Profile
Re: Help Desperately Needed
« Reply #1 on: February 23, 2012, 11:36:03 PM »

In your .ship file find

 "spriteName": "path/to/sprite",


and change it to:
 "spriteName": "graphics/*your dir in graphic*/ships/*your ship file*.png",



So if yours dir structure is: C:\games\starfarer\mods\first_mod\graphics\first_mod\ships\first_mod_cool_one.ping
in .ship file it would be:

 "spriteName": "graphics/first_mod/ships/first_mod_cool_one.png",
Logged
Creator of:
Relics MOD - vanilla balanced - Campaign integrated
Vanilla addon MOD - vanilla balanced - Campaign integrated
Project ONI MOD - mission only

jocan2003

  • Lieutenant
  • **
  • Posts: 96
    • View Profile
Re: Help Desperately Needed
« Reply #2 on: February 23, 2012, 11:36:44 PM »

The way i learn is often using other modders mods and figure out what they did, post your current .ship file and the error we will start from that.

Or what he says, but i prefer if you post your .ship file so we can find out if there is other kind of error
Logged

Veronw

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Help Desperately Needed
« Reply #3 on: February 24, 2012, 08:11:57 AM »

{"bounds":[-71.5,-16,-72.5,14,-55.5,41,-18.5,54,-0.5,28,30.5,16,89.5,13,123.5,13,125.5,-10,88.5,-15,30.5,-16,-0.5,-24,-13.5,-50,-53.5,-44],"center":[50,70],"collisionRadius":"200","engineSlots":[{"angle":"180","contrailSize":"64","length":"32","location":[-58,12],"style":"HIGH_TECH","width":"8"},{"angle":"180","contrailSize":"64","length":"32","location":[-58,-9],"style":"HIGH_TECH","width":"8"},{"angle":"180","contrailSize":"64","length":"64","location":[-54,6],"style":"HIGH_TECH","width":"12"},{"angle":"180","contrailSize":"64","length":"64","location":[-55,-3],"style":"HIGH_TECH","width":"12"}],"height":199,"hullId":"vianktau","hullName":"Vianktau","hullSize":"DESTROYER","shieldCenter":[0,1],"shieldRadius":"200","spriteName":"graphics/ex2/ships/vianktau","style":"HIGH_TECH","viewOffset":0,"weaponSlots":[{"angle":"120","arc":"210","id":"WS 001","locations":[-36,40],"mount":"TURRET","size":"SMALL","type":"ENERGY"},{"angle":"60","arc":"210","id":"WS 002","locations":[-20,36],"mount":"TURRET","size":"SMALL","type":"ENERGY"},{"angle":"-60","arc":"210","id":"WS 003","locations":[-40,-39],"mount":"TURRET","size":"SMALL","type":"ENERGY"},{"angle":"240","arc":"210","id":"WS 004","locations":[-21,-35],"mount":"TURRET","size":"SMALL","type":"ENERGY"},{"angle":"180","arc":"150","id":"WS 005","locations":[12,12],"mount":"HARDPOINT","size":"SMALL","type":"ENERGY"},{"angle":"45","arc":"150","id":"WS 006","locations":[12,-12],"mount":"HARDPOINT","size":"SMALL","type":"ENERGY"},{"angle":"-45","arc":"150","id":"WS 007","locations":[104,5],"mount":"HARDPOINT","size":"MEDIUM","type":"ENERGY"},{"angle":"0","arc":"5","id":"WS 008","locations":[104,-3],"mount":"HARDPOINT","size":"MEDIUM","type":"ENERGY"},{"angle":"0","arc":"5","id":"WS 009","locations":[-32,0],"mount":"TURRET","size":"SMALL","type":"ENERGY"}],"width":103}


Added the path/to line that was suggested, game launches now!! Just have to get the ship into a mission or the campaign now haha. Thanks for the assistance :)
« Last Edit: February 24, 2012, 08:13:34 AM by Veronw »
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Re: Help Desperately Needed
« Reply #4 on: February 24, 2012, 08:20:18 AM »

Great stuff!

Just as a note, if you intend on releasing your mod, it has been suggested that it is a good idea to prefix all your ship / weapon IDs with something unique, to hopefully make ID clashes less likely in the future.

e.g.
"hullId":"vianktau" would be (slightly!) more robust if you call it something like "hullId":"VeronW_mod_vianktau"

(Vianktau is a bad example :D but stands up for when you start running out of names and going for more generic ones!)
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Veronw

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Help Desperately Needed
« Reply #5 on: February 24, 2012, 08:32:49 AM »

Yes, that was what I was originally doing, but after all the trouble I ran into I decided to simplify things as much as possible to find the source of the trouble! I am not sure if I will release it or not as of yet, still gotta get weapons on it  ;D although its working in missions now, which makes me happy!

http://youtu.be/mMq7pQzMtuM rather bad video, but it at least shows what it looks like!
Logged

Veronw

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Help Desperately Needed
« Reply #6 on: February 24, 2012, 11:23:09 AM »

Okay, so, having successfully gotten the ship in game, I decided to add another variant of the Valk troop transport, I like the look of it. Got everything set up same way as before, made sure pathing was correct and the like. However, when I try and boot up the mission, I get this error: java.lang.RuntimeException: slot is null - make sure weapon slot id is correct.

Not quite sure what it means, I have redone the hard points on it now twice, perhaps I have too many? Added twelve to the ship..

Help would be appreciated :)
Logged

jocan2003

  • Lieutenant
  • **
  • Posts: 96
    • View Profile
Re: Help Desperately Needed
« Reply #7 on: February 24, 2012, 01:56:46 PM »

You have a mistake in the variant file calling a weaponslot ( or turret slot ) ID wrong maybe a typpo? make sure its ok in the variant file. Also really a space in a ID name? WS 001?? should be WS_001, shield radius on that ship is way too big too to my idea.
Logged

Veronw

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: Help Desperately Needed
« Reply #8 on: February 24, 2012, 02:37:17 PM »

I figured out the issue, I had apparently duplicated the file for a freighter in the ship.cvs, which didn't allot the number of turrets I had put on it. Copied over one of the cruiser files instead and altered that. Also changed a few other things, got rid of the shields, increased the armor, more battles look more epic that way I think.. Thanks for the assistance all :)
Logged

jocan2003

  • Lieutenant
  • **
  • Posts: 96
    • View Profile
Re: Help Desperately Needed
« Reply #9 on: February 24, 2012, 02:40:14 PM »

Your welcome have fun!
Logged