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 ... 11 12 [13] 14 15 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #180 on: January 25, 2013, 04:20:34 PM »

The applyDamage will spawn the floating text if appropriate (i.e. if the target is visible, and a few other considerations). And yes, it takes armor etc into account.
Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #181 on: January 25, 2013, 04:28:32 PM »

Quick question: is there any way to determine the render order of weapons? I've got large decorative weapons that seem to randomly overlap certain weapons.






As you can see, there should be two harpoon batteries in the middle there, but they're completely covered underneath the infection effects. It also seems to overlap the graviton beam hardpoints a bit as well.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #182 on: January 25, 2013, 04:56:19 PM »

All the hardpoints get rendered before all turrets.
Within that, larger sizes get rendered last.
Within each size, racked missiles (i.e. like Harpoon, not like Swarmer) get rendered first.

After that, it's not deterministic. So, you want a small hardpoint - that won't quite take care of everything, but at least all the turrets (i.e, the stuff that moves a lot) will be over it.
Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #183 on: January 25, 2013, 05:05:02 PM »

Ah, that helps--thanks.
Logged

EnderNerdcore

  • Commander
  • ***
  • Posts: 172
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #184 on: January 25, 2013, 05:20:00 PM »

The applyDamage will spawn the floating text if appropriate (i.e. if the target is visible, and a few other considerations). And yes, it takes armor etc into account.
Strange. We actually weren't seeing the floating text until we added the floating text code.

Or was it (more likely) just adding the applyDamage amount to the normal damage floating text of the weapon itself?  (basically this is bonus damage that has a chance to occur if it hits the armor or hull instead of shields).
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #185 on: January 25, 2013, 06:32:42 PM »

The applyDamage will spawn the floating text if appropriate (i.e. if the target is visible, and a few other considerations). And yes, it takes armor etc into account.
Strange. We actually weren't seeing the floating text until we added the floating text code.

Or was it (more likely) just adding the applyDamage amount to the normal damage floating text of the weapon itself?  (basically this is bonus damage that has a chance to occur if it hits the armor or hull instead of shields).

It only shows floaties for stuff damaged by the player's ship (and that is also visible). It also shows floaties for anything that already has floaties - the thinking being that it was attacked by the player recently, and floaties over it may be useful. That second behavior may explain what you're seeing.
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #186 on: January 26, 2013, 03:53:21 PM »

Noob question: why is this giving me "Line 516, Column 32: Expression "i" is not an rvalue"

« Last Edit: January 26, 2013, 04:29:13 PM by Uomoz »
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #187 on: January 26, 2013, 05:04:49 PM »

once "i" is used on the for cycle, its removed from the memory, you need to make it into the for cycle or add another integer incremental in the for cycle and use it instead
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #188 on: January 26, 2013, 05:50:23 PM »

Argh, can you help me with a basic example of implementation of adding another integer incremental?
« Last Edit: January 26, 2013, 05:51:57 PM by Uomoz »
Logged

EnderNerdcore

  • Commander
  • ***
  • Posts: 172
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #189 on: January 26, 2013, 06:47:14 PM »

Argh, can you help me with a basic example of implementation of adding another integer incremental?
use j, k, l, m, n, whatever you want. You can even name it integer1, integer2, etc
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #190 on: January 26, 2013, 06:57:20 PM »

depending on what ur trying to do, why dont you just place those if(){player.setReputation} covering the for cycle
example

String[] SOV = ....
if(uscData.USC_FACTIONCHOICE.equals("SOV"))
for(int i = 0; i < SOV.length; i++)
{
player.setREP....
....
}

if i actually understood the code ur trying to implement for the starting player rep


else just declare  a few int values outside those for cycles

then inside those cycles add ++
example:

for(...)
randominteger++; or randominteger = i; or randominteger += 1;
« Last Edit: January 26, 2013, 07:00:07 PM by silentstormpt »
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #191 on: January 26, 2013, 07:00:08 PM »

Thanks to both. I actually use this piece of code to both set the player initial standing and the general factions relationships, so it has a "player dependent" part and a "static" part.
Logged

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #192 on: January 27, 2013, 01:19:18 AM »

Hi there,

i have 2 questions.

1. is it possible to have a script that would firstly replace the starsector_title_alpha.png and secondly randomize that with every start of starsector another title would appear?

2. The number of burst determines the times a certain sound is played when a weapon is fired, right?
Is it possible to have one fixed sound for a burst of 6 projectiles. This sound would then play only once the weapon is fired.
At the moment i have a premade sound for a burst of 6 and the game is staggering the sound 6 times and that sounds ugly.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #193 on: January 27, 2013, 09:47:52 AM »

1. is it possible to have a script that would firstly replace the starsector_title_alpha.png and secondly randomize that with every start of starsector another title would appear?

2. The number of burst determines the times a certain sound is played when a weapon is fired, right?
Is it possible to have one fixed sound for a burst of 6 projectiles. This sound would then play only once the weapon is fired.
At the moment i have a premade sound for a burst of 6 and the game is staggering the sound 6 times and that sounds ugly.

1. No. All you can do is replace the image itself, but not dynamically via a script.

2. It's possible (using fireSoundOne - see heavymg.wpn for an example of something that plays a startup sound per burst and then individual sounds per shot). It's probably not a good idea to have all the shot sounds in the same file, though - it could desynced if the fps drops, or the gun could stop firing (due to ship being destroyed, weapon being disabled, flux running out, a vent or phase cloak being initiated, etc), but the full 6 sounds would play anyway.
Logged

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #194 on: January 27, 2013, 10:30:43 AM »

Regarding your suggestion i used fireSoundOne. The issue with this was that whenever i pressed the mousebutton it would play
the sound. On continous fire (mousebutton pressed down) it would only play the sound once and fire the weapon after the first burst in silent mode. ;)

I changed the soundfile and am using fireSoundTwo now. works like a charm

thanks.
Logged

Pages: 1 ... 11 12 [13] 14 15 ... 706