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)

Pages: 1 ... 42 43 [44] 45 46 ... 706

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1699865 times)

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #645 on: August 05, 2013, 04:42:35 PM »

Another question. I have a system I want to make, were it will instantly vent a set amount of flux and play an animation. I think I can do that part. However I need a second part were there's a percent chance to damage and overload the ship instead. Basically the ship is an unstable prototype generator with the bare minimum ship parts.
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #646 on: August 07, 2013, 05:43:09 AM »

Got a custom beam weapon, seems like
"   "textureType":["graphics/BR/missiles/plasmaray.png","graphics/BR/missiles/plasmaray2.png"],"
is valid and used by the game, the question is which texture is used and why? Is one for the core of the beam and one for the edge?
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #647 on: August 07, 2013, 08:13:51 AM »

Got a custom beam weapon, seems like
"   "textureType":["graphics/BR/missiles/plasmaray.png","graphics/BR/missiles/plasmaray2.png"],"
is valid and used by the game, the question is which texture is used and why? Is one for the core of the beam and one for the edge?

Exactly, one for core, one for fringe.... second one should be core btw.
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #648 on: August 07, 2013, 08:52:39 AM »

Awesome, thanks!
Logged

ThePinkPanzer

  • Commander
  • ***
  • Posts: 121
  • Professional accidentaly rude person
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #649 on: August 09, 2013, 01:42:04 AM »

Can anyone point me towards a custom weapons tutorial? The wiki has nothing and I can not find one for the life of me.
Logged

FasterThanSleepyfish

  • Admiral
  • *****
  • Posts: 727
  • Blub
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #650 on: August 09, 2013, 08:01:01 AM »

Search up Psyion on youtube. He should have a tutorial for ya'!
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #651 on: August 09, 2013, 09:10:25 AM »

I'd make one, but can't get fraps to work to record desktop
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)

ThePinkPanzer

  • Commander
  • ***
  • Posts: 121
  • Professional accidentaly rude person
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #652 on: August 09, 2013, 10:48:58 AM »

Search up Psyion on youtube. He should have a tutorial for ya'!
Righto, goof stuff. Thanks.
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #653 on: August 10, 2013, 09:50:57 AM »


I have a few theories myself but don't have time to check right now, what is it that causes the glow to be offcenter from the actual projectile sprite like this? Do I need to add a center value like on a missile? The sprite is square.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #654 on: August 11, 2013, 11:24:10 AM »

That's just where the engine renders the glow, at the "real" location of the projectile, which is right on the edge between the bullet and the tail. Which is definitely problematic in some cases, I've got to take another look at it.

Don't want to just blanketly change it to be the middle of the bullet, though, as that tends to completely overwhelm the bullet sprite.
« Last Edit: August 11, 2013, 11:25:52 AM by Alex »
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #655 on: August 11, 2013, 11:42:51 AM »

Well, ideally it would be great to have another field to input the offset of the glow from the center of the sprite or something.

A different question, what would be the most practical way to add an effect similar to a 360 muzzle flash to an OnHitEffect? Tons of particles with random vectors? Seems like a bit of a roundabout way to do it.
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #656 on: August 11, 2013, 11:44:18 AM »

Glow offset would be great.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #657 on: August 11, 2013, 11:57:36 AM »

A different question, what would be the most practical way to add an effect similar to a 360 muzzle flash to an OnHitEffect? Tons of particles with random vectors? Seems like a bit of a roundabout way to do it.

CombatEngineAPI.addSmoothParticle(), yeah. That's how regular muzzle flash works, the MUZZLE_FLASH spec contents are just parameters to the code that spews them out, nothing more special than that.


Well, ideally it would be great to have another field to input the offset of the glow from the center of the sprite or something.
Glow offset would be great.

Right, that sounds sensible. Added to the (rather long) list.
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #658 on: August 11, 2013, 12:06:56 PM »

You da man, Alex. Would it be possible to see the muzzle flash spec blown up into code, just for the sake of learning?
« Last Edit: August 11, 2013, 12:08:42 PM by Cycerin »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #659 on: August 11, 2013, 12:21:00 PM »

It just uses polar coordinates to spawn stuff in an arc.

Spoiler

for (int i = 0; i < numParticles; i++) {
   float size = range * (float) Math.random() + min;
   float theta = (float) (Math.random() * Math.toRadians(spread) + Math.toRadians(angle - spread/2f));
   float r = (float) (Math.random() * length);
   float x = (float)Math.cos(theta) * r;
   float y = (float)Math.sin(theta) * r;
   Vector2f pos = new Vector2f(point.x + x, point.y + y);
   Vector2f vel = new Vector2f(x + shipVel.x, y + shipVel.y);
   // add particle here, using size/pos/vel
}
"point" is where the flash starts. Also note that it's using the offset from the point as the velocity, too; there's no reason it *has* to be that way, just happens to work fairly well.
[close]

Edit: I should say, there are definitely other ways to approach generating a muzzle flash. This one is pretty simplistic, but generally seems good enough.
Logged
Pages: 1 ... 42 43 [44] 45 46 ... 706