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)

Author Topic: how would I change smuggling code? Like be able to land on a hostile space dock?  (Read 3284 times)

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

Hi,

I dont know much about java, but I have netbeans on my other computer and I want to make a mod that allows me to land on any planet/space station even if it is vindictive. How would I code this? Like all I'd have to do is change a boolean to make it always false or something... later on I might want to add some more functionality to this mod. How would I even find what variable to change? like I'm sure there's some function like isVindictive() or canLand() or similar that all I'd have to change is from true to false...

How would I even start?

Thanks in advance,
gruberscomplete
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

To be more specific, I want to be able to land on ANY space dock (you know, the space stations in space that float around planets?), even if my rating is not favorable / hostile / vindictive / suspicious, and even if there are hostile NPC patrol fleets present.

I just want to fly to the station and dock like I wasn't hostile (and trade and buy ships, repair...etc), even if I am vindictive and was chased the whole way there by hostile NPC fleets.
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile

I haven't actually tested it, but you should be able to remove the check completely simply by opening rules.csv and delete/comment out the following lines:

marketPostOpenCustomsInProgress
marketPostOpenInhospitable
marketPostOpenInhospitablePirates

Getting more complex functionality (e.g. require a certain skill to sneak fleet into port) will require modifying some plugin somewhere; looking up which one is left to the reader.
Logged

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

Also is there a mod or way to get rid of tool tips? I constantly make new characters and the popup tooltips are really annoying.
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile

Uncheck "Campaign Help" when creating a new character...
Logged
 

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

I've actually never seen that before. Where is this checkbox thing?
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

I haven't actually tested it, but you should be able to remove the check completely simply by opening rules.csv and delete/comment out the following lines:

marketPostOpenCustomsInProgress
marketPostOpenInhospitable
marketPostOpenInhospitablePirates

Getting more complex functionality (e.g. require a certain skill to sneak fleet into port) will require modifying some plugin somewhere; looking up which one is left to the reader.

WORKED!!!
WOW!
I landed while running away from an inspection.
Also I commented out some other things that said something like landUnavailable1 2 3 or something...
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile

I've actually never seen that before. Where is this checkbox thing?
Spoiler
[close]
Logged
 

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

I thought it said campaign mode so I always left it checked :(
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

Well if anyone would want to know exactly what I changed to get "smuggling" to work, I completely commented out all of the first column under:
# sneaking in

and under
# no trading w/ same faction market while customs inspection is in progress

I did:

# marketPostOpenCustomsInProgress

So now this is kind of a DIY mini-mod!
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

OK. ONE LAST QUESTION. FOR NOW.

How would you make it a 100% chance to capture an enemy ship after battle? Like its not in rules.csv
Perhaps there are other similar files somewhere?
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile

OK. ONE LAST QUESTION. FOR NOW.

How would you make it a 100% chance to capture an enemy ship after battle? Like its not in rules.csv
Perhaps there are other similar files somewhere?
Like getting a chance after every fight or making sure it does go boom?
If it is the former then you can change that in the settings.json file
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile

OK. Just tell me where you learned all of this stuff. Obviously I can't do any of modding on my own. Just like how do u know what these files do, is there a forum post that details that?
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile

OK. Just tell me where you learned all of this stuff. Obviously I can't do any of modding on my own. Just like how do u know what these files do, is there a forum post that details that?
The normal way: forum search button and actually opening the files and see by ourselves.
Logged