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: A simple modding question.  (Read 2805 times)

Verrius

  • Captain
  • ****
  • Posts: 369
    • View Profile
A simple modding question.
« on: November 24, 2012, 01:56:33 AM »

Search has failed me, and I feel awfully dumb. Is there an "add experience" function anywhere? I can't find anything.

I'd really like my mod to add experience when you mine.

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: A simple modding question.
« Reply #1 on: November 24, 2012, 06:34:38 AM »

No idea, mining doesn't exist yet in vanilla so you probably wont find it anywhere. use the function that gives you XP when you destroy a fleet, no idea where that code might be or if it is hard coded or not.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: A simple modding question.
« Reply #2 on: November 24, 2012, 08:49:53 AM »

Oops, there isn't.

Added MutableCharacterStatsAPI.addXP(long xp) just now.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: A simple modding question.
« Reply #3 on: November 24, 2012, 12:59:56 PM »

Ouch, lol.  Didn't matter much before though :)

While you're adding stuff... can we please, please, please have a method to change the Faction ownership of a Station?  Please?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: A simple modding question.
« Reply #4 on: November 24, 2012, 01:30:43 PM »

Ok, added :)

Generally not a fan of expanding an API that is likely to change wholesale, but that was pretty simple. Not sure whether changing factions on the fly is going to have some side-effects, though - it shouldn't, but I didn't test it. And we all know how well code that "should" work but wasn't tested actually works.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: A simple modding question.
« Reply #5 on: November 24, 2012, 01:40:00 PM »

I understand it'll all get transmogrified.  Just want a way to finally have wars in a moderately-clean way ;D
Logged
Please check out my SS projects :)
Xeno's Mod Pack

CrashToDesktop

  • Admiral
  • *****
  • Posts: 3876
  • Quartermaster
    • View Profile
Re: A simple modding question.
« Reply #6 on: November 24, 2012, 02:52:48 PM »

Hey, Exar mod?  I've been playing around with it, but it's been a bit tricky.  With this in hand (or, as close as it can get), I can make it smooth. :)
Logged
Quote from: Trylobot
I am officially an epoch.
Quote from: Thaago
Note: please sacrifice your goats responsibly, look up the proper pronunciation of Alex's name. We wouldn't want some other project receiving mystic power.

Verrius

  • Captain
  • ****
  • Posts: 369
    • View Profile
Re: A simple modding question.
« Reply #7 on: November 24, 2012, 07:03:44 PM »

Awesome xD. Can't wait to be able to do something else to level up.

I was trying to make money mining in Fleet Control though, and everyone trying to kill me still made it harder than I was expecting. Getting XP from it would be wonderful.