Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: Hyperspace Topography (10/12/22)

Pages: 1 ... 425 426 [427] 428 429 ... 636

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

lethargie

  • Commander
  • ***
  • Posts: 181
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6390 on: May 09, 2020, 07:17:58 PM »

scaleColorOnly doesn't touch the alpha component. In this case it wouldn't matter since setAlpha overwrites it to 175 regardless, but it'd matter if a subsequent call scaled the alpha. (You can see the implementations of those methods in Misc...)

Im sorry for being probably quite ignorant. But how do I see the implementation? I found the API, but that only gives the signature of the method. Is there source code somewhere?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21223
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6391 on: May 09, 2020, 09:39:44 PM »

starfarer.api.zip in the starsector-core/ folder! I'd unzip it and tell your IDE it's a source folder so you can navigate to it more easily.
Logged

ShadowDragon8685

  • Ensign
  • *
  • Posts: 45
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6392 on: May 10, 2020, 01:38:47 AM »

I tried to add some fluff (and other things) to the Hybrasil system.

Most of what I added worked, but all of the planets that didn't previously have a custom description don't have, even though I thought I had done it correctly;

For example, in the Java generating Elada, I added this line:


Code
hybrasil2.setCustomDescriptionId("planet_elada");
hybrasil2.applySpecChanges();

Just above the applySpecChanges(), the way it can be seen in the one for Culann:

Code
hybrasil1.setCustomDescriptionId("planet_culann");
hybrasil1.applySpecChanges();

I copied all the vanilla description strngs pertaining to Culann to a descriptions.csv, edited the ones I felt wee too short, and added the ones I thought I need to make; for instance, there's planet_elada,CUSTOM,blahblahblah...

Yet, it is not working.


Also in the process of doing this, the pirates of Donn picked up an Orbital Works and a corrupted nanoforge, yet they do not seem to be counting as a military planet, nor is their orbital battlestation showing up the way that an orbital I added over Cethlenn does. But they have it, I can see that in the colony info.

What might be going wrong here? I'm stumped.
« Last Edit: May 10, 2020, 10:32:57 AM by ShadowDragon8685 »
Logged

SirHartley

  • Admiral
  • *****
  • Posts: 644
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6393 on: May 10, 2020, 06:10:18 AM »

Okay, so I got a very general question - I'd like to use the officer selector to allow the player to choose an officer for something (other than as ship captain) - essentially, the Administrator selection panel for officers, returning the chosen person when selected and confirmed.

Is that panel available to us codewise? Looking through rules, it doesn't seem to be there so it's probably obf, but hope dies last :)
Edit - VisualPanelAPI doesn't seem to be it as well...

« Last Edit: May 10, 2020, 06:54:06 AM by SirHartley »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21223
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6394 on: May 10, 2020, 08:35:31 AM »

I tried to add some fluff (and other things) to the Hybrasil system.

Maybe obvious, but to make sure: you're creating a new game to test these changes, right? This code only runs once when a new campaign is created, so changing it would have zero effect on an existing savefile.

Nothing jumps out as being obviously wrong.


Okay, so I got a very general question - I'd like to use the officer selector to allow the player to choose an officer for something (other than as ship captain) - essentially, the Administrator selection panel for officers, returning the chosen person when selected and confirmed.

Is that panel available to us codewise? Looking through rules, it doesn't seem to be there so it's probably obf, but hope dies last :)
Edit - VisualPanelAPI doesn't seem to be it as well...

There's no generic version of that for picking a person, no - sorry!
Logged

ShadowDragon8685

  • Ensign
  • *
  • Posts: 45
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6395 on: May 10, 2020, 10:34:18 AM »

I tried to add some fluff (and other things) to the Hybrasil system.

Maybe obvious, but to make sure: you're creating a new game to test these changes, right? This code only runs once when a new campaign is created, so changing it would have zero effect on an existing savefile.

Nothing jumps out as being obviously wrong.

It turns out I'm a dumdum, and forgot to check that other mods (in this case Nex) also edit Hybrasil.java, and I need to go back and have a bit of a rethink. Thank you though!
Logged

ByteHammer

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6396 on: May 10, 2020, 04:21:36 PM »

Somewhat related questions. The first is a general question, and the last two are related modding questions:

Is it possible to change the skin of a ship in-game to another existing skin? For example, some ships have a variant with a separate paintjob. Is there a way to apply that? Autofit doesn't seem to do so.

Would it be possible to implement custom paintjobs for ships in this way? Let's say I want to take a few ships from different factions, make a new paintjob for these ships, and add them to the game. Is there a way to apply the paintjob to a ship, say by changing the variant of the ship, without applying it to all ships of the same type in the game?

If not, would I have to do something like Tiandong Refitting to achieve these results?
Logged

Unnamed_Shadow

  • Lieutenant
  • **
  • Posts: 65
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6397 on: May 11, 2020, 12:27:43 AM »

So im editing the ship_data cvs file.

I know adding the tag rare_bp will make that specific ship drop as a rare blueprint drop.

But the question comes about the rarity line.

How does this work? I know it is from 0 to 1.

But i also notice that some of the vanilla rare_bp tagged blueprints don't have any number in rarity.

is the 0 to 1 number to make them even rarer drops also how does it work? Is 0 super rare or 1 super rare?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21223
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6398 on: May 11, 2020, 08:40:14 AM »

It turns out I'm a dumdum, and forgot to check that other mods (in this case Nex) also edit Hybrasil.java, and I need to go back and have a bit of a rethink. Thank you though!

Ah, makes sense!

