Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 7 8 [9] 10

Author Topic: .ship/.variant editor  (Read 80288 times)

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: .ship/.variant editor
« Reply #120 on: March 24, 2012, 11:42:23 AM »

No Apophis is correct, it is an optimization that determines whether a check on the detailed bounding polygon is even necessary; for if something lies outside the defined collision radius for an object, then it isn't necessary to check any further. And circle-circle collision checks are very fast.

Thus, "Broad-Phase Collision Detection"
Logged

Plasmatic

  • Admiral
  • *****
  • Posts: 500
  • Curious no?
    • View Profile
Re: .ship/.variant editor
« Reply #121 on: March 26, 2012, 03:06:06 AM »

I think it is used for broad phase collision detection

Next question.. what the heck is Broad-Phase Collision Detection? :P

No Apophis is correct, it is an optimization that determines whether a check on the detailed bounding polygon is even necessary; for if something lies outside the defined collision radius for an object, then it isn't necessary to check any further. And circle-circle collision checks are very fast.

Thus, "Broad-Phase Collision Detection"

So if some part of the ship is outside the collision radius then the game won't care about bounds?? I guess the shield isn't included as when i set the radius inside the shield (still outside the ship) it still worked fine, asteroids and weapons hit the armor as they should, and the shields stopped them if it was up..

EDIT: Also, I still cannot log on..
« Last Edit: March 26, 2012, 07:17:46 AM by Plasmatic »
Logged
"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Maurice Switzer

Redbull

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: .ship/.variant editor
« Reply #122 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.
Logged

Temjin

  • Captain
  • ****
  • Posts: 461
    • View Profile
Re: .ship/.variant editor
« Reply #123 on: March 28, 2012, 09:45:03 AM »

I've got an issue. Following 51ppycup's tutorial, I've modified a Tempest (renaming it to "Tornado") so that the right medium turret is a medium ballistic, just to try things out.

I have a Mac, and I've named everything properly according to the tutorial, and placed everything properly, and added the info to the CSV file. I have not added it into an actual save game yet.

However, Starfarer does not load; as in, the "loading" bar gets stuck at "0" and doesn't do anything. It does this regardless of whether I modify the csv file or not. Simply placing the "tornado.ship" file and "tornado.png" file in their appropriate folders does this.

What am I doing wrong?
Logged

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: .ship/.variant editor
« Reply #124 on: March 28, 2012, 12:46:41 PM »

Post all your modified files in their entirety and also your starfarer.log from the app dir;

If the game isn't even loading, the fix will be easy because it is most likely an easily-fixed syntax bug or filename reference issue.

One problem I've seen a lot this week is filename case not matching the reference on Macs, so double check that of course.

For instance if you renamed the ship "Tornado" did you name the file "tornado.ship"? and did you create a variant named "tornado_Something.variant" or "tornado_something.variant" etc. Double check all the casing for consistency. Windows users can get away with this, you can't.
Logged

Temjin

  • Captain
  • ****
  • Posts: 461
    • View Profile
Re: .ship/.variant editor
« Reply #125 on: March 28, 2012, 01:17:38 PM »

Here's what I have done.

1.) The modified png file is "tornado.png", and is a copy and paste of the existing "tempest" file.

2.) The text of the "tornado.ship" file is:
Quote
{
    "bounds": [
        59,
        9,
        -11,
        27,
        -28,
        -6,
        -5,
        -29,
        48,
        -6
    ],
    "center": [
        32,
        31
    ],
    "collisionRadius": 80,
    "engineSlots": [
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 64,
            "location": [
                -29,
                0
            ],
            "style": "HIGH_TECH",
            "width": 24
        },
        {
            "angle": 180,
            "contrailSize": 64,
            "length": 32,
            "location": [
                -23,
                19
            ],
            "style": "HIGH_TECH",
            "width": 12
        }
    ],
    "height": 92,
    "hullId": "tornado",
    "hullName": "tornado",
    "hullSize": "FRIGATE",
    "shieldCenter": [
        15,
        0
    ],
    "shieldRadius": 64,
    "spriteName": "graphics/ships/tornado.png",
    "style": "HIGH_TECH",
    "viewOffset": 0,
    "weaponSlots": [
        {
            "angle": 60,
            "arc": 235,
            "id": "WS 001",
            "locations": [
                12,
                20
            ],
            "mount": "TURRET",
            "size": "MEDIUM",
            "type": "ENERGY"
        },
        {
            "angle": 260,
            "arc": 235,
            "id": "WS 002",
            "locations": [
                -4,
                -17
            ],
            "mount": "TURRET",
            "size": "MEDIUM",
            "type": "BALLISTIC"
        },
        {
            "angle": 0,
            "arc": 5,
            "id": "WS 003",
            "locations": [
                30,
                -15
            ],
            "mount": "HARDPOINT",
            "size": "SMALL",
            "type": "MISSILE"
        }
    ],
    "width": 64
}

