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 ... 431 432 [433] 434 435 ... 706

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

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Logged

Üstad

  • Commander
  • ***
  • Posts: 131
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6481 on: May 31, 2020, 06:08:44 AM »

Spoiler
Looks like that mod also provides the source for reference. But when the game runs, it's using the compiled code from the jar. In that case, changing that code wouldn't do anything, you'd need to recompile it and replace the jar.
I don't want to derail the thread but how to do what you're saying in this post? I really don't know where to look, any help would be appreciated. Thanks for help  :)

You are editing a part of the provided source code that is not actually loaded. Starsector loads the contents of the provided .jar file, which is the compiled version of what you are playing around with.
To compile code, you need an IDE, usually IntelliJ or Netbeans are suggested.

If you have no idea what you are doing, consider following a part of the tutorial that requires code compilation from here:
https://starsector.fandom.com/wiki/Intro_to_Modding

which will give you a better overview of how making a Starsector mod works.
You could also come join the Discord, where a lot of very helpful people can answer your questions quicker than they will be answered here.
[close]
I decompiled it with intellij idea but the file says it's read only even though I checked it and made sure it's not a read only file. It's a .class file btw.
Logged

Professor Pinkie

  • Ensign
  • *
  • Posts: 23
  • Best cupcakes in a sector!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6482 on: May 31, 2020, 09:23:01 AM »

I have created a ship, and everything works as intended. But still need some help with:

1. Description. It is looks like descriptions.csv in custom mod folder should not be edited with ordinary text editor, just like ship_data.csv. While ship_data.csv can be edited via SWE, it is looks like it can't work with descriptions. Is there any tools?

2. Tags. What shall I use to ensure:
-Non of a factions will not use this hull. Never.
-Non of markets will not sale this hull in a shop. Never.
-BP drops only as rare_bp, but with much smaller probability, like 1/20 of default BP of a same kind. Which rarity value shall I set for this?

3. Is there any possibility to make shiphull available for player-ordered building after BP is acquired, but not available for player faction's generated fleets not to use it?

Thank you!

EDIT: Typo.
« Last Edit: May 31, 2020, 09:25:08 AM by Professor Pinkie »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6483 on: May 31, 2020, 08:46:06 PM »

I decompiled it with intellij idea but the file says it's read only even though I checked it and made sure it's not a read only file. It's a .class file btw.

It sounds like you took a wrong turn somewhere. What you'd want to be doing is creating your own source file, compiling it, and also providing - in your mod - a file that points to your class instead of the vanilla one. E.G. if you were replacing an industry's code, you'd have your own version of it, and an entry in your mod's industries.csv, etc.

1. Description. It is looks like descriptions.csv in custom mod folder should not be edited with ordinary text editor, just like ship_data.csv. While ship_data.csv can be edited via SWE, it is looks like it can't work with descriptions. Is there any tools?

I don't know what external tools would work out of the box. I know excel can be configured to produce csv files the game can read, but I don't know the details. Personally I use google sheets and its "download as csv" option, so whatever format that ends up as, the game reads.

2. Tags. What shall I use to ensure:
-Non of a factions will not use this hull. Never.

As long as it's not in a blueprint package and none of the factions are configured (via their .faction file) to have it, they won't have it.

-Non of markets will not sale this hull in a shop. Never.
-BP drops only as rare_bp, but with much smaller probability, like 1/20 of default BP of a same kind. Which rarity value shall I set for this?

If you want 1/20, rarity would be 0.05.

3. Is there any possibility to make shiphull available for player-ordered building after BP is acquired, but not available for player faction's generated fleets not to use it?

I don't believe so.
Logged

Mongreal

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6484 on: June 01, 2020, 02:22:53 AM »

Hello,

I'm back on Starsector modding once again, and I was wondering how does pulse weapons works, and if there was a way to use the pulse charging effect on non pulse weapon, like a ballistic artillery. Is there an easy way around ?
Or would that involve scripting a custom behavior for the weapon as en everyframe effect (I guess checking for the charge level until it get back to 0 could work for the percentage of charge, but how can I make a weapon fire with a everyframe plugin ?)
If anyone is familiar with thoses things, feel free to pm me, thanks !
Logged

Professor Pinkie

  • Ensign
  • *
  • Posts: 23
  • Best cupcakes in a sector!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6485 on: June 01, 2020, 02:58:31 AM »

