Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Dibuk

Pages: [1]
1
Modding / Music in 0.7 ( and the mystery of the .bin) - solved
« on: November 29, 2015, 02:06:07 AM »
Fore some reason the game refuses to accept my code, game crashes as soon as I say "hi" to a fleet of the modded faction. the log holler about:
"java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.e] with id [music_nihil_encounter_hostile] not found"
and I scream back at it.

The apparent non-working code:


Working code:

sound.json (in the mod folder)
Code
	"music":{

"music_nihil_market_neutral":[
{"file":"nihil_2.ogg","source":"sounds/music/","volume":0.2},
],
"music_nihil_market_hostile":[
{"file":"nihil_2.ogg","source":"sounds/music/","volume":0.2},
],
"music_nihil_market_friendly":[
{"file":"nihil_2.ogg","source":"sounds/music/","volume":0.2},
],
"music_nihil_encounter_neutral":[
{"file":"nihil_1.ogg","source":"sounds/music/","volume":0.2},
],
"music_nihil_encounter_hostile":[
{"file":"nihil_1.ogg","source":"sounds/music/","volume":0.2},
],
"music_nihil_encounter_friendly":[
{"file":"nihil_1.ogg","source":"sounds/music/","volume":0.2},
],
},

.faction
Code
	"music":{
"theme":"music_nihil_market_neutral",
"market_neutral":"music_nihil_market_neutral",
"market_hostile":"music_nihil_market_hostile",
"market_friendly":"music_nihil_market_friendly",
"encounter_neutral":"music_nihil_encounter_neutral",
"encounter_hostile":"music_nihil_encounter_hostile",
"encounter_friendly":"music_nihil_encounter_friendly",
},

In the native files the music is all located in a mysterious "music.bin", could it be that dialog music must be set-up in this way? If that's the case how to .bin?

2
Modding / Sting type: Spawnpoint
« on: October 28, 2014, 08:13:49 AM »
Sooo, new version, new compability issues. Everyone is happy.

