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 ... 33 34 [35] 36 37 ... 706

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

WKOB

  • Admiral
  • *****
  • Posts: 732
  • Odobenidine Benefactor
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #510 on: May 10, 2013, 08:58:09 PM »

Sorry, I'm sure I'm asking things I could find my own answers to but the forum has bloated quite a bit over the months I've been on Starsector hiatus.

There are decorative weapons now, yes? How do they work?

Have ships, in general, had any major changes since Ship Systems were introduced?
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #511 on: May 10, 2013, 09:03:17 PM »

yes, there are decorative weapons now, they're still a little bugged though so I'd recommend not using them until the next patch...

to make one, you can start by looking at the sensor dish in starsector-core/data/weapons. the simplest one to make would be just renaming it and changing the picture, then adding the entry on weapons.csv

I'm not quite sure how to put it on a ship, though, at least by code. The newest version of trylobot sfedit has the decorative weapon slot feature so you can use that


no, I don't think ships have had any major changes since ship systems...
Logged
mmm.... tartiflette

WKOB

  • Admiral
  • *****
  • Posts: 732
  • Odobenidine Benefactor
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #512 on: May 10, 2013, 11:43:43 PM »

Thanks, Gunny, I'll hold off on decorative weapons for now. Though, out of curiosity, do any vanilla ships currently use them?
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #513 on: May 10, 2013, 11:53:28 PM »

onslaught, but that was stated as unintentional and will be removed by next version
Logged
mmm.... tartiflette

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 #514 on: May 11, 2013, 12:56:35 PM »

How would one go about adding a crap-ton of new graphics to the debris section? Would I just add them into a mod or is there some code changing needed...?
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.

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #515 on: May 11, 2013, 02:50:31 PM »

Any chance for a shipsystem that when active, generates Command Points at an incredibly slow rate? I'm looking to make command ships have something to do with tactical commands, rather than just slapping snesor increases on them.
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #516 on: May 11, 2013, 03:20:38 PM »

Any chance for a shipsystem that when active, generates Command Points at an incredibly slow rate? I'm looking to make command ships have something to do with tactical commands, rather than just slapping snesor increases on them.
I'd love to see that!
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)

WKOB

  • Admiral
  • *****
  • Posts: 732
  • Odobenidine Benefactor
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #517 on: May 11, 2013, 03:23:09 PM »

That'd definitely have to be scripted rather than done with in-game mechanics, but I can't help you any further than that. Neat idea, by the way.
Logged

Pelly

  • Admiral
  • *****
  • Posts: 757
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #518 on: May 13, 2013, 01:50:05 AM »

Is there any way to have the campaign character creation questions before picking a portrait picture?

e.g.

"I was a Imperial captain" --> Which would only allow me to use certain portraits depending upon which option I choose

Logged

WKOB

  • Admiral
  • *****
  • Posts: 732
  • Odobenidine Benefactor
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #519 on: May 13, 2013, 10:15:33 AM »

Also, is it feasible to change station graphics yet?
Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #520 on: May 16, 2013, 06:48:14 PM »

Is there an easy and efficient way to modify mutable stats for every ship in combat at once? Essentially, I want the effects of a specific hullmod to be universal on all ships in combat. The best I can think of is having an every-frame combat plugin that cycles through all the ships in play every few seconds, and then applies the modifications to each of them. That, however, seems really stupid to me, and I'm curious if there's a better way.


@Austupaio: You can change station graphics as a whole, but not individually.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #521 on: May 16, 2013, 06:58:16 PM »

An EveryFrameCombatPlugin would probably be the way to go. If you're worried about efficiency, a simple optimization would be to have it only run when the amount of ships on the field changes.

Code
public class Test implements EveryFrameCombatPlugin
{
    private CombatEngineAPI engine;
    private int numShips = 0;

    @Override
    public void advance(float amount, List events)
    {
        if (engine.isPaused())
            return;
        
        List allShips = engine.getShips();
        if (allShips.size() != numShips)
        {
            numShips = allShips.size();
            
            // Number of ships has changed, iterate through and re-apply bonus
        }
    }

    @Override
    public void init(CombatEngineAPI engine)
    {
        this.engine = engine;
        numShips=0;
    }
}
Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #522 on: May 16, 2013, 07:12:56 PM »

Ah, okay. That's too bad... but, with your optimization, using EveryFrameCombatPlugin for this shouldn't feel too stupid. Thanks :)
Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #523 on: May 17, 2013, 01:17:26 PM »

Forgive the double post, but there seems to be an issue with the above solution.


Code
...
public static final float RANGE_BONUS = 150f;
private static final float HEALTH_BONUS = 1100f;
private static final float ENGINE_BONUS = 450f;
...



if (interval.intervalElapsed()) {

List ships = engine.getShips();

if (ships.size() != numShips) {

numShips = ships.size();
ShipAPI ship = null;

for (Iterator iter = ships.iterator(); iter.hasNext();) {

ship = (ShipAPI) iter.next();
if (ship.isHulk()) continue;


MutableShipStatsAPI stats = ship.getMutableStats();
stats.getWeaponHealthBonus().modifyPercent(ship.getFleetMemberId(), HEALTH_BONUS); //Will not apply bonus to ship.
stats.getEngineHealthBonus().modifyPercent(ship.getFleetMemberId(), ENGINE_BONUS); //Will not apply bonus to ship.
//stats.getBallisticWeaponRangeBonus().modifyPercent(ship.getFleetMemberId(), RANGE_BONUS); //Bonus is applied to ship.
//stats.getEnergyWeaponRangeBonus().modifyPercent(ship.getFleetMemberId(), RANGE_BONUS); //Bonus is applied to ship.
//engine.addFloatingText(ship.getLocation(), "!!", 15f, textColor, ship, 2f, 0.2f);
}
}
}

For some reason, the ship's weapon health and engine health will not be modified. The two commented-out lines, however, will apply the proper bonuses to weapon range without a problem. Any reason why this might be happening? The only thing I can think of is that for the hullmod, these bonuses were applied in "applyEffectsBeforeShipCreation", rather than "applyEffectsAfterShipCreation". So maybe these particular health modifications can't actually be applied while in combat?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #524 on: May 17, 2013, 01:28:04 PM »

Is there any way to have the campaign character creation questions before picking a portrait picture?

There isn't.

Also, is it feasible to change station graphics yet?

No, not yet.


For some reason, the ship's weapon health and engine health will not be modified. The two commented-out lines, however, will apply the proper bonuses to weapon range without a problem. Any reason why this might be happening? The only thing I can think of is that for the hullmod, these bonuses were applied in "applyEffectsBeforeShipCreation", rather than "applyEffectsAfterShipCreation". So maybe these particular health modifications can't actually be applied while in combat?

Right. That, along with the hull hitpoints, flux capacity, the armor rating, and possibly a few other values, only get used at ship creation. You do, on the other hand, have stats to control the damage taken by weapons etc to work around that.
Logged
Pages: 1 ... 33 34 [35] 36 37 ... 706