google sheets

Can't believe answer was so easy. Probably that is why I didn't try it by myself.

Thank you!

Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6486 on: June 01, 2020, 01:59:20 PM »

1. Description. It is looks like descriptions.csv in custom mod folder should not be edited with ordinary text editor, just like ship_data.csv. While ship_data.csv can be edited via SWE, it is looks like it can't work with descriptions. Is there any tools?

I don't know what external tools would work out of the box. I know excel can be configured to produce csv files the game can read, but I don't know the details. Personally I use google sheets and its "download as csv" option, so whatever format that ends up as, the game reads.

You can use a text editor to edit descriptions iirc (I used notepad) or you can use Excel or OpenOffice Spreadsheet editor. For editors you just use commas as your deliminator. (Should be one of the first settings available when opening the file).

What you can't do (at least not without caution or errors will occur) is mix and match tools. So once you choose one you mostly have to stick with it because the formats between tools cause hidden escaped characters to be misread as actual characters (my theory) when switching between formats.

In general, you have to be careful using quotes and commas when editing descriptions, and always back up your file before you make any edits. Every time. Seriously. If you get into a situation where a hidden escape character is causing an issue you won't be able to fix it to my knowledge. The file will look completely normal in a text editor but Starsector won't be able to read it correctly. For instance, if you use quotes in notepad to separate your text cells and then add nested quotes within the quotes, they have to be escaped iirc. If you use quotes to wrap your text and then open it in an editor- the quotes might disappear and they might not. Depends upon the editor. Using notepad I think I used ' as quote wrappers and " as cell wrappers. New lines are captured in notepad as well as editors.

Notepad Example:

Code
archean_avalanche,WEAPON,"A powerful strike cannon that uses the ship's own power core to generate enough energy to fire a massive projectile. Completely decimates armor. Flux inefficiency and low ammo storage prevent this weapon from dominating the sector's ballistic demand.

The avalanche is an older design most notably used by the Luddic Church, independents and pirates as a way to combat heavily armored targets with enough point defense to defend against explosive missiles that would otherwise perform the same role. The weapon must draw a non-insignificant amount of power from the defensive shield systems to effectively maintain prolonged fire.

Even if the clip size was larger, most vessel's power cores would be severely stressed by more than a couple of these weapons installed.",Strike,,
« Last Edit: June 01, 2020, 02:01:34 PM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6487 on: June 01, 2020, 02:56:05 PM »

Hello,

I'm back on Starsector modding once again, and I was wondering how does pulse weapons works, and if there was a way to use the pulse charging effect on non pulse weapon, like a ballistic artillery. Is there an easy way around ?
Or would that involve scripting a custom behavior for the weapon as en everyframe effect (I guess checking for the charge level until it get back to 0 could work for the percentage of charge, but how can I make a weapon fire with a everyframe plugin ?)
If anyone is familiar with thoses things, feel free to pm me, thanks !

Pulse weapons are extremely deprecated so I'd recommend not using them. Unless you just mean adding a chargeup time  to a weapon firing? Or do you mean the (very, very old) "hold button to charge, release to fire" behavior?
Logged

Professor Pinkie

  • Ensign
  • *
  • Posts: 23
  • Best cupcakes in a sector!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6488 on: June 02, 2020, 08:22:16 AM »

One more question: is it possible to change a frontal shield direction? Particularly, can I made a rear shield instead of a front?

I know, I can just rotate a sprite and pilot ship backward. Also, I can add an invisible module with shield emitter, similar to station modules. But redirection of a frontal shield would give the best gameplay experience.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6489 on: June 02, 2020, 11:03:56 AM »

It's not possible, no. Even if it were, the ship's AI wouldn't really be aware of it, so that would be a problem...
Logged

Professor Pinkie

  • Ensign
  • *
  • Posts: 23
  • Best cupcakes in a sector!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6490 on: June 03, 2020, 08:58:30 AM »

It's a pity! That would be a really interesting concept.

Anyway, thanks for putting up with my stupid questions. let it be of no use to community, the process itself is very, very interesting to me.
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6491 on: June 04, 2020, 02:44:01 AM »

Is there a way to force a ship to render over another/ alter its render level?

