Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 698 699 [700] 701 702 ... 709

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

Histidine

  • Admiral
  • *****
  • Posts: 4681
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10485 on: February 18, 2024, 05:45:50 PM »

Been looking at the new Colony Crises code and FleetGroupIntel. Wondering:

FGI spawns fleets immediately and never abstracts them like with normal route-managed fleets. Should I be concerned about performance if there are a bunch of large events going on at once (possibly more than a dozen, going by some screenshots I've seen)?

Is there a way to detect when a major crisis event fires or its FGI has been generated?
Logged

alaricdragon

  • Commander
  • ***
  • Posts: 156
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10486 on: February 19, 2024, 11:38:53 AM »

hello again everyone. its me. again. with more questions and things.
1) is there a way to get the Strings contained within a given 'TooltipMakerAPI'?
2) is there a way to get the Strings from a given 'BaseIntelPlugin'? (pacifically, the text that would display on the right hand of the screen when you click on it)
thanks everyone who answered my questions in the past. I know sometimes my questions are weird.
Logged

Zisko

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10487 on: February 19, 2024, 12:15:13 PM »

Hello, how can I stop the launcher from disabling my mods which are not flagged for current version? I know I can change the version in the json file, but dont want to do that with ~35 mods. Would be easier to just stop the game from disabling them everytime I start the game.
Thanks in advance!
Logged

Kaysaar

  • Captain
  • ****
  • Posts: 387
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10488 on: February 20, 2024, 12:34:16 AM »

Is there any way to increase salary of individual administrator?
Logged

NeoLemon

  • Ensign
  • *
  • Posts: 27
  • Y E S
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10489 on: February 20, 2024, 11:17:35 AM »

how did you put the administrator alpha core effect on Culann? I wanna replicate that for secret conspiratory Hegemony systems, to add a theme of hypocrisy amongst their ranks.

Take a look at People.java.


This probably breaks a lot of mod guidelines, but I was wondering if someone could point me in the direction of how I can overwrite a standard api used in the game with my own.

My java knowledge is a little bit limited, and I don't even know the terms to google. In short - I would for example like to exchange in com.fs.starfarer.api.combat the Interface DamageAPI with my own, so that my version of it is called by everything, and not the standard one.

I think that's not playing nicely with other mods, but that's oki - I don't try to make something particularly "useable" - just goofing around. (I also don't want to overwrite the original files)

Where do I start with this?

*This is the sort of thing where it *might* be barely possible for someone that really knows what they're doing, but it'd be pretty complicated and would require some very intimate java knowledge. I wouldn't recommend trying it, it seems like a pretty massive undertaking.)


Need help or direction in making a mod.
I want a mod where at the start of the game, when choosing your fleet, you have the option of a phase fleet, which has 1 Doom, 1 Revenant and 1 Phantom.

Any help would be helpful, I dont mind trying to make the mod myself.