Somewhat related questions. The first is a general question, and the last two are related modding questions:

Is it possible to change the skin of a ship in-game to another existing skin? For example, some ships have a variant with a separate paintjob. Is there a way to apply that? Autofit doesn't seem to do so.

There isn't, as far as the game is concerned, these are (for most purposes) treated as separate hull types. They can be flagged to share goal autofit variants, though, and a few related things.

Would it be possible to implement custom paintjobs for ships in this way? Let's say I want to take a few ships from different factions, make a new paintjob for these ships, and add them to the game. Is there a way to apply the paintjob to a ship, say by changing the variant of the ship, without applying it to all ships of the same type in the game?

If not, would I have to do something like Tiandong Refitting to achieve these results?

Your best bet, I think, is how the vanilla game does it - adding .skin files for these paintjobs, which is basically shorthand for creating another hull based on an existing one. See the files in data/hulls/skins/ for some examples.


So im editing the ship_data cvs file.

I know adding the tag rare_bp will make that specific ship drop as a rare blueprint drop.

But the question comes about the rarity line.

How does this work? I know it is from 0 to 1.

But i also notice that some of the vanilla rare_bp tagged blueprints don't have any number in rarity.

is the 0 to 1 number to make them even rarer drops also how does it work? Is 0 super rare or 1 super rare?

Yeah, "rarity" is a bad name for it, it should be "frequency", since 0 is more rare (well, nonexistent), and 1 is default. Whenever the game rolls drops, the rarity column (where present) will be a multiplier for the chance of getting that specific ship/weapon/etc.
Logged

Üstad

  • Commander
  • ***
  • Posts: 121
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6399 on: May 11, 2020, 09:33:36 AM »

How can we lower or remove hammer barrages missile spread?
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 649
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6400 on: May 11, 2020, 05:14:22 PM »

I'm looking for a way to override the AI's target choice. 
My scenario is I've got a special ship system AI that while active and when certain criteria are met I'd like to force the ship system's owner to care about a different target.  I've tried calling ShipAPI.setShipTarget(), but the next frame the AI has chosen the old target to be the target again.  Is there any simple way to say "No, I really mean it, care about this target"?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21223
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6401 on: May 11, 2020, 06:04:37 PM »

How can we lower or remove hammer barrages missile spread?

You can change that in hammerrack.wpn; see hardpointAngleOffsets and hardpointAngleOffsets.

I'm looking for a way to override the AI's target choice. 
My scenario is I've got a special ship system AI that while active and when certain criteria are met I'd like to force the ship system's owner to care about a different target.  I've tried calling ShipAPI.setShipTarget(), but the next frame the AI has chosen the old target to be the target again.  Is there any simple way to say "No, I really mean it, care about this target"?

Depending on what you mean by "cares about" - probably not. That is, if you mean "make the AI prioritize this target", about the only thing I can think of is creating an eliminate order and assigning that ship to it, but it'd be visible to the player.

(setShipTarget() is equivalent to the R key for the player, btw, so it wouldn't do anything like this.)
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 649
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6402 on: May 11, 2020, 07:34:17 PM »

I'm looking for a way to override the AI's target choice. 
My scenario is I've got a special ship system AI that while active and when certain criteria are met I'd like to force the ship system's owner to care about a different target.  I've tried calling ShipAPI.setShipTarget(), but the next frame the AI has chosen the old target to be the target again.  Is there any simple way to say "No, I really mean it, care about this target"?

Depending on what you mean by "cares about" - probably not. That is, if you mean "make the AI prioritize this target", about the only thing I can think of is creating an eliminate order and assigning that ship to it, but it'd be visible to the player.

(setShipTarget() is equivalent to the R key for the player, btw, so it wouldn't do anything like this.)

Ahhh, OK.  Thanks for the tip!

ByteHammer

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6403 on: May 11, 2020, 08:04:01 PM »

Somewhat related questions. The first is a general question, and the last two are related modding questions:

Is it possible to change the skin of a ship in-game to another existing skin? For example, some ships have a variant with a separate paintjob. Is there a way to apply that? Autofit doesn't seem to do so.

There isn't, as far as the game is concerned, these are (for most purposes) treated as separate hull types. They can be flagged to share goal autofit variants, though, and a few related things.

Would it be possible to implement custom paintjobs for ships in this way? Let's say I want to take a few ships from different factions, make a new paintjob for these ships, and add them to the game. Is there a way to apply the paintjob to a ship, say by changing the variant of the ship, without applying it to all ships of the same type in the game?

If not, would I have to do something like Tiandong Refitting to achieve these results?

Your best bet, I think, is how the vanilla game does it - adding .skin files for these paintjobs, which is basically shorthand for creating another hull based on an existing one. See the files in data/hulls/skins/ for some examples.

Thanks for the reply.

It sounds like I'd also need to create a mod to convert an original hull to a another hull, then, yeah? I think the only other mod I know of that accomplishes this is Tiandong. Otherwise, I guess I could just use the console mod to add the variant hull and delete the original hull.

It's kind of overkill, but what I'm going for here is the ability to convert captured/purchased original ships into a "player empire" variant, where I can unify the materials and aesthetics of some of my favorite ships and have a fleet that not only works well together, but looks like it belongs together.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21223
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6404 on: May 11, 2020, 08:39:28 PM »

Yeah, I get what you're going for! I'd say the most practical way is to create these skins and do the "exchange" using the console. And you could give yourself the blueprint for those via the console as well.
Logged
Pages: 1 ... 425 426 [427] 428 429 ... 636