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 ... 617 618 [619] 620 621 ... 706

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

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9270 on: October 16, 2022, 07:30:44 AM »

I am pretty sure weapon slots can not be modified on per-ship basis.
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9271 on: October 16, 2022, 08:26:04 AM »

maybe he can do it by changing the facing of the module itself instead of the slot
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9272 on: October 16, 2022, 04:03:04 PM »

Trying to make my own version of the phase cloak with the intention of changing the color. So I copied over the details in ship_systemscsv and the phasecloak system file (I changed next to nothing). In game it works, you hear the sound effects, you see the unique system name/details, but none of the glow effects work. I noticed even if I alter the _glow image names to something else that would normally have the game yelling at you about it missing, it doesn't care about those missing. Can anyone direct me to what I need to change? Thanks in advance.

I'd recommend modifying the existing phasecloak.system file (after making a backup copy) one change at a time to narrow down where it's going wrong.

Okay so.. this is weird!

If the weapon is a turret/hidden weapon and doesn't have that special AI hint, its turn rate is clamped to 360 degrees. Like even if you have a weapon that is 400 degrees, placing it on a turret/hidden mount would always limit to 360,

BUT if you have the special AI hint or you're placing it on a hardpoint, this 360 limit doesn't exist at all. In fact you can set 9999 turn rate in weapon.csv and get 9999(or 2499)  turn rate.

Does it seem like there should be a hard limit of 360 degree regardless of mount or ai hint then?

Yeah, the non-turret rate should probably be clamped too, unless the weapon has that AI hint (which I think should preclude rate clamping, regardless); let me do that.


as for my acutal question - how often does a renderPlugin's render() method get called per-frame?

Could you clarify what you mean by "renderPlugin"?

Regardless, though, I'd be pretty surprised if it was getting called more than once per frame...

maybe he can do it by changing the facing of the module itself instead of the slot

Yeah, it'd have to be something like that - the slot objects are shared between all ships of that type, so changes to one would be changes to all.
Logged

Ruddygreat

  • Admiral
  • *****
  • Posts: 524
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9273 on: October 16, 2022, 04:36:22 PM »

as for my acutal question - how often does a renderPlugin's render() method get called per-frame?

Could you clarify what you mean by "renderPlugin"?

Regardless, though, I'd be pretty surprised if it was getting called more than once per frame...

specifically, a class that extends BaseCombatLayeredRenderingPlugin & is added to the engine through addLayeredRenderingPlugin(new renderPluginName()) (obvs not the actual code)

to me it'd be odd if it wasn't getting called more than once per frame, that's the only reasonable explanation I can think of?
unless there's some wierd jank with running combatEntityAPI.getOwner() on a shipAPI while the game is paused? (specifically because I've got one plugin running for owner 0 & one for owner 1, though that seems highly unlikely)
« Last Edit: October 16, 2022, 04:38:39 PM by Ruddygreat »
Logged

creature

  • Captain
  • ****
  • Posts: 400
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9274 on: October 16, 2022, 08:27:58 PM »

maybe he can do it by changing the facing of the module itself instead of the slot
This worked, thank you very much!
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 229
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9275 on: October 18, 2022, 09:02:12 AM »

What's a good way to store data on a planetary condition? I'm confused as to how they work. Is it like hullmods, where the definition of the condition plugin is a singleton instance and thus cannot have any data stored on it?

Basically, I have a ton of data I'm currently storing through the memory of the market, but I kind of want to move it to the condition itself for convenience sake.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9276 on: October 18, 2022, 10:35:45 AM »

specifically, a class that extends BaseCombatLayeredRenderingPlugin & is added to the engine through addLayeredRenderingPlugin(new renderPluginName()) (obvs not the actual code)

to me it'd be odd if it wasn't getting called more than once per frame, that's the only reasonable explanation I can think of?
unless there's some wierd jank with running combatEntityAPI.getOwner() on a shipAPI while the game is paused? (specifically because I've got one plugin running for owner 0 & one for owner 1, though that seems highly unlikely)

Ah - I mean, it's called once per layer during each frame. So if your plugin has multiple active layers (i.e. getActiveLayers() returns a set with more than one element) and you're not checking which layer it is in the render() method then you might see this sort of behavior.



