aliens

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - redv

Pages: 1 [2] 3 4 ... 19
16
Suggestions / Re: Base Defense Mechanics
« on: April 13, 2015, 10:43:32 pm »
Of course this solution is very easy to implement.
But where is the fun? ;)

btw, new interface for active base defense:

17
Suggestions / Re: Base Defense Mechanics
« on: April 12, 2015, 09:38:27 pm »
May be make each defence building behave like 1 interceptor? If submenu is impossible, then just use the same Interception menu used by craft. Sure it might get cluttered, but I think people who desire such option can handle some micromanagement in exchange for new strategic options.

Actually it's a lot of micromanagement.
Will be very annoying to manage an swarm of interceptors which can fly 5-10 sec on short distance, then will be the repair/refuel/rearm cycle at least 2 hours.

Does this mechanic make base defences easier?

Like, a Battleship is fired at twice - first on the Geoscape and then on the defence screen. Or is the base artillery defence part disabled?

I don't think it would be a problem if it is attacked twice, I just would like to know.

Even 3 times if you have a Grav shield. :)
But you not always can detect a battleship on Geoscape.
I'm not sure that need change something in vanilla base defense. At least need several tests to balance this behavior.
I will add one string to vanilla base defense mission: after shots of base defense will be start the recharge countdown.

In the other hand, in this mod first shot to a battleship can be at distance 280 m.
Velocity of a battleship can be up to 5000 mph.
Therefore base defense can have 280/5000*60 = 3.36 min to recharge.
So, if you set rechargeTime to 3 or 4 min then this behavior will be looks good :)
I think, the Grav shield also can give you 3-4 min of time to the second attack and second shot.

18
Suggestions / Re: Base Defense Mechanics
« on: April 12, 2015, 01:00:51 pm »
Actually this branch not ready yet for merging.

In first, active base defense never used before in Xcom series. Therefore I'm not sure, that it will be accepted to the master branch. For extended version need to rewrite code, i.e. add 2 more weapons (actually need much more changes).

Second, I see that this version less than perfect. The interface should be redesigned.

1. Is it craft? Should be icons of defense turrets.
2. These buttons disabled. One can be repurposed to enable/disable base defense. But what to do with second one?
3. Need replace icon to point defense turret. It's easy.

I think about special build just for testing and feedback.

From the Interception screen I can see each defensive building is represented by a separate weapon. What if a base has more than 2 types of defensive buildings?

Even if you have three or four types of base defense facilities, will be chosen only two types. Which exactly types is not determined. Can be any. Actually this is a problem.

It is obvious, that blaster defense is best. But what will be best defense in general case? Is best defense that most powerful? Or best defense which has maximum range? Or best defense which can shoot rapidly? May be best accuracy should be taken into account? I think about maximum range.

In other hand, are you really will to use more than 2 types of base defense in one base? ;)

19
Suggestions / Re: Base Defense Mechanics
« on: April 11, 2015, 10:23:07 pm »
Each base has own defenses.

20
Suggestions / Re: Base Defense Mechanics
« on: April 11, 2015, 10:14:30 pm »
Active base defense ready to use :)

1. Activate defense:


2. Track down an UFO:


3. Shot down the UFO:


The branch: https://github.com/redv/OpenXcom/tree/active_base_defense
Difference: https://github.com/SupSuper/OpenXcom/compare/master...redv:active_base_defense

The branch compatible with regular OpenXcom.
All settings moved to the ruleset: https://github.com/redv/OpenXcom/blob/active_base_defense/bin/data/Ruleset/Active_Base_Defense.rul
Therefore the mod can be easily reconfigured or disabled.
Code: [Select]
# X-COM 1 (UFO: Enemy Unknown) ruleset
defense:
  rechargeTime: 10      # minutes. If value == 0 then active defense will be disabled permanently.
  retaliationChance: 30 # 0..100 %. Chance to uncover the base by aliens after air battle.
#-----------------------------------
crafts:
  - type: STR_BASE
    requires:
      - STR_BASE_DEF
    sprite: 1  #26   # I need new icon
    damageMax: 100   # should be > 0. Actually not used.
    weapons: 2
#-----------------------------------
craftWeapons:
  - type: STR_MISSILE_DEFENSES
    sprite: 1
    sound: 5
    damage: 100     # the same as for launcher
    range: 40       # range in pixels: (range for facility)/4; i.e. 160/4 = 40
    accuracy: 50    # the same as for facility
#    reloadCautious: 96    # not used
    reloadStandard: 72
