Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 170 171 [172] 173 174 ... 711

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

Stalker

  • Lieutenant
  • **
  • Posts: 65
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2565 on: December 11, 2015, 04:42:34 AM »

I'm trying to get my head around if this is possible. I have a beam-type weapon that should:

  • Charge up for 3 seconds (chargeup)
  • Fire at full power for 4 seconds (number of bursts and burst delay??)
  • Charge down for 1.5 seconds (chargedown? Add to cooldown?)
  • Be on cooldown for 25 seconds until it can be charged again and fired (?)

I don't see a way to actually put the weapon on cooldown for a set period of time. I would be happy to script it in if I knew which stat I needed to set when the beam is done firing.

Unless I'm misunderstanding how these weapon stats are supposed to work, which is entirely possible ;)

EDIT: Tested this a bit...

  • chargeup definitely works as advertised. No surprises there.
  • I don't know what chargedown is actually doing. Increasing its duration seems to increase the duration of the beam before it disappears? Is this correct/
  • burst delay seems to act like the actual "cooldown" for the weapon. Could I actually reference this via getCooldown(), or is it not actually a real cooldown (e.g. I'm just telling SS into delaying the next beam "burst", but the beam actually has no real "cooldown" stat)? Not sure how this works.
« Last Edit: December 11, 2015, 07:27:47 AM by Stalker »
Logged

speeder

  • Captain
  • ****
  • Posts: 364
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2566 on: December 11, 2015, 09:02:16 AM »

Can I add information to conditions tooltips? (like the stability tooltip, that show what is affecting stability... I wanted to add to conditions tooltips warnings about what is blocking production, like missing resources/crew or excess goods stored)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24147
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2567 on: December 11, 2015, 11:21:18 AM »

If classB extends/implements classA, and I call entity.removeScriptsOfClass(classA.class), will instances of classB also be removed?

They won't. If checks whether script.getClass() == parameterClass.

In combat, is there a way to tell if/when a FleetMemberAPI is disabled/destroyed or has retreated? Is there a way to get a list of all such fleet members for a given fleet (i.e. not deployed, not in reserve)?

There isn't. Added:
CombatFleetManagerAPI
   List<FleetMemberAPI> getDisabledCopy();
   List<FleetMemberAPI> getDestroyedCopy();
   List<FleetMemberAPI> getRetreatedCopy();

Was a bit of an oversight these methods weren't in the interface to begin with. For now, you might take a snapshot of the reserves at battle start and try to work from that. Distinguishing "retreated" and "destroyed/disabled" might be tricky, though.

  • Charge up for 3 seconds (chargeup)
  • Fire at full power for 4 seconds (number of bursts and burst delay??)
  • Charge down for 1.5 seconds (chargedown? Add to cooldown?)
  • Be on cooldown for 25 seconds until it can be charged again and fired (?)

Take a look at the Tachyon Lance or Phase Lance stats in weapon_data, both of these do what you're trying to do, I think. If you don't want them to fire while charging up, add "beamFireOnlyOnFullCharge":true to the .wpn file.


Can I add information to conditions tooltips? (like the stability tooltip, that show what is affecting stability... I wanted to add to conditions tooltips warnings about what is blocking production, like missing resources/crew or excess goods stored)

Yes, see: MarketConditionPlugin interface.
Logged

speeder

  • Captain
  • ****
  • Posts: 364
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2568 on: December 12, 2015, 09:06:49 AM »

Can I add a new commodity that has the demand class "REGULAR_CREW" but does NOT count as crew inside your ship? (ie: passengers, the intention is to allow trading of workers between stations without consuming your supplies in the process... it would be nice if it still used crew space though, to justify using the transport shuttles, and because putting people in cargo holds is weird).
Logged

Rushyo

  • Ensign
  • *
  • Posts: 46
    • View Profile
    • Home Page
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2569 on: December 12, 2015, 09:19:08 PM »

I can write a custom UI in a small panel in an interaction dialog by implementing CustomUIPanelPlugin. I can render custom UI in combat by implementing renderInUICoords() in interface EveryFrameCombatPlugin.

Is it possible for me to render a full screen custom UI in the campaign interface, similar to existing fleet or map UIs? I'd like to add a new basic interface that focuses on 'important people'. If so, are there any existing examples, particularly some which would demonstrate the basic window elements (like the pretty borders, tab interface, text rendering, etc)? Doesn't need to be in-depth; I should be able to work out the niceties (I'm comfortable with OpenGL).
« Last Edit: December 12, 2015, 10:40:26 PM by Rushyo »
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 790
    • View Profile
    • Starsector South Korean Community
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2570 on: December 12, 2015, 09:25:20 PM »

How do I override tips(shown in main screen and under loading bar) with a mod?
I tried creating strings\tips.json in the mod category, but seems it is adding new tips instead of overwriting them...
Logged

Rushyo

  • Ensign
  • *
  • Posts: 46
    • View Profile
    • Home Page
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2571 on: December 12, 2015, 09:50:07 PM »

How do I override tips(shown in main screen and under loading bar) with a mod?
I tried creating strings\tips.json in the mod category, but seems it is adding new tips instead of overwriting them...

You need to add "data/strings/tips.json" to your mod_info.json's "replace" section.
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 790
    • View Profile
    • Starsector South Korean Community
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2572 on: December 12, 2015, 10:07:52 PM »

How do I override tips(shown in main screen and under loading bar) with a mod?
I tried creating strings\tips.json in the mod category, but seems it is adding new tips instead of overwriting them...

You need to add "data/strings/tips.json" to your mod_info.json's "replace" section.
Is the format "replace":["data/strings/tips.json","",...] ?
I still haven't figured out the full functionalities of mod_info.json.
Logged

ChaseBears

  • Commander
  • ***
  • Posts: 224
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2573 on: December 12, 2015, 10:21:35 PM »

Hello,

I'm trying to figure out how subfactions are defined. Namely, despite looking through what feels like every file in the starsector-core directory, I can't find how the Lion's Guard are defined as related to the Sindrian Diktat other than their comms channel.  Can anyone point me to the right file?
Logged
If I were creating the world I wouldn’t mess about with butterflies and daffodils. I would have started with lasers, eight o’clock, Day One!

Rushyo

  • Ensign
  • *
  • Posts: 46
    • View Profile
    • Home Page
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2574 on: December 12, 2015, 10:34:08 PM »

Is the format "replace":["data/strings/tips.json","",...] ?
I still haven't figured out the full functionalities of mod_info.json.

Yup, that's it  :) Gimme a PM if you have any trouble. I'm around for a bit...
Logged

ChaseBears

  • Commander
  • ***
  • Posts: 224
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2575 on: December 13, 2015, 03:56:15 AM »

Another Q.  Is there any way for auto-named ships in missions (as in, not in the campaign) to draw from a name list?

I have a bunch of prime numbers for machine ships in my ship name list, but having random human ships pull from that is annoying.

I looked through the API documentation but it looked like the only thing you could define for a side was its ship prefix, and I quickly got lost in the weeds when digging through the campaign fleet spawning API.
Logged
If I were creating the world I wouldn’t mess about with butterflies and daffodils. I would have started with lasers, eight o’clock, Day One!

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2576 on: December 13, 2015, 04:55:43 AM »

You can set the names manually, from a list in the mission definition file if necessary.
Logged
 

ChaseBears

  • Commander
  • ***
  • Posts: 224
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2577 on: December 13, 2015, 09:20:36 AM »

Yeah thats what i ended up doing. My Java ended up being incredibly ugly but it seems to work alright.  Used Excel to make up a big list quickly. 
Logged
If I were creating the world I wouldn’t mess about with butterflies and daffodils. I would have started with lasers, eight o’clock, Day One!

Clockwork Owl

  • Admiral
  • *****
  • Posts: 790
    • View Profile
    • Starsector South Korean Community
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2578 on: December 15, 2015, 06:02:44 AM »

What should I know if I want to create - or edit - custom fonts?
Logged

murumuru

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2579 on: December 16, 2015, 01:29:11 AM »

I made faction and made a description in .faction file, however I still get "No description yet..." description ingame. What am I doing wrong?
Logged
Pages: 1 ... 170 171 [172] 173 174 ... 711