Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 464 465 [466] 467 468 ... 710

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

Flacman3000

  • Commander
  • ***
  • Posts: 202
  • A man cannot put his shaft into the unknown.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6975 on: January 10, 2021, 11:12:31 AM »

Hi guys, I wanted to mod and make a weapon that's special but I do not know how to implement my idea, I wanted to implement a mine that gets launched at a slow velocity (by how fast your ship is going) to then contact anything and explode with expanding ring of damage. How would I incorporate this into a large missile mount weapon? I already have sprites some new some already in the game and changed in color. As far I know the imperium atom bomb ship is the closest thing I have to an example without all the debris I just want an image of a ring expanding. until it dissipates with set damage.
Logged
Ryzen 7 2700x, 1080ti, 16GB DDR4 RAM and playing SS on a SSD - Always stay ahead because when you're ahead you're rear anatomy is open to interpretation.

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 #6976 on: January 11, 2021, 11:56:11 PM »

Is there any way to refresh the cargo UI? I mean, I need to make some commodities to be illegal or legal after trading, but the red background which shows illegal won't be removed or added dynamically seems like it is not refreshed every frame.
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6977 on: January 12, 2021, 10:33:53 AM »

Hi guys, I wanted to mod and make a weapon that's special but I do not know how to implement my idea, I wanted to implement a mine that gets launched at a slow velocity (by how fast your ship is going) to then contact anything and explode with expanding ring of damage. How would I incorporate this into a large missile mount weapon? I already have sprites some new some already in the game and changed in color. As far I know the imperium atom bomb ship is the closest thing I have to an example without all the debris I just want an image of a ring expanding. until it dissipates with set damage.

That's a tough one - nice visuals are hard to just give a "do this" kind of answer for. MagicLib may be a good place to start looking but I'm not really sure what your level of comfort with coding is, and this would take some scripting.


Is there any way to refresh the cargo UI? I mean, I need to make some commodities to be illegal or legal after trading, but the red background which shows illegal won't be removed or added dynamically seems like it is not refreshed every frame.

Ah - looking at the code, yeah, this isn't refreshed every frame, and I don't see a way to force it to refresh. Sorry!
Logged

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 #6978 on: January 15, 2021, 06:33:57 AM »


Is there any way to make these boxed contents disabled?
What I know is, the abandoned station condition could clear those things.
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6979 on: January 15, 2021, 09:16:33 AM »

Checking the code - the stability, ship quality, etc widget is hidden if the market has the "abandoned_station" condition, so that's hardcoded.

The button is disabled if the market has only 1 submarket and that submarket has the id "storage". So, again, hardcoded.

Let me add a "no_market_info" tag for the next release to let this behavior happen in other cases. There, done.
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6980 on: January 15, 2021, 10:17:01 AM »

I'm trying to make a sabot that explodes immediately and without targetting, like a shotgun. I can't really find a way to do this, since sabots only explode when theyre capable of hitting their targeted ship. Would I have to make a custom missle type to get this to work?
Logged

IonDragonX

  • Admiral
  • *****
  • Posts: 816
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6981 on: January 15, 2021, 11:31:22 AM »

@NikoTheGuyDude
IIRC you are in danger of shooting your own ship with the missile if your range is close to 0. You know the collision radius of a .SHIP file? Well if any effects happen inside that range, they either hit your ship or have unpredictable results.
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6982 on: January 15, 2021, 11:52:53 AM »

@NikoTheGuyDude
IIRC you are in danger of shooting your own ship with the missile if your range is close to 0. You know the collision radius of a .SHIP file? Well if any effects happen inside that range, they either hit your ship or have unpredictable results.

What kind of unpredictable results?
Logged

shoi

  • Admiral
  • *****
  • Posts: 658
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6983 on: January 15, 2021, 02:01:33 PM »

I'm trying to make a sabot that explodes immediately and without targetting, like a shotgun. I can't really find a way to do this, since sabots only explode when theyre capable of hitting their targeted ship. Would I have to make a custom missle type to get this to work?

can't you just make a gun that shoots the sabot projectiles? Unless im missing something, it'd have same effect.