Hmm, load up rules.csv in a spreadsheet editor (preferably google sheets, or possibly the rules-editing tool that's floating around on the forum), and look for "NGCAddShip".

Hi alex, i want to ask few question

Been tinkering around fleetspawner, how do exactly vanilla scavenger fleet spawned on populated or unpopulated area? it is spawned the same way as lions guard fleet?
also how do you spawn specific kind of fleet size or type, indepedently from global faction ship quality/doctrine modifier?

Do it coded to spawn in system with junk/salvage belt on it?

 if its. then is there a tools to make "artificial" junk belt that counted as salvage cloud but cannot salvaged both by player or AI (just for trigger scav fleet spawn)

Or a way to make indepedent scav fleet to dock and using your colony as it return and starting base? i kinda want to have indepedent scav fleet that dock and circling around a colony, Thanks!

Logged

VladimirVV

  • Lieutenant
  • **
  • Posts: 80
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10490 on: February 20, 2024, 08:59:47 PM »

Hello everyone,

Here is Vladimir VV, I'm trying to make new star systems by mimicking the vanilla game way (just to get more familiar with how everything works).

So far, what I know is that the campaign/starmap file includes the positions of the systems on the large map, the campaign/econ file includes all the planet conditions and industry conditions we want, and scripts/world/systems folder contains the files including all the system entities we want. Then we can call the system generators in the ModPlugin file to generate the system. But how about the markets? I could generate administrators for each market in the ModPlugin file, but I don't know how the markets are generated.

I implemented a system using the knowledge I have, and it worked as expected, the system was generated at the expected spot with expected entities. But the markets were lost, for some reason the game ignored my campaign/econ file. Is there anyway to fix that? By the way, how about the colony administrators, is there any other simple way to add it besides using the ModPlugin file?

Any help would be appreciated.
Logged
Greetings from the P-Space! --Captain Vladimir

LngA7Gw

  • Lieutenant
  • **
  • Posts: 88
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10491 on: February 20, 2024, 09:44:43 PM »

Been tinkering around fleetspawner, how do exactly vanilla scavenger fleet spawned on populated or unpopulated area? it is spawned the same way as lions guard fleet?

Check out RuinsFleetRouteManager

Or a way to make indepedent scav fleet to dock and using your colony as it return and starting base? i kinda want to have indepedent scav fleet that dock and circling around a colony, Thanks!

Every market, including your own, already generates scavengers?
Logged

NeoLemon

  • Ensign
  • *
  • Posts: 27
  • Y E S
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10492 on: February 21, 2024, 04:36:51 AM »

Been tinkering around fleetspawner, how do exactly vanilla scavenger fleet spawned on populated or unpopulated area? it is spawned the same way as lions guard fleet?

Check out RuinsFleetRouteManager

Or a way to make indepedent scav fleet to dock and using your colony as it return and starting base? i kinda want to have indepedent scav fleet that dock and circling around a colony, Thanks!

Every market, including your own, already generates scavengers?

Thanks! every market automatically generates your own scavenger? how to determine the size of scav fleet spawned on it?
Logged

VladimirVV

  • Lieutenant
  • **
  • Posts: 80
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10493 on: February 21, 2024, 11:41:56 AM »

Hello everyone,

Here is Vladimir VV, I'm trying to make new star systems by mimicking the vanilla game way (just to get more familiar with how everything works).

So far, what I know is that the campaign/starmap file includes the positions of the systems on the large map, the campaign/econ file includes all the planet conditions and industry conditions we want, and scripts/world/systems folder contains the files including all the system entities we want. Then we can call the system generators in the ModPlugin file to generate the system. But how about the markets? I could generate administrators for each market in the ModPlugin file, but I don't know how the markets are generated.

I implemented a system using the knowledge I have, and it worked as expected, the system was generated at the expected spot with expected entities. But the markets were lost, for some reason the game ignored my campaign/econ file. Is there anyway to fix that? By the way, how about the colony administrators, is there any other simple way to add it besides using the ModPlugin file?

Any help would be appreciated.

OK, I found an answer myself. If anyone has similar question, here is a solution:

There is actually an economy.json file, we just need to add the system econ json file into that economy.json to let the game recognize it.
Logged
Greetings from the P-Space! --Captain Vladimir

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24105
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10494 on: February 21, 2024, 12:50:44 PM »

Been looking at the new Colony Crises code and FleetGroupIntel. Wondering:

FGI spawns fleets immediately and never abstracts them like with normal route-managed fleets. Should I be concerned about performance if there are a bunch of large events going on at once (possibly more than a dozen, going by some screenshots I've seen)?

Is there a way to detect when a major crisis event fires or its FGI has been generated?

It doesn't spawn them immediately - there is a single RouteData that simulates their movement, and it spawns *all* of the fleets when that RouteData is close enough to the player. From that point on, the fleets all stay spawned until the end.

Re: having a bunch of large events - possibly? It depends on if they're all in the same part of the map, how many fleets there are, etc. FGI is not really intended to handle *a lot* of stuff, not on the scale of say faction-faction warfare, especially in a scenario where there are many factions. But the only way to be sure is to test it out and see.

Re: how to detect - not sure, actually. I mean beyond stuff like checking for event progress and the presence of a new FGI etc.

(Sorry about taking a while to respond, btw!)


hello again everyone. its me. again. with more questions and things.
1) is there a way to get the Strings contained within a given 'TooltipMakerAPI'?
2) is there a way to get the Strings from a given 'BaseIntelPlugin'? (pacifically, the text that would display on the right hand of the screen when you click on it)
thanks everyone who answered my questions in the past. I know sometimes my questions are weird.

