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: Simulator Enhancements (03/13/24)

Pages: 1 ... 494 495 [496] 497 498 ... 706

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

ElPresidente

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7425 on: May 19, 2021, 11:41:13 PM »

As I'm fixing up a mod and goig trough the log files, I find errors liek these:

Code
519913 [Thread-3] WARN  com.fs.starfarer.ui.impl.CargoTooltipFactory  - Error figuring out MIRV spec details for [mis-uin-frag-med]
org.json.JSONException: JSONObject["emp"] not found.
at org.json.JSONObject.get(JSONObject.java:406)
at org.json.JSONObject.getDouble(JSONObject.java:445)
at com.fs.starfarer.ui.impl.CargoTooltipFactory.o00000(Unknown Source)
at com.fs.starfarer.ui.impl.CargoTooltipFactory$4.createImpl(Unknown Source)
at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.create(Unknown Source)
at com.fs.starfarer.ui.impl.StandardTooltipV2Expandable.beforeShown(Unknown Source)
at com.fs.starfarer.ui.o00O.showTooltip(Unknown Source)
at com.fs.starfarer.ui.Objectsuper.o?0000(Unknown Source)
at com.fs.starfarer.ui.Objectsuper.processInput(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.campaign.ui.trade.CargoDataGridView.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.e$Oo.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.e.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.campaign.ui.oOoO.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.coreui.k.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.class.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.Oo0O.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.K.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.Oo0O.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.newui.Stringsuper.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.ui.v.dispatchEventsToChildren(Unknown Source)
at com.fs.starfarer.ui.v.processInputImpl(Unknown Source)
at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.processInput(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The strange this that the weapon does not have EMP damage, (in the weapon_data) nor does the word emp show up in the weapon file or the projectile file?
Logged

ElPresidente

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7426 on: May 19, 2021, 11:59:13 PM »

I'm in the process of updating my mod. For some reason, one of the three solar systems added, should appear south-west of Eos star. Instead, it falls next to Hybrasil star. I tried change the coordinates in starmap.json to no avail. The system addition predate the current 0.95 version, and have always been working fine. Have any idea of what may be wrong?

Thanks!

I'm having the same issue.
2 of my systems just show up in wrong places.

I checked all of the scripts and the ONLY place coordiantes are ever mentioned is starmap.json
The gen script just imports the individual system files, generates them, and assigns faction relations.

The game dumps 3 systems into one pace, so it gets crowded.

Code
		"vns_vaynar": [10000,15000],
"vns_gammadraconis": [8000,17000],
"isa_argos": [13000,13000],
"isa_shington": [15000,15000],
"rsf_lomonosov": [11000,18000],
"rsf_barnard": [14000,19000],
"rsf_vega": [12000,21000],
"uin_centronom": [6500,13000],
"uin_achiles": [7500,15000],
"xle_procyon": [5000,21000],   <---- these two basically end up close to Mayasura, overlaping that TRi-tach system to it's upper right.
"xle_uomoz": [6000,19000],
"ffs_impalo": [2000,14000],
"ffs_kores": [1000,16000], <--- these two

Logged

ElPresidente

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7427 on: May 20, 2021, 12:21:42 AM »

I'm on a roll, so another question:

I have the modPlugin script that also sets this up:

Code
   @Override
    public void onNewGameAfterEconomyLoad() {
        MarketAPI market = Global.getSector().getEconomy().getMarket("avalon");
        if (market != null) {
            PersonAPI admin = Global.getFactory().createPerson();
            admin.setFaction("VNS");
            admin.setGender(Gender.MALE);
            admin.setPostId(Ranks.POST_FACTION_LEADER);
            admin.setRankId(Ranks.FACTION_LEADER);
            admin.getName().setFirst("Gabriel");
            admin.getName().setLast("Algar");
            admin.setPortraitSprite("graphics/portraits/prt_vns_algar.png");

            market.setAdmin(admin);
            market.getCommDirectory().addPerson(admin, 0);
            market.addPerson(admin);
        }
    }


It works, but the portrait does not show up.
The portrait's path is correct, it's the same format as all others...
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 816
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7428 on: May 20, 2021, 05:42:19 AM »

What does the "restricted", "req_military" and "merc" tags do?
I'm assuming "hist1t" and "hist2t" are story related to the historian and what types of blueprints are available from him/her. And "auto_rec" is what ships can be recovered from Automated Ships?
restricted is for hiding things in the Codex, missions, and the campaign menu dialog.
hist1t/2t, yeah, you got it - it's the tier of item for the historian, determined by how many times you've donated to him or her.
And, correct re: auto_rec.
I'm sorry if I missed it but was there an answer to what "req_military" and "merc" tags do?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7429 on: May 20, 2021, 09:41:57 AM »

Haha that's very kind of you to think I can do that by I don't have this kind a skill :)
I dug a bit on the problem. It seems the system is actually landing at the 0,0 x,y coordinate on the star map. I tested with an old version of my mod and generate the same problem. Since it never happened before, my guess is it seems related to the 0.95 version of Starsector, but I have no idea why.

Hmm - nothing else comes to mind, unfortunately. I'd suggest maybe finding the simplest mod you can that does this successfuly and trying to figure out what the difference is.


519913 [Thread-3] WARN  com.fs.starfarer.ui.impl.CargoTooltipFactory  - Error figuring out MIRV spec details for [mis-uin-frag-med]
org.json.JSONException: JSONObject["emp"] not found.

This means that the "emp" field is missing in the mirv split definition for that weapon, in the .proj file for the first stage.


It works, but the portrait does not show up.
The portrait's path is correct, it's the same format as all others...

Probably because the portrait isn't actually loaded by the game. It needs to either be present in a .faction file, or in one of the subsections in the "graphics" section of settings.json, for it to actually be loaded by the game.


I'm sorry if I missed it but was there an answer to what "req_military" and "merc" tags do?

Ah no, I just missed it.

"merc" is a tag used by the mercenary faction, so stuff tagged with that is available to it. Generally only the top-tier stuff is flagged with this. This faction is used for some of the fleets you encounter during the story, and for some of the top-end bounties.

"req_military" means a hull is sold *only* on military submarkets.
Logged

ElPresidente

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7430 on: May 20, 2021, 11:00:29 AM »

This means that the "emp" field is missing in the mirv split definition for that weapon, in the .proj file for the first stage.

Thanks, odd, since no EMP damage is defined. I'll check.

OK, I've done NOTHING and the warnings in the log are no more....


Quote
It works, but the portrait does not show up.
The portrait's path is correct, it's the same format as all others...

Probably because the portrait isn't actually loaded by the game. It needs to either be present in a .faction file, or in one of the subsections in the "graphics" section of settings.json, for it to actually be loaded by the game.

from my (well, not "mine" mine, I'm fixing an abandoned mod) settings.json, under graphics:

      "characters":{
         "algar":"graphics/portraits/prt_vns_algar.png",
         "forsythe":"graphics/portraits/prt_vns_m_22.png",
      },   


I guess I should just cal "algar" in the script?


And to go back to my earlier question - I call a sound from everyFrame, since I'm checking special weapon animation and callig weapon sounds from the weapon file doesn't work in this case. How do I force it to play until the end before re-starting?
« Last Edit: May 20, 2021, 11:09:09 AM by ElPresidente »
Logged

shoi

  • Admiral
  • *****
  • Posts: 649
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7431 on: May 20, 2021, 05:54:56 PM »

Is there a way to make a ship unable to capture objectives?
Logged

MajorTheRed

  • Captain
  • ****
  • Posts: 288
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7432 on: May 21, 2021, 07:24:07 AM »

Quote
Quote from: MajorTheRed on May 19, 2021, 11:30:48 AM

    Haha that's very kind of you to think I can do that by I don't have this kind a skill :)
    I dug a bit on the problem. It seems the system is actually landing at the 0,0 x,y coordinate on the star map. I tested with an old version of my mod and generate the same problem. Since it never happened before, my guess is it seems related to the 0.95 version of Starsector, but I have no idea why.


Hmm - nothing else comes to mind, unfortunately. I'd suggest maybe finding the simplest mod you can that does this successfuly and trying to figure out what the difference is.

Alex, I found the problem, here is the solution just in case:

It very silly: in the name.java file in data/script/world/systems/ there was a caps missing in the following line:
      PlanetAPI byzos_star = system.initStar("byzos", // unique id for this star
In my case, "Byzos" was initially missing a caps on the "b", so I ended up with something like that:
      PlanetAPI byzos_star = system.initStar("Byzos", // unique id for this star

Please note that I make some tries with the Nakara system file just to check where was the problem. It has the same spelling problem.

Thanks again for the support!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7433 on: May 21, 2021, 12:03:04 PM »

from my (well, not "mine" mine, I'm fixing an abandoned mod) settings.json, under graphics:

      "characters":{
         "algar":"graphics/portraits/prt_vns_algar.png",
         "forsythe":"graphics/portraits/prt_vns_m_22.png",
      },   


I guess I should just cal "algar" in the script?

What you're doing looks right, so I'm not sure. You would *not* pass in "algar" to that method. You might instead pass in Global.getSettings().getSpriteName("characters", "algar") but that would be the same as just passing in the path to the sprite. Make sure the sprite actually exists, I guess, and is named exactly what's type into the other files, including capitalization?

And to go back to my earlier question - I call a sound from everyFrame, since I'm checking special weapon animation and callig weapon sounds from the weapon file doesn't work in this case. How do I force it to play until the end before re-starting?

If you want to play a loop, you'd call playLoop(). Or if your sound doesn't loop, you could track how long it's been and play it every so often instead of on every frame.


Is there a way to make a ship unable to capture objectives?

I don't think so.

Alex, I found the problem, here is the solution just in case:

It very silly: in the name.java file in data/script/world/systems/ there was a caps missing in the following line:
      PlanetAPI byzos_star = system.initStar("byzos", // unique id for this star
In my case, "Byzos" was initially missing a caps on the "b", so I ended up with something like that:
      PlanetAPI byzos_star = system.initStar("Byzos", // unique id for this star

Please note that I make some tries with the Nakara system file just to check where was the problem. It has the same spelling problem.

Thanks again for the support!

Ah, thanks! Naraka is fine because it's lowercased both in starmap.json and as the id. Doesn't matter which way you go, as long as it's consistent.
Logged

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7434 on: May 22, 2021, 02:04:04 AM »

Skins:These are just a shorthand for defining new hulls. The game takes the .skin file and creates a new hull based on that; for almost every purpose within the game, it's treated as an entirely separate hull. You can't change skins for a ship once you have it, for example. "Skin" might be slightly misleading as it encompasses more than just appearance. Skins can, for example change/remove weapon and engine slots, change the OP/deployment points/price, add/remove built in hull mods and weapons. Skins can not change the bounds or weapon slot locations, and also can't change the ship's system (the latter, at least for the moment).
So.. reading this.. how do I change deployment points on a .skin ship.

Aramoro

  • Ensign
  • *
  • Posts: 48
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7435 on: May 22, 2021, 10:57:14 AM »

Hey any1 know how i can add Blueprints to a factions military base/shop?



Quote
So.. reading this.. how do I change deployment points on a .skin ship.
that is a good question

as far as i know its under "supplies/rec" in the .csv, but will it work in skins too?

try:

"supplies/rec" :insert_number ,

Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7436 on: May 22, 2021, 12:48:07 PM »

So.. reading this.. how do I change deployment points on a .skin ship.

Doesn't look like you can, actually, either directly in the skin or with a hullmod.

Hey any1 know how i can add Blueprints to a factions military base/shop?

You'd want to add them directly to the military submarket's cargo, probably by using a SubmarketInteractionListener (and adding it to SectorAPI.getListenerManager().
Logged

Aramoro

  • Ensign
  • *
  • Posts: 48
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7437 on: May 22, 2021, 03:57:12 PM »

So.. reading this.. how do I change deployment points on a .skin ship.
Doesn't look like you can, actually, either directly in the skin or with a hullmod.
looks like u need to add the skin as a new ship instead, the colossus II and III are added like this too, they have different dp costs, now we know wy

Hey any1 know how i can add Blueprints to a factions military base/shop?

You'd want to add them directly to the military submarket's cargo, probably by using a SubmarketInteractionListener (and adding it to SectorAPI.getListenerManager().

thx, but i was thinking there was an easier way, still its wort looking into, it could be useful for a lot of things
Logged

Inhilicon

  • Lieutenant
  • **
  • Posts: 61
  • I like when the ship
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7438 on: May 22, 2021, 06:40:04 PM »

Can you have a low-tech or midline ship use Plasma Jets and can you have a high-tech ship use Burn Drive? What are the colors of the jets for low-tech and midline ships?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7439 on: May 22, 2021, 07:38:50 PM »

Can you have a low-tech or midline ship use Plasma Jets and can you have a high-tech ship use Burn Drive? What are the colors of the jets for low-tech and midline ships?

You can, yeah. IIRC Burn Drive keeps the engine color being whatever it is, while Plasma Jets shifts it towards green, regardless of the ship's normal engine color. You can check the relevant .system file for details (Plasma Jets is defined in microburn.system, btw.)
Logged
Pages: 1 ... 494 495 [496] 497 498 ... 706