aliens

Author Topic: [REQUEST] "We can now produce" message for bonus researched items.  (Read 2676 times)

Offline Shiroi Bara

  • Colonel
  • ****
  • Posts: 331
    • View Profile
Apologizes if I posting in wrong forum and sorry for my broken English in advance. Analyzing "getOneFree" parameter in research.rul I have found this interesting behavior - if it unlocks some project, what could be produced as  item there is no "We can now produce" message pop ups when research completed. Only UFOpedia message pops up. For example you can try reproduce this if you change research.rul file in  standard\xcom1\ folder:
Code: [Select]
  - name: STR_LASER_WEAPONS
    #cost: 50
    cost: 1
    points: 10
    getOneFree:
      - STR_MOTION_SCANNER
  - name: STR_MOTION_SCANNER
    #cost: 180
    cost: 1
    points: 20
As you can see you can get Motions Scanner standard way or as bonus when you complete "Laser Weapons" topic. Lets try both ways. Make changes in file as I did and restart the game. Select new game. Choose "Laser weapons" in research list. When it finishes it pops up article about Motion Scanner when Laser Weapons topic has completed and pops up message about next research - Laser Pistols but it dose not pop up message about possibility production of Motion Scanner. But if you go to manufacture menu manually you will see what this item ready for production. Now start new game again and select "Motion scanner" in research list. When research finishes you will see article in UFOpedia and message "We can now produce Motion Scanner" pop ups. And scanners will be ready for production if you got to manufacture menu. This behavior present for UFO Defense and  TFTD as well and for all their mods. I know what "getOneFree" parameter used most of times just to show UFOs(USOs) or live (dead) aliens when live medics (technicians) researched, so they're can not be produced of course, but for future request can we have option to show "We can now produce" message if it come as free bonus and can be produced in workshops? Seems it's require change in game code. As I can understand now it checks production flag and call "We can now produce" function if item researched standard way but not execute it if it comes as bonus. Any advice how I can do this manually from developers? Should I look at GeoscapeState.cpp file? I successfully compiled and ran last git build in Linux Mint but I'm suck in programming skills so good example in modified code from skilled people will be nice even just for test purpose for new or existing now mods.