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 ... 28 29 [30] 31 32 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #435 on: April 23, 2013, 05:16:32 PM »

graphics/TL/weapons/decor/thule_heimdahl_0059_Frame-1.png01.png

That part looks suspect, but I can't say without seeing your filenames and what you've got in the .wpn file.

The naming convention has to be:
graphics/weapons/shredder/chaingun2_turret_base00.png
graphics/weapons/shredder/chaingun2_turret_base01.png
graphics/weapons/shredder/chaingun2_turret_base02.png
...
graphics/weapons/shredder/chaingun2_turret_base99.png
graphics/weapons/shredder/chaingun2_turret_base100.png
graphics/weapons/shredder/chaingun2_turret_base101.png
etc. So, has to end in .png, and the number has to precede that, and it has to be 2 digits unless it's 100 or over (i.e. you can't do 001, iirc).
Logged

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #436 on: April 23, 2013, 05:43:04 PM »

ah, i see, okay i guess there is the problem. the frames are numbered in three digits and the number is not at the end of the filename.

What i did:
I took okims mod "ironclad" and tried to mimic his landing lights.

The following files are involved:

D:\Program Files (x86)\Fractal Softworks\Starsector\mods\Thule Legacy\data\scripts\plugins\isHulkCheck.java
Code
package data.scripts.plugins;

import com.fs.starfarer.api.AnimationAPI;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.EveryFrameWeaponEffectPlugin;
import com.fs.starfarer.api.combat.WeaponAPI;
import com.fs.starfarer.api.combat.FluxTrackerAPI;

public class isHulkCheck implements EveryFrameWeaponEffectPlugin
{

 public void advance(float amount, CombatEngineAPI engine, WeaponAPI weapon)
  {
   if (engine.isPaused()) return;

   AnimationAPI animation = weapon.getAnimation();
 
   if (weapon.getShip().isHulk())
    {
    animation.pause();
    }

   else
    {
     animation.play();
    } 

  }

}




D:\Program Files (x86)\Fractal Softworks\Starsector\mods\Thule Legacy\data\weapons\thule_deco_heimdahl.wpn
Code
{
"id":"thule_deco_heimdahl",
"specClass":"projectile",
"type":"DECORATIVE",
"size":"MEDIUM",

"everyFrameEffect":"data.scripts.plugins.isHulkCheck",

"turretSprite":"graphics/TL/weapons/decor/thule_heimdahl_Frame-01.png",
"hardpointSprite":"graphics/TL/weapons/decor/thule_heimdahl_Frame-01.png",

"numFrames":60,
"frameRate":15,
"alwaysAnimate":"true",

"turretOffsets":[0, 0],
"turretAngleOffsets":[0],
"hardpointOffsets":[0, 0],
"hardpointAngleOffsets":[0],

"barrelMode":"ALTERNATING", # or LINKED.  whether barrels fire at the same time or alternate.
"animationType":"MUZZLE_FLASH",  # NONE, GLOW, MUZZLE_FLASH, SMOKE
"muzzleFlashSpec":{"length":0.0,   # only used if animationType = MUZZLE_FLASH
   "spread":10,
   "particleSizeMin":4.0,
   "particleSizeRange":18.0,
   "particleDuration":0.2,
   "particleCount":25,
   "particleColor":[255,150,30,200]},

"projectileSpecId":"thule_barbarossa_shot",  # projectile that will be fired
"fireSoundTwo":"thule_barbarossa",
"fireSoundOne":"thule_barbarossa_overload",
}
Logged

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #437 on: April 23, 2013, 05:51:58 PM »

the current naming convention looks like this: thule_heimdahl_Frame01.png, ..., thule_heimdahl_Frame60.png

it's still lokking for graphics/TL/weapons/decor/thule_heimdahl_Frame01.png01.png
Don't know how it gets the idea ...
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #438 on: April 23, 2013, 06:37:23 PM »

A-ha! Looking at the code, the frames have to start with 00. Have fun renaming all the files :)
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #439 on: April 23, 2013, 07:57:54 PM »

