Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 529 530 [531] 532 533 ... 710

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7950 on: September 14, 2021, 10:17:37 AM »

the way i am using it is:

Ah, alright - it's possible what's in dev is working a bit differently, then.


But when it is built in only the CargoMod updates, the ballistic mod doesn't update (nay!).

Argh! After a bunch of digging, it looks like there's a vanilla bug here; fixed it up.

(Interestingly, I think if you build in reinforced bulkheads, then save and reload, it should apply the bonus, I believe.)
Logged

Great Wound

  • Captain
  • ****
  • Posts: 278
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7951 on: September 14, 2021, 12:40:42 PM »

Argh! After a bunch of digging, it looks like there's a vanilla bug here; fixed it up.

(Interestingly, I think if you build in reinforced bulkheads, then save and reload, it should apply the bonus, I believe.)

Ah. Fair enough. Good to know it should be sorted.

Saving and reloading works even without bulkheads.

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7952 on: September 14, 2021, 09:01:45 PM »

I have engines that are color 255,125,25,255. I want to change them to 170,220,222,255 using ShipEngineControllerAPI.fadeToOtherColor(). What inputs do I need? Is it even possible? All I can get are shades of violet.
Logged

dcong89

  • Ensign
  • *
  • Posts: 40
  • Work Hard Play Hard
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7953 on: September 15, 2021, 04:54:44 AM »

sorry guys, i've got a problem but dont know how .The weapons everyship when firing it's fire backward and forward for example in attachement.



[attachment deleted by admin]
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7954 on: September 15, 2021, 08:34:25 PM »

I've got an issue with ship sale transactions in the listener.

So the ship says it sells for so much (and this is indeed the amount of credits I get):


But ShipSaleInfo.getPrice() in the PlayerMarketTransaction lists a much lower price:
694691 [Thread-3] INFO  exerelin.campaign.intel.merc.MercContractIntel  - Sale value: 54963.996
694691 [Thread-3] INFO  exerelin.campaign.intel.merc.MercContractIntel  - Sale value with tariff: 59910.758
694692 [Thread-3] INFO  exerelin.campaign.intel.merc.MercContractIntel  - Tariff: 0.09

Is the sale info doing something annoying like getting the ship price after the submarket cargo has already mothballed it?

sorry guys, i've got a problem but dont know how .The weapons everyship when firing it's fire backward and forward for example in attachement.
Sorry, it's not clear what's going on. Do you have a cleaner screenshot, with fewer things happening?

If the issue is what I think it is, first thing I'd check is whether the gun is actually firing in both directions (has a second fire offset in the weapon file, pointing backwards)
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7955 on: September 16, 2021, 04:22:12 AM »

I have engines that are color 255,125,25,255. I want to change them to 170,220,222,255 using ShipEngineControllerAPI.fadeToOtherColor(). What inputs do I need? Is it even possible? All I can get are shades of violet.

And today it's working the way I want. ???

Okay.
Logged

Primus

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7956 on: September 16, 2021, 05:59:54 AM »

Greetings !

I am trying to edit the Drive Field Stabilizer hull mods (to reduce a litle bit its Increase of the sensor profile, and perhaps increase the burn bonus), but I am unable to find where it is located.

I used notepad++ to search the files of the game, but I didn't find anything, does anyone knows where it is?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7957 on: September 16, 2021, 09:51:16 AM »

Is the sale info doing something annoying like getting the ship price after the submarket cargo has already mothballed it?

Yeah, that was exactly it! Fixed it up. The price should've just been passed in as a parameter to begin with, not sure how it ended up computing it twice.


Greetings !

I am trying to edit the Drive Field Stabilizer hull mods (to reduce a litle bit its Increase of the sensor profile, and perhaps increase the burn bonus), but I am unable to find where it is located.

I used notepad++ to search the files of the game, but I didn't find anything, does anyone knows where it is?

starfarer.api.zip has a bunch of source and among other things, that file is there. Keep in mind that just editing it in that file won't do anything - the source is just provided for reference. To change it, you'd need to make a mod that provides your own implementation, and a hull_mods.csv entry that points to it.
Logged

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7958 on: September 16, 2021, 04:39:29 PM »

Running into some weird stuff with mine behavior- I'm trying to make an anti-fighter mine, which necessitates having the mine not collide with friendlies. However, despite having the mine collision class and explosion collision class set to MISSILE_NO_FF, the mine will still collide with allies when it's in the windup phase. The explosion doesn't, but the mine will damage friendly ships if they run into it, and allies will try to rotate their shields towards the mine.

Is there some way to fix this, or do I just need to write an AI script that replicates the sound/flash/explosion behavior for a bomb projectile?

NuclearStudent

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7959 on: September 16, 2021, 10:37:23 PM »

