Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Raiding for Fun and Profit (11/27/19)

Pages: 1 ... 90 91 [92] 93 94 ... 280

Author Topic: Project Ironclads TC (28 of April, 2017) Source files for the mod  (Read 1335599 times)

phyrex

  • Admiral
  • *****
  • Posts: 751
    • View Profile
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1365 on: July 26, 2013, 04:14:58 PM »

That Denmark is a frigate? With 2 medium ballistics and a medium energy all at the front? That thing is either slow, unwieldy and built like a nuclear bunker or is crazy fast and maneuverable and made of paper mache.

i think he was going for something like cycerin's desdinova, that is, it might actually be a frigate with very low CR. its gonna pack a hell of a punch, but if it dosent work its magic quickly, then its just lost efforts

CR opens new avenues dont forget
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1366 on: July 26, 2013, 07:15:43 PM »

Denmark has the best armour and hull among all other UIN frigates, but has some problems with speed and agility which it compensates by having man. jets.

phyrex

  • Admiral
  • *****
  • Posts: 751
    • View Profile
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1367 on: July 26, 2013, 10:15:16 PM »

Denmark has the best armour and hull among all other UIN frigates, but has some problems with speed and agility which it compensates by having man. jets.

ah, so its basicly a slow ass turtle that only shoots forward ?
Logged

Silver Silence

  • Admiral
  • *****
  • Posts: 980
    • View Profile
    • Email
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1368 on: July 27, 2013, 11:42:16 AM »

The epitome of a gunship, then. Slow moving brick with a lot of firepower that it can bring to bear. More typical workhorse frigates like the California or the Omsk should be able to tackle it with better maneuverability and speed, if not firepower. The Denmark could be quite the support frigate with mass drivers to keep enemies "on the back foot" (on the defensive) with perhaps a plasma cannon for added punch or a type of particle weapon for added suppression.
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1369 on: July 29, 2013, 12:13:26 AM »

Btw i can make a plugin that destroys a husk ship depending on hull/faction, this prevents capture for example the rock fly and the ai/alien ships. Do you need it Okim?

Hi.

Yeap, i think that the Fly and the AI should benefit from this plugin of yours. I`m currently modding in some unique salvage that the Fly, the AI and the Aliens will be 'carrying' around so that taking them out would be a little bit more profitable. This idea might use a plugin that removes these resources from the base once you sell them. Can you handle this one too? :)

P.S.: sorry for answering this proposal almost a month later - i was trying to avoid extra scripting by manipulating with various values (making Fly carry 1k marines and such).
« Last Edit: July 29, 2013, 12:15:27 AM by Okim »
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1370 on: July 29, 2013, 12:22:39 AM »

The epitome of a gunship, then. Slow moving brick with a lot of firepower that it can bring to bear. More typical workhorse frigates like the California or the Omsk should be able to tackle it with better maneuverability and speed, if not firepower. The Denmark could be quite the support frigate with mass drivers to keep enemies "on the back foot" (on the defensive) with perhaps a plasma cannon for added punch or a type of particle weapon for added suppression.

It is actually on par with Omsk as both ships have 3 medium weapons (in case of Omsk - they are all turrets). Omsk has worse flux, but great armour and speed. Denmark has an energy slot instead of missile, good omni shield and flux capacity. Oh, and Omsk is much much cheaper both in credits and fleet points.

silentstormpt

  • Admiral
  • *****
  • Posts: 1056
    • View Profile
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1371 on: July 29, 2013, 03:38:38 AM »

Btw i can make a plugin that destroys a husk ship depending on hull/faction, this prevents capture for example the rock fly and the ai/alien ships. Do you need it Okim?

Hi.

Yeap, i think that the Fly and the AI should benefit from this plugin of yours. I`m currently modding in some unique salvage that the Fly, the AI and the Aliens will be 'carrying' around so that taking them out would be a little bit more profitable. This idea might use a plugin that removes these resources from the base once you sell them. Can you handle this one too? :)

P.S.: sorry for answering this proposal almost a month later - i was trying to avoid extra scripting by manipulating with various values (making Fly carry 1k marines and such).

Alright, ive changes ur isHuskCheck to do both the "auto-destruct" and the huskcheck, all you need to do is replace the old code with this one AND remove every isHuskCheck on every weapon that had it since, it doesnt needed it anymore:

Code
package data.scripts.plugins;

import com.fs.starfarer.api.AnimationAPI;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.DamageType;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.WeaponAPI;
import java.util.List;
import java.util.ListIterator;

public class isHulkCheck implements EveryFrameCombatPlugin
{
    private CombatEngineAPI engine;
    private String ROCK_FLY_HULL_ID = "rockfly";

