Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 2 [3] 4 5 ... 18

Author Topic: [0.7.2a] Omnifactory v1.11c (released 2017-03-16)  (Read 153237 times)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #30 on: January 19, 2013, 11:48:59 PM »

1.4 is up. This should be save-compatible with the previous version. Get it here.

This update brings built-in compatibility for total conversions. For non-Corvus systems, the station will try to find the best place to orbit. The generator uses the following logic:
  • If the system is Corvus, orbit Corvus IV
  • If not Corvus, find a planet with no existing satellites
  • If there are no free planets, orbit opposite the Abandoned Storage Facility
  • If there is no Abandoned Storage Facility, orbit the system's star

Changelog:
Quote
Version 1.4 (January 20, 2013)
================================
Updated bundled version of LazyLib
This is now a utility mod (can be run alongside total conversions)
Generator will attempt to pick the best spot for the station in TC systems
Logged

Plasmatic

  • Admiral
  • *****
  • Posts: 500
  • Curious no?
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #31 on: January 20, 2013, 08:18:10 AM »

Will this mod work with other mods in terms that I put a ship/weapon from a different mod into the factory, will it produce that ship/weapon?

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

How does the priorities work? if I put in 3 ships and 4 weapons at the same time, what will it produce first? will it produce everything at the same time? or does it prioritize based on complexity?
easy weapons/ships first, once those are done starts producing harder things etc.?

definately a very interesting mod that I will be downloading and trying.. now :P
Logged
"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Maurice Switzer

Chronosfear

  • Commander
  • ***
  • Posts: 211
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #32 on: January 20, 2013, 09:29:44 AM »

Will this mod work with other mods in terms that I put a ship/weapon from a different mod into the factory, will it produce that ship/weapon?

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

How does the priorities work? if I put in 3 ships and 4 weapons at the same time, what will it produce first? will it produce everything at the same time? or does it prioritize based on complexity?
easy weapons/ships first, once those are done starts producing harder things etc.?

definately a very interesting mod that I will be downloading and trying.. now :P

1.yes it does ... at least for weapons i can confirm.
   think it does for hulls , too

2. Everything will be produced at the same time but takes a different time to produce it ( small goes faster then medium or large mounts )


cool addition, will be my 2nd mod which will be permanently activ.
« Last Edit: January 20, 2013, 09:31:21 AM by Chronosfear »
Logged
Be the change that you wish to see in the world.

My words are backed with nuclear weapons
Gandhi (Civ)

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #33 on: January 20, 2013, 09:46:47 AM »

May I implement this in U'sC? :)
Logged

Andy H.K.

  • Commander
  • ***
  • Posts: 232
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #34 on: January 20, 2013, 10:02:13 AM »

Will this mod work with other mods in terms that I put a ship/weapon from a different mod into the factory, will it produce that ship/weapon?

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

How does the priorities work? if I put in 3 ships and 4 weapons at the same time, what will it produce first? will it produce everything at the same time? or does it prioritize based on complexity?
easy weapons/ships first, once those are done starts producing harder things etc.?

definately a very interesting mod that I will be downloading and trying.. now :P

1.yes it does ... at least for weapons i can confirm.
   think it does for hulls , too

2. Everything will be produced at the same time but takes a different time to produce it ( small goes faster then medium or large mounts )


cool addition, will be my 2nd mod which will be permanently activ.

1. Yes it does for hull too, I've been happily replicating Neutrino's Super bomber ;D
Logged

Plasmatic

  • Admiral
  • *****
  • Posts: 500
  • Curious no?
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #35 on: January 20, 2013, 11:15:56 AM »

Will this mod work with other mods in terms that I put a ship/weapon from a different mod into the factory, will it produce that ship/weapon?

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

How does the priorities work? if I put in 3 ships and 4 weapons at the same time, what will it produce first? will it produce everything at the same time? or does it prioritize based on complexity?
easy weapons/ships first, once those are done starts producing harder things etc.?

definately a very interesting mod that I will be downloading and trying.. now :P

1.yes it does ... at least for weapons i can confirm.
   think it does for hulls , too

2. Everything will be produced at the same time but takes a different time to produce it ( small goes faster then medium or large mounts )


cool addition, will be my 2nd mod which will be permanently activ.

1. Yes it does for hull too, I've been happily replicating Neutrino's Super bomber ;D

Finally I can actually have a big carrier fleet! normally the problem I get is that I run out of fighters to buy, and those stupid convoys never resupply what I need :P
Logged
"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Maurice Switzer

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #36 on: January 20, 2013, 11:20:40 AM »

May I implement this in U'sC? :)

Feel free. :)

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

There's no limit on how many blueprints it can store. However, the station is still bound by the cargo limits of vanilla Starsector, so it will stop producing new resources if its inventory becomes completely full (this is very visible with ships; I may have to lower the default number produced per hull for the next patch).
Logged

Plasmatic

  • Admiral
  • *****
  • Posts: 500
  • Curious no?
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #37 on: January 21, 2013, 08:35:57 AM »

May I implement this in U'sC? :)

Feel free. :)

Does the station have a limit to the number of different things it can produce? like 20 different ships and 40 different weapons, after that anything new you sell to the station will not get produced?

There's no limit on how many blueprints it can store. However, the station is still bound by the cargo limits of vanilla Starsector, so it will stop producing new resources if its inventory becomes completely full (this is very visible with ships; I may have to lower the default number produced per hull for the next patch).

is it possible to remove a blueprint from the omnifactory?
Logged
"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Maurice Switzer

EvilWaffleThing

  • Lieutenant
  • **
  • Posts: 73
    • View Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #38 on: January 21, 2013, 02:22:05 PM »

What happens if there is already something orbiting opposite the abandoned storage facility? I'm using Fleet Control Mod (http://fractalsoftworks.com/forum/index.php?topic=3758.0) which places a civilian mining station opposite the abandoned storage facility. Would the omnifactory just occupy the same space?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #39 on: January 21, 2013, 06:23:04 PM »

is it possible to remove a blueprint from the omnifactory?

Not at this time.

What happens if there is already something orbiting opposite the abandoned storage facility? I'm using Fleet Control Mod (http://fractalsoftworks.com/forum/index.php?topic=3758.0) which places a civilian mining station opposite the abandoned storage facility. Would the omnifactory just occupy the same space?

I just checked, and it actually spawns the Omnifactory about 90 degrees away from the Abandoned Station. So it shouldn't be a problem. :)
« Last Edit: January 21, 2013, 06:26:46 PM by LazyWizard »
Logged

Okim

  • Admiral
  • *****
  • Posts: 2161
    • View Profile
    • Okim`s Modelling stuff
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #40 on: January 22, 2013, 12:18:31 AM »

Hey, there is a new script from our Chinese friends over in modding sub-forum. Its about combining things into various stuff.

Guess this might be of some use for your omni factory.

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Omnifactory v1.0 (.54, released 2012-12-27)
« Reply #41 on: January 22, 2013, 11:56:14 AM »

i don't have time to check the mod right now (<sad face>) BUT . . . is it required any man power or supplies for production or is it just a fun (testing) mod ?

No, but you do have to buy the produced goods from the station at full price. :)
Is there any way to change this? :D
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)

gruntmaster1

  • Ensign
  • *
  • Posts: 31
    • View Profile
Re: Omnifactory v1.0 (.54, released 2012-12-27)
« Reply #42 on: January 22, 2013, 12:31:02 PM »

i don't have time to check the mod right now (<sad face>) BUT . . . is it required any man power or supplies for production or is it just a fun (testing) mod ?

No, but you do have to buy the produced goods from the station at full price. :)
Is there any way to change this? :D

Add the line "station.getCargo().setFreeTransfer(true);" after
"SectorEntityToken station;" in the AddOmniFac.java file in data -> scripts -> world folder. This can be abused to easily get a lot of money. I once thought about making a form of economics mod to produce weapons and ships, and this might help me work on it again (depending on time and how well I can implement my ideas).

Edit: In case I actually get it done, is it okay if I modify the scripts (credit will ofcouse be given for the original work)?
« Last Edit: January 22, 2013, 12:34:50 PM by gruntmaster1 »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Omnifactory v1.4 (.54.1a, released 2013-01-20)
« Reply #43 on: January 22, 2013, 10:23:48 PM »

i don't have time to check the mod right now (<sad face>) BUT . . . is it required any man power or supplies for production or is it just a fun (testing) mod ?

No, but you do have to buy the produced goods from the station at full price. :)
Is there any way to change this? :D

Like gruntmaster1 said, you can enable free transfer for the station's cargo. If you don't want the station to become overpowered, you can always make the factory require resources to run.

I've been working on making customization easier for non-coders for the next update. AddOmniFac.java now has all the relevant settings with comments describing what they do.

If you want to use this now, here's the updated file. It should be compatible with 1.4, but you would need to start a new game for the changes to take place:

data/scripts/world/AddOmniFac.java
Code
package data.scripts.world;

import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import java.util.*;

@SuppressWarnings("unchecked")
public class AddOmniFac implements SectorGeneratorPlugin
{
    private static final String STATION_NAME = "Omnifactory";
    private static final String STATION_FACTION = "neutral";

    // Responsible for creating the spawnpoint and adjusting factory settings
    // If you wish to modify a default, uncomment and change the relevent line
    private static void initStation(SectorEntityToken station, StarSystemAPI system)
    {
        OmniFac factory = new OmniFac(station);

        // Should the player be able to freely take goods from the factory?
        //station.getCargo().setFreeTransfer(false);

        // Sets if 'X added to station' messages appear. Defaults to true.
        //factory.setShowAddedCargo(true);
        // Sets if 'Limit for X reached' messages appear. Defaults to true.
        //factory.setShowLimitReached(true);
        // Sets if buggy goods should be removed from memory. Defaults to false.
        //factory.setRemoveBrokenGoods(false);

        // Sets ship production time modifier. Defaults to 1.0.
        //factory.setShipProductionTimeModifier(1.0f);
        // Sets weapon production time modifier. Defaults to 1.0.
        //factory.setWeaponProductionTimeModifier(1.0f);

        // Sets the minimum amount of crew for the factory to function. Defaults to 0.
        //factory.setRequiredCrew(0);
        // Sets factory supply consumption per day. Defaults to 0.
        //factory.setRequiredSuppliesPerDay(0f);
        // Sets factory fuel consumption per day. Defaults to 0.
        //factory.setRequiredFuelPerDay(0f);

        // Sets how many of each fighter to produce. Retroactive. Defaults to 3.
        //factory.setMaxHullsPerFighter(3);
        // Sets how many of each frigate to produce. Retroactive. Defaults to 2.
        //factory.setMaxHullsPerFrigate(2);
        // Sets how many of each destroyer to produce. Retroactive. Defaults to 2.
        //factory.setMaxHullsPerDestroyer(2);
        // Sets how many of each cruiser to produce. Retroactive. Defaults to 1.
        //factory.setMaxHullsPerCruiser(1);
        // Sets how many of each capital ship to produce. Retroactive. Defaults to 1.
        //factory.setMaxHullsPerCapital(1);
        // Sets how many stacks of each weapon to produce. Defaults to 0.5.
        //factory.setMaxStacksPerWeapon(0.5f);

        system.addSpawnPoint(factory);
    }

    // This will try to create the station in the following places (in order):
    // 1. If the system is Corvus, at Corvus IV
    // 2. If not Corvus, a planet with no existing satellites
    // 3. If no free planets, orbit adjacent the Abandoned Storage Facility
    // 4. If no Abandoned Storage Facility, orbiting the system's star
    private static void createStation(StarSystemAPI system)
    {
        SectorEntityToken station;

        // We are in the Corvus system (not a TC), so use Corvus IV
        if ("Corvus Star System".equals(system.getName()))
        {
            station = system.addOrbitalStation(
                    system.getEntityByName("Corvus IV"), 315,
                    300, 50, STATION_NAME, STATION_FACTION);
        }
        // Not in Corvus, find a good candidate for station placement
        else
        {
            SectorEntityToken tmp;
            List planets = new ArrayList(system.getPlanets());
            List stations = system.getOrbitalStations();

            // Why is this even IN there?
            planets.remove(system.getStar());

            // Remove all planets that have stations around them
            for (int x = 0; x < stations.size(); x++)
            {
                tmp = (SectorEntityToken) stations.get(x);

                if (tmp.getOrbit() != null)
                {
                    planets.remove(tmp.getOrbit().getFocus());
                }
            }

            // Are there any free planets?
            if (!planets.isEmpty())
            {
                station = system.addOrbitalStation(
                        (SectorEntityToken) planets.get(0), 315,
                        300, 50, STATION_NAME, STATION_FACTION);
            }
            else
            {
                tmp = system.getEntityByName("Abandoned Storage Facility");

                // Does the Abandoned Storage Facility exist?
                if (tmp != null)
                {
                    station = system.addOrbitalStation(tmp.getOrbit().getFocus(),
                            315, 300, 50, STATION_NAME, STATION_FACTION);
                }
                else
                {
                    // I give up, just use the star
                    if (system.getStar() != null)
                    {
                        station = system.addOrbitalStation(system.getStar(), 315,
                                7250, 50, STATION_NAME, STATION_FACTION);
                    }
                    // Just in case somehow there's no sun in this system
                    else
                    {
                        station = system.addOrbitalStation(system.createToken(0f, 0f),
                                0, 0, 50, STATION_NAME, STATION_FACTION);
                    }
                }
            }
        }

        // Finally, create the factory
        initStation(station, system);
    }

    @Override
    public void generate(SectorAPI sector)
    {
        List systems = sector.getStarSystems();

        // This generator ran before SectorGen, delay until a system is created
        if (systems.isEmpty())
        {
            Timer deferredAdd = new Timer(true);
            deferredAdd.scheduleAtFixedRate(new DeferredAdd(sector), 1000, 1000);
        }
        else
        {
            StarSystemAPI system = (StarSystemAPI) systems.get(0);
            createStation(system);
        }
    }

    private static class DeferredAdd extends TimerTask
    {
        SectorAPI sector;

        public DeferredAdd(SectorAPI sector)
        {
            this.sector = sector;
        }

        @Override
        public void run()
        {
            CampaignFleetAPI player = sector.getPlayerFleet();

            if (player != null)
            {
                StarSystemAPI system = (StarSystemAPI) player.getContainingLocation();

                if (system != null)
                {
                    createStation(system);
                    this.cancel();
                }
            }
        }
    }
}
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Omnifactory v1.0 (.54, released 2012-12-27)
« Reply #44 on: January 22, 2013, 10:24:09 PM »

I once thought about making a form of economics mod to produce weapons and ships, and this might help me work on it again (depending on time and how well I can implement my ideas).

Edit: In case I actually get it done, is it okay if I modify the scripts (credit will ofcouse be given for the original work)?

Feel free. :)
Logged
Pages: 1 2 [3] 4 5 ... 18