Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 532 533 [534] 535 536 ... 710

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

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7995 on: September 29, 2021, 12:41:33 AM »

Is there a way to add "gas giant" condition to a planet(or in this case, station)? Specifically, the one that allows Plasma Dynamo to work properly. I tried "GAS_GIANT" and it doesn't exist.

The market conditions are defined in data/campaign/market_conditions.csv

I checked, and it seems there’s no defined Gas Giant condition. Which is odd, because Plasma Dynamo in ItemEffectsRepo defined “GAS_GIANT” and “NOT_A_GAS_GIANT” which I don’t know how it defines as a gas giant.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3020
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7996 on: September 29, 2021, 05:03:11 AM »

Whether a planet type is a gas giant or not is defined in planets.json.
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7997 on: September 29, 2021, 05:06:50 AM »

Whether a planet type is a gas giant or not is defined in planets.json.

Well, then is it possible to list a market as a gas giant for Plasma Dynamo compatibility?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3020
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7998 on: September 29, 2021, 05:22:43 AM »

No. It checks the planet, not the market.

You might be able to override Plasma Dynamo's implementation so it looks for a market condition instead, but I'm not 100% sure of that.
« Last Edit: September 29, 2021, 05:27:32 AM by SafariJohn »
Logged

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7999 on: September 29, 2021, 05:43:37 AM »

Well for one I know that TASC's stations are considered gas giants, and the market I am talking about is a station so I'm not sure if they count as gas giants too
Logged

Helldiver

  • Captain
  • ****
  • Posts: 382
  • space fruit
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8000 on: September 30, 2021, 04:36:44 AM »

Question related to fixed derelict spawns as I try to fix something:

I went into Galatia.java in data\scripts\world\systems and changed the fixed derelicts that spawn in Tetra orbit in the various addDerelict lines, for example:
addDerelict(system, tetra, "hammerhead_Balanced", ShipCondition.AVERAGE, 450f, true);
changed to
addDerelict(system, tetra, "enforcer_Outdated", ShipCondition.BATTERED, 450f, false);

However, when starting a new game the original derelicts (the guaranteed recovery Hammerhead, the two Kites etc) always spawn instead of the newly specified ones from the modified Galatia.java file - even if the "tutorial" is bypassed with a mod.

I don't know why and would like help, thanks in advance.
Logged
Afflictor bean plushie that glows purple when you squeeze it
30$

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8001 on: September 30, 2021, 06:21:30 AM »

is it possible to create a mod that allows 4x or even 10x on the campaign screen?
preferably with a different button from the 2x



also, how would one make a ship use the broadside ai more frequently?
it doesnt seem like just putting combat weapons in the big rear mounts works
it may be worth mentioning the ship i intend to do this with is a mod ship: the izar from hyperion systems
it has two large mounts, one forward one back- i want it to circle ships and broadside, considering that layout, but it seems to want to just point directly at whatever its target is, even though i put the main battery on the back (it is after all a civ turned combat sort of ship with high campaign speed, so theoretically should be powerful on the retreat)
« Last Edit: September 30, 2021, 06:39:27 AM by 6chad.noirlee9 »
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8002 on: September 30, 2021, 09:44:34 AM »

I was wondering, maybe someone has done or has attempted to do a mod, that lets you visually change the paint job on a ship?
Like change the sprite of your Paragon to Ludic colours or Hegemony. Add in stripe/fractal/tribal effects to mix it a bit.