    @Override
    public void init(CombatEngineAPI engine)
    {
        this.engine = engine;
    }//INIT
   
    @Override
    public void advance(float amount, List events)
    {
        if (engine.isPaused()) return;
       
        ListIterator allships = engine.getShips().listIterator();
       
        if(allships.hasNext())
        {
             while(allships.hasNext())
             {
                 ShipAPI ship = (ShipAPI) allships.next();
                 
                 if(ship.isHulk() && ship.getHullSpec().getHullId().equals(ROCK_FLY_HULL_ID))
                 {
                     engine.applyDamage(ship, ship.getLocation(), 9999999, DamageType.FRAGMENTATION, 0, true, true, ship);
                 }//IF
                 else
                 {
                    ListIterator allweapons = ship.getAllWeapons().listIterator();
                   
                    if(allweapons.hasNext())
                    {
                        while(allweapons.hasNext())
                        {
                            WeaponAPI weapon = (WeaponAPI) allweapons.next();
                            AnimationAPI animation = weapon.getAnimation();
                           
                            if(animation != null)
                            {
                                if (ship.isHulk())
                                {
                                    animation.pause();
                                }//IF
                                else
                                {
                                    animation.play();
                                }//ELSE
                            }//IF
                        }//WHILE
                    }//IF
                    else
                        continue;
                 }//ELSE
             }//WHILE
         }//IF
    }//ADVANCE
}//CLASS

Ive set it to only destroys the Rock Fly since.. well boarding a Fly doesnt make much sense unless this is a Tyranic ship.
« Last Edit: July 29, 2013, 03:42:04 AM by silentstormpt »
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1372 on: July 29, 2013, 06:07:36 AM »

Thanks!

I`ll try it out.


Has anyone here on the forums figured out how to manipulate item costs (i.e. imitate trading)?

Silver Silence

  • Admiral
  • *****
  • Posts: 980
    • View Profile
    • Email
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1373 on: July 29, 2013, 06:57:34 AM »

The Fairy Empire mod has a form of trading where certain items change prices depending on which station you get close to. It's simple and it only takes a few minutes of trial and error before you can be making absurd amounts of credits with a couple freighters in the fleet. But it works.
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1374 on: July 29, 2013, 09:20:49 AM »

Thanks, i`ll look into it.

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1375 on: July 30, 2013, 01:04:30 PM »

Btw i can make a plugin that destroys a husk ship depending on hull/faction, this prevents capture for example the rock fly and the ai/alien ships. Do you need it Okim?

Hi.