Not that I can think of. Those strings could be put together with code.

(I mean, one could take a created tooltip/intel item and inspect it with reflection etc, but that's beyond the scope of this thread.)

Hello, how can I stop the launcher from disabling my mods which are not flagged for current version? I know I can change the version in the json file, but dont want to do that with ~35 mods. Would be easier to just stop the game from disabling them everytime I start the game.
Thanks in advance!

There isn't a way, sorry.


Is there any way to increase salary of individual administrator?

See: Misc.getAdminSalary() - you *might* be able to set a different admin tier and provide a different salary value in settings.json. I'm not sure if a different tier value would break something else, though.
Logged

vicegrip

  • Commander
  • ***
  • Posts: 190
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10495 on: February 21, 2024, 02:12:25 PM »

I am using a reportPlayerOpenedMarket listener to check and prune excessive numbers of a certain type of ship from appearing in submarkets visited by the player. Removing ships from submarket.getCargo().getMothballedShips().getMembersListCopy() works, but the ship list won't update until the player leaves the planet and interacts with it again. Is there a way to update the mothballed ship list prior to the player opening the submarket screen?

VladimirVV

  • Lieutenant
  • **
  • Posts: 80
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10496 on: February 22, 2024, 03:42:56 AM »

Hello everyone, I met another strange oproblem.

I was trying to add a storyline using rules.csv for one of my characters.

I created the character, set his id with a string in my ModPlugIn file. Let's say I set his Id using the code person.setId("tomas_kol"); (I didn't find any example of using setId and so I kinda went with my imaginations for this code, probably it's gonna be wrong).

Then I set his post Id and his rank Id using codes I copied from the vanilla game file. And I set him on a planet market. Let's say this planet market is A_market.

Everything in my rules.csv works just fine, I can locate the person by his PostId. (However I couldn't locate him using his Id, I don'tknow why) But at the very end of the storyline, when I'm about to modify the relation with this npc by completing the quest, and the game raises a null pointer exception. I called AdjustRepPerson tomas_kol COOPERATIVE 5 in the scripts column of my rules.csv file to raise relation.

I guess it's because somehow the person I created does not have the Id I want. (It should be tomas_kol)

Any ideas on how to deal with this bug? All suggestions will be appreciated!

BTW, I'm particularly interested in a compilation-free way. But just let me know if this problem must be solved with a jar file. Thanks!
« Last Edit: February 22, 2024, 03:49:32 AM by VladimirVV »
Logged
Greetings from the P-Space! --Captain Vladimir

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24105
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10497 on: February 22, 2024, 02:01:32 PM »

I am using a reportPlayerOpenedMarket listener to check and prune excessive numbers of a certain type of ship from appearing in submarkets visited by the player. Removing ships from submarket.getCargo().getMothballedShips().getMembersListCopy() works, but the ship list won't update until the player leaves the planet and interacts with it again. Is there a way to update the mothballed ship list prior to the player opening the submarket screen?

You might try doing this in reportPlayerOpenedMarket(), along with *maybe* calling updateCargoPrePlayerInteraction() there (if needed; not sure offhand if it would have already been called before then). This should happen before the UI is created, assuming that's the problem (which, honestly, not 100% sure, this is just off the top of my head).

Hello everyone, I met another strange oproblem.

I was trying to add a storyline using rules.csv for one of my characters.

I created the character, set his id with a string in my ModPlugIn file. Let's say I set his Id using the code person.setId("tomas_kol"); (I didn't find any example of using setId and so I kinda went with my imaginations for this code, probably it's gonna be wrong).

Then I set his post Id and his rank Id using codes I copied from the vanilla game file. And I set him on a planet market. Let's say this planet market is A_market.

Everything in my rules.csv works just fine, I can locate the person by his PostId. (However I couldn't locate him using his Id, I don'tknow why) But at the very end of the storyline, when I'm about to modify the relation with this npc by completing the quest, and the game raises a null pointer exception. I called AdjustRepPerson tomas_kol COOPERATIVE 5 in the scripts column of my rules.csv file to raise relation.

I guess it's because somehow the person I created does not have the Id I want. (It should be tomas_kol)

Any ideas on how to deal with this bug? All suggestions will be appreciated!

BTW, I'm particularly interested in a compilation-free way. But just let me know if this problem must be solved with a jar file. Thanks!

Just real quick - you probably need to add this person to Global.getSector().getImportantPeople(), and then the game would be able to find them by ID. See People.java for examples of this being done.
Logged

VladimirVV

  • Lieutenant
  • **
  • Posts: 80
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10498 on: February 22, 2024, 07:35:15 PM »

I am using a reportPlayerOpenedMarket listener to check and prune excessive numbers of a certain type of ship from appearing in submarkets visited by the player. Removing ships from submarket.getCargo().getMothballedShips().getMembersListCopy() works, but the ship list won't update until the player leaves the planet and interacts with it again. Is there a way to update the mothballed ship list prior to the player opening the submarket screen?

You might try doing this in reportPlayerOpenedMarket(), along with *maybe* calling updateCargoPrePlayerInteraction() there (if needed; not sure offhand if it would have already been called before then). This should happen before the UI is created, assuming that's the problem (which, honestly, not 100% sure, this is just off the top of my head).

Hello everyone, I met another strange oproblem.

I was trying to add a storyline using rules.csv for one of my characters.

I created the character, set his id with a string in my ModPlugIn file. Let's say I set his Id using the code person.setId("tomas_kol"); (I didn't find any example of using setId and so I kinda went with my imaginations for this code, probably it's gonna be wrong).

Then I set his post Id and his rank Id using codes I copied from the vanilla game file. And I set him on a planet market. Let's say this planet market is A_market.

Everything in my rules.csv works just fine, I can locate the person by his PostId. (However I couldn't locate him using his Id, I don'tknow why) But at the very end of the storyline, when I'm about to modify the relation with this npc by completing the quest, and the game raises a null pointer exception. I called AdjustRepPerson tomas_kol COOPERATIVE 5 in the scripts column of my rules.csv file to raise relation.

I guess it's because somehow the person I created does not have the Id I want. (It should be tomas_kol)

Any ideas on how to deal with this bug? All suggestions will be appreciated!

BTW, I'm particularly interested in a compilation-free way. But just let me know if this problem must be solved with a jar file. Thanks!

Just real quick - you probably need to add this person to Global.getSector().getImportantPeople(), and then the game would be able to find them by ID. See People.java for examples of this being done.

Thank you Alex! It helps and solves my problem! Now I got two new problems.

The first is, I need to make a global boolean value to record whether this person is met or not. Like player.metSiyavong in the vanilla game. Do I need to create a new boolean method under the class of the object player? I don't think this idea is practible.

The second is, for some reason, after I add the person to Global.getSector().getImportantPeople(), everything works well, and the person has his sprite and visual as expected when I see him on the stations. But when I tried to call ShowPersonVisual after calling ShowImageVisual tomas_kol, nothing happens. Do I need to undo the ShowImageVisual first, or is it just there is something wrong with the ShowImageVisual? I didn't find any example about doing this.

Would you please let me know whether you have any suggestions? Thank you very much!
« Last Edit: February 22, 2024, 08:08:25 PM by VladimirVV »
Logged
Greetings from the P-Space! --Captain Vladimir

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10499 on: February 23, 2024, 09:13:40 AM »

Is there anyway to remove the missile destoryed sound (after reaching its lifetime)?
Logged
My mods


Pages: 1 ... 698 699 [700] 701 702 ... 709