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: Anubis-class Cruiser (12/20/24)

Pages: 1 ... 79 80 [81] 82 83 ... 752

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

Sundog

  • Admiral
  • *****
  • Posts: 1779
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1200 on: December 29, 2013, 04:44:24 PM »

I haven't had the pleasure of playing Sector of Sins yet. Downloading now.

So we're talking about doing partial damage through shields now? Intimidating...

I wouldn't worry about performance issues from using EveryFrameCombatPlugin unless you're doing something crazy.

An IDE (Integrated Development Environment) is just a fancy text editor with a bunch of features for coding. Some people consider Notepad++ an IDE, but it lacks any of the nifty features I mentioned (unless you go crazy with extensions).

You're right about the V key and venting, as a mater of fact it made me realize just how bad my idea was for inverting flux. I didn't even consider what it would do to the AI (make it suicidal). Please accept my humble apologies for making such an inane suggestion.

To my knowledge, ovoid shields are impossible.

Maybe we should move this to another thread to keep this one uncluttered. This could get complicated  :)

Xalendi

  • Commander
  • ***
  • Posts: 198
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1201 on: December 29, 2013, 05:05:33 PM »

I've created a new thread called Traditional Shields
Logged

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1202 on: January 06, 2014, 05:27:18 PM »

I haven't posted in awhile, I haven't had much time to play around with this game recently. However I began to mess around again, and I've got some questions.

I basically have a faction about 90% done, 25 ships in the faction, not counting drones and other misc ships. I used to have a working station in Corvus, and had everything working nicely pre 6.0 or whatever the last big patch was. That patch pretty much broke everything, and I've patched up most of it. However I can't get my new system to show up in hyperspace, therefore I cannot see my faction at all in the campaign.

Basically, the jist of it is, I'd like to know if there's any tutorials to look at, or any mods in particular I can reference to figure out how to add systems, new factions fleets, and modded ship behaviors. I don't want to be an annoyance, but I've been trying on my own for awhile, and I'm not really a programmer.
Logged

LiquidStang

  • Ensign
  • *
  • Posts: 47
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1203 on: January 06, 2014, 05:45:56 PM »

I haven't posted in awhile, I haven't had much time to play around with this game recently. However I began to mess around again, and I've got some questions.

I will be glad to help.

I basically have a faction about 90% done, 25 ships in the faction, not counting drones and other misc ships. I used to have a working station in Corvus, and had everything working nicely pre 6.0 or whatever the last big patch was. That patch pretty much broke everything, and I've patched up most of it. However I can't get my new system to show up in hyperspace, therefore I cannot see my faction at all in the campaign.

Have you tried to set up the system properly? You should probably check the mods settings before you even think about using the system in hyperspace.

Basically, the jist of it is, I'd like to know if there's any tutorials to look at, or any mods in particular I can reference to figure out how to add systems, new factions fleets, and modded ship behaviors. I don't want to be an annoyance, but I've been trying on my own for awhile, and I'm not really a programmer.

I found some tutorials from youtube. I'm not sure what one will solve the problem you're having, though. I just randomly came across with them. Watch all 3 tutorials then if you have the problem solved tell me what one helped you the most.

http://www.youtube.com/watch?v=-_geS3qALyU

http://www.youtube.com/watch?v=r0dvlSS8Jdc

http://www.youtube.com/watch?v=Tc-KiVg5iV8

Best Regards, David
Logged
David

Starsector is challenging, but what's more challenging is dealing with people who encourage you to try real hard.

Sundog

  • Admiral
  • *****
  • Posts: 1779
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1204 on: January 06, 2014, 10:01:27 PM »

@Arumac: Here ya go sir; http://fractalsoftworks.com/forum/index.php?topic=1282.0

My guess is you haven't told the game to run the script that generates your system. Like this:

Code
public class MyModPlugin extends BaseModPlugin
{
    @Override
    public void onNewGame()
    {
new MySystemGeneratorClass().generate(Global.getSector());
    }
}

Edit: Hrm. Well after taking a closer look at that tutorial it looks like it doesn't cover creating new systems. I'll try to get the faction I'm working on into the game and let you know what I find out (assuming someone who actually knows how to add systems doesn't beat me to the punch)
« Last Edit: January 06, 2014, 10:14:00 PM by Sundog »
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1779
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1205 on: January 06, 2014, 11:55:13 PM »

Ok, so here's a bare-bones mod that adds a new system called Example (really it's just a copy of Akonia)
https://www.dropbox.com/s/02145xsa7dzoxoc/Example%20System.zip

Hope to play your faction soon  :)

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1206 on: January 08, 2014, 05:49:31 PM »

@Sundog

Thanks a lot. That did the trick, I just wasn't able to follow were I needed to include the ModPlugin file in a couple of places. I appreciate your help, thanks a lot
Logged

Sundog

  • Admiral
  • *****
  • Posts: 1779
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1207 on: January 08, 2014, 08:24:30 PM »

No problem  :)

Edit: Forgot why I came here in the first place... I have a question. The faction I'm working on is shieldless and very short-ranged, so I'm a little worried about damage caused by the blasts of enemy ships being disabled. Is there any good way to reduce damage from those blasts?
« Last Edit: January 08, 2014, 08:39:44 PM by Sundog »
Logged