This is from a Spawnpoint that used to work.
Code
	protected CampaignFleetAPI spawnFleet() {
//if ((float) Math.random() < 0.5f) return null;

      --->    String type = null;
float r = (float) Math.random();

Yeah, that little line causes me much grief. In the last version it were fine to give it a null value, now I have no idea what to enter in the string value. The vanilla factions have things like "patrol" or "guard" entering these things dosen't work as my faction does not have a variable set up for those values (duh).

So where does one set up a "guard"-fleet? I'm pretty damn sure I've looked everywhere.

(PS: the pesky independents does have a null value, I just notised...)

EDIT: I just notised that the color did not work (derp), it's about the line with the arrow.

3
Modding / Damn Solar System refusing to show up (Solved!)
« on: May 13, 2014, 10:19:18 AM »
So I've been at it, trying to fix this damn system. It's obvious I'm missing something.

The mod starts up fine (no errors), but the new system does not show up in the Hyperspace map (or in space). WHY!?

Code
package data.scripts.world;

import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.InteractionDialogImageVisual;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.campaign.JumpPointAPI;
import com.fs.starfarer.api.campaign.LocationAPI;
import com.fs.starfarer.api.campaign.OrbitAPI;
import com.fs.starfarer.api.campaign.PlanetAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.fleet.FleetMemberType;
import com.fs.starfarer.api.impl.campaign.CoreCampaignPluginImpl;
import java.awt.Color;
import java.util.List;

@SuppressWarnings("unchecked")
public class NihilGen {

public void generate(SectorAPI sector) {

StarSystemAPI system = sector.createStarSystem("Noll");
LocationAPI hyper = Global.getSector().getHyperspace();
system.setBackgroundTextureFilename("graphics/backgrounds/background4.jpg");
//system.setBackgroundTextureFilename("graphics/backgrounds/background2.png");

// create the star and generate the hyperspace anchor for this system
PlanetAPI star = system.initStar("star_neutron", // id in planets.json
1000f, // radius (in pixels at default zoom)
1500, 1500);   // location in hyperspace

system.setLightColor(new Color(45, 35, 45)); // light color in entire system, affects all entities


/*
* addPlanet() parameters:
* 1. What the planet orbits (orbit is always circular)
* 2. Name
* 3. Planet type id in planets.json
* 4. Starting angle in orbit, i.e. 0 = to the right of the star
* 5. Planet radius, pixels at default zoom
* 6. Orbit radius, pixels at default zoom
* 7. Days it takes to complete an orbit. 1 day = 10 seconds.
*/

PlanetAPI n1 = system.addPlanet(star, "Nihil", "nihil", 290, 120, 11500, 450);

PlanetAPI n2 = system.addPlanet(star, "Zenit", "cryovolcanic", 5, 180, 2500, 100);
PlanetAPI n21 = system.addPlanet(n2, "Zenit Minor", "rocky_unstable", 35, 85, 800, 25);

/*
* addAsteroidBelt() parameters:
* 1. What the belt orbits
* 2. Number of asteroids
* 3. Orbit radius
* 4. Belt width
* 6/7. Range of days to complete one orbit. Value picked randomly for each asteroid.
*/



/*
* addRingBand() parameters:
* 1. What it orbits
* 2. Category under "graphics" in settings.json
* 3. Key in category
* 4. Width of band within the texture
* 5. Index of band
* 6. Color to apply to band
* 7. Width of band (in the game)
* 8. Orbit radius (of the middle of the band)
* 9. Orbital period, in days
*/

system.addRingBand(n1, "misc", "rings2", 256f, 2, Color.white, 256f, 200, 20f);
system.addRingBand(n1, "misc", "rings2", 256f, 2, Color.white, 256f, 400, 40f);
system.addRingBand(n1, "misc", "rings3", 256f, 2, Color.white, 256f, 800, 60f);



JumpPointAPI jumpPoint = Global.getFactory().createJumpPoint("Unstable Jump Point");
OrbitAPI orbit = Global.getFactory().createCircularOrbit(n1, 0, 500, 30);
jumpPoint.setOrbit(orbit);
jumpPoint.setRelatedPlanet(n1);
jumpPoint.setStandardWormholeToHyperspaceVisual();
system.addEntity(jumpPoint);


FactionAPI nihil = sector.getFaction( "nihil" );

nihil.setRelationship( "hegemony",     -1 );
nihil.setRelationship( "tritachyon",   -1 );
nihil.setRelationship( "pirates",      -1 );
nihil.setRelationship( "independent",  -1 );
nihil.setRelationship( "nomads",       -1 );
nihil.setRelationship( "junk_pirates", -1 );
nihil.setRelationship( "sindrian_diktat", -1);
nihil.setRelationship( "player",       -1 );




// SectorEntityToken station = system.addOrbitalStation(a1, 45, 300, 50, "Command & Control", "sindrian_diktat");
// initStationCargo(station);

// example of using custom visuals below
// a1.setCustomInteractionDialogImageVisual(new InteractionDialogImageVisual("illustrations", "hull_breach", 800, 800));
jumpPoint.setCustomInteractionDialogImageVisual(new InteractionDialogImageVisual("illustrations", "space_wreckage", 1200, 1200));
// station.setCustomInteractionDialogImageVisual(new InteractionDialogImageVisual("illustrations", "cargo_loading", 1200, 1200));

// generates hyperspace destinations for in-system jump points
system.autogenerateHyperspaceJumpPoints(true, true);

//NihilSpawnPoint patrolSpawn = new NihilSpawnPoint(sector, system, 5, 3, n1);
//system.addScript(patrolSpawn);
//for (int i = 0; i < 5; i++)
// patrolSpawn.spawnFleet();

//NihilSpawnPoint garrisonSpawn = new NihilSpawnPoint(sector, system, 1, 2, n1);
//system.addSpawnPoint(Nihilspawn);
//Nihilspawn.spawnFleet();

   // NihilSpawnPoint NihilSpawn = new NihilSpawnPoint(sector, system, 1, 2, n1);
//system.addSpawnPoint(NihilSpawn);
//Nihilspawn.spawnFleet();

NihilSpawnPoint nihilSpawn = new NihilSpawnPoint( sector, system, 1, 2, n1 );
system.addSpawnPoint( nihilSpawn );

  // for (int i = 0; i < 3; i++) nihilSpawn.spawnFleet();


// system.addScript(new IndependentTraderSpawnPoint(sector, hyper, 1, 10, hyper.createToken(-6000, 2000), station));
        
sector.registerPlugin(new CoreCampaignPluginImpl());
}


// private void initStationCargo(SectorEntityToken station) {
// CargoAPI cargo = station.getCargo();
// addRandomWeapons(cargo, 5);
//
// cargo.addCrew(CrewXPLevel.VETERAN, 20);
// cargo.addCrew(CrewXPLevel.REGULAR, 500);
// cargo.addMarines(200);
// cargo.addSupplies(1000);
// cargo.addFuel(500);
//
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "conquest_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "heron_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "heron_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "crig_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "crig_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "crig_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "ox_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "ox_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "ox_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "ox_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "ox_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "monitor_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.SHIP, "monitor_Hull"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.FIGHTER_WING, "gladius_wing"));
// cargo.getMothballedShips().addFleetMember(Global.getFactory().createFleetMember(FleetMemberType.FIGHTER_WING, "gladius_wing"));
// }