I don't think that's really doable; if you want a decent paintjob that pretty much means you've got to have that sprite made. Slapping some patterns onto an existing hull isn't going to look good (or easily work with the engine, but that's another point...)


How would I change the required 20,000 metal requirement for a Hypershunt?

Search rules.csv for:
$metalsReq = 20000 0

And then make your own mod wit a rule with the same id that changes that number to whatever you like.


I checked, and it seems there’s no defined Gas Giant condition. Which is odd, because Plasma Dynamo in ItemEffectsRepo defined “GAS_GIANT” and “NOT_A_GAS_GIANT” which I don’t know how it defines as a gas giant.

Ah, those aren't market conditions, not necessarily/directly.

See: BaseInstallableItemEffect.getUnmetRequirements()

For details on how that all works, if you're curious.


Question related to fixed derelict spawns as I try to fix something:

I went into Galatia.java in data\scripts\world\systems and changed the fixed derelicts that spawn in Tetra orbit in the various addDerelict lines, for example:
addDerelict(system, tetra, "hammerhead_Balanced", ShipCondition.AVERAGE, 450f, true);
changed to
addDerelict(system, tetra, "enforcer_Outdated", ShipCondition.BATTERED, 450f, false);

However, when starting a new game the original derelicts (the guaranteed recovery Hammerhead, the two Kites etc) always spawn instead of the newly specified ones from the modified Galatia.java file - even if the "tutorial" is bypassed with a mod.

I don't know why and would like help, thanks in advance.

Hmm. Did you restart the application before starting a new game? Changes to these files (and in general, except for rules.csv) require the application to be restarted to take effect.

Also: if you've got mods enabled and are editing the base Galatia.java file, it's possible that a mod is overriding it.

And, finally, if you use notepad or some such, sometimes when you save it'll add a .txt extension to the file and especially if you don't have the OS set to show you file extensions that can be easy to miss.

Beyond these possibilities, nothing much comes to mind right now.


is it possible to create a mod that allows 4x or even 10x on the campaign screen?
preferably with a different button from the 2x

There's campaignSpeedupMult in settings.json. Beyond that, I'm not sure.


also, how would one make a ship use the broadside ai more frequently?
it doesnt seem like just putting combat weapons in the big rear mounts works
it may be worth mentioning the ship i intend to do this with is a mod ship: the izar from hyperion systems
it has two large mounts, one forward one back- i want it to circle ships and broadside, considering that layout, but it seems to want to just point directly at whatever its target is, even though i put the main battery on the back (it is after all a civ turned combat sort of ship with high campaign speed, so theoretically should be powerful on the retreat)

I really can't say - I don't think you can, but maybe someone with more modding experience/broadside ships knows some tricks. That's a bit off-topic for this thread, though.
Logged

Negheve

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8003 on: September 30, 2021, 09:56:34 AM »

Is there a method for setting the battlesize (that works not just onGameLoad), something like a set version of
Code
Global.getSettings.getBattleSize()
?
Logged

Helldiver

  • Captain
  • ****
  • Posts: 382
  • space fruit
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8004 on: September 30, 2021, 10:07:04 AM »

Hmm. Did you restart the application before starting a new game? Changes to these files (and in general, except for rules.csv) require the application to be restarted to take effect.

Also: if you've got mods enabled and are editing the base Galatia.java file, it's possible that a mod is overriding it.

And, finally, if you use notepad or some such, sometimes when you save it'll add a .txt extension to the file and especially if you don't have the OS set to show you file extensions that can be easy to miss.

I only edit files without the application running so no problem there.
The file type wasn't tampered with, it's still proper JAVA.

I tried a different approach of restoring the default vanilla file and instead making a small mod that includes the modified Galatia.java file (with proper arborescence and mod structure) to see if it would override the vanilla one but that didn't work either.

I don't have any other mods with a Galatia.java that would override it, but I am guessing that there are other ways that mods could tamper with the fixed derelicts in that system without it? Any pointers to find how or should I just trial-and-error it?

Thank you for your time and helping my dumb ass with this.
« Last Edit: September 30, 2021, 10:11:50 AM by Helldiver »
Logged
Afflictor bean plushie that glows purple when you squeeze it
30$

Alex

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

Hmm, that's really weird. I'd suggest - just as a quick test - making some really guaranteed-not-to-compile edits (just, like, jam on your keyboard mid-file) to Galatia.java in vanilla. And then disabling any mods you might have - to rule them out as a possible contributor, regardless of whether they provide the file or not - and trying to run the game. It should get all the way through the progress bar and then crash trying to compile the intentionally-broken Galatia.java.

If that *doesn't* happen it would be an indicator that whatever you're editing is not what the game is using. If it does break, you have a starting point to work from and can add things in one by one to see what doesn't work, etc.
Logged

Helldiver

  • Captain
  • ****
  • Posts: 382
  • space fruit
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8006 on: September 30, 2021, 11:55:16 AM »

Found the problem.
The Adjusted Sector mod's source.jar contains .class files for various vanilla systems including Galatia. I never looked into this jar as this mod doesn't override derelicts added by other mods to the same systems and never realized it could be the issue.

Thank you for your time. There's many things I don't like about this game's development (or have grown to dislike over the years) but one thing I can never criticize is the help you provide to modders.
Cheers :)
Logged
Afflictor bean plushie that glows purple when you squeeze it
30$

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24111
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8007 on: September 30, 2021, 12:38:21 PM »

:) Glad you got it figured out!
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8008 on: September 30, 2021, 01:34:15 PM »

...
Thanks, using your code I was able to build something much simpler.
Code
Global.getSector().getPlayerFaction().getPortraits(FullName.Gender.MALE).remove(Global.getSector().getPlayerPerson().getPortraitSprite()); 
Global.getSector().getPlayerFaction().getPortraits(FullName.Gender.FEMALE).remove(Global.getSector().getPlayerPerson().getPortraitSprite());

presidentmattdamon

  • Commander
  • ***
  • Posts: 249
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8009 on: September 30, 2021, 02:01:25 PM »

is there an easy way to determine the parent fleet member of a ship module? is it as simple as MutableShipStatsAPI.getFleetMember(), or do i have to get to the parent ship somehow?
Logged
Pages: 1 ... 532 533 [534] 535 536 ... 710