3.) In the ship_data.csv, I copied the line for the Tempest, changed the first field to "Tornado", the second to "tornado", the FP cost to "7", and the "number" to 210 (which doesn't match any other ship in my CSV.

4.) In "descriptions.csv" I added a line and filled in the three fields as follows: "tornado" "SHIP" "A modified Tempest-Class."

This is all I have done.

5.) I have no starfarer.log, or any .log files anywhere in the application directory.

6.) Do I have to create a variant of this ship for the game to load? I have not created a variant.

7.) I kept casing consistent with the reference files.

Am I missing anything?
Logged

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: .ship/.variant editor
« Reply #126 on: March 28, 2012, 04:35:49 PM »

6.) Do I have to create a variant of this ship for the game to load? I have not created a variant.
Yep.

Copy a *.variant that references the "tempest" hull, make it use your "tornado" hullID instead, and give it a variant name like "tornado_variant". When you want to instantiate a ship for use in Missions or Faction fleet defs, you use the variant id.

Remember:
  • ship - image, collisions and mounts
  • csv - performance statistics and costs
  • variant - loadouts, marrying ships with weapons and perks
Logged

Temjin

  • Captain
  • ****
  • Posts: 461
    • View Profile
Re: .ship/.variant editor
« Reply #127 on: March 28, 2012, 04:55:18 PM »

6.) Do I have to create a variant of this ship for the game to load? I have not created a variant.
Yep.

Copy a *.variant that references the "tempest" hull, make it use your "tornado" hullID instead, and give it a variant name like "tornado_variant". When you want to instantiate a ship for use in Missions or Faction fleet defs, you use the variant id.

Remember:
  • ship - image, collisions and mounts
  • csv - performance statistics and costs
  • variant - loadouts, marrying ships with weapons and perks

Thanks for your help! I appreciate it.

Sadly, I just did this, replacing the "graviton" with a "flak" and referencing the "tornado" hullID.

Still getting the issue where the initial Starfarer loading screen pops up, but nothing loads and the game hangs.
Logged

Temjin

  • Captain
  • ****
  • Posts: 461
    • View Profile
Re: .ship/.variant editor
« Reply #128 on: March 28, 2012, 04:56:56 PM »

Wait... am I supposed to be doing this in the "Mods" folder?
Logged

medikohl

  • Admiral
  • *****
  • Posts: 854
    • View Profile
Re: .ship/.variant editor
« Reply #129 on: March 28, 2012, 04:58:29 PM »

Wait... am I supposed to be doing this in the "Mods" folder?
yes.
Logged
"Captain! You can't call our greatest dreadnought 'The Parrot'"
"Watch me"
Spiral Arms: Ship Sprites for Everyone

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24151
    • View Profile
Re: .ship/.variant editor
« Reply #130 on: March 28, 2012, 04:59:11 PM »

No Apophis is correct, it is an optimization that determines whether a check on the detailed bounding polygon is even necessary; for if something lies outside the defined collision radius for an object, then it isn't necessary to check any further. And circle-circle collision checks are very fast.

Thus, "Broad-Phase Collision Detection"

So if some part of the ship is outside the collision radius then the game won't care about bounds?? I guess the shield isn't included as when i set the radius inside the shield (still outside the ship) it still worked fine, asteroids and weapons hit the armor as they should, and the shields stopped them if it was up..

The collision circle (center + collision radius) needs to fully cover the bounds of the ship and the shield circle (shield center + radius). Otherwise, some collisions will be missed. For shields, it might not be as apparent, because projectiles will simply appear to go deeper inside the shield before being absorbed, instead of triggering a collision right on the shield boundary.
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: .ship/.variant editor
« Reply #131 on: May 06, 2012, 04:34:13 PM »

It would appear none of the buttons or options work? Am i doing something wrong or?
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7231
  • Harpoon Affectionado
    • View Profile
Re: .ship/.variant editor
« Reply #132 on: May 08, 2012, 08:08:16 PM »

Does anyone know if this still works? It won't allow me to upload images so I can't use it anymore. Last time I used it was a month or two ago.

[Edit] Aaaand now its working. I swear every time I post about these things I figure it out 2 seconds later...
« Last Edit: May 08, 2012, 08:10:08 PM by Thaago »
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: .ship/.variant editor
« Reply #133 on: May 09, 2012, 05:34:16 AM »

Does anyone know if this still works? It won't allow me to upload images so I can't use it anymore. Last time I used it was a month or two ago.

[Edit] Aaaand now its working. I swear every time I post about these things I figure it out 2 seconds later...

What did you do? :P
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7231
  • Harpoon Affectionado
    • View Profile
Re: .ship/.variant editor
« Reply #134 on: May 09, 2012, 07:16:51 PM »

I was using the upload .ship and thought it meant sprite... its really stupid of me  :-[
Logged
Pages: 1 ... 7 8 [9] 10