project-navigation
Personal tools

Author Topic: Where are the radar specs hiding?  (Read 1700 times)

Offline Sniper_Bait

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Where are the radar specs hiding?
« on: January 10, 2013, 11:20:38 pm »
Not necessarily "specs" as in "spectacles," but if you can point me to a pair of those, that would work, too.  I'm looking for the files that control installation radar range, and then for the ones that control the radar of aircraft and SAM sites.  I had this crazy idea that once the improved radar kicks in and increases the range of the old radar, aircraft and SAM installations would eventually get a similar upgrade.  Where, then, might they be stored and what are their names?  Are they in "base" or "src?" 
Thanks, all.  Your help is appreciated.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2538
    • View Profile
Re: Where are the radar specs hiding?
« Reply #1 on: January 10, 2013, 11:54:35 pm »
You cannot change the range of the radar tower installations without modifying the source code in src, but you can create an "Advanced Radar Tower" building with scripts.

For this,
1. add an entry to base/ufos/installations.ufo (based on radartower)
Code: [Select]
installation advradartower {
    ...
}

2. add a technology to base/ufos/research.ufo which have "provides" flag points to the scripted id of your installation and requires advanced radar technology. If you set the research time to 0 it will be automatically researched along with the advanced radar building.
Code: [Select]
tech rs_adv_radartower {
    ...
    require_AND rs_building_radar_adv
    provides advradartower
    time       0
}

Haven't tested it myself, but Should Work (TM).

Edit: Should mention that max number of installation types are limited to 6 and number of batteries of a samsite to 5 in the code now.

-geever
« Last Edit: January 10, 2013, 11:57:47 pm by geever »

Offline Wolls

  • Rookie
  • ***
  • Posts: 93
    • View Profile
Re: Where are the radar specs hiding?
« Reply #2 on: January 11, 2013, 12:09:17 am »
AFAIK in 2.5-Dev.. you can simply change the installation.ufo (in the ...\base\0ufos.pk3) to change the radar value.. like from 8 to 18

Also in the 0ufos.pk3, aircraftmanagement.ufo has the craft and SAM radar values..

Offline Sniper_Bait

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: Where are the radar specs hiding?
« Reply #3 on: January 11, 2013, 12:11:09 am »
Aha!  Much gratitude to you both!  Should have specified I'm only on 2.4 for now, but now at least I know what to look for.  Thank you again.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2538
    • View Profile
Re: Where are the radar specs hiding?
« Reply #4 on: January 11, 2013, 12:23:51 am »
Aha!  Much gratitude to you both!  Should have specified I'm only on 2.4 for now, but now at least I know what to look for.  Thank you again.

I'm not sure if the tech & research for installations works in 2.4.

About changing the numbers of existing installation/aircraft: I belive it is a cheat. That's why I suggested a new (more expensive) installation available after the radar research.

Aircraft radar: I hoped it is possible with a new electronics slot equipment, but currently their radar ranges are hardcoded. Possibly I'll make it scriptable later because is sounds reasonable for me.

-geever

Offline Anarch Cassius

  • Squad Leader
  • ****
  • Posts: 176
    • View Profile
Re: Where are the radar specs hiding?
« Reply #5 on: January 11, 2013, 11:39:20 am »
A cheat that you'll need to turn on and off manually each game at that.

The tech idea is much better. Base radar is already so good I was a bit disappointed I couldn't upgrade my installations too.

An electronic slot item sounds perfect. More stuff for slots is needed anyway. A free boost for craft wouldn't fit the way the rest of the upgrades work and adding new aircraft would just be silly.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2538
    • View Profile
Re: Where are the radar specs hiding?
« Reply #6 on: January 11, 2013, 11:32:47 pm »
Aircraft radars are now scriptable in 2.5-dev.

For item modifying radar more work is needed. And to be honest I don't like the current system, so I might need changing some foundations. Currently radar has a fixed range and the advanced radar has a "level" property that multiplies it with 1.4 - I would rather like individual scripted radar buildings. Soo, I might postpone this development a bit.

About aircraft I suggest changing radar for advanced crafts like Raptor and Stingray which are based on alien technology for now, maybe add rs_building_radar_adv as a prerequisite for them.

-geever

Offline Anarch Cassius

  • Squad Leader
  • ****
  • Posts: 176
    • View Profile
Re: Where are the radar specs hiding?
« Reply #7 on: January 11, 2013, 11:54:49 pm »
Well I was thinking more of having whole new classes of aircraft or Firebird Radar+ model and that would be odd.

Having a particular spy plane model or two and varying the base radar between craft is a good idea.

Saracens actually seem like a reasonable candidate for good radar. They don't have much use early on except flying around scouting since fuel is their big advantage. Or maybe this is just a reason to stick advanced radar on them when you get it.