Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Working System Defense Fleet?  (Read 1983 times)

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Working System Defense Fleet?
« on: August 18, 2012, 12:06:45 AM »

So I am having a problem with my system defense fleet spawn. It works fine except that it spawns a new one every couple of days and begins to saturate the whole system. I have a feeling it has something to do with the gen file but my understanding of code is limited. Anyway here is the gen file entry:

Code
ArcheusSpawnPoint2 archSpawn2 = new ArcheusSpawnPoint2(sector, system, 5, 30, archstation1);
system.addSpawnPoint(archSpawn2);

for (int i = 0; i < 2; i++) archSpawn2.spawnFleet();

I was wanting it originally to only spawn a max of 2 fleets but I guess I am not completely understanding how its working here. Any takers?

If more information is needed ill post it.
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Working System Defense Fleet?
« Reply #1 on: August 18, 2012, 12:10:29 AM »

Quote
ArcheusSpawnPoint2 archSpawn2 = new ArcheusSpawnPoint2(sector, system, 5, 30, archstation1);

note "5, 30"

the 1st number is the days between spawns, the 2nd is the max number of fleets

so you're gonna have 30 system defense fleets on your hands soon...

I'm guessing you intended it to be the other way around
Logged
mmm.... tartiflette

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Working System Defense Fleet?
« Reply #2 on: August 18, 2012, 07:41:08 PM »

Ahh see I it was just me not understanding the code. I thought the second line determined the number of fleets and the 30 was representing the days before a new one would spawn. I thought the 5 referred to its orbit around the station. Sigh I'm going to have to spend a weekend researching code and the APIs available so I can really start getting this thing off the ground. I have the factions all done and edited in and I believe it is decently balanced, but getting the A.I in the overworld to behave with the precision I want it to has been a challenge due to my poor understanding of java. Oh well time to hit the books.

Thanks!  8)
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: Working System Defense Fleet?
« Reply #3 on: August 18, 2012, 08:11:44 PM »

no problem  :)
Logged
mmm.... tartiflette