Yeap, i think that the Fly and the AI should benefit from this plugin of yours. I`m currently modding in some unique salvage that the Fly, the AI and the Aliens will be 'carrying' around so that taking them out would be a little bit more profitable. This idea might use a plugin that removes these resources from the base once you sell them. Can you handle this one too? :)

P.S.: sorry for answering this proposal almost a month later - i was trying to avoid extra scripting by manipulating with various values (making Fly carry 1k marines and such).

Alright, ive changes ur isHuskCheck to do both the "auto-destruct" and the huskcheck, all you need to do is replace the old code with this one AND remove every isHuskCheck on every weapon that had it since, it doesnt needed it anymore:

Code
package data.scripts.plugins;

import com.fs.starfarer.api.AnimationAPI;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.DamageType;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.WeaponAPI;
import java.util.List;
import java.util.ListIterator;

public class isHulkCheck implements EveryFrameCombatPlugin
{
    private CombatEngineAPI engine;
    private String ROCK_FLY_HULL_ID = "rockfly";

    @Override
    public void init(CombatEngineAPI engine)
    {
        this.engine = engine;
    }//INIT
   
    @Override
    public void advance(float amount, List events)
    {
        if (engine.isPaused()) return;
       
        ListIterator allships = engine.getShips().listIterator();
       
        if(allships.hasNext())
        {
             while(allships.hasNext())
             {
                 ShipAPI ship = (ShipAPI) allships.next();
                 
                 if(ship.isHulk() && ship.getHullSpec().getHullId().equals(ROCK_FLY_HULL_ID))
                 {
                     engine.applyDamage(ship, ship.getLocation(), 9999999, DamageType.FRAGMENTATION, 0, true, true, ship);
                 }//IF
                 else
                 {
                    ListIterator allweapons = ship.getAllWeapons().listIterator();
                   
                    if(allweapons.hasNext())
                    {
                        while(allweapons.hasNext())
                        {
                            WeaponAPI weapon = (WeaponAPI) allweapons.next();
                            AnimationAPI animation = weapon.getAnimation();
                           
                            if(animation != null)
                            {
                                if (ship.isHulk())
                                {
                                    animation.pause();
                                }//IF
                                else
                                {
                                    animation.play();
                                }//ELSE
                            }//IF
                        }//WHILE
                    }//IF
                    else
                        continue;
                 }//ELSE
             }//WHILE
         }//IF
    }//ADVANCE
}//CLASS

Ive set it to only destroys the Rock Fly since.. well boarding a Fly doesnt make much sense unless this is a Tyranic ship.

There is a problem with all rotary weapons playing animation even while not firing after i started to use this code. Seems that there should be a check of some sorts to prevent this from happening. But if i make one - all animated weapons (drivers etc.) stop their animations...

Any ideas?

Wyvern

  • Admiral
  • *****
  • Posts: 2412
    • View Profile
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1376 on: July 30, 2013, 01:09:59 PM »

I've edited it a bit - this should fix the problem.  (Silentstorm's version said "if ship is dead, stop all weapon animations; if ship is not dead, play all weapon animations" - I commented out the second part of that.)
Code
package data.scripts.plugins;

import com.fs.starfarer.api.AnimationAPI;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.DamageType;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.WeaponAPI;
import java.util.List;
import java.util.ListIterator;

public class isHulkCheck implements EveryFrameCombatPlugin
{
    private CombatEngineAPI engine;
    private String ROCK_FLY_HULL_ID = "rockfly";

    @Override
    public void init(CombatEngineAPI engine)
    {
        this.engine = engine;
    }//INIT
    
    @Override
    public void advance(float amount, List events)
    {
        if (engine.isPaused()) return;
        
        ListIterator allships = engine.getShips().listIterator();
        
        if(allships.hasNext())
        {
             while(allships.hasNext())
             {
                 ShipAPI ship = (ShipAPI) allships.next();
                
                 if(ship.isHulk() && ship.getHullSpec().getHullId().equals(ROCK_FLY_HULL_ID))
                 {
                     engine.applyDamage(ship, ship.getLocation(), 9999999, DamageType.FRAGMENTATION, 0, true, true, ship);
                 }//IF
                 else
                 {
                    ListIterator allweapons = ship.getAllWeapons().listIterator();
                    
                    if(allweapons.hasNext())
                    {
                        while(allweapons.hasNext())
                        {
                            WeaponAPI weapon = (WeaponAPI) allweapons.next();
                            AnimationAPI animation = weapon.getAnimation();
                            
                            if(animation != null)
                            {
                                if (ship.isHulk())
                                {
                                    animation.pause();
                                }//IF
//                                else
//                                {
//                                    animation.play();
//                                }//ELSE
                            }//IF
                        }//WHILE
                    }//IF
                    else
                        continue;
                 }//ELSE
             }//WHILE
         }//IF
    }//ADVANCE
}//CLASS
Logged
Wyvern is 100% correct about the math.

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1377 on: July 30, 2013, 01:22:54 PM »

Thanks. Stupid me, it all was so damn simple :)

silentstormpt

  • Admiral
  • *****
  • Posts: 1056
    • View Profile
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1378 on: July 30, 2013, 04:06:05 PM »

Ops sorry about that, i knew about the play() and even thought about removing it but i forgot to do it, just remove the else{ animation.play(); } since its not needed, also since this makes the rock fly unobtainable you can add as many OP points as you want to its weapons, fixing the problem with the never-ending battle-flee issue.
« Last Edit: July 30, 2013, 04:29:43 PM by silentstormpt »
Logged

Okim

  • Admiral
  • *****
  • Posts: 2145
    • View Profile
    • Okim`s Modelling stuff
Re: Project Ironclads, version 5.2 (0.54.1)
« Reply #1379 on: July 31, 2013, 12:52:01 AM »

I have a request for a script that imitates mining operations.

Here is what i need it to do:

1. check if the fleet is near the asteroid body (orbiting it for some clicks)

2. check if the fleet has miner ships in it (checks specific hulls and their numbers)

3. check if player has enough supplies for mining operations (25 per miner) + per day consumption. If he has enough - generate a message 'Mining in progress', else - 'Not enough supplies for mining operations'.

4. generate a random amount of materials at the end of the day if the fleet kept orbiting the asteroid for the whole day

- there are three types of materials that i have already created: basic, rare and exotic
- numbers of generated materials should depend on the amount of the crewed miners in the fleet
- chances of getting rare and exotic materials should be made by a simple randomiser (basic 75, rare 20, exotic 5)

5. a message should prompt once materials are generated and fleet should lose the aforementioned supplies for the mining operations

It would be great to have some skills in 'Industrial' that have impact on supplies consumption rates, chances to get rare materials, number of materials generated etc. I see this as a check in the script that looks for player`s skills and adds bonuses to certain formulas.

All the IDs for hulls and materials i`ll provide later.
Pages: 1 ... 90 91 [92] 93 94 ... 280