#    reloadAggressive: 48  # not used
    ammoMax: 100    # in fact, maximum is 6x6-1 = 35
    launcher: STR_AVALANCHE_LAUNCHER
    projectileType: 1
    projectileSpeed: 8
  - type: STR_LASER_DEFENSES
    sprite: 4
    sound: 8
    damage: 70
    range: 50       # 200/4 = 50
    accuracy: 60
#    reloadCautious: 24
    reloadStandard: 24
#    reloadAggressive: 24
    ammoMax: 100
    launcher: STR_LASER_CANNON
    projectileType: 4
  - type: STR_PLASMA_DEFENSES
    sprite: 5
    sound: 9
    damage: 140
    range: 60       # 240/4 = 60
    accuracy: 70
#    reloadCautious: 24
    reloadStandard: 24
#    reloadAggressive: 24
    ammoMax: 100
    launcher: STR_PLASMA_BEAM
    projectileType: 5
  - type: STR_FUSION_BALL_DEFENSES
    sprite: 3
    sound: 7
    damage: 230
    range: 70       # 280/4 = 70
    accuracy: 80
#    reloadCautious: 64
    reloadStandard: 48
#    reloadAggressive: 32
    ammoMax: 100
    launcher: STR_FUSION_BALL_LAUNCHER
    projectileType: 3
    projectileSpeed: 8
#-----------------------------------
facilities:
  - type: STR_MISSILE_DEFENSES
    defenseRange: 160    # maximum range is 280 miles (70*4 = 280)
  - type: STR_LASER_DEFENSES
    defenseRange: 200
  - type: STR_PLASMA_DEFENSES
    defenseRange: 240
  - type: STR_FUSION_BALL_DEFENSES
    defenseRange: 280
#-----------------------------------
#extraSprites:
#  - type: INTICON.PCK
#    width: 352
#    height: 80
#    subX: 32
#    subY: 40
#    files:
#      26: Resources/Base_Defense/bd_geoscape.png
#-----------------------------------
extraStrings:
  - type: en-US
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defense
  - type: en-GB
    strings:
    strings:
      STR_ACTIVATE_DEFENSE: Activate Base Defence

Next I plan change icons of craft to something like a point defense turret:


And yes, active base defense it is lot of fun :)

21
Suggestions / Re: Smarter Civilian AI?
« on: April 08, 2015, 08:45:35 pm »
Option for example:
If civilian nearby at Xcom soldier (i.e. 2 tiles distance) then player can control this civilian during 1 turn. Almost the same as psi control.

22
Suggestions / Re: Base Defense Mechanics
« on: April 01, 2015, 11:57:07 pm »
Actually it is not a mod. I wrote only 5 strings of code just for this screenshot :)
This is just an concept. At least at the moment ;)

23
Suggestions / Re: Base Defense Mechanics
« on: April 01, 2015, 10:42:59 pm »
Something like that?



This button appears only if the base has base defense.
After activating, the defense trying to shoot down nearby UFOs.
If any UFOs will be shot down by the base defense, this base counted as uncovered by aliens and aliens will send a battleship.

24
Suggestions / Re: In-game manufacturing profitability view
« on: April 01, 2015, 06:22:11 am »
We talk about different things.
I talk about profit for current active production task.
You talk about overall profit on the base.

OK
But maybe info about overall profit on the base  better send to the Base Information->Monthly Cost screen?
For calculation of the Base maintenance.

25
Suggestions / Re: In-game manufacturing profitability view
« on: April 01, 2015, 05:51:04 am »
+8K :D good catch!



Yes, the algorithm has a bug.
Because resources consumed always before the beginning of production.
And because often possible situation when this production task cannot be finished in one month.

Fixed fixed variant:
Code: [Select]
int ManufactureInfoState::getMonthlyNetProfit()
{
const int HOURS_PER_MONTH = 365 * 24 / 12; https:// Also you can use HOURS_PER_CURRENT_MONTH instead

const RuleManufacture *item = _production->getRules();
int numEngineers = _production->getAssignedEngineers();

https:// how many manHours will be consumed for this task per average month
int manHoursPerMonth = HOURS_PER_MONTH * numEngineers;
if (!_production->getInfiniteAmount())
{
int manHoursRemainig = item->getManufactureTime() * (_production->getAmountTotal() - _production->getAmountProduced());
manHoursPerMonth = std::min(manHoursPerMonth, manHoursRemainig);
}
https:// how many items will be manufactured in this month
float itemsPerMonth = (float)manHoursPerMonth / (float)item->getManufactureTime();
https:// for how many items will be consumed resources in this month
https:// (because resources consumed always before the beginning of production;
https://  and because possible situation when production task cannot be finished in one month)
float consumedPerMonth = itemsPerMonth;
if (manHoursPerMonth == HOURS_PER_MONTH * numEngineers)
{
consumedPerMonth += 1.0f;
}

https:// final calculation
int saleValue = _btnSell->getPressed() ? _producedItemsValue : 0;
int consumedValue = item->getManufactureCost() + _usedItemsValue;
int salaryCost = _game->getRuleset()->getEngineerCost() * numEngineers;
float livingCost = ((float)_totalLivingQuartersMaintenance * numEngineers) / _totalLivingSpace;
float workshopCost = ((float)_totalWorkshopMaintenance * (numEngineers + item->getRequiredSpace()) / _totalWorkshopSpace;

return saleValue * itemsPerMonth - consumedValue * consumedPerMonth - (salaryCost + livingCost + workshopCost);
}

26
Suggestions / Re: Enlarged Minimap
« on: March 31, 2015, 04:51:01 pm »
Good idea ;)