What's a good way to store data on a planetary condition? I'm confused as to how they work. Is it like hullmods, where the definition of the condition plugin is a singleton instance and thus cannot have any data stored on it?

Basically, I have a ton of data I'm currently storing through the memory of the market, but I kind of want to move it to the condition itself for convenience sake.

You can just store the data in data members of the condition class. Make sure to have this in your condition class:
public boolean isTransient() {
   return false;
}

So that the data is actually stored in the savefile.
Logged

bananana

  • Commander
  • ***
  • Posts: 226
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9277 on: October 19, 2022, 06:04:36 PM »

question
what is the script that generates the generic combat battlefield? i mean one that spawns asteroids and objectives and stuff
is it in the API or obfuscated?
i'm just curious to take a look at it, to see if i can learn something from
but i can't find the script in the first place?
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 229
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9278 on: October 20, 2022, 05:30:48 AM »

question
what is the script that generates the generic combat battlefield? i mean one that spawns asteroids and objectives and stuff
is it in the API or obfuscated?
i'm just curious to take a look at it, to see if i can learn something from
but i can't find the script in the first place?

Not a script, its the BattleCreationPlugin i think
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 229
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9279 on: October 20, 2022, 08:10:42 AM »

What's a good way to spawn a fleet that has a strict FP limit, using factions (maybe), so I can the officers, personality type, memflags, dmods, etc. all contained on the faction?
I'm currently not using a faction to spawn my fleets. This is because I learnt fleetfactory uses FP as a softcap, not a hardcap, but I never want FP to exceed a provided value. So, I have a method that manually injects variants into a fleet. My question, then, is how do I do this while maintaining the dmod rate, officers, etc. of a given faction? Would I have to use a fleet inflater or something?

Heres an example of what I mean: I want to spawn a fleet composed 100% out of a provided list of variants. I want this to be spawned using the derelict faction doctrine, but using the provided variants in place of the existing known ships list. I want them to have the same amount and type of dmods as a derelict fleet-the same types of officers, and the same memflags. This can be done with a faction, but I'd prefer to do it programatically by just passing a list of variants.
Assuming I do it programatically: How do I ensure that each member has the same characteristics as a normal derelict fleet member, as well as having the same autofit variance (just for variety)?
Assuming I do it with a faction: How do I ensure that the fleet never exceeds the provided FP limit?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9280 on: October 20, 2022, 09:30:38 AM »

Create a fleet using FleetFactory and then cull until you meet your FP requirements.
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 229
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9281 on: October 20, 2022, 04:28:41 PM »

Is there any way to hint to AI that a specific ship may be a better target than normal? For example: I have a modular ship, and one if its modules causes two big and very dangerous modules to explode if it dies. I want the AI to recognize the higher target value of said module.
Logged

Great Wound

  • Captain
  • ****
  • Posts: 268
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9282 on: October 20, 2022, 06:14:15 PM »

Anybody know an easy way to change the damage type of a projectiles proximity fuse to have different type to the projectile. Tried:

Code: .proj file
	"behaviorSpec":{	"behavior":"PROXIMITY_FUSE",
"damageType":KINETIC,

But alas, it does nothing. Also tried putting damageType under "explosionSpec":{ but it's still the same.

Alternatively, is there an easy way to change the projectiles damage type, providing it doesn't carry to the PROXIMITY_FUSE effect...
« Last Edit: October 20, 2022, 06:15:56 PM by Great Wound »
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9283 on: October 20, 2022, 07:00:59 PM »

If the projectile has a proximity fuse then it will almost never actually hit a target directly, so what are you trying to do?
Logged

Great Wound

  • Captain
  • ****
  • Posts: 268
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9284 on: October 21, 2022, 12:35:28 AM »

If the projectile has a proximity fuse then it will almost never actually hit a target directly, so what are you trying to do?

I'm using it for a 'timed fused' by setting the range to 0 and shotRangeVariance to 0.3.

To effect is a direct fire weapons with rounds that detonate when near-maximum range. Ideally I'd like direct HE damage with a Kinetic Component when the fuse triggers. Currently it's all Kinetic which works fine but I'm also toying with a Frag/EMP version.
Pages: 1 ... 617 618 [619] 620 621 ... 706