ouch...

that can't be fun....
Logged
mmm.... tartiflette

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #440 on: April 23, 2013, 08:04:40 PM »

NO IT WASN'T FUN!!! ;) but at least it did the trick ;)

Thanks alex for the help.
Logged

phyrex

  • Admiral
  • *****
  • Posts: 751
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #441 on: April 23, 2013, 08:21:42 PM »

oh wow XD thats the kind of mistake that makes you feel dumb when they happens  ;D
Logged

Vinya

  • Captain
  • ****
  • Posts: 379
  • Vulgar at best...
    • View Profile
    • Mykyria Scifi/Zombie writing blog (Old site)
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #442 on: April 23, 2013, 09:09:11 PM »

Yeah, I had that problem when I was doing my first animations. Thankfully I've been animating various things for years already so I'm used to finding problems like that. That was nothing compared to this game some guy had me work on. I had to 3D animate a whole helicopter- engine and everything. 0_0
Logged
If by "good guys" you mean "elitist regime that suppresses colonial independence and thrives off of an overwhelmingly deep gap in wealth between social classes," then yes.

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #443 on: April 24, 2013, 12:35:28 AM »

anyway, I have found that there seem to be a limited number of smoke particles that can exist simultaneously in a battle, but other particles (like smooth particle) seem to be unlimited. I assume this is intended since a limit like that has to be coded in somehow (unless it's a part of LWJGL?)

is this for performance? If so why isn't smooth particle limited as well? Is there a way to set how many particles can be in a battle?

thanks

gunny
Logged
mmm.... tartiflette

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #444 on: April 24, 2013, 10:40:01 AM »

There's a limit for both kinds; as you guessed, for performance reasons. It's currently hardcoded, and I don't know that changing that makes sense.

These are never going to be something you can just spawn at will without worrying about performance. Generally speaking, if whatever effect you're going for requires a LOT of them, then it's probably best to either 1) make sure the effect doesn't happen often or 2) reconsider how the effect's visuals are implemented.

It's sort of like that with EMP arcs, too - yeah, you can go overboard and spawn a lot of them and it looks cool, but that doesn't make it a good idea performance-wise.
Logged

Sarducar_Dun

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #445 on: April 24, 2013, 01:02:48 PM »

Errrrm I think this should go here. I'm thinking of starting a mod and I'm trying to get some ideas down on paper, I'm wondering what kind of health and armourvalues vanilla missiles have to balance my P.D. and missiles?
Logged

phyrex

  • Admiral
  • *****
  • Posts: 751
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #446 on: April 24, 2013, 01:50:28 PM »

Errrrm I think this should go here. I'm thinking of starting a mod and I'm trying to get some ideas down on paper, I'm wondering what kind of health and armourvalues vanilla missiles have to balance my P.D. and missiles?

your best bet is to check the weapon csv and compare values. from there you can do some math yourself and see what works for you
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #447 on: April 24, 2013, 05:04:03 PM »

There's a limit for both kinds; as you guessed, for performance reasons. It's currently hardcoded, and I don't know that changing that makes sense.

well... I feel that would belong in options rather than anything else. I seem to remember quite a few games (such as GSB i believe) have a slider of number of allowed particles there. But this is a discussion for suggestions I suppose so I'll drop it here and maybe start a thread at some point...
Logged
mmm.... tartiflette

Sarducar_Dun

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #448 on: April 24, 2013, 11:45:13 PM »

Ah thanks.
Where do I find the CSV's though? I've looked on the forum and yes that's exactly what I need but I don't know where to look.
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #449 on: April 25, 2013, 12:01:38 AM »

/Fractal Softworks/Starsector/starsector-core/data/weapons

check in there, anything that ends in .wpn is well... a weapon, what you're looking for is weapon_data.csv


/Fractal Softworks/Starsector/starsector-core/data/hulls

for ships it is ship_data.csv
Logged

Pages: 1 ... 28 29 [30] 31 32 ... 706