Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: [1] 2 3 ... 7

Author Topic: Restock Mod - 2.6. Tested with .6a  (Read 77970 times)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Restock Mod - 2.6. Tested with .6a
« on: August 04, 2012, 10:07:31 AM »

V2.6: Tested with .6a. Added Ox and Construction Rig, included Askonia.


Never run out of ships again! This mod keeps the stations stocked with at least one copy of every ship hull - Tritachyon has the high tech hulls, the Hegemony/Pirates have copies of low and a few mid hulls, and the Diktat in Askonia has midline stuff. All stations are restocked with supplies, fuel, and weapons. The restock check happens once per second.

Let me know if I've forgotten any ships or if bugs pop up.

Download link is attached to this message below. :)

MCWarhammer's version for Uomoz' Corvus has not been updated - I'm sure that its going to change a heck of a lot. If after he's released people want a mod, either let me know or modify this mod yourself: its super easy and has comments in code telling you what to do.

Old notes:
Spoiler
V2.1: Tested with .54.1a. Added the Prometheus supertanker to all stations.

[VERSION 2.0]
New version! This version has much cleaner code and is even easier to modify! All the action happens in data/scripts/world/corvus/RestockSpawnPoint.java Add an array of ship names or fighter names, put in a check for the station you want to add them to (by name), and call addShips/addFighters.

[VERSION 1.1]

Will now keep all weapons stocked - if there are none of a weapon 4 new ones will appear, checked once per day.
Will now keep crew stocked - if none in a category, adds 5/25/100/200 crew to elite/veteran/regular/green. Checked once per day.

[MF Version] - feel free to make a new version for your own mod (if you want), just credit me for the original code if you distribute. :)

This version is more friendly towards other mods. It will add every ship and every fighter to EVERY station, no matter the name (free trade stations excluded on purpose).
To modify for use in combination with another mod:
In: data/scripts/world/corvus/RestockInit.java and data/scripts/world/corvus/RestockSpawnPoint.java
Modify any line that gets the system from "corvus" to whatever your system's name is in the mod. Should be once in each file. Don't change the folder structure (just leave it corvus).

In: data/scripts/world/corvus/RestockSpawnPoint.java
Scroll to the bottom - there are the lists of ships and wings that are added to every station. Add/remove whatever you'd like.


Old download totals:
2.1: 505
MCWarhammer's UoC: 337
2.0: 128
1.0: 499
mf: 167
[close]

[attachment deleted by admin]
« Last Edit: September 19, 2013, 09:40:06 PM by Thaago »
Logged

hadesian

  • Admiral
  • *****
  • Posts: 2058
  • It's been one of those days...
    • View Profile
Re: Restock Mod
« Reply #1 on: August 05, 2012, 10:35:04 AM »

best
thing
ever

Does it work with mods?
Logged
Changes as of May 24, 2013
  • Reinvented Starsector.
  • That is all.

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod
« Reply #2 on: August 05, 2012, 11:29:20 AM »

Glad you like it :D

The mod will continue to restock the base ships if the original stations are still there, but won't adapt to new ships or stations.

It can be very easily adapted to mods though - just change the names of the stations to whatever they are in the mod, and change the ship lists to whatever you want.

I'm thinking of expanding it to keep minimal weapon stocks as well (I keep running out of heavy needlers :P).
Logged

Archduke Astro

  • Captain
  • ****
  • Posts: 456
  • 99 AU from anywhere
    • View Profile
Re: Restock Mod
« Reply #3 on: August 05, 2012, 12:48:34 PM »

My compliments, Thaago, on a very useful little mod.
Logged
We thought our last moment had come
when we got a message up the voice pipe
saying that 'A' Turret magazine was on fire.....

Erick Doe

  • Global Moderator
  • Admiral
  • *****
  • Posts: 2489
  • "Pretty cunning, don't you think?"
    • View Profile
Re: Restock Mod
« Reply #4 on: August 05, 2012, 02:34:53 PM »

Very good! I'll have a look at this. This might make adding supply fleets to custom factions a lot easier.
Logged

Griffinhart

  • Commander
  • ***
  • Posts: 169
    • View Profile
Re: Restock Mod
« Reply #5 on: August 05, 2012, 04:21:54 PM »

I can't tell - does this mod ensure there is at most one of every ship stocked, or at least one of every ship stocked?

I.e., 1 <= ShipsStocked <= 1, or 1 <= ShipsStocked < infinity?

ETA: Apparently the forum software doesn't like the infinity symbol. Sadness.

-- Griffinhart
« Last Edit: August 05, 2012, 04:24:09 PM by Griffinhart »
Logged


"Rrha ki ra tek wim tes yor
en weel waath dius manaf, Yat!
"

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod
« Reply #6 on: August 05, 2012, 09:00:57 PM »

At least - if the convoys keep delivering them they will keep piling up. :)
Logged

Barracuda

  • Lieutenant
  • **
  • Posts: 70
    • View Profile
Re: Restock Mod
« Reply #7 on: August 06, 2012, 04:24:17 AM »

Great Mod. Cant wait till you do the same to the weps. Im tired of when i get a Hammerhead  i need to jump to all three stations just to get it ready.
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Restock Mod
« Reply #8 on: August 06, 2012, 06:42:34 AM »

Awesome little mod, I'll try it out later
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod - Hulls, Weapons, Crew
« Reply #9 on: August 06, 2012, 11:42:18 AM »

New version up - now will restock weapons and crew as well.

The way the weapons are implemented will work with any additional weapon mods. I couldn't find a getAllHulls method so that won't be possible with extra ship mods - but you can always do it manually by pasting a list of the hulls into this mod.
« Last Edit: August 06, 2012, 11:43:51 AM by Thaago »
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod - Hulls, Weapons, Crew
« Reply #10 on: August 06, 2012, 05:56:22 PM »

Huh - very strange bug: every once in a while the stations all receive a new copy of every ship on their lists. I have absolutely no idea why this would be intermittent - the only point of failure I can think of would be the FleetDataAPI.getMembersListCopy() method returning a list of 0 elements.

Question for Alex: is there an easy way to get a script to write to the log file?

[Edit] The duplication only happens after loading, but I have no idea why. Still working on it.
« Last Edit: August 06, 2012, 09:01:11 PM by Thaago »
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod - Bugfix update
« Reply #11 on: August 12, 2012, 01:26:08 PM »

It happened cause I'm an idiot :P. Alex straightened it out and its now working.
Logged

Dri

  • Admiral
  • *****
  • Posts: 1403
    • View Profile
Re: Restock Mod - Bugfix update
« Reply #12 on: August 12, 2012, 05:46:43 PM »

I take it mods don't work in games already in progress? I've activated this mod via the launcher and loaded up my save but after 3-5 game days still no Heavy Maulers at the pirate base. ???
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7220
  • Harpoon Affectionado
    • View Profile
Re: Restock Mod - Bugfix update
« Reply #13 on: August 13, 2012, 09:25:11 AM »

Yeah - like most mods it has scripts that are only activated at the beginning of a new game (the generator files). If anyone knows a way to add stuff midgame I'm all ears!
Logged

Barracuda

  • Lieutenant
  • **
  • Posts: 70
    • View Profile
Re: Restock Mod - Bugfix update
« Reply #14 on: August 15, 2012, 08:32:02 PM »

Could you try and work with the project Iornclads mod. The creater has a bad habbit of not putting ship breaking wep's on ships. Weps that define what the ship does and with out them i cant use the ships properly.[Cause all they have is PD and others.]
Logged
Pages: [1] 2 3 ... 7