Is there any way to dynamically modify the codex, planet/ship descriptions, or other such things not directly stored by rules.csv?

Specifically I'm interested in having some planetary descriptions modify based on the results of a quest.

edit:

I dropped an idiot box: the special quest ships do exactly that. I'll look at how they're implemented before asking any other questions.
« Last Edit: September 17, 2021, 08:34:57 AM by NuclearStudent »
Logged

Primus

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7960 on: September 18, 2021, 12:53:15 PM »


starfarer.api.zip has a bunch of source and among other things, that file is there. Keep in mind that just editing it in that file won't do anything - the source is just provided for reference. To change it, you'd need to make a mod that provides your own implementation, and a hull_mods.csv entry that points to it.

Thanks for your answer!

I tried to copy-paste the file so it goes inside [.]\Starsector\starsector-core\data\hullmods ; and changed the hull_mods.csv so that on the Drive Field Stabilizer line, it is written "hullmods.DriveFieldStabilizer" instead of "com.fs.starfarer.api.impl.hullmods.DriveFieldStabilizer" .
It didn't worked and crash the game at launch.  ???


On another point, I am not sure if it is the correct thread, but I am looking at the code in the saves to move star system :  I was expecting the coordinates of each star sector and the coordinates of its jump point to be somewhere in the  campaign.xml save file, but I have trouble to guess what they could be.

I tried to look for informations who are similar between two star system who are near to each other, but I didn't see anything that could be it ???.
 
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7961 on: September 18, 2021, 06:00:52 PM »

I tried to copy-paste the file so it goes inside [.]\Starsector\starsector-core\data\hullmods ; and changed the hull_mods.csv so that on the Drive Field Stabilizer line, it is written "hullmods.DriveFieldStabilizer" instead of "com.fs.starfarer.api.impl.hullmods.DriveFieldStabilizer" .
It didn't worked and crash the game at launch.  ???
Should be data.hullmods.DriveFieldStabilizer I think
(EDIT: and the package declaration at the top of the file should also be package data.hullmods;)

If it still fails, change the line
Code: java
public static final float BURN_BONUS = 1;
to
Code: java
public static final float BURN_BONUS = 1f;
If it still fails, check the error message (it'll be at the end of starsector-core/starsector.log when opened immediately following the crash).

(Also it's recommended to make your own mod rather than editing core files directly, to avoid stuff getting overwritten on a reinstall. But let's keep things simple for now.)
« Last Edit: September 18, 2021, 06:20:21 PM by Histidine »
Logged

Primus

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7962 on: September 19, 2021, 01:16:00 AM »

If it still fails, change the line
Code: java
public static final float BURN_BONUS = 1;
to
Code: java
public static final float BURN_BONUS = 1f;

It worked !!  ;D

Thanks a lot !
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7963 on: September 19, 2021, 12:51:25 PM »

Running into some weird stuff with mine behavior- I'm trying to make an anti-fighter mine, which necessitates having the mine not collide with friendlies. However, despite having the mine collision class and explosion collision class set to MISSILE_NO_FF, the mine will still collide with allies when it's in the windup phase. The explosion doesn't, but the mine will damage friendly ships if they run into it, and allies will try to rotate their shields towards the mine.

Is there some way to fix this, or do I just need to write an AI script that replicates the sound/flash/explosion behavior for a bomb projectile?

Hmm - I *think* if you call: missile.setNoFlameoutOnFizzling(true) on the mine when it's spawned then this should get around the issue.

Edit: just tried it and it seems to work. Also changed it to do this automatically for mines with MISSILE_NO_FF explosions since this behavior kind pretty much feels like a bug. Just a side effect of the mine technically "fizzling out" at some point in the process.

And, ah: you probably also want to call "missile.setNoMineFFConcerns(true)", that may or may not be necessary to get friendly ships to stop reacting to it as if it was a danger.
« Last Edit: September 19, 2021, 12:56:00 PM by Alex »
Logged

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7964 on: September 19, 2021, 06:53:21 PM »

Hmm - I *think* if you call: missile.setNoFlameoutOnFizzling(true) on the mine when it's spawned then this should get around the issue.

Edit: just tried it and it seems to work. Also changed it to do this automatically for mines with MISSILE_NO_FF explosions since this behavior kind pretty much feels like a bug. Just a side effect of the mine technically "fizzling out" at some point in the process.

And, ah: you probably also want to call "missile.setNoMineFFConcerns(true)", that may or may not be necessary to get friendly ships to stop reacting to it as if it was a danger.

setNoFlameoutOnFizzling doesn't appear to be exposed in the API. Fortunately, it seems that setting the missile's collision class to MISSILE_NO_FF every frame also fixes it. I can also confirm the second part works. Thanks!
Pages: 1 ... 529 530 [531] 532 533 ... 710