Obviously this isn't possible normally, but I have a ship that's set to fighter collisionclass on creation.
Before, it would render above everything , so it looked like it was flying over other ships. I don't know what I did, but that doesn't seem to be the case anymore, and now it only renders over ships that are above its weight class (it's a frigate), and when it flies over other frigates, it goes below them

its really triggering my OCD, any help would be appreciated

EDIT: I made a new game and it works, ship flies over everything...didn't touch the script or anything..weeeird

« Last Edit: June 04, 2020, 02:49:15 AM by shoi »
Logged

peeaa

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6492 on: June 04, 2020, 11:52:53 AM »

How do I overwrite faction files of vanilla starsector and the faction files of other mods? I have all the faction files and the portraits done but I can't get the game the overwrite the old portraits from other mods or the vanilla game.

mod_info looks like this, probably done way wrong:

{
   "id":"portraits2", # internal id
   "name":"Portrait Pack CUSTOM", # displayed to the player
   "version":"v2",
   "description":"Adds way more portraits for the campaign for player choice.",
   "gameVersion":"0.8a",
"replace":["data/world/factions/player.faction",],
"replace":["data/world/factions/hegemony.faction",],
"replace":["data/world/factions/independent.faction",],
"replace":["data/world/factions/kinghts_of_ludd.faction",],
"replace":["data/world/factions/lions_guard.faction",],
"replace":["data/world/factions/luddic_church.faction",],
"replace":["data/world/factions/luddic_path.faction",],
"replace":["data/world/factions/persean_league.faction",],
"replace":["data/world/factions/pirates.faction",],
"replace":["data/world/factions/poor.faction",],
"replace":["data/world/factions/scavengers.faction",],
"replace":["data/world/factions/sindrian_diktat.faction",],
"replace":["data/world/factions/sleeper.faction",],
"replace":["data/world/factions/tritachyon.faction",],
"replace":["mods/Blackrock Drive Yards/data/world/factions/blackrock_Driveyards.faction",],
"replace":["mods/Blackrock Drive Yards/data/world/factions/br_consortium.faction",],
"replace":["mods/HMI/data/world/factions/brighton.faction",],
"replace":["mods/HMI/data/world/factions/hmi.faction",],
"replace":["mods/Underworld/data/world/factions/cabal.faction",],
"replace":["mods/DIABLEAVIONICS/data/world/factions/diableavionics.faction",],
"replace":["mods/Shadowyards/data/world/factions/shadow_industry.faction",],
"replace":["mods/tahlan/data/world/factions/tahlan_legioinfernalis.faction",],
}
« Last Edit: June 04, 2020, 02:20:56 PM by peeaa »
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6493 on: June 04, 2020, 07:37:39 PM »

How do I overwrite faction files of vanilla starsector and the faction files of other mods? I have all the faction files and the portraits done but I can't get the game the overwrite the old portraits from other mods or the vanilla game.

You can't override faction files of other mods. You just have to change the files in the mod itself (personal use only - do not publish the changes without author permission).

For vanilla, here is the implementation: (So the replace section is all one entry with commas separating each replaced file path. The final entry should not have a comma.

  "replace":[
          "data\\world\\factions\\pirates.faction",
          "data\\world\\factions\\neutral.faction",
          "data\\world\\factions\\hegemony.faction",
          "data\\world\\factions\\independent.faction",
          "data\\world\\factions\\player.faction",
          "data\\world\\factions\\sindrian_diktat.faction",
          "data\\world\\factions\\knights_of_ludd.faction",
          "data\\world\\factions\\luddic_church.faction",
          "data\\world\\factions\\luddic_path.faction",
          "data\\world\\factions\\persean_league.faction",
          "data\\world\\factions\\tritachyon.faction",
          "data\\world\\factions\\remnants.faction",
          "data\\world\\factions\\scavengers.faction",
          "data\\world\\factions\\lions_guard.faction",
          "data\\world\\factions\\derelict.faction",
          "data\\world\\factions\\poor.faction",
          "data\\world\\factions\\sleeper.faction"]
Logged

Fen

  • Ensign
  • *
  • Posts: 11
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6494 on: June 04, 2020, 09:05:06 PM »

Has anyone attempted to make a mod that lets you build hullmods into a hull permanently? How difficult would that be to do?
Logged
Pages: 1 ... 431 432 [433] 434 435 ... 706