Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: SOLVED: Items disappear from stations.  (Read 2542 times)

Gotcha!

  • Admiral
  • *****
  • Posts: 1124
    • View Profile
    • Welcome to New Hiigara
SOLVED: Items disappear from stations.
« on: January 09, 2014, 05:57:36 PM »

Heya,

As some of you know, both my mods have certain items on a station, which, when bought, allows the player to buy more ships and puts the player neutral/friendly with my factions.
Now the problem is that items disappear over time, because the game messes with a station's inventory. Naturally, when this happens, a player would not be able to buy Bushi's or Hiigaran's bigger ships.

I am looking for a way to make certain items have a permanent presence on their stations, so players will always be able to buy them at least once.

Another solution would be to make these particular items buyable through dialogue. I know it's possible, although I can't script myself.

Would anyone mind to help (as in, do everything, since I can't script :-[ )? I asked LazyWizard months back, and he would help, but I guess he's kinda busy. :-X
« Last Edit: January 10, 2014, 06:40:29 AM by Gotcha! »
Logged
  

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Help wanted: Items disappear from stations.
« Reply #1 on: January 09, 2014, 09:42:48 PM »

Just write a simple EveryFrameScript that checks your Stations every Advance(), iterates through the Cargo and counts all of that item.  If zero, stock 1, shoving something else out of the station.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Gotcha!

  • Admiral
  • *****
  • Posts: 1124
    • View Profile
    • Welcome to New Hiigara
Re: Help wanted: Items disappear from stations.
« Reply #2 on: January 10, 2014, 12:52:16 AM »

I'm sorry, but like I said, I can't make scripts. I have no idea what an EveryFrameScript even means. :-\
Logged
  

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Help wanted: Items disappear from stations.
« Reply #3 on: January 10, 2014, 04:16:59 AM »

I asked LazyWizard months back, and he would help, but I guess he's kinda busy. :-X

Er, sorry about that. I started on an item persistence script that ended up becoming way too complicated, decided to set it aside to rewrite later, and, um, kind of forgot about it. *cough*

I'll get right on it and PM you the fixes soon. Edit: sent! :)
« Last Edit: January 10, 2014, 04:45:39 AM by LazyWizard »
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: Help wanted: Items disappear from stations.
« Reply #4 on: January 10, 2014, 05:55:05 AM »

I think that handling this kind of stuff via station dialogue would be a lot better, compared to item clutter.
Logged

Gotcha!

  • Admiral
  • *****
  • Posts: 1124
    • View Profile
    • Welcome to New Hiigara
Re: Help wanted: Items disappear from stations.
« Reply #5 on: January 10, 2014, 06:19:51 AM »

@LazyWizard: Thanks! :o

@Uomoz: You're most likely right, but since I am 100% dependable on other people's scripting abilities (because I'm mentally handicapped), I'll take what I can get. ;D
Logged
  

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1365
    • View Profile
    • GitHub Profile
Re: Help wanted: Items disappear from stations.
« Reply #6 on: January 10, 2014, 06:46:48 AM »

I think that handling this kind of stuff via station dialogue would be a lot better, compared to item clutter.

Usually I'd agree, but in this particular case I think a custom interaction plugin would be unnecessary complexity. There's only a single item per faction, so clutter's not an issue (Hiigarans have three badge 'ranks' but only sell one at a time). :)
Logged