If for some reason you wanted to keep it a missile, you can just make a dumbfire one that doesn't track and shoots directly where aimed
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6984 on: January 15, 2021, 02:47:25 PM »

I'm trying to make a sabot that explodes immediately and without targetting, like a shotgun. I can't really find a way to do this, since sabots only explode when theyre capable of hitting their targeted ship. Would I have to make a custom missle type to get this to work?

can't you just make a gun that shoots the sabot projectiles? Unless im missing something, it'd have same effect.

If for some reason you wanted to keep it a missile, you can just make a dumbfire one that doesn't track and shoots directly where aimed

I can't use [RENDER_LOADED_MISSILES] with projectiles, or else the game will crash, and [RENDER_LOADED_MISSILES] is sort of integral to my envisionment of this weapon.

Also, I've succeeded in making it dumbfire by removing all turning capabilities, but I can't find a way to make it explode instantly. It only seems to explode when an enemy ship is within its arc and range. When I aim it an an enemy, though, it has the intended effect, as I made it burn out instantly... until it starts drifting off and fires while burnt out.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3023
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6985 on: January 15, 2021, 05:27:33 PM »

Use a script that detects the first stage and replaces it with the second stage instantly/after a delay/whatever. That is how some of the mod-shotgun weapons work.
Logged

NikoTheGuyDude

  • Commander
  • ***
  • Posts: 231
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6986 on: January 15, 2021, 07:42:14 PM »

Use a script that detects the first stage and replaces it with the second stage instantly/after a delay/whatever. That is how some of the mod-shotgun weapons work.

Do you know of a specific modded shotgun that does this, so I can reference it (fairly new to modding)
Logged

Cyber Von Cyberus

  • Commander
  • ***
  • Posts: 212
  • Warcrimes are very profitable...
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6987 on: January 16, 2021, 08:10:31 AM »

Hello, I would like to change the music for the player's colony and use my own, I'd like some help on how to do it since the game seems to crash when I modify the \starsector-core\data\world\factions\player
Logged
Diktat Admiral:"What do we have here ? A dissident ? A pirate ? Or maybe a degenerate ?"

Me:"Yes, I'm all of those."

shoi

  • Admiral
  • *****
  • Posts: 658
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6988 on: January 16, 2021, 05:40:01 PM »

I have a ship that keeps getting too close to enemy ships (usually cruiser+) and getting killed as a result. It flies far ahead of other ships, and oftentimes ends up behind the enemy line.  im assuming this has to do with it just being faster, but it doesn't seem to react to building flux as quickly as other ships for some reason and will fly straight in front of a ship at like 99% flux trying to kill it.

So my idea is to just set an ai flag to make it back off after a certain flux threshold

would setting AI flag 'BACK_OFF"  when that criteria is met acheive this?

Also what does NEEDS_HELP do? API says "Whether the ship wants to be escorted by nearby friendlies."  Are you able to tell me what that means behind the scenes? When I tried it on a ship it seems like the ship I put the flag on would linger around friendlies more itself, and not that the othe AI ships were being directed towards it, if that makes any sense.
« Last Edit: January 16, 2021, 05:41:47 PM by shoi »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6989 on: January 16, 2021, 07:32:25 PM »

So my idea is to just set an ai flag to make it back off after a certain flux threshold

would setting AI flag 'BACK_OFF"  when that criteria is met acheive this?

It should, yeah.

Also what does NEEDS_HELP do? API says "Whether the ship wants to be escorted by nearby friendlies."  Are you able to tell me what that means behind the scenes? When I tried it on a ship it seems like the ship I put the flag on would linger around friendlies more itself, and not that the othe AI ships were being directed towards it, if that makes any sense.

I forget the details but basically what it says. But, how to explain... it's a situational thing, not something where "if you set this flag it will reliably result in behavior X". That flag results in being a consideration in a few places under the hood, both for whether the ship that has it should try to escort other ships that it otherwise might, and whether other ships will try to escort it if they're so inclined.

BACK_OFF, on the other hand, should be pretty reliable.
Logged
Pages: 1 ... 464 465 [466] 467 468 ... 710