UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Feature request #4097 New scriptable properties for campaigns
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Feature request
  • Category
    Engine
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Complexity
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/feature-requests/613 Item 613] imported from sourceforge.net tracker on 2013-01-28 20:23:02

I propose that we add two new properties to the scriptable items in campaign.ufo (numbers are current and could be used as default in the code):

research_rate 0.8
ufo_reduction_rate 0.65

research_rate specifies the number of research hours that a single scientist produces in a single hour of game time. It is referenced in cp_research.cpp, line 801.

ufo_reduction_rate is used in the equation which spawns UFOs to determine the probability that a UFO will not be spawned. It is currently called NON_OCCURRENCE_PROBABILITY. It is defined in cp_campaign.h, line 136 and used in cp_missions.cpp, lines 1556 and 1558. It works like this: the game says: 10 UFOs can be spawned in this cycle. For each UFO it picks a number between 0.0 and 1.0. If the number is higher than NON_OCCURRENCE_PROBABILITY, it is spawned. Otherwise it is not. So higher numbers lead to fewer UFOs.

To make ufo_reduction_rate simpler, the lines 1556 adn 1559, as well as line 1571 of cp_missions.cpp could be switched to invert the number, so that we could name the parameter ufo_rate and then lower numbers would lead to fewer UFOs (more intuitive on the user's side). Line 1556 of cp_missions.cpp might make this a bit more difficult though, because this line uses the number in a way that makes UFOs increase dramatically after max alien interest is reached.


===== Comments Ported from Sourceforge =====

====== tlh2000 (2012-06-17 12:35:36) ======

ufo_reduction_rate => ufo_rate is still missing, the remaining parts are done now. ee48c4d602302f1765e0cfcefa644216fc9329b5
====== natewr (2012-07-03 15:39:32) ======

Another request for scriptable campaign property: the number of workers for each producetime (hour). cp_produce.cpp:37:

static const int PRODUCE_WORKERS = 10;

I propose the name: producerate to follow researchrate. Higher numbers = faster production.
====== tlh2000 (2012-07-04 04:52:31) ======

producerate is in master now 762b69ab43807cb039b565f066e6771f5f099f91
====== natewr (2013-01-22 15:22:31.517000) ======

This is now implemented. The variable name change is not worth keeping this around.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif