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 ... 36 37 [38] 39 40 ... 706

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

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #555 on: June 25, 2013, 12:08:55 PM »

Hi folks,

i returned to the Thule Meteor Missile to change the color.

in the .proj file there is always the part about the engineslots:
   
Code
"engineSlots":[{"id":"ES1",
"loc":[-38, 0],
    "style":"TORPEDO_ATROPOS",
    "width":50.0,
    "length":100.0,
    "angle":180.0}]
if i change the style to a customized engine it gets an error. To make things worse i can't find the id "ES1" anywhere.
Anyone a hint for me?
Logged

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #556 on: June 26, 2013, 06:49:04 PM »

I have a ship system that basically boosts the systems of the ship for a set amount of time (Shield efficiency, flux dissipation, etc). When I use the ship it works fine, but when I run against it in a simulation it crashes the game. It's currently using the manuvering jets AI. I'm not sure if it has to do with that, or if I can somehow make my own system AI. Anyone have any ideas?
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #557 on: July 08, 2013, 06:53:13 AM »

Where is defined that Guardian PD got multiple beams, their number and position?
I am able to recreate tachyon beam with all its´ effects, but can´t find this.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #558 on: July 08, 2013, 09:11:37 AM »

@Thule:  The problem there is that you're using an incompatible style, I think.  Build a custom engine style:

Code
	"engineSlots":[
{"id":"ES1",
"loc":[0, 0],
    "style":"CUSTOM",
"styleSpec":{
"engineColor":[100,255,100,255],
"contrailParticleSizeMult":6,
"contrailParticleDuration":2,
"contrailMaxSpeedMult":-0.2,
"contrailAngularVelocityMult":0f,
"contrailColor":[55,255,55,35],
"type":"GLOW" # GLOW or SMOKE
},
    "width":9.0,
    "length":10.0,
    "angle":180.0},
   ]

@Arumac:  You can code a custom System AI that will regulate the System according to your wishes.  See the API documentation for details about how to implement this.

@Ravendarke:  You need to add a line to the wpn, after defining all of your firing points: 

Code
"convergeOnPoint":true,

Bear in mind that the first point must be the one closest to zero on the Y axis; the first firing point is the one used to aim the weapon.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Thule

  • Admiral
  • *****
  • Posts: 580
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #559 on: July 08, 2013, 06:47:54 PM »

Xeno thanks for the code, the colorchange worked fine ;)
Logged

Arumac

  • Lieutenant
  • **
  • Posts: 98
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #560 on: July 08, 2013, 07:43:48 PM »


@Arumac:  You can code a custom System AI that will regulate the System according to your wishes.  See the API documentation for details about how to implement this.


Thanks, I'm not really a coder, but I like to fiddle around with things. I never knew there was any kind of actual API documentation on the web. After you mentioned it I started digging and found http://fractalsoftworks.com/starfarer.api/ which I think is what you're talking about.

Thanks again for pointing me in the right direction.
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #561 on: July 12, 2013, 01:40:20 PM »

Looking for script that makes possible beam weapon with charge up time (not that smooth build up that can be done by default, but really charge up with possible frame by frame deco animation as some projectile weapons got).

Just checking if this was done before, if not, I will look into it myself, thx.
Logged

CrashToDesktop

  • Admiral
  • *****
  • Posts: 3876
  • Quartermaster
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #562 on: July 13, 2013, 04:27:07 PM »

AFAIK, being a weapons expert (albeit kind of rusty), I don't think it's possible.

Although I do remember from the Ironclads mod a weapon that's pretty close to the one you want, called the "Heavy Beamer."  At least, if I remember what it was. :P
Logged
Quote from: Trylobot
I am officially an epoch.
Quote from: Thaago
Note: please sacrifice your goats responsibly, look up the proper pronunciation of Alex's name. We wouldn't want some other project receiving mystic power.

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #563 on: July 13, 2013, 04:45:17 PM »

Looking for script that makes possible beam weapon with charge up time (not that smooth build up that can be done by default, but really charge up with possible frame by frame deco animation as some projectile weapons got).

Just checking if this was done before, if not, I will look into it myself, thx.

Try the Trader ship on the Star Control 2 mod im doing and see if its that what ur searching for
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #564 on: July 15, 2013, 03:39:47 PM »

Do you mean variable blaster?
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #565 on: July 15, 2013, 04:17:33 PM »

Do you mean variable blaster?
Yes, while  it shoots projectiles, its actually a beam weapon, it where i based the death ray
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #566 on: July 15, 2013, 05:28:20 PM »

This part of the code I'm working on gives me a lot of errors.

Spoiler

139116 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.StackOverflowError
java.lang.StackOverflowError
   at java.util.Arrays.mergeSort(Arrays.java:1270)
   at java.util.Arrays.sort(Arrays.java:1210)
   at java.util.Collections.sort(Collections.java:159)
   at com.fs.starfarer.campaign.fleet.FleetData.ÖøÕ000(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.syncIfNeeded(Unknown Source)
   at com.fs.starfarer.campaign.fleet.FleetData.getHangarSpace(Unknown Source)

[close]

------------------------------------------------------------------------------

        private void Cycle (CampaignFleetAPI fleet) {   
                float a = (float) Math.random();
                if (a > 0.3)    {
                    fleet.addAssignment(FleetAssignment.PATROL_SYSTEM, null, (int) Math.random()*10 + 5);
                    } else {
                    fleet.addAssignment(FleetAssignment.DEFEND_LOCATION, getAnchor(), (int) Math.random()*10 + 5);
                    }   
                Script script = null;
      script = createArrivedScript(fleet, getAnchor());
                fleet.addAssignment(FleetAssignment.GO_TO_LOCATION, getAnchor(), 10, script);
                }
       

   private Script createArrivedScript(final CampaignFleetAPI fleet, final SectorEntityToken station ) {
      return new FleetScript(fleet, station) {
                    public void run() {
                    Cycle(fleet);

...
... various checks on the fleet using many local variables and parameters changing the cargo of the fleet and the fleet composition. ...
...
                }
            };
   }

------------------------------------------------------------------------------

Is there any way I can make it prettier or less prone to crashes? It seems that this things I try to do gets smashed quickly by StackOverflow.
Logged

Ravendarke

  • Captain
  • ****
  • Posts: 276
  • Nemesis
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #567 on: July 16, 2013, 03:51:54 AM »

Do you mean variable blaster?
Yes, while  it shoots projectiles, its actually a beam weapon, it where i based the death ray

It is using "projectile" tag, and therefor it is using charge up for projectile weapons.
Logged

CrashToDesktop

  • Admiral
  • *****
  • Posts: 3876
  • Quartermaster
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #568 on: July 16, 2013, 09:48:14 AM »

Is is possible to have one .wpn file be the base for different weapons?  For example, I've got "mmm_1.wpn" and I want to make two different versions of it, same sprite, etc. but one has more ammo than the other.  That possible without having to copy the "mmm_1.wpn" twice?
Logged
Quote from: Trylobot
I am officially an epoch.
Quote from: Thaago
Note: please sacrifice your goats responsibly, look up the proper pronunciation of Alex's name. We wouldn't want some other project receiving mystic power.

Silver Silence

  • Admiral
  • *****
  • Posts: 980
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #569 on: July 16, 2013, 09:53:49 AM »

Why not just have mmm_1_2?
It'd mean greater control if the weapon was built-in for example. You can tweak the built-in and non-built in versions to offset their natures.
Logged
Pages: 1 ... 36 37 [38] 39 40 ... 706