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: Planet Search Overhaul (07/13/24)

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 - rogerbacon

Pages: 1 [2] 3
16
Modding / Is it possible to modify which proj a weapon fires during combat
« on: December 11, 2022, 06:11:46 AM »
I want to make a weapon that has two modes, call them slug and shotgun. All the differences between them are in the proj class that the weapon fires. Is it possible to bind a hotkey that changes what proj a weapon fires and be able to call it during combat?
I see in the WeaponSpecAPI there is a GetProjectileSpec() but I don't see any setter method.

17
Modding / How to create a hullmod that provides benefit based on hull size
« on: December 08, 2022, 03:44:44 PM »
I want to create a hull mode that reduces the fuel used by small ships. I assume I do that in applyEffectsAfterShipCreation() like many examples I've seen. However, I need a reference to the shipAPI for the ship the mod is going on, right? How do I get that?
Once I have it I think I can use ship.getMutableStats().getFuelUseMod().modifyFlat(id, -1f); to do what I want.

Thanks in advance for any help.

18
I read the help file at https://starsector.fandom.com/wiki/Intro_to_Modding#Weapon_Data_files and my weapon works fine if I use the console to drop it in a campaign. However, it does not show up as a choice when refitting a ship in a mission.  I was under the assumption that all weapons in the game are available when refitting for a mission. Any idea what I've forgotten to do?

[Edit] Never mind. It's showing up now. Not sure what was happening before.

19
Modding / Weapon damage loss with range. Does it happen? Moddable?
« on: January 15, 2021, 08:16:55 AM »
Do weapons lose damage with range? If not, is it moddable?

I sort of did this but since I'm new to modding stuff here its probably not the best way.
I made an energy torpedo modeled after the Starfleet Battles plasma torpedo. In the csv it lists 1 damage but in tn the script I override OnHit and calculate the range it has traveled since launch and apply the real damage there as a formula.

I assume this would work for any projectile weapon but how would I do something similar for a beam weapon? To keep it simple let's say I want the beam weapon to do one-half damage if the target is beyond one-half of the beam's max range. Any ideas?

20
Modding / Can a hullmod add weapons to a ship
« on: January 12, 2021, 04:29:02 PM »
Is it possible for a hullmod to add weapons to a ship? I know it can add fighters so I thought a weapon might be possible.

21
Modding / How to add a hullMod to a ship in a mission (not campaign)
« on: December 29, 2020, 11:59:11 AM »
I'm creating a mission like randomBattle and I want to get each ship and add a hullMod as the ship is added to the player's fleet. How should I do this? I think I'm close but its not quite working. Here's what I've tried so far.

Code
BattleCreationContext batContext = api.getContext();
CampaignFleetAPI playerFleet = batContext.getPlayerFleet();
FleetMemberAPI ship = api.addToFleet(FleetSide.PLAYER, "astral_Elite", FleetMemberType.SHIP, false);
api.addBriefingItem("ship is " + ship.getVariant().getHullMods());
ship.getVariant().addMod("some_HullMod");

22
Modding / Vector2f not recognized
« on: December 23, 2020, 09:18:59 AM »
I have a mod I made about 4 years ago and I wanted to update it but I'm getting a "Cannot determine simple type of 'Vector2f'"

I believe I have the right import for the Vector2f class.

[Edit]. Now the error message is different.

Here is my class
http://s000.tinyupload.com/index.php?file_id=08048878206568048916

Here is the log
http://s000.tinyupload.com/index.php?file_id=28263378194853936554

The error message says :
Error compiling [data.scripts.weapons.SFB_PlasmaOnHitEffect]
java.lang.RuntimeException: Error compiling [data.scripts.weapons.SFB_PlasmaOnHitEffect]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: 1 error(s) while compiling unit "data/scripts/weapons/SFB_PlasmaOnHitEffect.java"
   at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:226)
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:178)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)



23
Bug Reports & Support / New Game: Can't get past ship selection
« on: August 08, 2016, 06:12:52 PM »
Starting a new game I select my name, my role (smuggler, bounty hunter, etc) and then select my starting ship. After that the process does not advance. I can select the ship ove and over but there is no further progress on creating the game. This is the latest version 7.2a rc 3. I can play missions just fine, however.

24
Modding / DamagingProjectileAPI getElapsed() question
« on: January 02, 2016, 03:08:53 PM »
The method getElapsed() says "Time the projectile has been alive.". Does anyone know if this is in seconds or milliseconds or something else?

25
Modding / Can I modifiy shot properties during a shot's lifetime?
« on: January 02, 2016, 06:44:16 AM »
I'm thinking of creating a weapon that fires expanding projectiles. I'd like to be able to alter the shot's size and collisionRadius over the shot's lifetime. Is this possible? Has anyone done anything like this?


26
Modding / Java question: which java files need to be compiled?
« on: January 01, 2016, 03:14:39 PM »
I made some changes to missions and the changes showed up in the game so I figured out they don't need to be complied.  Which java files must be compiled and which ones can I leave uncompiled?

27
Modding / Max character level and aptitude?
« on: January 01, 2016, 09:16:52 AM »
Where can I find the max character level and skill aptitude?

28
Suggestions / New Weapon characteristics I'd like to see.
« on: January 01, 2016, 07:23:05 AM »
To add more tactical choices to combat, as well as to vary the uniqueness of weapons, I'd like to see the following traits added to the weapon and /or shot definitions:

1 minimum range. It would be interesting if weapons also had a minimum range. This could go in the csv right next to max range.

2 Damage over range profile. Make the weapon be able to change damage over its range (usually lower at longer range). This could be a json object added to the *.wpn file with range: damage. So {500 : 1, 600: 0.8, 800, 0.2) would be a weapon that does 100% damage out to range 500, 80$ damage to range 600, and 20% damage to its max range of 800)

3 Alternative firing modes. A weapon could have more than one firing mode, activated by a hotkey (maybe ALT+#). Activating it would load a weaponmod file similar to a hullmod and modifiy the weapons characteristics as determined by the weaponMod file. So a weapon might have a regular mode and an overload mode where its damage and flux were higher and its range was shorter.

4 Seeking weapons that have their damage reduced by some ration of the PD damage they take on the way to their target. So, instead of hit points you could define a number like 0.5 meaning that every 2 points of damage the weapon took it would lose one point of warhead strength. This would make more sense for energy seeking weapons than for physical missiles.

29
Modding / Where can I get more info on wings_data.csv?
« on: December 30, 2015, 09:35:09 AM »
What do "quality" "role" and "refit" do? I assume role is to help the AI know what type of targets to go after.

What is the max size for "num"? I put in 6 for a fighter with role "FIGHTER" and it works fine but if I put in more than 3 for "BOMBER" it crashes with a worthless null pointer message.

30
Modding / Can you disable a weapon mount with a hullmod?
« on: December 29, 2015, 02:38:58 PM »
I want to make a hullmod for a specific class of ship that adds cargo pods but renders two of the ship's weapons unusable. Is that possible? It will only be for a specific class of ship so I know which weapon IDs will be affected if that makes a difference.

Pages: 1 [2] 3