27
Suggestions / Re: In-game manufacturing profitability view
« on: March 31, 2015, 04:46:30 pm »
Another example.
What if i start 2, 3, 4 production tasks with 0 assigned engineers. In this case will be many free space in workshops.



Question is, how many times you will count the same free space for all tasks?

28
Suggestions / Re: In-game manufacturing profitability view
« on: March 31, 2015, 01:26:19 pm »
@redv: I like your version of the algorithm -- very clean.  But what does the final number mean to the player?  What are they supposed to do with a value that is scaled by workshop utilization?  That number is not directly related to the actual change in funds the player will see due to manufacturing at the end of the month.

I think the the net change of funds due to all manufacturing-related costs and profits at the current base is what the player really needs to know.  Say you have one living quarters, one workshop, and 10 engineers and are manufacturing (infinite) motion scanners for sale.  In the scaled algorithm you have above, we'd show the profit as $123K.  However, the change in funds due to manufacturing at this base would really be $97K due to the unused workshop space.  Things get worse if you aren't actually allocating all your engineers, or have some engineers assigned to other projects.  If you have 50 engineers but only allocate 10 for this job, the scaled algorithm would still calculate $123K but the actual change in funds at the end of the month (due to manufacturing) would be -$910K!  I think it is important to consider *all* manufacturing resources and liabilities at the base when calculating profit since it really does affect the final result.

thanks @myk002
This algorithm calculates profit for this and only for this production task per average month. Therefore takes into account only resources given for this task. Nothing more.
May be i have 1 workshop, may be 10. May be i use all space in workshops, may be the space is wasted. May be executed another production tasks on this base, may be not. May be assigned all engineers, may be engineers are idle.

Who knows? In all cases this algorithm always will be calculate the same profit for this particular task and for this resources.

You want take into account free space in the workshops.
OK. But why not take into account idle engineers, idle soldiers, feree space in research labs and stores, hangars.
Why not? These factors influence on profit per month too. ;)

29
Suggestions / Re: Base Defense Mechanics
« on: March 31, 2015, 03:07:59 am »
The best using of base defense is if it could be shoot down UFOs, flying nearby.
At least it will be funny:)

30
Suggestions / Re: In-game manufacturing profitability view
« on: March 30, 2015, 03:21:38 pm »
Fixed version:
Code: [Select]
int ManufactureInfoState::getMonthlyNetProfit()
{
static const int HOURS_PER_MONTH = 365 * 24 / 12; https:// Also you can use HOURS_PER_CURRENT_MONTH instead

const RuleManufacture *item = _production->getRules();
int numEngineers = _production->getAssignedEngineers();

https:// how many manHours will be consumed for this task per average month
int manHoursPerMonth = HOURS_PER_MONTH * numEngineers;
if (!_production->getInfiniteAmount())
{
int manHoursRemainig = item->getManufactureTime() * (_production->getAmountTotal() - _production->getAmountProduced());
manHoursPerMonth = std::min(manHoursPerMonth, manHoursRemainig);
}
https:// how many items will be manufactured in this month
float itemsPerMonth = (float)manHoursPerMonth / (float)item->getManufactureTime();
if (itemsPerMonth < 1.0f) itemsPerMonth = 1.0f;

https:// final calculation
int saleValue = _btnSell->getPressed() ? _producedItemsValue : 0;
int consumedValue = item->getManufactureCost() + _usedItemsValue;
int salaryCost = _game->getRuleset()->getEngineerCost() * numEngineers;
float livingCost = ((float)_totalLivingQuartersMaintenance * numEngineers) / _totalLivingSpace;
float workshopCost = ((float)_totalWorkshopMaintenance * (numEngineers + item->getRequiredSpace()) / _totalWorkshopSpace;

return (saleValue - consumedValue) * itemsPerMonth - (salaryCost + livingCost + workshopCost);
}

Upd: changed to _producedItemsValue

Pages: 1 [2] 3 4 ... 19