Hyph_K31

  • Admiral
  • *****
  • Posts: 1605
  • O' Hear My Name and Tremble! Ug Ug.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1208 on: January 09, 2014, 01:56:04 PM »

You and increase the speed at which ships recover disabled weapons using hullmods.

All (Most) Gedune ships have such a hull mod, which is based on the automated repair hull mod. for EMP damage resistance, look at resistant flux conduits.
Logged

"GEDUNE, stop venting in front of your classmates!"

MesoTroniK

  • Admiral
  • *****
  • Posts: 1734
  • I am going to destroy your ships
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1209 on: January 09, 2014, 02:04:03 PM »

Sundog, you could give them a special hull mod that provided resistance against certain kinds of damage.

The current unreleased dev of Exi has one that provides 30% mitigation against beam weapons for example.

Zudgemud

  • Commander
  • ***
  • Posts: 225
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1210 on: January 09, 2014, 02:07:06 PM »

Is there any way, to make a custom phasecloak system actually execute an operation before entering phase? And if so, how does one do that?

More specifically I want to make my ship send off some sort of AOE when going into phase. But all my poorly understood copying and pasting/editing of existing ship systems seem to have no effect on the actual phase effect. My IDs internal shipsystem reference IDs should be correctly updated though, so I don't think that is the problem.

Would be very thankful for any help here.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1211 on: January 09, 2014, 04:11:58 PM »

Yes, you can do that. 

In apply(MutableShipStatsAPI stats, String id, State state, float effectLevel){}  the state tells you whether it's IN, ACTIVE or OUT, see the API.

IN is running during the period when the Phase Cloak is just coming on line, so you can change a boolean state there that fires off your AOE in Advance() (which requires implementing EveryFrameCombatPlugin and your script needs to be in data/scripts/plugins for that to work).

For an example of a script that combines a ShipSystemStatsScript with EveryFrameCombatPlugin, see the Repulsor script I wrote for Vacuum.

Lastly, if I've mis-interpreted what you've said, and what you really want to do is have a System that can use the Phase Cloak "slot" for a special-purpose weapon- i.e., use defense_id for a "phase cloak" that doesn't actually phase... for something like this, you'd want a trigger condition when in State.IN, but have a limited time duration for being phased (0.001f) so that there's only one gameframe where your ship is "phased" and won't be aimed at by the AI.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Sundog

  • Admiral
  • *****
  • Posts: 1779
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1212 on: January 09, 2014, 04:44:27 PM »

Sundog, you could give them a special hull mod that provided resistance against certain kinds of damage.

The current unreleased dev of Exi has one that provides 30% mitigation against beam weapons for example.

Good call on giving Exi a buff against beams. 30% seems like a good amount to turn beams into a weakness of Exi rather than a hard counter.

Your suggestion was my first idea too, but unfortunately MutableShipStatsAPI doesn't have anything like getShipExplosionDamageTakenMult() to reduce only that type of damage (Unless I missed it?)

Is there any way, to make a custom phasecloak system actually execute an operation before entering phase?

You can do this by adding a 'Stats' script to an otherwise ordinary copy of the phasecloak system. Add a line that looks like this:
Code
"statsScript":"data.shipsystems.scripts.BurnDriveStats",
to the .system file of your version of the phasecloak, only replace 'BurnDriveStats' with the name of your own script. You'll want to put the .java file for your script in "\data\shipsystems\scripts\"

This method is a little hacky because the type of script you need to use (ShipSystemStatsScript) is only meant for modifying stats, but nothing else. That's why it doesn't provide you with a reference to the ship that's activating the system. To get a reference to the ship you need to look through all the ships on the battlefield and ask them; 'Hey, man, are these your stats?' until one says yes. Or just copy this:
Edit: That was bad advice. Just use stats.getEntity()

Code
        Object[] ships = Global.getCombatEngine().getShips().toArray();
        ShipAPI ship = null;

        for(int i = 0; i < ships.length; ++i) {
            if(stats == ((ShipAPI)ships[i]).getMutableStats()) {
                ship = (ShipAPI)ships[i];
            }
        }
        
        // For some reason the stats don't match any ship.
        if(ship == null) return;

From there you can use the 'state' variable xenoargh mentioned to decide when to do stuff.

Also if you are trying to replace the phasecloak with something else entirely (which I hadn't considered until xenoargh mentioned it) keep in mind that you won't be able to change the AI for the phasecloak without causing a crash when the AI tries to use it.

@xenoargh: I don't understand why an EveryFrameCombatPlugin would be necessary. Will a ShipSystemStatsScript not execute it's 'apply' function each frame?
« Last Edit: January 12, 2014, 01:01:40 PM by Sundog »
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1734
  • I am going to destroy your ships
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1213 on: January 09, 2014, 05:52:44 PM »

Sundog, yea it feels pretty good in practice. While the armor is still intact the mitigation is more than 30%, it only become that flat amount when its hitting bare hull.

I would imagine you would likely just have to give them resistance to HE damage, there is likely not a more elegant solution at the moment.

Zudgemud

  • Commander
  • ***
  • Posts: 225
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1214 on: January 10, 2014, 12:00:20 PM »

Thanks a lot xenoargh and Sundog! I'll try it out and see how it goes.
Logged
Pages: 1 ... 79 80 [81] 82 83 ... 752