// private void addRandomWeapons(CargoAPI cargo, int count) {
// List weaponIds = Global.getSector().getAllWeaponIds();
// for (int i = 0; i < count; i++) {
// String weaponId = (String) weaponIds.get((int) (weaponIds.size() * Math.random()));
// int quantity = (int)(Math.random() * 4f + 2f);
// cargo.addWeapons(weaponId, quantity);
// }
}



Code is full of placeholders and things commented as of trying to find the damn problem.

ples halp.

4
Modding / Multi barreled weapons
« on: June 21, 2011, 09:21:24 AM »
Two questions.

1. The guardian DP, have it so the beams meet at a certain point, where in the code dose this happend? Whenever I try to make a multi barreled weapon like it it just fires straight...

2. Does the damage (in beam weapons) split up between the beams (from the diffrent barrels) or does every single beam make the stated damage from the weapon_data file? ex. 100 damage in weapon_data file, tree beams (barrels) = 300 dmg, OR 33.33 x 3?

Thanks!

5

Newest  --> HERE <--



############INCOMMING MESSAGE############


Captain.

We have just decoded a message from a gateway exploration team that was reported missing months ago. I have to say that all the data was quite corrupted when we got it but you can now view a LCF of the supposed battle, noone but you are to see this until further notice from higher up. I need not say how serious this is, as you can see in the picure above.
   You'll have to Download the full report to your terminal, we have technical problems in the D€codin# Lab %t s&%ms to ha¤((#(""12#/d1e"&"772OOoooooooo


¤w&#e###$s##END OF MESSAGE##e#%e&y#%ou#


Instructions
1. click the link in the PM
2. Unzip it
3. put it in the "mods" folder
4. Start the Spacefarer launcher and activate the mod
5. Start the mission "odd Signals"
6. ¤*5%"¤ bac¤ he¤#% w¤%#"


Features:
Spoiler
  • Three missions - Damn hard
  • Nihilic presence in the campaign
  • Seven ships for the Nihilics
  • Bunch of weapons
[close]

Edit: updated 0.22
Edit: updated 0.3 - balanced weapons, remade all playerships configurations.
Edit: updated 0.31 - balancing.
Edit: updated 0.38 - New ship types, new mission (as "the enemy")!
Edit: updated 0.38b - Fixed a problem in the new mission....
Edit: updated 0.38c - ... Fixed the mission problem for real, and fixed a few offsets on the Null.
Edit: updated 0.39 - Re balanced the mission, and ships.
Edit: updated 0.40 - Re balanced the mission again, weapons, and "fixed" the fighter shields, in that they don't have any ^^
Edit: updated 0.41 - Added new sounds! They are still not optimal in that they are .wav and BIG, the mod is now about 1.4mb.
Edit: Back from the dead! Updated to 0.75! Campaign mode is in aswell as tree new ships and some new weapons, two missions are revamped and still in!(PS let me know if the link is a dud...)
Edit: updated to 0.76 - Fixed some stats for less imbaness, and fixed some general buggyness.
Edit: updated to 0.81 - Manipulated missions to be less insane AND added a new one!

Edit: updated to 0.82(b) - Managed some Ship Systems for the Nihil Ships, fixed a little for the new version.
Edit: updated to 0.82c - missed a "," in a ships file, bad bad Dibuk
Edit: updated to 0.85 - Fixed a bunch of small stuff, added new sound for the 0-core canon, hit the big secret ship with the nerf bat.
Edit: updated to 0.85b - forgot a damn "," again... shields work again.
Edit: updated to 0.88 - Made the mod work with 6.2a, also nerfed the shields a little.
Edit: updated to 0.89 - Fixed buggy cargo and crew values, tweeked the missions (I actually won, can't have that).

Edit: updated to 0.89b - yeah, kinda the same as yesterday but for real, also added support for the most succulent "Trylobot's ship editor" as my variable strings were abominations from 0.26...
Edit: updated to 0.89c - You saw nothing...
Edit: updated to 0.90 - New ship, new gun. New ship is rare and can only be encountered in the campaign.
Edit: updated to 0.95 - The Nihil empire has emigrated to a new system, they could not stand the bright sun of Corvus.
Edit: updated to 0.96 - Well well well, the years fly by. This update mostly makes the mod playable again, had to remake the system which took HOURS (mostly due to ineptitude)
Edit: updated to 0.96a - ninja fix for trading.
Edit: updated to 0.96b - a fix for trading for real this time.
Edit: updated to 0.97 - Encounter music (2 of them, Theme and other), Descriptions (codex entries) for the ships so now you can actually read about the lore hidden in there there are even an ester egg refering to a comment in this very thread!
Edit: updated to 0.98 - Two new ships (one "wing"), new weapons, the Empire also snatched a moon, market balancing.

Now, as zero players will download a mod with no pictures; and I don't want to spoil things for you - you deside how much spoiler YOU want too try out this nifty mod.

SPOLER LEVEL: LOW

Spoiler
[close]

SPOLER LEVEL: MEDIUM

Spoiler
[close]

SPOLER LEVEL: MASSIVE

Spoiler
[close]

6
Bug Reports & Support / mission_list.csv
« on: June 20, 2011, 05:16:50 AM »
Hello!

I just got a very wierd error. I have made a mission and it works just fine when I put it with the spacefarer-core missions BUT when I but it in my mod folder i.e mods\"mymod"\data\missions\(Put it in mission_list.csv) "mission folder"\ , I get a error on game start up

---------------------------
Starfarer
---------------------------
Fatal: null
Check starfarer.log for more info.
---------------------------
OK  
---------------------------

The only change is that I move the whole thing from Spacefarer-core to the mod folder...

EDIT: well, I was to fast, the game starts and the mission loads but when I click deploy I get...

---------------------------
Starfarer
---------------------------
Fatal: 12
Check starfarer.log for more info.
---------------------------
OK  
---------------------------


EDIT EDIT: It works now, it was a error in my wings_list that made the errors, not sure what yet though.

SUPER EDIT: Oooookkkeeyy! Now I get it in the mission_list.csv there MUST be a empty new line under the last mission else it gets the "Null"-error, Good to know.

Best Regards
 /Dibuk

7
Modding / Placing weapons.
« on: June 19, 2011, 08:23:32 AM »
Hello!

I'm new to this game but I do have a habit of modding just about anything moddable. I have already made a small ship and it works just fine.
I little thing I need some advise on: is there a easy way to place hardpoints i.e weapons, finding out where they will go on the vector:
      
            "locations": [
                -27,  <------- This
                78    <--------
            ],

I have used trial and error but after some 20 restart of the game and still can't get it just right.

So, how do you do it?

Pages: [1]