ZWWoOoOo 因为喜欢所以折腾...无折腾不铁血! Fri, 16 Apr 2021 02:38:38 +0000 zh-CN hourly 1 大清早没事升级下 WordPress,都 5.7.1 了 Fri, 16 Apr 2021 02:35:39 +0000 有段时间没升级 WordPress 了,很久以前就很多人说它越来越臃肿,其实呢,以博客系统来说——是,但它早就不是单纯的博客系统啦,所以慢不一定是它的问题,通常是所用的主机环境以及主题、插件的代码运行效率导致。

WordPress 都 5.7.1 了,刚开始用独立博客它还是 2.x.x,时间飞逝,以前叫我大叔的博友们都变大叔了,被生活、工作压得还能把博客挂在网上的已经寥寥无几。

WordPress 自从换了编辑器,我一直都没切换,还是用的老编辑器——习惯了,新的虽然模块化,但不适应感觉太繁琐,要用鼠标太多。



转载请注明转自: 《大清早没事升级下 WordPress,都 5.7.1 了

]]> 34
ja2_7609+AI 中文版 r2046 Thu, 15 Apr 2021 12:24:30 +0000 详情《JA2 1.13 稳定版 AI 增强 MOD【中文版】

部分 r1944~r2046 新特性视频(Y2B,自备木弟子)


Focus feature:
- soldier can concentrate on selected spot
- focus spot gives +1 bonus to interrupt instantly, up to +4 over time
- no watched location bonus if focus is activated
- penalty -2 to interrupt level outside of focus spot
- can be activated in look mode (L or middle mouse button) or using skill menu (Shift+4, Alt+RMB)

New vision mode:
- default day/bright vision bonus for scopes disabled
- day/bright vision bonus works in focus or spotting area
- day/bright vision bonus works in watched location (soldier can remember up to 3 locations of recently seen/heard opponents)
- AP cost to activate focus/spotting is AP_SPOTTER + distance based bonus
- night/cave vision bonus for scopes works as before
- in spotting mode, normal vision is limited to TACTICAL_RANGE / 4 tiles

Demo video:


Allow to pick up delayed grenade and throw it back, don't show disarm message box for delayed grenade.
Enabled explosion warning for soldier carrying armed object (original feature by Flugente).
Display time counter on picked up activated grenade in inventory.
Don't allow throwing picked up activated grenades as grenades, use throwing regular object code.


SightCoverAtSpot: don't calculate visible distance when using unlimited check. SightCoverAtSpot, AnyCoverAtSpot: optimize search by sorting opponents by distance.
AttachObjectOAS: use activated grenade check only for explosives. AI path tweaks: don't avoid light when using flashlight. AIUseFlashlightCondition: check min MORALE_CONFIDENT. Red AI: avoid light only when not using flashlight.
Only check bDelay for explosive items when trying to attach.
Fixed critical bug introduced in r2041.
DSM fixes.
Show shock percent in portrait bars tooltip.
Only show shock level on face morale bars when in tactical screen.
Shock shock level on morale bar. If shock level is higher than morale and soldier is not under adrenaline effect, apply additional penalty to suppression tolerance, make soldier easier to react to suppression (crouch/go prone).
Show last enemy in overhead map: also show non neutral civilians which have civilian group defined.
Restored default delay between queen reinforcements.
Dragging code update.
Minor code improvements.
Show locations of recently known enemies when SHIFT is pressed. Update knowledge for player when enemy moves into cover.
Don't show draggable objects in hidden rooms.
Show draggable objects when drag mode is active.
Show possible focus/spotting locations: - limit to max possible vision distance - mark knowledge with color, the most recent uses the most bright color
Show possible focus/spotting locations only in look mode.
Limit spotting radius to 1 for night/cave vision.
Reduce bonus from focusing at close range.
Increase spotting radius when using binocs at distance > TACTICAL_RANGE. Disabled tunnel vision for focus spot when spotting/focus active. OCTH, NCTH: no penalty when shooting at unseen target when spotter is active.
Lowered APs to use focus skill. NCTH, OCTH: small bonus for shooting in focused spot. Improved spotting/focus/enemy position circles view on second level.
Show locations of known opponents: allow with binocs in hand.
Improved code to choose vest for soldier. Don't check for MAX_VISION_RANGE when showing known enemy locations.
Show APs in blue, green color when activating focus/spotting. Added AI debug messages. Show locations of known opponents with grey circles, if soldier is active, not unconscious/cowering, looking in the direction of opponent with weapon rai...
Food system: - show message in orange color when stat is damaged - stop time compression when stat is damaged - show message when soldier is hungry/thirsty and there's a risk of stat being damaged - stop time compression if bleeding because...
Stop spotting/focusing: improved code to update sight. DeductPoints: only call StopSpotting if soldier is spotting. Set base/aim penalty when shooting at cowering target as -25.0/-50.0
Removed NEW_AI_TACTICAL option.
NCTH: BASE_SHOCK, AIM_SHOCK define max penalty when shooting at cowering target, scaled with distance (full at TACTICL_RANGE, 0 at zero range).
UseSkill: show message of cannot use skill only for player team. AI: additional check if can use skill before deciding to focus.
Disabled watched location vision bonus for AI. Improved check for valid pSoldier.
Re-enabled auto redisguise code for covert mercs (but you still need to change compromised uniform type).
Soldier AI tooltip: show focus/spotter status.
Radio listening allows to show number of army soldiers on tactical panel.
Tactical panel: show backpack.
Tactical Panel: show number of remaining army soldiers/militia in sector.
Suppression: only cower in crouched stance if cannot go prone.
Suppression: increased min points to react when soldier is under adrenaline. Improved Russian translation.
Always write AI logs if Logs folder exists in game folder. Removed options: - AI_DEBUG_INFO - AI_DECISION_INFO - AI_DECISION_TOPIC_INFO - AI_MISC_INFO - AI_COVER_INFO - AI_SHOT_INFO - BR_INFO
AI focus skill: focus more often on spots that have cover from soldier.
Disabled experimental muzzle flash code.
TileEngine include cleanup (by Asdow).
Cowering after suppression fire: improved code to start cowering in standing/crouched stance.
NewDest: switch crawling to swatting for AI if found fence/water/door in the path.
ChooseArmourForSoldierCreateStruct: - fixed bug resulted in soldiers having armour attachments too often - lowered chance for elites to have armour attachment
ItemIsLegal: don't allow usItemClass = 0.
Improved cover cache: use iterator to avoid second search.
Show message when target soldier is too far for talking. Added missing German string in TacticalStr.
Fixed talking to enemy without having extended ear: increased talk distance to TACITCAL_RANGE. SetAttachmentSlotsFlag: code optimization, use iterator to avoid extra map searching. LogDecideInfo: log focus/spotting information. LogKnowledge...
Removed unused include files in renderworld.cpp
SetAttachmentSlotsFlag: code optimization, cache attachment slots in point/item maps.
SetAttachmentSlotsFlag: improved code to check array bounds.
Don't allow attaching activated grenade.
Main Red AI: use watching more often when using focus skill and in safe spot. Show inactive mercs: show F key when ALT pressed. Improved code to determine AI safe spot.
Allow to pick up delayed grenade and throw it back, don't show disarm message box for delayed grenade. Enabled explosion warning for soldier carrying armed object (original feature by Flugente). Display time counter on picked up activated g...
No interrupt if soldier has suppression points. penalty to interrupt level if soldier is under fire.
Use RMB to switch tactical panel mode.
Limit vision bonus to 5% on INSANE level. Red AI watch decision: don't start focus if soldier is under fire, seen enemy last turn or enemy is closer than TACTICAL_RANGE / 2.
HasThermalOptics: only for scope in focus mode, binocs in hand in spotting mode or gear (face items, helmet etc).
AI use focus skill: don't start for new turn when in turnbased. Re-enabled day/bright vision bonus for AI at watched locations. FindCombatFocusSpot: choose random focus spot from all known opponent locations + watched locations. Red AI: pos...
Green, Yellow AI: possibly use focus skill to scan area.
Added AI_ACTION_STOP_FOCUS action. Red AI: possibly start focusing on highest watched spot when decided to watch. Green, Yellow, Red AI: chance to stop focusing.
CalcInterruptDuelPts: no penalty outside of focus spot (apart from watched location bonus not working). Disabled full vision bonus at watched location.
StartFocusing, StopFocusing, StopSpotting: update sight. GetVisionRangeBonus: small vision bonus for AI on expert/insane level. Don't apply gear bonus if using gbForceWeaponReady/gbForceWeaponReady to correctly calculate scope aiming bonus....
Disabled interrupt on manipulating inventory, only sight is updated.
Improved code to calculate AP to spot/focus.
Increased focus circle brightness. Limited needed watch turns for focus vision bonus to 1.
Add 60% tunnel vision when focusing or spotting. Don't limit normal vision when focusing.
Disabled <VisionRangeBonus> for scopes and binocs (works only for body equipment like face masks). Enabled night and cave vision bonus for scopes without focus/watched location.
Implemented New vision system. For spotter/focus circles on second level, use darker colors.
Show spotter ready icon when spotter counter reaches 2 * gGameExternalOptions.usSpotterPreparationTurns. Use look cursor mode to activate spotter/focus skills. Updated spotter/focus skill code. Show spotting area as green circle.
Focus skill: - up to 4 points interrupt bonus over time - no watched location interrupt bonus if focus is active - circle thickness indicates focus level (1..4) - stop focusing if soldier cowers, swaps hands of manipulates inventory
Improved data initialization.
Stop focus if shooting outside focus spot.
Added Focus skill feature (original code by Flugente). Focus and dragging status is stored in save file. Added PixelAlterColour() function. Stop focusing when spending APs on anything except shooting. Skill traits can now use specified leve...
Smart tree top hiding: increased max distance to hide tree in vertical direction.
Removed AP_SUPPRESSION_SHOCK_DIVISOR. New suppression shock can be more than MAX_SUPPRESSION_SHOCK if current shock value is less than MAX_SUPPRESSION_SHOCK. Improved code to calculate morale loss from suppression.
Update for removed watching feature code.
Removed watching code (need item with <usSpotting> value to use vision bonus). Enabled sight and vision penalty from shock (SHOCK_REDUCES_SIGHTRANGE option). Set max tunnel vision when cowering to 40. Set max tunnel vision from shock to 80....
Suppression shock from heard gunshots: - check MAX_SUPPRESSION_SHOCK > 0 - modify with CTGT - use FLOAT calculation to allow small shock values - penalty if shooting beyond weapon range - modify if shooting at different target - apply fear ...
More transformation actions localizations.
Alt+Shift+B - drop backpacks for all player squads in sector. Sector menu (Ctrl+V) allows to drop backpacks for all player squads in sector. Localized transformation strings for delayed/instant mode.
Black AI: try to continue flanking if soldier is in deep water and not under fire.
Fixed AI deep water flanking. Allow AI to use scuba fins when in deep water. No penalty for ENEMY_TEAM if wearing scuba fins not in water. Added code for AI to drop scuba fins when not in water. Added swimming background for elite soldiers ...
HandleSuppressionFire: ensure min shock value 1 if any suppression happened.
Suppression shock from heard gunshots: - less penalty from morale - increase distance for unmodified shock to TACTICAL_RANGE
Improved code to throw smoke/flashlight.
Red AI: possibly throw flashbang before entering room. Fixed grenade searching check to throw smoke to cover movement.
Medic AI: - ensure sufficient medical skill for AI - don't drain BP when doing first aid for AI
REVEAL_DROPPED_ENEMY_ITEMS_AFTER_COMBAT option should reveal items dropped by all soldiers, not just ENEMY_TEAM.
Better breath restoring with high breath level when using canteen.
Change order for ENEMY_TEAM or non-neutral CIV_TEAM only if soldier is under fire, not underground and not in a room or placed on roof.
Roof vision bonus applies from roof to ground level only, giving more advantage to roof positions.
Red AI: allow suppression more often when soldier is on roof and has prone sight cover.
Doubled canteen effect for restoring breath (when not using food system).
AI: Check if blowing up obstacle when flanking improves path cost.
SwitchOffRadio: stop SOLDIER_COUNTER_LISTEN. Red, Black AI: radio operator wants jamming if player team is listening.
New <ItemFlag>1073741824</ItemFlag> in Items.xml forces grenade to always use delayed explosion mode (only applicable for normal/stun/flashbang hand/gl grenades that don't have fExplodeOnImpact flag). For this type of grenade, delayed mode ...
When using radio in listen mode, show remaining opponents on the overhead map, need 10 turns to show all opponents. Both enemy team and hostile civilians with civ group will be marked on the overhead map. Also, listen radio mode will show ...
Allow small min level of BP regeneration for AI even if having no APs left.
AI soldiers should not use energy when doing first aid. Correctly deduct APs from AI soldier for doing first aid when not crouched (so not staring first aid animation). DecideMedic, DecideMedicCombat: check if AI soldier can afford AP cost ...

转载请注明转自: 《ja2_7609+AI 中文版 r2046

]]> 2
开始重新学习玩儿时玩过的弹弓 Sat, 06 Mar 2021 11:52:52 +0000 春节前想买支玩具枪给小孩玩,发现各大卖场除了软弹就只有皮筋玩具枪,觉得纳闷,以前的水弹枪呢?一搜才知道,又是熟悉的味道:


  • 石头扔过去也会,要不把石头都……
  • 沙子撒眼睛会瞎,要不把沙也……
  • 我一拳过去你不瞎则肿,要不……









儿时玩的都是估打,而且是二三十年前的事了,哪里还会估打中?于是重新学瞄打,刚开始很不习惯,不过很快上手,先从3米学习姿势,很快就5米基本百发百中,现在开始练10米,可惜场地不方便,家里虽然能在客厅 + 饭厅有10米,实在是不方便啊,看来只能常回老家、登山时练习,平时就房间里面练练5米好了。



转载请注明转自: 《开始重新学习玩儿时玩过的弹弓

]]> 40
ja2_7609+AI 中文版 r1942 Sat, 20 Feb 2021 05:44:35 +0000 详情《JA2 1.13 稳定版 AI 增强 MOD【中文版】》,直达百毒 Builds 目录(以后更新就不贴百毒地址了,免得需要改地址)。

(r3xx~r1437 的更新跟 TBS 一起消失了,在此叹下气)

部分 r1438~r1942 新特性视频(Y2B,自备木弟子)


Enemy can use wirecutters to cut path to closest enemy, also flanking soldiers can use wirecutters to cut fence if they cannot find next flanking spot.
EXTRA_ITEMS option adds small chance for enemy soldiers to have wirecutters, depending on soldier class and game difficulty.
Only attacking soldiers will use wirecutters, garrison soldiers will prefer to not destroy fortifications.

Limitations: currently soldier can cut fences only around him, he will not intentionally move to fence to cut it.


New option REPAIR_WIRE_FENCES (FALSE by default) allows repairing cut fences using wire cutters.
Works by assigning bPartnerDelta to cut fence structure information.


Building sandbags is possible with only shovel (only for dirt/grass surface).
Fortification is instant action now, uses AP_USEWIRECUTTERS cost.
Show hammer icon on merc portrait while doing fortification action.
Swapped red/gray fortification cursors to make them consistent with other action cursors.
Allow fortification actions in diagonal direction when action spot is directly near soldier.
Don't play COOL quote when doing fortification actions.
Fixed various fortification related bugs (AP costs, moving to build, cursor type etc).


Added new flag to AmmoTypes.xml: AMMO_AIRBURST = 16, which forces bullet to explode in the air once it reaches range to target or max weapon range.
Airburst ammotype requires explosionSize > 1, highExplosive > 1.
Explosion on the second level now can affect tiles on the first level, if there is no roof above them.
Implemented safety distance - grenade will only explode after traveling at least 5 tiles from shooter (unless it hits something before).
There is some randomization to distance - 33% chance for grenade to explode at each tile once it reaches (distance to target - 1) tiles.
Note: explosion fragments work incorrectly with airburst (actually, with any explosive ammo), so don't use them.


New option "Safe [D] button" in the ingame options allows to stop accidental endturns and also provides new functionality.

Now the player can cycle through mercs in a new way - when you press [D], the game will switch to next closest merc who still has APs, and mark current merc to not select him next time, after all mercs have been selected this way, the process starts again by clearing "selected" flag for all mercs and selecting closest merc. Unlike the [Space] button, all mercs in the sector can be selected this way, not just active squad.

This is how it looks in the game:

No rain sight penalty under roof.
Improved smoke/gas sight penalty.
Limited visibility in smoke to 1 tile.

AI soldiers can try to blow up known opponent from above or below using their TNT.

Experimental feature from Vengeance:Reloaded mod which I plan to also implement in +AI.

Vision bonus works only for selected area when spotting or focus skill is active.
Focus feature allows not only using vision bonus to scout area, but also provides bonus to interrupt in the focus area.
Both spotting and focus limit normal vision to 5 tiles around soldier.
AI uses standard watched locations where it can have vision bonus and interrupt bonus automatically.


You can now give "Move to" order to militia, to place them tactically before battle.
By default, soldier will be switched to FARPATROL/DEFENSIVE mode.
If you don't want militia to move from new spot, give it "Hold" order after arriving, it will switch soldier to STATIONARY.
Some limitations:
- works only in realtime
- if move spot is on different level, soldier will climb but not move further
- you can only order movement to roof if it was correctly defined in editor, some flat roofs cannot be used by AI as they don't have correct room number


New ingame option "Smart Tree Tops" allows to hide only trees that can block view for visible soldiers or cursor position.

r1438~r1942 log(E文不好懒翻译,有兴趣可以细看,不看就游戏中感受)

Improved militia command code.
Smart tree top hiding: more optimization.
Smart tree top hiding: code optimization.
Set final destination for militia when giving "Move to" order to move between level, so it will move to desired spot after climbing. Switch militia to STATIONARY order when giving "Move to" order, so it will not walk away later.
Only spawn legal random items (check food, dirt, sci-fi, tons of guns mode and inventory type). Minor code improvements.
Added 0.1s delay to hide tree top when moving cursor to prevent flickering when moving mouse over trees.
Improved Smart tree top feature.
New ingame options: Smart tree tops.
Fix: UI attack handling prioritised interactive structures over target soldiers even if target soldier was explicitly provided causing deadlocks e.g. when trying to punch enemy overlapped by a door (by anv)
More bullets when shooting with autofire if - soldier is using machinegun and has cover - soldier is under psycho effect - rush attack prepare is active - soldier has spare magazine and has cover
Red AI: more bullets for suppression fire when using LMG or if soldier has spare magazine (OCTH only). Increased chance for suppression fire for SEEKENEMY soldier.
ReInitMergedItem: show item id, attachment id when doing assert.
Fix: guiBaseJA2Clock overflow (by MH17).
CalcMorale: don't limit morale if we outnumber. AnyCoverAtSpot: allow adjacent cover for opponents except closest opponent. AIEstimateCTH: added visibility penalty for spots out of sight.
When changing stance from UI, first stop cowering. Stop cowering when merc starts to move. Increase delay to stop AI when in fast forward mode.
Experimental tweak: don't switch movement to WALKING after water.
Improved communication checks between soldiers: both have extended ear and sector is not jammed or they can see each other and not too far away. Don't stop cowering animation for player merc if he is unconscious. GetSquadleadersCountInVicin...
CalcChanceHTH: only use reduced chance for boxers.
NO_STANDING_ANIM_ADJUSTMENT_IN_COMBAT: only for player. AIDoctorFriend, AIDoctorSelf: first change soldier to stationary. AIDoctorFriend: change target to stationary.
FindSunGogglesInInv: count item is sun goggles if it has day or bright vision bonus > 0. StartRadioAnimation: no animation if in water, invisible or incorrect bodytype. CalcChanceHTH: restored base chance for melee attacks to 67.
Improved code to check if militia options are available. Start radio animation when giving orders to militia. Show locator when "Move to" order is successful, say curse quote if cannot find path. FindClosestClimbPointAvailableToAI: don't ch...
New militia order: Move to (works in realtime only). Cancel current AI order when giving militia order. Don't allow selecting shaded options.
GetItemSlots: use MAXITEMS + 1 as AttachmentSlots limit. Improved path AI code.
CheckDangerousDirection: don't check sight.
Use UINT16 for Item[] loops. PickARandomLaunchable: use 1 + progress / 10 to allow coolness 10 items.
CountCorpses: use soldier's level to check corpse level.
OCTH: reworked code to avoid lucky hits, increased MIN_AIMING_SCREWUP 22 -> 30. AI: don't use reverse movement mode when in water.
EstimateThrowDamage: take into account <buddyitem> tag for single shot rocket launchers.
Added DecideActionUtils file.
Check corpses in a room when deciding to blow up wall or jump window. ClosestReachableDisturbance: decide to move to closest spot where we can blow up wall if opponent is in a room. CountCorpses: - return number of corpses instead of TRUE/...
SightCoverAtSpot, AnyCoverAtSpot: don't check diagonal directions to improve performance.
ClosestReachableDisturbance: speed optimization when searching for jump window - limit search distance.
Path AI: disabled sight/cover checks to improve performance.
AI medic: improved code for militia medics. CalcCoverValue: increase bonus to position which will make enemy turn to shoot. Don't reduce range factor for positions without cover is soldier has SEEKENEMY order. When calculating bonus/penalty...
LBE tooltips: improved code. GetHearingBonus: when using listening skilll, need several turns to reach max hearing bonus. Create AI soldier: give TNT if demolitions trait assigned and EXTRA_ITEMS option enabled. ClosestReachableDisturbance:...
Improved code for LBE tooltip. DecayRottingCorpseAIWarnings: keep min 1 value underground. Always allow suppression for not SEEKENEMY soldier if he can see opponent after turning.
DecayRottingCorpseAIWarnings: improved code to check room and level.
DecayRottingCorpseAIWarnings: keep min value 1 when in combat (only for rooms).
Re-enabled improved LBE tooltips. Red AI suppression fire: less chance for SEEKENEMY.
Disabled extended BR LBE tooltips. UpdateAttachmentTooltips: separated launchables loop. Speed optimization: gMAXATTACHMENTS_READ, gMAXLAUNCHABLES_READ.
Speed optimization: implement gMAXITEMS_READ, gMAXAMMOTYPES_READ. InternalInitItemDescriptionBox: added code to reset incorrect ammo type. UpdateAttachmentTooltips: first check items in a separate loop, improved vector search code. GetItemS...
Bobby Ray: show some additional stats for LBE (MOLLE space available/consumed, MOLLE slots, combat pack/backpack combos) (by rftr). Fixed some warnings.
Stop Speck from spamming your email when multiple new mercs are available on the same day (by rftr).
BeginSoldierJumpWindowAI: for AI, first inflict damage from jumping into closed window, then start jump. IsGivingAid: also check START_AID, START_AID_PRN to allow AI soldier to stop medic animation that just started. AI_ACTION_JUMP_WINDOW: ...
ClosestReachableFriendInTrouble: disabled medic code. Improved medic AI for more consistency, check that healing spot is safe.
AI: don't end turn after starting first aid in turnbased to make healing faster.
Allow to start dragging if only second hand is busy. Reverse movement: limit to 1 tile for seek/cover.
AI searching for items to pick up: - allow to pick up from the same spot even in dangerous situation - use correct item id if weapon is not in hand - take into account trait skills when deciding to pick up weapon - changed code to compare d...
Assigning skill traits to AI: for SMG/Assault rifle, check that gun is autofire/burst capable.
AI skill traits assignment tweaks: - use IC_PUNCH instead of 128 for melee weapons - assign MARTIAL_ARTS_NT for militia only if soldier has brass knuckles - chance to assign demolitions trait if soldier has TNT - assign throwing trait if so...
Removed quick item panel feature. Tactical panel: minor code improvements.
New AI function: CheckClosedWindow. ClosestReachableDisturbance: - improved TNT check - don't change bLevel if found TNT spot
Added CheckWindow function - check window in direction.
EXTRA_ITEMS: - changed default TNT item to C1 - search for explosive item if C1 is not correct explosive, require ubDamage > 40
InitializeMultiplayerProfile: use std::unique instead of std::auto_ptr. Path AI: disabled path flanking to improve performance.
UIHandleNewMerc: - check if can place new merc at mouse location - set arriving spot for merc
New functions: RoomNo, SameRoom. BeginSoldierClimbWindow: deduct APs for jumping when teleporting soldier. Deduct APs when teleporting soldiers to/from roof. AI_ACTION_JUMP_WINDOW: - in turnbased, add random facing change after jump, if sol...
Re-enabled light sprite when throwing flares, but no muzzle flash so no interrupt. Play grenade_breaklight.ogg / grenade_breaklight_delay.ogg for all flare grenades (disabled grenade_flare.ogg / grenade_flare_delay.ogg).
Removed randomness from window jump decision. Removed unused defines: TRAVELCOST_JUMPABLEWINDOW, TRAVELCOST_JUMPABLEWINDOW_N, TRAVELCOST_JUMPABLEWINDOW_W.
Zombie AI: allow jumping through window in Red, Black state if it allows to improve path cost to closest opponent (only if ZOMBIE_CAN_JUMP_WINDOWS = TRUE).
Path AI: moved smart flanking higher in conditions. GetAPsToJumpThroughWindows: code cleanup. New function: BeginSoldierJumpWindowAI, similar to BeginSoldierClimbWindow but for AI. AI_ACTION_JUMP_WINDOW: set next action to AI_ACTION_END_TUR...
CalcMorale: - reworked health/breath modifiers - penalty if friends flanking and soldier is in sage spot - combined attack hit/target collapsed/target suppressed in one check - bonus if weapon is out of range
Only allow path flanking if complex AI allowed.
FindAdvanceSpot: avoid moving into light at night if spot has no standing sight cover.
Added code for AI path flanking (avoid approaching to enemy from direction with corpses).
Renamed WKAEUP_FROM_SLEEP to WAKEUP_FROM_SLEEP. EVENT_SoldierBeginFirstAid: stop dragging. CancelDrag: initialize new animation to fix incorrect position.
Radio Listening skill: - simplified code - don't turn off listening when soldier spends AP (to make it more useful for AI) - need to spend 1 turn listening to start showing noise locators - listening stops when soldier is suppressed (reacte...
CancelDrag: change dragged soldier to stationary. OCTH: disabled additional effective sight based penalty for obstacles.
AI: - limit some special actions to ENEMY_TEAM (use TNT, use wire cutters, smoke to cover position, blow up fences with grenade) - make AI want to use listen skill when in rain - allow black cover advance code for militia and civilians
OCTH: increase minimum miss to prevent lucky shots with low CTH at distance.
Main Red AI: allow taking cover in realtime at the start of the turn if soldier recently saw/heard enemy, with 30% chance. GetSightAdjustmentStealthAtLightLevel: linear scale from darkness level.
GetSightAdjustmentCamouflageOnTerrain: scale camo with light level. LightTrueLevel: re-enabled full effect of shadows on light level at night.
Long jump: - change to stationary stance before jumping (fixes problems with jumping from moving animation) - switch to standing animation before jumping if soldier is prone (allows to correctly jump from prone stance)
New option NIGHT_SHADOWS (FALSE by default). NightBonusScale: full night vision bonus in darkness. OCTH: disabled aim time bonus for max CTH. LightTrueLevel: shadows have no effect on light level at night.
Added basic requirements to start snitching (alive, conscious, not in transit etc).
Fixed AI role icon display.
Path AI: sniper should avoid spots without cover.
EstimatePathCostToLocation: safety checks.
Medic AI: prefer safe path with cover from opponents. CheckForChangingOrders: switch BRAVESOLO< BRAVEAID, AGGRESSIVE medic to CUNNINGAID. CalcMorale: limit AI morale for AI medics if there are friends nearby and no successful attack.
WillExplosiveWeaponFail: play dry fire sound to indicate weapon fail. CheckForChangingOrders: switch medic to defensive attitude. AICheckSpecialRole: add medic to special AI role.
DecideMedic: - limit self healing to the start of the turn - fixed bug with changing facing
Reworked medic AI code. CanMedicAI: check merc bodytype. WillExplosiveWeaponFail checks: if explosive type is not normal, use mini grenade explosion. GetClosestWoundedSoldierID: skip friend in turnbased if he is not bleeding and not dying
New icon for AI GL operator. Disabled flanking when underground, simplified start flanking code.
New enemy AI role icon: GL launcher. New enemy additional icons: has key, has TNT.
Main Red AI: - moved decision weight calculation to PrepareMainRedAIWeights - don't search for cover in realtime
End muzzle flash and show message if it hasn't been ended correctly, when: - soldier spends AP - soldier moves at new tile - soldier begins new turn
Reduce default MAX_MOVEMENT_PENALTY to 40. Set default DIRECTIONAL_PENALTY = FALSE. Disable default INSANE vision bonus. Disable muzzle flash when throwing items. Disable muzzle flash when throwing flare/molotov as it doesn't get removed co...
Allow AI to mark INVISIBLE bomb as seen if it has LOS to it. Inventory choosing: reduce chance for AI to have TNT, make it dependent on difficulty level.
CountKnownEnemies: allow to check level. AI_ACTION_PLANT_BOMB: reduced delay to 1-2 turns. Use TNT to blow up enemies nearby: reduced chance to plant bomb. Use TNT to blow up walls and fences: - only at the beginning of the turn - always a...
AI_ACTION_PLANT_BOMB: set dropped bomb to INVISIBLE.
Player mercs should avoid moving into gas/fire when in autobandage mode or under AI control.
Reworked spot danger checks to use SpotDangerLevel. Removed CheckNPCDestination. SearchForItems: allow same spot for picking up items, regardless of danger level. Code cleanup and optimization.
AI_ACTION_PLANT_BOMB: - randomize delay 1-3 turns - set trap difficulty as 6 + SoldierDifficulty
IsLocationSittable: return FALSE if location on roof is not sittable.
IsLocationSittableExcludingPeople: return FALSE if location on roof is not sittable. ClosestReachableDisturbance: when checking spot to plant bomb, check if location is sittable.
CheckForEndOfBattle: disable AddPossiblePendingEnemiesToBattle() to prevent bug with enemy appearing in sector after the battle end.
New AI function: CountKnownEnemies() CheckForChangingOrders: - switch special role from BRAVESOLO/BRAVEAID/AGGRESSIVE(except machinegunner) to CUNNINGSOLO/CUNNINGAID - set Commander/MortarOperator/RadioOperator to DEFENSIVE - switch SEEKENE...
CheckForChangingOrders: - switch special AI role to defensive - switch SEEKENEMY/DEFENSIVE to CUNNINGSOLO to make attacking AI more aggressive
Allow higher chance when spreading fire: use sqrt(1 + ubGeneration).
OCTH: - limit max long range penalty to AIM_BONUS_SAME_TARGET - penalty for shooting beyond visual range, up to SHOOT_UNSEEN_PENALTY at double visual range - no penalty for assisted shot - when calculating max aiming bonus, use average from...
AI: don't try to blow up cliffs.
Red AI: allow chance to really hit = 1 when deciding suppression fire.
AbortPath, AbortFinalSpot: added smoke check to light at night check, minor code improvements.
AbortPath, AbortFinalSpot: simplified light at night check.
Restored first aid code.
Red, Black AI: more restrictive rush attack, less chance when high percent killed.
Red, Black AI: allow soldiers to blow up walls/fences/obstacles when flanking or to improve path cost. AI_ACTION_PLANT_BOMB: added DROP_ITEM/CUTTING_FENCE and THROW_IMPACT_2 sound. CountCorpses: simplified code, always check visible. Decide...
AI: improved code to cut wire fence. Inventory choosing: added chance to create TNT.
Main Red AI: fixed weight calculation.
HandleItem: use current spot and direction for self healing to prevent endless clock.
CalcBestShot: - improved shoot through walls check - disabled return fire code
CalcCoverValue: - allow advance to zombie/bloodcat/melee opponent if beyond gun range - when checking for retreat, always check if new spot is in gun range - apply aggression booster only when iRangeFactor > 0
Increased max distance for reverse movement mode to 2. Simplified reverse movement mode code. Reworked code to determine reverse movement mode.
More first aid kits for AI, depending on difficulty and game progress.
NWSS: play room effect for first shot only.
AI inventory choosing: more variety for mortar shells, improved hand/GL grenade choosing code. Added AICheckWeOutnumberSector AI function. AICheckWeOutnumberPublic: always require 2x number.
DetermineMovementMode: allow CRAWLING near fences when taking cover.
Tweaked AI path penalties.
Covert operations: when alert raised and team recently saw/heard any enemy, immediately uncover any spy, except cowering civilian spy.
Simplified CorpseWarning code: always return highest number of nearby corpse AI warning.
Simplified AI corpse warning code.
CalcBestShot: penalize standing/crouched stance for heavy weapons. AI: reduced weapon holding BP cost for raising weapon to 30, allow to raise weapon when crouched or prone.
Tweaked the GL grenade number bonus for AI equipment.
More ammo for mortars and grenade launchers when choosing AI inventory.
SightCoverAtSpot bug fix: when checking adjacent reachable tiles for unlimited sight, use new spot.
AI: - improved mortar use code: use next action to fire mortar after stepping back - use AICheckSpecialRole
Improved any cover check.
Experimental AI tweak: take into account movement penalty for enemy when deciding best cover, only if soldier is under attack or used weapon this turn.
SightCoverAtSpot: improved code to check structure density.
Improved code for AI path tweaks. SightCoverAtSpot, AnyCoverAtSpot: simplified code. AbortPath: initialize sDangerousSpot, sLastSafeSpot. AbortFinalSpot: initialize sDangerousSpot.
AI: - improved code for using flashlight to reveal enemy position - improved code for using smoke to cover movement
Added FindFenceAroundSpot() function. StopTacticalOrderL initialize ubTacticalTurns with 0. Improved code for using smoke for cover when flanking.
Non-neutral civs should also discover active bombs.
Improved code to check bomb nearby. Using grenade for special purpose: not during interrupt, check SoldierAI.
AI: - only zombies, creatures, bloodcats, unarmed soldiers and neutral soldiers ignore empty vehicles - ignore empty vehicle if there is reachable regular opponent - prefer regular opponent over empty vehicle when deciding shoot or throw - ...
HandleSight: also set bomb visibility.
NCTH: when calculating movement offset, apply min aperture depending on distance.
Don't check valid spot when starting to spot/watch. Increased chance for soldier to have wire cutters. SumDistanceToKnownEnemiesInRoom: fixed code. CheckTossGrenadeSpecial: - fixed code to find number of adjacent tiles of destructible obsta...
Improved code for watching/spotting.
VR r2698 fix: snitch assignments were not properly taking mercs out of vehicles
Improved muzzle flash code for grenades. CommonEnterCombatModeCode: fixed DebugAI code.
Increased AP cost to use radio set.
RedSmokeDanger: set min terrain density to consider spot safe to 75.
Improved r8460 fix: also check for incorrect ammo item. Red AI: fixed cautious move spot check.
Red AI: Improved cautious move check.
Set min 1 tile for distance when applying sight adjustment if original sight distance > 0.
GetSightAdjustment: use max from camo/stealth penalty. AICheckSpecialRole: added GL role.
Enable muzzle flash for flare/molotov.
Experimental fix: stop muzzle flash in InternalReduceAttackBusyCount at the end of the attack instead of UIHandleLAEndLockOurTurn. Don't show muzzle flash when unjamming weapon. UseHandToHand: no bonus to strength when using taser. OCTH: pe...
Main Red AI: improved code for watching modifiers.
InLightAtNight: - simplified code - always check light in a room
Reduce light for destroyed tank after 60 minutes. Check destroyed tanks more often. Correctly show muzzle flash when shooting. OCTH: weapon penalty starts from max(NORMAL_RANGE, max_weapon_range / 3).
Reduce light radius for destroyed tank after DELAY_UNTIL_ROTTING.
Added light for destroyed tanks. Changed message color for drop/pick up backpack to yellow.
CalcBestShot: fixed bug with checking LMG when suppressing. Main Red AI: helping does not prevent seeking. FindFlankingSpot: - set search range to TACTICAL_RANGE / 4 - don't limit AP search budget - changed edge check to NorthSpot
HandleArmedObjectImpact: fixed bug. Artillery strike code uses INT32 for gridno.
Reduce bonus from laser in day light. WatchedLocLocationIsEmpty: - improved code to check if new gridno is out of bounds - use knowledge functions - don't ignore collapsed/cowering OCTH: - start weapon penalty from NORMAL_RANGE - minor co...
Always make tank/vehicle corpses visible. Use wire cutters to cut fence: fixed bug. allow buddy explosion for flares (use for sound and animation).
Use non-linear law when determining stat improvement speed.
Improved code to slow down stat improving speed with high stat value/high delta. AI_ACTION_RED_ALERT: taunt only when raising alert for the first time. HandleInitialRedAlert: improved code to set alerted status for QUEEN and JOE.
Fixed breaking AI deadlock code.
Max darkness in shadows halves night vision bonus instead of completely removing it. NCTH, OCTH: improved code to determine target visibility. Improved code to break AI deadlock when ESC key pressed.
DistanceVisible: don't allow returning negative value. CheckForEndOfBattle: re-enabled check to see if more enemy soldiers exist in the strategic layer. OCTH: no aiming if sight is blocked completely.
Update sight when manipulating inventory. Improved code to start watching/spotting. DistanceVisible: - vision penalty should apply to all directions - apply cowering penalty even if soldier has no tunnel vision CanSpot: improved code to ch...
Increment watched location when soldier hears enemy: check sight with raised weapon. CalcMorale: make only hostile civilians more aggressive. AbortPath: use SafeSpot check for last safe spot.
Uncover military spy on sight in combat situation.
When alert is raised, uncover any spy on close look, except cowering civilian spy. Don't reduce suspicion level if any alerted enemy recently saw/heard this spy.
ClosestReachableFriendInTrouble: less restricting max distance check in turnbased.
AICheckSpotTooFar: - FALSE if high percent of soldiers was killed - allow max range if soldier heard enemy recently
Don't allow soldiers to spawn at top north spots.
CalcManThreatValue: - take into account 100AP/25AP system - use ShockLevelPercent instead of bShock - use cube level 1 when checking CTGT
CalcBestShot: - allow blind suppression fire for all teams except MILITIA_TEAM - improved LOS checks to take into account weapon raising - allow machinegunner to suppress any target - allow shooting through walls if high percent killed - al...
Disable LOS caching.
Renamed LOS functions.
Increased temp string sizes. Code formatting.
Reverted old/new F1..F10 selection method. Mercs don't die instantly option: increased damage to health below OKLIFE. Increased damage to health below OKLIFE for robots and zombies.
DEFEAT_MODE option: fixed max value 4. PlayerStrength: improved code, also count covert soldiers. EnemyStrength: improved code. HandleMoraleEvent: fixed MORALE_RAN_AWAY, no penalty if soldier has covert trait and is in covert mode. CheckFor...
New option DEFEAT_MODE: - 0: default, any lost battle is considered defeat - 1: if found alerted opponent in sector - 2: if at least one of retreating mercs is not covert - 3: if at least one merc was killed in battle - 4: if all mercs were...
SightCoverAtSpot: improved enemy sight code. Code formatting.
Also take into account MILITIA_TEAM aware status when retreating/losing battle.
Apply morale/reputation penalty when retreating from sector/losing battle: also if CIV_TEAM was alerted. Also log defeat when losing battle if CIV_TEAM was alerted. Only play MUSIC_TACTICAL_DEATH when battle is lost if ENEMY_TEAM or CIV_YEA...
CalcChanceToHitGun, CalcNewChanceToHitGun: improved code to determine target visibility.
CalcCounterForceAccuracy, CalcChanceToHitGun, CalcNewChanceToHitGun code optimization: check SEEN_CURRENTLY knowledge before checking LOS.
CalcBestShot: initialize bAimShotLocation = AIM_SHOT_RANDOM. Suppression fire: if low CTGT at current bAimShotLocation/bTargetCubeLevel, try to shoot higher to avoid hitting cover.
Tactical panel: changed "suppressed" string to "under fire". NCTH, OCTH: don't count target as unseen if player merc is aiming at visible soldier.
CalcMorale: improved code to limit AI morale from morale/shock level.
[F] key: show first line with ORANGE font to better distinguish information. Code cleanup, removed unused code. CalcChanceToHitGun: fixed gun condition related bug in max weapon aim calculation. CalcMorale: allow MORALE_HOPELESS when under ...
OCTH: - changed close range, long range to be based on TACTICAL range instead of DAY_VISION_RANGE - re-enabled long range reduction for directional movement penalty - re-enabled long range reduction for animation movement penalty
AICheckWeOutnumberPublic: changed distance to TACTICAL_RANGE.
AdjustMaxSightRangeForEnvEffects: no bonus from lightning for tiles under roof. CheckForGunJam: allow rain penalty when on the second level.
CheckForGunJam: apply rain penalty only if there is no roof above.
LineOfSightTest: improved smoke visibility test.
CalcCoverValue: - allow STATIONARY soldiers advance when moving into cover or on the roof (except moving to the edge of the roof). - only allow retreat if morale is worse than MORALE_CONFIDENT CalcMorale: - only limit morale category from ...
GetItemAimBonus: reverted code to square law from 0 to full at minrangeforaimbonus.
GetItemAimBonus: - zero bonus if range < minrangeforaimbonus - full bonus if range >= 2 * minrangeforaimbonus - linearly scale bonus from minrangeforaimbonus to 2 * minrangeforaimbonus OCTH: - improved max weapon aiming bonus calculation -...
GetMoraleModifier: use bMorale for AI instead of bAIMorale.
CalcBestThrow: - reverted MAX_TOSS_SEARCH_DIST to 1 - increase search range to 2 if complex AI is allowed - don't increase search range for gas grenades
Increased MAX_TOSS_SEARCH_DIST to 2. CalcBestThrow: - don't even check opponents too far for a throw - changed max distance to consider damage to opponent to max(3, ubSafetyMargin / 2)
CalcBestThrow: fixed bug ending throw search if one if the checked spots was too far for throw.
CheckTossGrenadeAt, CheckTossAt: avoid offscreen tiles as they may cause bugs when attacked.
CalcBestThrow, GetBestAoEGridNo: exclude offscreen tiles as they may cause bugs when attacked.
Don't allow artillery/mortar attacks to hit offscreen spots, to prevent bug with incorrect object trajectory or game crash.
OCTH: reduce penalty for target hiding crouched/prone behind obstacle, if shooter is on roof and target is on floor level.
Show message when AI radio operator uses radio.
Civilian spy: only covert LBE allows to hide restricted items on close look.
Add smoke after explosion: only on visible world tile. RandomGridFromRadius: improved code.
Reverted M_PI to PI.
ArtilleryStrike: supply GetArtilleryLaunchParams with launcher item and not just mortar shell, as it will check it's range later. RandomGridFromRadius: new code, avoid selecting spot not on visible world tile. GetArtilleryLaunchParams: adde...
Updated names and tooltips for ingame options.
Use Alt+Arrow to switch to closest merc in direction. Use Alt+D to switch to next unused merc. If "Smart selection" option is enabled, show next smart selected with light gray name, show next unused with light gray name if Alt is pressed. U...
Added new ingame option: "Smart merc selection", which allows to use [D] button to quickly switch to closest merc. This option requires "Safe [D] button" option to be active. If "Show inactive mercs" option is also selected, the name of the...
FindNextSmartSelectMerc: improved code to allow also checking considered mercs. Ctrl+Shift+D - disable interrupts for this merc until the end of this turn. Ctrl+D - end turn in turnbased. Ctrl+D - start turnbased when in realtime mode.
OCTH: - increased base weapon aiming bonus to 40 - added gun status/condition to OCTH tooltip
Updated tooltip and description for Safe [D] option.
When safe [D] button option activated: - [D] switches to next closest merc who haven't been considered yet, if all mercs have been considered, it clears flag for all mercs and starts again - [Ctrl]+[D] ends turn (without disabling interrupt...
Increase min duration for signal smoke to prevent it from disappearing before the artillery strike starts.
New ingame option "Safe [D} button": disabled [D] button in combat. Localized strings for disabling interrupts until the end of turn. Improved Russian translation.
GetBestAoEGridNo: improved code to store excluded tiles.
Artillery strike: - count opponents seen/heard 2 turns ago - use full RADIO_OPERATOR_MORTAR_RADIUS when checking for friends/opponents - min rating to allow artillery strike depends on difficulty level
OCTH tooltip: added effective marksmanship, morale bonus and fatigue penalty.
OCTH: compensating stability penalty requires high experience level and high effective dexterity.
OCTH: - show animation/directional penalty in one line as the game uses only max value - start base weapon range penalty (1% per tile) from NORMAL_RANGE * 2 - use square low when calculating base stability penalty - fixed close range penalt...
Disqualify boxer if any player merc throws/drops something on the ring after the boxing started.
Hopefully improved AI code: don't try to resume movement after ActionDone was executed. Limited AI reverse movement to 1 tile. Added more AI debug information.
Don't add burn marks from jump grenades. Disable smoke creation for explosions on level = 1 without roof. Make smaller smoke from explosion for jumping grenades.
Airburst: - improved code - changed chance to explode at each tile starting from distance - 1 tiles to 33% - always explode after reaching distance + 1 tiles
Airburst feature: - added safety distance - grenade will only explode after traveling at least 5 tiles from shooter (unless it hits something before) - added some randomization to distance, there's a 50% chance for grenade to explode at eac...
Added new flag to AmmoTypes.Xml: AMMO_AIRBURST = 16, which forces bullet to explode in the air once reached range to target or max weapon range. Airburst ammotype requires explosionSize > 1, highExplosive > 1. Explosion on the second level ...
CalcBestThrow: - use correct known opponent's level when calculating CTH with rocket launcher - need higher CTH and CTGT (at least 80%) to decide to attack opponent in a room (or from a room) with hand grenade or grenade launcher, also appl...
CalcCoverValue: - improved sight check - optimized code - lowered penalty from no cover when advancing
CalcCoverValue: - don't allow advancing for soldiers with STATIONARY order - don't allow advancing when in a room except when advancing to room tile with cover or to a roof tile not on the edge
EDB: minor code improvements.
Improved EDB code: do not show AimLevels, PercentTargetTrackingSpeed and PercentDropCompensation when using OCTH.
Improved OCTH tooltip code.
Slightly changed OCTH tooltip order.
Use bExpLevel instead of EffectiveExpLevel for AI calculations to speed up code execution a bit.
OCTH: - modify max weapon aim by gun's status - modify max shooter aim by soldier's breath level - code optimization
OCTH tooltip: added chance before applying weapon limit.
Improved OCTH tooltip. Improved code for max weapon aim.
OCTH: improved code for max weapon aim bonus.
OCTH: max aim bonus = min (max weapon aim, max shooter aim).
Update sight when doing item transformation.
Improved disarming code.
Added more OCTH info to OCTH tooltip (EXT_TOOLTIP_CTH option). Scope uses square law to modify sight range, depending on aim: no modification with no aim, normal modification with 4 aim clicks, square modification with 8 aim clicks.
Interface: check GetAimBonus with GetMinRangeForAimBonus as distance, to get full aim bonus. GetItemAimBonus: - provide full aim bonus at distance > minrangeforaimbonus - scale aim bonus with square low at distance < minrangeforaimbonus OCT...
Covert: - instead of damaging vest, mark this uniform type as compromised, so next time this spy will be seen in the same uniform he will be uncovered - when spy is uncovered, play "inform about" taunt - updated covert related strings
Only apply CTH penalty to AI soldier if he can have skills to compensate.
Do not uncover civilian spy at close distance when alert is raised if spy is cowering.
Mark soldier as doing suspicious action, if: - he is heard making any type of attack - if someone is suppressed by his attack - if someone is taking damage, and attacker was recently seen/heard by soldier being hit
CheckForEndOfBattle: clear enemy kill counter when battle is finished.
Covert: - uncover military spy on sight if observing soldier is alerted - uncover civilian spy at close range if observing soldier is alerted
OCTH: improved penalty for shooting at close range with long range weapons.
Unified code to check if soldier should use civilian AI. SoldierAI: exclude civilians.
Improved AI RPG use: - check for friendly fire chance when using rocket launcher - set min chance to hit 80% when deciding to use rocket launcher, except tanks or when shooting at tank - changed min chance to hit to use launcher/RPG so that...
Test if civilian carries clothes only on close look.
AI: - improved civilian AI behavior (cower/stop cower/run away in battle) - allow using grenade launcher underground as it uses low trajectory and can hit targets up to 200m
OCTH: 10% penalty at max weapon range.
OCTH: - shooting pistol one handed: penalty 5% - shooting SMG one handed: penalty 10% - shooting dual handed: penalty DUAL_SHOT_CTH_PENALTY which can be reduced with ambidextrous trait by PENALTY_TO_SHOOT_DOUBLE_GUNS_REDUCTION value
CanDragInPrinciple: one of the hands should be free and should not carry two handed weapon in main hand.
VR r2621 fix: freeze when ending turn with the squad list open and inventory auto-collapse enabled (by anv)
Only show "suppression fire" message if target soldier cannot be seen after turning. CTGT(): fix bug with restoring original spot. CheckSuppressionDirection: improved code. Black AI: allow prefer bullets over aim when using NCTH, add chance...
Limit suppression fire if SUPPRESSION_EFFECTIVENESS < 100.
Added AI CTGT functions: - from soldier to soldier - from soldier to soldier with specified location, level and animation state - from soldier to location - from soldier to location with specified location, level and animation state
When initializing cover cache (start/refresh/cancel AI, begin new turn), also stop/clear individual LOS cache.
When ALT key is pressed, show [F1]..[F10] together with merc's name to indicate the key to quick select this merc. With default selection method, F1..F10 selects merc, with old selection method, just locates. Fixed incorrect spelling. Warni...
CanSeeEnemyAtSpot, CanSeeProneEnemyAtSpot: use unified function with stance argument. SightCoverNearSpot, ProneSightCoverNearSpot: use unified function with stance argument. SightCoverAtSpot, ProneSightCoverAtSpot, CrouchedSightCoverAtSpot:...
CanSeeEnemyAtSpot, CanSeeProneEnemyAtSpot: improved LOS check to take into account sight bonuses/penalties. SightCoverAtSpot, ProneSightCoverAtSpot, CrouchedSightCoverAtSpot: LOS check to take into account sight bonuses/penalties.
AddNoiseAtRandomSightCoverSpot: - doubled max search range if complex AI allowed - reset gubNPCAPBudget, gubNPCDistLimit when path searching is finished
Allow complex AI: improved code, removed unnecessary gfTurnBasedAI check. Black AI: try to use regular grenade for special purpose if soldier cannot attack or has low CTH.
FindNearestUngassedLand, FindNearbyDarkerSpot: - optimization: don't check spots already checked in previous loop - increase max distance to 35, reduce to 25 if complex AI not allowed, reduce to 15 in realtime
Raise suspicion for covert: for seen/heard this turn, check if spy can be seen by soldier (if he turns).
Fixed critical bug in LOS function.
For AI, replace SoldierToSoldierLineOfSightTest, SoldierTo3DLocationLineOfSightTest, SoldierToVirtualSoldierLineOfSightTest and LocationToLocationLineOfSightTest with LOS functions. Fixed incorrect AI LOS checks. CanDragPerson: use world mo...
Added new LOS functions: location to location (uses stance instead of LOS_POS), soldier to soldier (with option to force weapon ready). ClosestReachableDisturbance: check all opponents when in combat situation (if soldier is under fire or s...
Red, Black AI: - possibly update knowledge before any other actions. - added more debug information
TellPlayerAboutNoise fix: one direction was not checked when using Extended Ear. DecayPublicOpplist: apply HEARD_3_TURNS_AGO tweak only for valid opponents. TeamSeesGridNo: only check friends that are not too far from GridNo or look in it's...
New AI function LOS: check line of sight from soldier to soldier using specified position/level/stance. Removed SoldierAtGridNoToSoldierLineOfSightTest function. Reverted r8112 fix: for tanks use default LOS pos. Minor code improvements, wa...
Code cleanup, formatting.
Red, Black AI: don't start retreat/rush attack if another tactical order is active.
Play USE_WIRE_CUTTERS sound when repairing wire fence. Play Sounds\Misc\Fortification1.ogg .. FortificationN.ogg sound when doing fortification action.
Red, Black AI: stop retreating if current spot is safe. Black AI: start retreating only if morale < MORLE_CONFIDENT. SpotDangerLevel: also check Water and CorpseWarning for danger level = 1.
Use tactical order code for rush attacks and retreats. Minor code improvements and warnings fixes.
Use SOLDIER_DOING_FORTIFICATION flag instead of usMultiTurnAction to show fortification icon on merc's portrait. Renamed bOverTurnAPS to sTacticalUnused. Renamed sMTActionGridNo to iTacticalUnused. Renamed usMultiTurnAction to ubTacticalTur...
Moved flanking flag SOLDIER_EXTRA_FLANKING from usSoldierFlagMask to TACTICAL_FLAG_EXTRA_FLANKING in flags.ubTacticalFlags.
Red AI: don't start flanking if another tactical order is active. Change type of ubTacticalFlags to UINT8.
Minor code improvements.
Reworked flanking code to use bTacticalOrder.
SOLDIERTYPE: renamed bRTPCombat to bSuppressionShock.
Removed OLDSOLDIERTYPE_101 class.
Added enum for tactical order types. SOLDIERTYPE: formatting, added comments.
Flanking: minor code cleanup.
ManSeesMan: also call SetNewSituation if opponent's level is different.
ManSeesMan: only call SetNewSituation if location is different to reduce frequency of AI re-evaluation.
Red, Black AI; improved code to reserve APs to go prone/hide after shooting. Only allow radio animation on initial red alert
Improved code for militia/enemy artillery strike, added small chance for smoke shells on low progress.
HandleSight: check if soldier can see hidden corpse and make it visible (only for player team or militia team, if WE_SEE_WHAT_MILITIA_SEES_AND_VICE_VERSA = TRUE). Skill Menu: check if can drag corpse before adding it to menu. Added support ...
Press ESC to close skills menu. Press ESC to stop dragging. Minor code improvements.
Only load StructureMove.xml file if it exists, to allow compatibility with stock 1.13 and mods.
r8870 Improved feature: structures can be dragged. Which ones is defined in a new xml (by Flugente)
When assigning bNextAction, also clear usNextActionData if not used. When switching to bNextAction, clear iNextActionSpecialData since we don't need it anymore.
CancelAIAction: clear next action data. TurnBasedHandleNPCAI, RTHandleAI: clear next action data before making decisions.
Don't show "no clothes item in xml" to allow using new camo palette without defining all new clothes in XML Fixed compiler warnings.
Minor code cleanup.
Lua: minor code improvements.
Fix compiler warnings.
Check full item size (with attachments) when trying to put item into gun sling.
PopupAttachmentInfo class: added missing initializations in constructor. DragSelection class: added missing initialization in constructor. GenerateRandomEquipment: fixed alcohol item check. Fixed some warnings.
BuildString class: added missing assignment operator. MERCPROFILEGEAR class: added missing copy constructor. WORLDITEM class: added missing copy constructor. CheckForGunJam: fixed min/max reliability limits. Fixed some warnings.
ClosestReachableDisturbance: - don't skip opponents if knowledge on last found opponent is HEARD_3_TURNS_AGO - only check noise locations if soldier haven't seen opponents recently and closest disturbance is not reachable or noise is closer...
CalcBestShot: - check max aim only of complex AI not allowed or if solder is sniper/marksman and not in close combat. - sniper/marksman prefer shot with max CTH instead of best hit rate - prone soldier prefers max CTH instead of best hit r...
Allow building sandbags with shovel on any terrain where filled sandbag can be placed. Improved code for building fortifications with shovel.
Allow creating fortification with shovel if there is full sandbag in inventory. When creating fortification with shovel, first use full sandbags from inventory, them use empty sandbags.
Making fortification with shovel requires empty sandbag in inventory, which get used in the process. Removing fortification creates filled sandbag on the ground. EXTRA_ITEMS option: add shovel and empty sandbags to some of enemy soldiers.
Disabled retrieving sandbag item when removing fortification.
Red, Black AI: allow using wire cutter for garrison soldier if rush attack active.
Don't play USE_WIRE_CUTTERS sound for fortification actions. Play PICKING_SOMETHING_UP sound when finishing fortification action. Fix problem with entering certain sectors.
Don't play COOL quote when doing fortification actions.
Allow fortification actions in diagonal direction when action spot is directly near soldier.
Improved fortification code, fixed various fortification related bugs. Soldier can use shovel to build fortification without sandbags, only on grass/dirt surface.
Uncover spy if dragging someone.
Repair fences: - use AP_USEWIRECUTTERS for AP cost - correctly calculate AP when soldier needs turning to start repairing fence - disable repair cursor when soldier is prone
Disabled multi turn actions, all fortification actions are instant and use wire cutter code. Fortification actions cost AP_USEWIRECUTTERS. Fixed AP calculation for wire cutter and fortification cursor when soldier needs to turn first. Show ...
ClosestReachableDisturbance: fixed bug with using stored closest reachable opponent. Improved code to repair structures. Improved code to store original structure for structures that can be swapped (use tile database instead of checking the...
Use toolkit to repair wire fences instead of wire cutters. Using toolkit to repair wire fences takes 5-15 status points.
Soldier structure: use InitializeExtraData() to initialize all added extra data that is not saved. ClosestReachableDisturbance: in realtime, check only closest opponent if Slow PC options is enabled.
ClosestReachableDisturbance, ClosestReachableFriendInTrouble: improved code, store found friend/opponent in the first loop if successfully passed all checks.
ClosestReachableDisturbance, ClosestReachableFriendInTrouble: always check stored friend/opponent first, then check other soldiers.
ClosestReachableDisturbance, ClosestReachableFriendInTrouble: improved AI optimization code.
AI speed optimization: lower max search range when searching for items in realtime or if complex AI not allowed
AI speed optimization: - remember last reachable opponent (for 1-5 turns), ignore other opponents except closest known, if complex AI not allowed - when complex AI not allowed, ignore opponent if farther away than closest reachable - rememb...
Allow breaking AI with ESC key after 1 second.
Suspicion counter: bonus if opponent previously saw this spy uncovered.
Improved gbSeenOpponents code, use special value for uncovered opponents.
Improved check for gbSeenOpponents[]
Improved code for unintended hits: reduce chance to hit enemy with distance.
NCTH: limit max deviation only when shooting at visible target.
DamageSoldierFromBlast: - improved check for various types of explosives - heavy weapons skill provides DAMAGE_TO_TANKS_PERCENT_BONUS against tanks only when using rocket launcher - heavy weapons skill provides HW_DAMAGE_PERCENT_BONUS when...
Red, Black AI: allow longer autofire for tanks fore better suppression.
Fixed SOLDIER_TAKEN_LARGE_HIT, SOLDIER_TAKEN_HIT flags for vehicles/tanks.
EXTRA_ITEMS option fix: chance to give wire cutters to elite/regular soldiers.
Enabled REPAIR_WIRE_FENCES option.
New option REPAIR_WIRE_FENCES (FALSE by default) allows repairing cut fences using wire cutters.
Red AI: - improved code for cutting fence for flanking - added NewOKDestination check when finding spot to shorten path
EXTRA_ITEMS option: added chance to equip soldier with wirecutters. Red, Black AI: - soldier can try to cut fence when flanking if he cannot find next flanking spot - soldier can cut fence with wirecutters if it allows him to shorten path ...
Red AI: - radio operator may decide to jam frequencies if team is attacking and there are radio activated bombs in sector and RADIO_OPERATOR_JAMMING_BLOCKSRADIOBOMBS = TRUE - radio operator may decide to use listening mode if RADIO_OPERATOR...
Increased penalty for boxers for tiles with blood and marbles. New AI action: AI_ACTION_HANDLE_ITEM.
Medic AI: added code to drag wounded friend into safe place.
New AI action: AI_ACTION_CANCEL_DRAG. IsActionAffordable: added support for missing AI actions. AI: - stop dragging before deciding anything - use IsActionAffordable() check for AI_ACTION_DRINK_CANTEEN and AI_ACTION_USE_DRUG
BecomeSpotter: only show messages for player team. Red, Black AI: medic can use smoke grenade to cover himself and wounded friend before starting healing. Added more debug info to medic/first aid AI.
Re-enabled using radio for calling artillery or reinforcements during player interrupt. If player is ordering artillery strike during interrupt, 1 wait turn is added.
Enemy role icon: use color code to indicate radio operator status - red for jamming, blue for listening, purple for scanning.
AI_ACTION_USE_SKILLL improved code, check is usActionData is defined, default ubID = NOBODY New AI functions: TeamHasJammingRadioOperator, TeamCanOrderArtilleryStrike. CalcBestThrow: team needs radio operator with active scanning to determi...
Red AI shooting code: optimization for big battles.
Red AI: allow shooting code at least once every turn and every time soldier moves at new tile.
Fixed critical bug in FindNearbyDarkerSpot()
Reload when in safe situation: - chance 25% - check safe spot
Red AI: try to reload gun when in peaceful situation and have less than 1/2 of magazine.
Red AI: - removed second CheckIfShotPossible() call - only use reloading before suppression fire if weapon is autofire capable and can swap clips
AI: - fixed CanNPCAttack check - when trying to step back to deploy mortar, check if we can reach the spot and have enough APs - use reverse movement when trying to step back to deploy mortar
Improved r8658: check weapon magazine size and chance to say phrase when using gun.
Re-enabled r8658: If a gun has a magazine size < 5, the 'out of ammo' soundfile is only displayed with a chance of CHANCE_SAY_ANNOYING_PHRASE. This should make using guns with tiny magazine sizes less annoying. (by Flugente)
AI Artillery strike (for militia team and enemy team): - try to find first mortar shell item instead of using hardcoded id = 140 - at low progress level, use tear gas shells to make artillery strikes less devastating - at high progress leve...
Red AI: - reload before suppression fire less often in dangerous situation, also check AP_MINIMUM to allow reloading before suppression fire check - use CanNPCAttack() check only for sniper and suppression fire
GetBestAoEGridNo: - check valid opponent - use general Knowledge and location functions - allow SEEN_THIS_TURN and HEARD_THIS_TURN knowledge
CanUseSkill: cannot use artillery and reinforcements skills during interrupt. IsJamming, IsScanning: don't turn off radio as these functions can be used by AI. New AI function: TeamHasListeningRadioOperator() TeamHasScanningRadioOperator us...
Added small chance for enemy soldiers to carry signal smoke grenade. AI soldiers can attack with red smoke grenade if there is artillery strike active or to scare opponents. AI will not use red smoke grenades underground and will not throw ...
Improved code for first time sector description (moved message code to HandleTacticalEndTurn).
Improved first time sector description: only show when there is selected active merc.
New tags in SectorNames.xml: <szFirstTimeDescription>, <szFirstTimeDescription1>, <szFirstTimeDescription2>, <szFirstTimeDescription3> - show sector description message when entering sector for the first time, 1..3 are used for underground ...
HandleGotoNewGridNo: use standard grenades (smoke grenade, tear gas grenade, mustard gas grenade, molotov) if possible to determine damage to soldier moving through tile. If grenade is not found, first search for hand grenade of needed type...
ADD_SMOKE_AFTER_EXPLOSION option: use first found smoke hand grenade if SMOKE_GRENADE is incorrect item.
Improved code for AI to search for grenades of various types.
Boxers: PUNCH_APS_REDUCTION reduces APs for attack when using <BrassKnuckles> item. Don't allow ninja kick animation if using punch weapon.
DetermineMovementMode: improved reverse mode check (don't change stance, use WALKING instead of RUNNING).
AI: when deciding using reverse movement mode, check if current spot or movement spot can be seen or attacked by enemy, or if soldier is under attack or there is fresh corpse nearby.
SoldierGotHitExplosion: lowered explosion power requirement for flyback animation to 40
Re-enabled roof collapse animation.
FindAmmoToReload: added assert messages to indicate that searching attached weapon failed. DecideAction: initialize bWeaponMode = WM_NORMAL to prevent FindAmmoToReload from crashing. AI reverse movement: check that reverse movement is possi...
Experimental feature: use alt movement mode when moving for 1-2 tiles backwards or sideways. DetermineMovementMode: replace RUNNING with WALKING when using reverse movement mode. Red AI: - alt movement mode for retreat - alt movement mode w...
Improved suppression calculation on the edge of the roof: allow check from tile not on a roof to tile on flat roof.
Improved suppression calculation on the edge of the roof.
Use full suppression when target is on the edge of the roof. OCTH: only allow min cth 1% when not aiming at head and not shooting beyond weapon range.
Suppression: restored 1/3 chance for buckshot.
Suppression: - removed 1/3 chance for buckshot - improved calculation for damage reduction for buckshot - removed pMapElement->ubAdjacentSoldierCnt > 0 check since ubAdjacentSoldierCnt seems to not work correctly - improved calculation of n...
CalcBestShot: improved hit rate calculation, take into account possible options INCREASE_AIMING_COSTS, FIRST_AIM_READY_COST_DIVISOR. OCTH: sniper with sniper rifle halves SHOT_HEAD_PENALTY, marksman with sniper rifle, rifle or assault rifle...
CalcBestThrow: - improved AI code to avoid hitting friends with grenades - correctly set usGrenade for mortar attacks CheckTossGrenadeSpecial: fixed incorrect fragments range calculation.
Added a nullpointer check to a DDraw call, gets rid of one FIXME. (by Asdow)
ProcessStatChange: lowering skill progress chance from stat delta cannot make it lower than 1.
VR r2559 fix: climbing related AI deadlocks (by anv)
r8881: Changed the way the STI file for CTH indicator is loaded to prevent the game from constantly loading and unloading the graphics file from the disk every time the function gets called. Now it's only done once per the lifetime of the g...
Women get badguy battlesound sets 6-8.
Use more battlesounds for female bodytypes.
r8863 (by Fugente): - Fix: assignment not displayed consistently in personnel page - Fix: bizarre function
r8868 fix (by silversurfer): - when USE_XML_SQUADNAMES was TRUE, the squad box was shifted upwards over the column headers, causing clipping issues - when READ_PROFILE_DATA_FROM_XML was TRUE, the game would still read profile data from prof...
r8871 fix: animation loops until new order given (by Flugente)
r2479 fix: NPC go to grid script properly interrupts cowering (by anv) CalcBestSHot: only try to suppress alive and conscious human targets. DecideActionRed: disable stealth and reverse movement mode earlier.
r8875 Fix: Re-enabled the condition check for mercs to enter tactical screen from map screen. Someone removed it, which made it possible to enter tactical with no mercs in the sector. (by silversurfer)
CalcBestShot: fixed bug for stance change check.
Improved friendly fire AI code.
r8869 fix: nullpointer access (by Flugente)
r8841 fix: when failing to apply a gasmask to another soldier, the message still states success (by Flugente) r8839 Don't check whether an explosion damaging a room pisses of civilians if there is no room to begin with (by Flugente) r8835 f...
r8843 (by Flugente) - Fix: wrong face displayed on insurance website - Chg: no insurance payout on suspicious deaths (no enemy presence during merc death, or merc died from friendly fire)
r8846 fix: mercs staffing a facility for global propaganda cause mine income to drop to 0% (by Flugente)
r8855 fix: dragging soldiers is frequently canceled (by Flugente) CalcMorale: improved code.
r8816 Fix: crash after heli landing in UB (by Asdow) Fix: unnecessary town initialization in UB (by Asdow)
NCTH: tweak distance based first shot aiming penalty. OCTH: tweak increase max distance based first shot penalty.
Fix: compiler warnings
r8813: minor code cleanup (by sun_alf)
r8812: Minor code cleanup. Critical gun fail: show explosion animation if bVisible == -1
Bigmaps lockbusting fix: removed incorrect type cast (by Franimus). Don't show names of inactive mercs if cursor is on target (to prevent names appearing when using ALT+scroll for setting burst length).
Do not show extended status for inactive mercs when multi selection enabled.
Lowered chance for unintended hits. Show names of inactive mercs using dark gray color when ALT pressed or new ingame option TOPTION_ALWAYS_SHOW_INACTIVE enabled. Show extended status for inactive mercs: sniper, spotter, dragging, dragged, ...
New tag <shotAnimation> in AmmoTypes.xml allows defining custom shot animation. r8115 fix: negative values for ExplosionSoundID or AltExplosionSoundID in ExplosionData.xml cause a game crash, even though negative values are intended (by Flu...
Enemy health color: show adrenaline and rush attack using same color.
Spreading fire: - do not spread fire on roof - ignore rain if in building under roof
Complex AO: - only for ENEMY_TEAM - reduced max combatants to 40 - only in turnbased mode
Added small chance for critical gun jam if weapon is in bad status (but not overheated).
Smoke effect for gun shots: - requires ammoflag 8 - only for merc bodytypes - only for guns
Added small chance for weapon to critically fail when jamming while highly overheated.
AI: - sniper/marksman can use wisdom drug to improve CTH - sniper/marksman can use vision drug if under attack and cannot see enemy
AI soldiers will use drugs sometimes if available. Play sound when drinking alcohol (Sounds\Misc\Alcohol1.ogg, Alcohol2.ogg, ...) EXTRA_ITEMS: add chance for enemy to have various drugs.
Show drunk status for enemy soldiers using health text color.
AI: drink from canteen if low on breath. ApplyCanteen: display no AP message only for player mercs. EXTRA_ITEMS: Randomly add canteen to AI.
AI: improved retreat code.
Suppression: - lowered AP to react when prone - only cower when reached cowering shock level - deduct AP when prone and react - unready weapon if prone and react
Rush attack start: add adrenaline effect.
Increased MAXATTACHMENTS to 60000 for Aimnas to work. Minor code improvements and warnings fixes. Project update.
GenerateProsString, GenerateConsString: don't use overheating for gun descriptions. GetHelpTextForItem: use GetGunAccuracy. DrawItemUIBarEx: use GetGunOverheatDisplayPercentage to draw gun temperature. GetGunAccuracy: - start lowering accur...
Path AI tweaks.
Allow complex AI calculations only when there are no more than 64 combatants in sector. Allow small chance of unintended hit for prone/cowering persons. AICheckWeOutnumberPublic: change to friends >= enemies + 5. AICheckWeOutnumber: additio...
HourlyLarryUpdate: - initialize usTemptation for every soldier - all facility types including AMBIENT can trigger addictions
Improved code to update scope mode when changing stance. CalcBestShot: allow shooting HeavyGun in standing stance if not twohanded or alt weapon holding is disabled. GetBPCostPer10APsForGunHolding: also check twohanded and standing stance ...
VR r2370: fixed hourly alcohol/drug update - drug items were being used up without applying drug effects, preventing Larry profile swap and background related drunkenness (by anv)
Improved code for unintended hits.
NCTH: modify effective suppression range depending on weapon recoil. HearNoise: don't randomize noise location if opponent is seen publicly. CalcBestShot: limit return fire code to this turn, consider only previous attacker.
Switch from alt weapon holding when changing stance in realtime. NCTH: limit effective suppression distance when shooting in alt weapon holding mode.
NCTH: - limit max shown cursor aperture - limit max bullet deviation, depending on weapon range - limit ground shots
Structure damage: improved code.
DamageStructure: fix possible division by zero.
Improved code to create fire on grass from tracers.
Guns can damage structures: - mostly light structures (wood, light metal) can be damaged - chance is higher when using AP ammo - chance is higher when using high power ammo - when using tracer ammo, there's a small chance to create fire whe...
Travel time improvements: - negative backgrounds work for foot travel - for foot travel, use lowest value - for vehicle/air travel, use highest value - no bonus for ranger when flying in helicopter
When tracer bullet hits ground, theres a chance that fire will be created if there is grass on this tile. Spreading fire code: - check that Molotov (item 979) is fire explosive item. - removed light creation as it's now handled in SpreadEf...
UIHandleNewBadMerc: - randomly create admin, regular or elite - create soldier at interface level Slip on blood: improved code. VaporizeCorpse: spread blood only if fExplode = true. RemoveBlood: correctly remove blood on specified level. Up...
CalcBestThrow: - use smoke launchable if not found non smoke - limit safety margin to DAY_VISION_RANGE / 2
Added r7783, r7788 (by silversurfer).
Restored AI decision delay when recruiting new troops, less AI waiting on higher levels.
Interrogate prisoner: don't change reinforcement pool when unlimited reinforcements enabled. EvaluateQueenSituation: - allow recruiting when pool size drops below QUEEN_POOL_INCREMENT_PER_DIFFICULTY_LEVEL, this should result in more stable ...
VR r2348 fix - loading .jpc.7z with a single image would cause exception as file was not considered open (by anv) Show tooltips for all soldiers. Allow tooltips for bloodcats, bugs, tanks and robots in debug mode.
Halved chance to slip on blood.
Update soldier morale when changing inventory.
NWSS: - new tag in AmmoStrings.xml: <NWSSCaliber> - new tags in Weapons.xml: <ubNWSSCase>, <ubNWSSLast>, <szNWSSSound>
Hotkeys for quick transformations: Shift+O - transform scope Shift+L - transform flashlight Shifr+Y - transform laser
Only allow opportunity attack when boxing is active and boxer is in RED/BLACK status.
Black AI: improved code for sidearm using. CalcBestShot: always check if can shoot at target seen by another soldier.
Don't allow chain reaction for items on the ground with ubVolatility = 0. Lowered chain reaction bonus chance for items on the ground.
[F] key should correctly show CTH for different types of attacks: - gun - launcher - grenade - thrown knife - punch - toss item
Stab/Steal/Punch attacks: reduce defender rating if defender is blind or cannot see attacker after turning (only for human bodytypes).
Scale tactical ambients and sector steady ambients with general effects volume. Minor code improvements.
First decay light effects and then decay smoke effects, because fire can create light. Dynamic creation of light effects for fire and signal smoke. Fixed/improved code to decay light effects so that ubDuration works correctly. Note: <ubRadi...
New tag in CivGroupNames.xml: CustomSide, allows to set custom side for civilian group using tag Side.
Red AI: when soldier is being bandaged, turn to closest known threat, crouch if not crouched and wait.
Do not show icons on big portraits.
No cowering effect in water.
Combined all standard interrupt checks into one function CanInterrupt(). Reset SOLDIER_TAKEN_LARGE_HIT flag at the end of each turn. Tank uses smoke grenade for cover if he is under attack, has health < max health - 20 and haven't seen enem...
When shooting at swimming soldier, allow aiming at head and torso. Zombie AI: - CalcMorale() - set default aiming location as AIM_SHOT_RANDOM
More zombie raise sounds. More water splash sounds.
Localized messages for item moving assignment. ClosestReachableDisturbance: - zombies do not attack vehicles - improved code to prefer not dying enemies
TurnSoldierIntoCorpse: fixed damage to items dropped by MILITIA_TEAM. GetCorpseAtGridNo: check if sBaseGridNo is out of bounds. ClosestReachableDisturbanceClosestKnownOpponent, ClosestKnownOpponentID: boxers should not ignore dying opponent...
Improved noise volume bonus when dragging something. Improved dragging sound: any number of sounds supported.
Fixed translation bug.
Improved dragging sound. Fixed grenade pin sound for signal smoke.
Mercs can drag corpses and people (by Flugente). Play sound when dragging something. Mercs always make movement noise when dragging. Movement noise is louder if soldier is dragging something. Disabled showing trait distance when selecting s...
r8482 fix: boxing exception to covert behaviour only works between 2 boxers (by Flugente) Minor AI code improvements.
CheckNPCDestination: improved code. FindBestPath: allow SEEKENEMY to move into deep water. UIPlotPath: disabled code to ignore person at destination to fix endless clock when moving to invisible opponent. ClosestReachableDisturbance: when i...
Improved CheckNPCDestination check - compare danger levels.
Added CheckNPCDestination function for common checks for: - gas - deep water - light at night - north spot - door nearby - explosive structure nearby - bomb nearby - red smoke danger
HandleFlashLights: use HandleSight for soldier only if he is not dying.
RandomFriendWithin: more checks for target spot, improved code. RandDestWithinRange: more checks for target spot, improved code.
LegalNPCDestination: only avoid locations near doors in green mode. Improved AI location searching routines, added LegalNPCDestination checks. FindFlankingSpot: removed edge of the map check.
Added random chance to create fire when explosion damages burnable object (grass, cloth, furniture). Randomized chance to spread fire. Don't add light effects when spreading fire on roof.
Fixed Russian translation. Increased volume for water splash sound.
Only normal, stun and flashbang explosives create water explosion. Increase max force when throwing items into water (because of no bouncing). Play sound when item hits water.
Removed DEBUG_ATTACKBUSY define from debug version. Added TOPIC_GAME to registered topics. StructureHit: check water level. OBJECT_DETONATE_ON_IMPACT(): check fExplodeOnImpact only for explosives.
InternalDoMercBattleSound: don't try to play sound if file not exists.
Fixed LOS bug introduced in r1204.
Disabled warnings for missing options TAUNT_VOICE and TAUNT_VOICE_SHOW_INFO. Improved creation of smoke and lights effects after explosion. Add light effect when signal smoke is created.
FindTossSpotInDirection: also check one tile farther to throw smoke grenade. Improved Russian translation.
New option TAUNT_VOICE (FALSE by default): if true, will play sound file instead of showing text. New option TAUNT_VOICE_SHOW_INFO (FALSE by default): if true, will show debug info when playing voice taunt. TAUNT_INFORM_ABOUT: check that op...
Doubled canteen drink effect for restoring breath.
SSA: fixed ambient in tropical sectors.
New option in game settings: "Slow PC" disables complex AI calculations to speed up enemy turn. AnyCoverAtSpot: fixed cover cache code. GetItemVisionRangeBonus, GetItemPercentTunnelVision, GetItemHearingRangeBonus: improved code.
Updated tooltip for toggling artificial merc light.
Disable interrupt if soldier was suppressed this turn. Penalty to watch decision if soldier cannot interrupt. Penalize seek/help if target too far: - only when in town or underground - only if number of known opponents is less than 10 - 2 *...
Fix deadlock when executing AI_ACTION_STOP_COWERING for soldiers.
StandardInterruptConditionsMet: allow interrupt if not cowering CalcInterruptDuelPts: penalty if soldier was suppressed this turn, penalty if soldier taken large hit CalcMorale: - also make civilians more aggressive - limit AI morale if no ...
When giving AI boxer dusters, make them undroppable.
Reworked taser code: - take into account taser status - randomize breath damage 50-150% - head attack +50% breath loss, legs attack -50% breath loss - apply bodybuilder resistance for taser attacks


转载请注明转自: 《ja2_7609+AI 中文版 r1942

]]> 3
JA2 1.13 稳定版 AI 增强 MOD【中文版】 Sat, 20 Feb 2021 05:17:25 +0000 前言

由于不可抗拒的可以甩桌甩凳的可笑原因,TBS 决定自闭了,于是比较重要的 JA2 MOD 相关的“偶尔才会更新”又重新回到即将进入年更的博客。

AI MOD 说明照搬我的原帖

Ja2 1.13 Stable 7609+AI(下面简称 ja2_7609+AI) 是熊窝 sevenfm 开发的源码 MOD(熊窝原帖),针对熊窝官方 1.13 7069 后的 2014 稳定版的 AI 增强,所以基本上凡是基于 1.13 2014 稳定版的组合都可以使用,如 1.13 官方 2014 原版、IoV、AR、AV……

可能之前一些整合包中包含的一些 MOD(如 AV [Arulco Vacations])有铁友就接触了此 AI MOD,只是都是英文版。

最近我在整理 IoV929beta 时搞了个分支 IoV Revised(好像没人有兴趣,哈),遇到一些 IoV 枪/子弹消失问题,在源码上查找问题时跟 sevenfm 交流了一下,加上我一直在玩英文版的 AV MOD,于是跟 sevenfm 讨论 + 调试出了中文版的 Ja2 1.13 Stable 7609+AI。

其实我早就在《zww's源码编译、MOD组合包、整合包》放出下载(现在已经删了老版本的中文版 ja2_7609+AI,只留了今天上传的比较完善的版本 r327)

下载:百毒 Builds 目录里面命名方式为 ja2_2014+AI_cn_r327.7z 的家伙,解压后就一 ja2_2014+AI_cn.exe

使用:直接放到你所玩的 1.13 稳定版目录,代替原来的 ja2.exe 运行

然后:你 会发现敌人突然就比较聪明了,不再是你随便虐——比较明显的就是非常会躲避,站位相当牛,牛到你必须挪位置才能干掉他,如果有医疗技能还会对受伤的急救 (汗~我还没遇到,因为我测试时都是牛人),有些花花草草时更要命,就在眼前你发现不了(如果再加“野草”地图就...玩捉迷藏?),还喜欢蹲墙角、蹲窗口(什么时候女王兵学会德雷森保卫战战术了?)……等等...

另外:r3xx 版本后,好像加入了手雷/榴弹延时爆炸功能,别以为扔出去的手雷/射出的榴弹是“鸭蛋”,跑上去捡起来——1回合后就爆……(此功能已整入 1.13 开发版,要开启的话,下面 Ja2_Options.INI 的 DELAYED_GRENADE_EXPLOSION 要设为 True)

sevenfm 对此 MOD 说明

[Updated on: Sun, 12 July 2020 08:20]

Short and incomplete description of changes in Ja2+AI


Important note:
Ja2+AI.exe is alternate executable file that you can put in your Ja2 1.13 7609 folder and run instead of default Ja2.exe.
It is based on stable 7609 release, so use it only with stable 7609 or mods based on stable release.

- AI soldier can shoot for suppression at enemies that nobody can see currently, aiming at last known seen or heard position
- roof climbing fixed
- flanking fixed and improved
- AI decisions fixed and improved
- fixed 'jump over fence' bug
- avoid sitting at door tiles when doing random patrols, this should help when playing covert
- don't raise alarm again if found handcuffed friend and status is already RED
- raise alarm when found friend who is captured with binders
- avoid going too close to seen armed bombs
- decide aiming location when shooting or stabbing depending on cth, distance to target and other factors
- AI will aim at head more often when shooting at zombies
- AI will aim at legs more often when using burst fire in NCTH at distance
- limit search range when deciding random patrols or visiting friends in GREEN to reduce CPU load and make enemy green behaviour more realistic
- Shooting: Reserve MAX_AP_CARRIED before attack if found sight cover spot nearby, try to reserve AP by lowering aim time if needed
- Shooting: check if soldier can find better position before firing (take cover keeping LOS to target)
- Black AI: Black cover advance (if soldier cannot attack or weapon range is short)
- Red AI: search advance spot with sight cover
- suppression shock reduces AI morale (AI aggressiveness) depending on current shock and morale level
- allow AI to shoot HeavyGun weapons when crouched or prone (fix 1.13 bug)
- allow attacking empty vehicles with greandes or RPGs
- tanks can use suppression fire (only machinegun at the moment)
- fix many shooting related 1.13 bugs
- improvements to AI soldier choosing best gun to fire (main weapon/sidearm)
- AI will try to avoid staying near timed grenade
- r8127: If a tank just took a heavy hit, but cannot see an enemy to fire upon, it can detonate a smoke grenade on itself to hide.
- Tank can activate mustard grenade in Red state if there is opponent close
- r7072: New Feature: enemies roles allows the AI to use medics
- r7080: Enemy roles improvement: medics can heal themselves

Zombie AI:
Zombie AI reworked and simplified, should work faster with less bugs now:
- zombie will always go to nearest known enemy
- if zombie doesn't know enemy location, it will move to closest friend who knows
- zombies don't do anything that humans do like starting patrol routes or using radio etc, they just roam here and there if not alerted, and attack closest enemy if they see or hear him
- no flanking or hiding or other complex AI for zombies
- added some safety checks for zombies to prevent possible problems - if enemy is on the roof and zombie cannot climb, this enemy will be skipped to avoid AI loop
- zombies always have highest AI morale

AI morale:
Every turn, morale for AI soldiers is restored by value equal to soldier's exp. level (1-10), to max value of (60 + 2 * ExpLevel).
This means, if AI soldier will be under heavy suppression fire for several turns, his morale will drop to low level, so he will play defensively and also will be more vulnerable to suppression attacks, but if he will avoid suppression fire for several turns, his morale will restore to max level.
In stock 1.13, morale value for AI soldiers is not used at all.

Watched locations:
- allow communication if distance < DAY_VISION_RANGE / 2 and there is line of sight between soldiers
- allow communication if both soldiers have hearing aid and distance < DAY_VISION_RANGE
- removed vanilla AI cheating when checking watched location, use public knowledge instead

- night crawling
- getting closer
- crawling when taking cover
- crawling for snipers on roofs

Improved roaming range:
STATIONARY: 0 - 5 (if sees enemy or under attack)
ONGUARD: 5 - max (if sees enemy or under attack)
CLOSEPATROL: 15 - max (if sees enemy or under attack or friends need help)
POINTPATROL: 10 - max (if sees enemy or under attack or friends need help)
RNDPTPATROL: 10 - max (if sees enemy or under attack or friends need help)
FARPATROL: 25 - max (if knows enemy position)
ONCALL: 10 - max (if sees enemy or under attack or friends need help)
With this change, ONCALL/POINTPATROL/RNDPTPATROL soldier will not move far from it's position unless he sees enemy or is attacked or there are some friends that need help.
Note: ONGUARD and CLOSEPATROL are changed to FARPATROL when red alert raised.

Improved aiming levels in OCTH:
Pistols 2-4
MP, shotguns: 3-4
Rifles, AR, LMG: 4-6
Sniper rifles: 4-8

Scopes give bonus to aim levels:
- small scope (2x): +1
- medium scope (4x): +2
- high power scope (8x): +3
- very high power scope (10x): +4

Limit aim levels depending on distance:
on distance less than half of day vision range - no more than 4 aim clicks
on greater distance - up to 8 aim clicks at day vision range

Militia control improvements:
- Hold: change attitude to defensive
- Take Cover: use low morale when searching for cover spot
- don't change orders for STATIONARY/SNIPER

Covert Operations:
- exploit Fix: we can only disguise successfully if we haven't been seen recently
- disabled automatic clothes stripping when uncovered
- disguise automatically if spy haven't been seen by enemy recently and wears correct clothes
- default civilian clothes: white + blue/jean
- don't use enemy military colors for civilian clothes
- moved most limits for covert soldiers to suspicion counter
- if a merc intentionally removes the diguise property via the [Ctrl] + [.] menu, the disguise property will not be reapplied until new clothes are applied
- allow wearing backpack for covert civs/soldiers, use suspicion counter instead

Now soldier will be uncovered immediately only in following conditions:
- suspicion counter is red
- suspicious animation is seen by enemy
- civilian spy doesn't look like a civilian (has camo or gun in hand or any not covert weapons or military gear)
- soldier spy doesn't look like a soldier (he carries a corpse)
- spy is very close to a corpse (standing next to it)
- soldier is targetting a buddy of observing enemy
- soldier is standing near armed bomb

More realistic clothes:
- disguise/lose disguise in [Ctrl]+[.] menu
- [Ctrl]+[.] menu will show if merc has damaged vest/pants
- cannot 'wear off' clothes, only replace them with other color (we dont't have naked Fox animation anyway)
- don't disguise automatically when applying clothes, instead use menu (this will also turn on automatic disguise mode)
- don't need new clothes to disguise, only check that they have correct color and not damaged

- show red quick locators to show noise sources
- changed the way X-Ray detector works - it now shows locators on enemy positions, works only in front direction, distance is limited to day vision range / 2, also it randomly inflicts 1-3 damage to user (radiation is dangerous!)
- "x ray activated.wav" sound is played when x-ray is activated
- OCTH now uses gravity constants from NCTH, this makes OCTH ballistics look much better.
- enemy weapon jamming
- manual unjamming and chambering using 'u' key
- manual unjamming using transformations menu
- changed BASIC_DEPRECIATE_CHANCE to 45 (default value in NCTH) so there will be less damage to guns when shooting (and less frequent jams when doing a lot of suppression fire)
- changed maxJamChance from 50% to 30 - 4 * GunReliability, so it will be about 20% for good weapons, no more than 50% for bad weapons
- AI always unjams weapon successfully
- Vehicle is visible if any part of it is visible
- bonus for trap detect level if soldier is crawling and has knife in his hand
- CalcTrapDetectLevel: removed chance to ignore trap for optimists
- reduce camo when soldier is crawling
- reworked CAMO_KIT_USABLE_AREA option, now it only limits camo from kits, but not camo from gear, this also fixes some bugs with camo applying (so if you set this option to 100 it should work as in vanilla)
- reworked camo worn/kit bonuses for camo zombies and soldiers created with camo kits inventory (65% worn camo + random camo value)
- Drunk level visual indicator: Feeling good, Borderline, Drunk, Hungover
- "Enemy can see me" indicator in stealth mode
- Enemy roles: Commander, Officer, Marksman, Sniper, Mortar, Machinegunner, Medic, Radio operator
- regen boosters now less cheating as they cause damage to max health, if you healed 40 HP with regen booster, you will lose in average 10 max HP and will have to restore them later with doctor
- auto refill canteens if no hostile enemy in sector (less micromanagement)
- AI always successfully unjams guns
- Camo faces for Monk, Shadow and Tex (feature from VR code)
- pre-placed bombs (action items with an explosive) can now be blown up by explosives, this allows clearing mine fields with grenades for example
- disabled taunts for collapsed soldiers
- if soldier is unconscious, he can't see anything
- garotte should be used on head only, also check AI knowledge instead of LOS test
- added r7016: static shadows decrease brightness (by anv)
- auto pick up backpacks when combat is over
- it's possible to set side for civ groups (any not 0 value can be used) - <Side>2</Side>
- disabled badass animations by default (enable them using BADASS_ANIMATION = TRUE if you want)
- less BP loss when shooting with RPG or flamethrower
- flyback critical animation is possible only when using powerful weapon (ubImpact >= 40)
- [v] button shows if IIS/NCTH is used
- SAFE_SUPPRESSION option enables additional checks for AI when shooting for suppression (ni general, this will mean less suppression fire, also less bullets to the backs of your mercs from militia and less harm for civilians)
- fix: walkman only works from head slots
- bonus 20% to morale when using walkman
- if soldier is captured, he cannot see anything
- if soldier is captured, he cannot hear anything
- you can empty canteen using transformation (useful if you don't want to carry poisoned water)
- mercs will replace bad water in canteens with good when filling
- new option: SOFT_IRON_MAN (save in realtime)
- new option: SPREAD_FIRE (create new fire when structure is destroyed by fire)
- show enemy role icon only after 2 turns or in cheat mode
- show red locators on visible armed timed bombs
- disable messagebox when putting group of mercs to sleep, show message in the game log instead
- lowered laser bonus in OCTH when aiming: bonus = 2 * bonus / (2 + AimTime) (lasers are mostly used when hip firing or with little aim)
- take into account trap difficulty when performing disarm check (previously trap level had no effect on trap disarming, only on detecting)
- removed wirecutter bonus when disarming tripwire (use items with <DisarmModifier> tag)
- neutral civilians always avoid player mines (CIVILIANS_AVOID_PLAYER_MINES has no effect)
- new command: On [Alt] + [N], all team members in the sector try to put on gas masks

Fire/gas/explosions improvements:
- no fragments in water, no smoke from explosions in water, no light from fire in water
- fire removes corpses
- fire can damage burnable structures
- fire can spread when damaging burnable structures
- spread fire adds light at night
- add burn marks when fire damages structure
- cannot spread fire in rain
- don't spread fire on water
- hand or GL grenade cannot damage roof (use more powerful explosives or destroy all walls to collapse roof)
- explosion adds burn marks randomly
- stun grenades remove fire
- fire damages items on the ground
- fire will ignite explosive structures
- limit smoke effects duration when in the rain
- enable flyback animation only if explosion power >= 50 and distance from explosion center <= explosion radius / 2
- limit fire spreading to 7 generations

List of useful transformations:
- manually unjam guns (or you can press 'u' for that)
- delay grenade explosion
- empty canteen

Delayed grenade explosion:
Use transformation to activate delayed mode for grenade - it will explode at the beginning of the next turn. This may be useful in some tactical situations.

Set DELAYED_GRENADE_EXPLOSION = TRUE to make all hand/GL grenades work as timed (disabled by default).

- only Normal/Stun/Flashbang grenades can work as timed - gas/flare/other types will always explode immediately
- grenades with fExplodeOnImpact tag set will always explode immediately
- attached explosives feature will not work for timed grenade
- armed grenade can be picked up and disarmed like any other explosive item, but it can be dangerous
- AI soldier will usually try to avoid staying close to armed grenade/bomb, but he still can be hit with fragments

Alcohol and drugs:
- alcohol level is changed every hour instead of every turn, so being drunk can have some serious consequences now
- using alcohol and drugs in turnbased requres AP
- alcohol and drugs start effect immediaely (don't need to wait for new turn)
- not recommended to use alcohol and adrenaline at the same time (will result in heart attack with stats loss)

- VERTICAL_BIAS is always 1.0 for showing cursor, so it always looks like circle (no more ovals)
- max shown aperture limited to 100 (no more gigantic circles), in this case color is changed to dark red
- laser is shown as dot in the center of target cursor
- press ALT to see bullet deviation as gray circle
- no more than 10 bullets are shown in autofire mode, the rest is shown as + sign
- use full IRON_SIGHT_PERFORMANCE_BONUS at half day vision range, at greater distance iron sights bonus is reduced
- changed distribution: accurate shots are more accurate (green cursor), less lucky hits with bad aim (red cursor)
- always use VERTICAL_BIAS = 0.5 for shooting (less stupid shots to the ground)
- r8281 fix: BASE_STANDING_STANCE was missing from handling calculations in NCTH
- enabled AIM_VISIBILITY penalty

Improved suppression:
- action points can be reduced to zero when soldier is suppressed
- action points at the start of new turn are reduced depending on current shock level
- if soldier has cowering shock level (you can see this by cowering animation though it's not 100% always happens)
- if soldier has cowering shock level after suppression attack, he loses all APs
- soldier can still have negative APs if he is hit or for another reason, but not from suppression
- alcohol reduces shock from suppression, hungover state increases shock
- adrenaline effect reduces AP loss from suppression
- suppression is less effective if soldier is running
- cowering shock level is equal for all soldiers (MAX_SUPPRESSION_SHOCK/2), but different soldiers have different suppression tolerance which determines how quickly soldier will reach max level and how effective suppression is in general against this soldier
- new shock level at new turn depends on soldier's morale, with morale=100 shock level is reduced by 50%
- shock level is reduced by 50% at the start of new turn if soldier is not under attack or if soldier is dauntless
- shooting at enemy reduces actual shock level, depending on number of bullets fired and also gun damage and loudness
- shock level reduces effective marksmanship and dexterity, old shock effects for shooting are disabled
- shock from attack is reduced by fear resistance value (from skills and backgrounds), max SL_FEAR_RESISTANCE is limited by 25%
- AI soldiers also use morale for shock calculation, they start with max morale depending on soldier's level, every successfull suppressive attack redices morale for AI soldier, every turn that AI soldier is not under attack his morale is restored up to max value depending on his exp. level
- allow suppression fire for soldiers with machineguns for 2 turns
- allow tanks to use aimed suppression
- allow soldiers with machineguns to use aimed suppression in prone stance with full AP

You can make a civ group hostile to both player and enemy:
- set Side 2 or 3 in CivGroupNames.xml, for example:


- set group as hostile in GameInit.lua

SetCivGroupHostile( Group.REBEL_CIV_GROUP , Civ_status.CIV_GROUP_HOSTILE )

Strategic enemy detection:
- UpdateStrategicDetectionLevel fix: detect enemy movement direction using assignments
- scouts can detect enemy direction
- ScoutIsPresentInSquad fix: allow scouting only if soldier is not in a vehicle, not sleeping and not on assignment
- Skyrider can detect enemy direction when flying over sector with enemy

Updated feature: Attached explosives
- can attach rubber band to any grenade
- if there's rubber band attached, allow attaching another grenade
- can attach duct tape to any explosives
- can attach any explosives to duct tape
- can attach any tripwire activated item to tripwire
- use buddy item to define special attachments (like gas can, alcohol bottle or marbles)
- cannot attach explosive item with zero volatility (if not using tripwire activation)

- Ctrl+D - skip interrupts for this merc only
- Ctrl+Alt+D - skip interrupts for player team
- don't allow interrupt if shock level percent > 50
- StandardInterruptConditionsMet: cowering soldier cannot interrupt

- allow jumping/climbing with backpacks.

Backpack penalties in 1.13:
- movement cost is increased depending on backpack weight
- jumping over fence cost is increased when wearing backpack
- need to use zipper to access backpack contents in combat

- all possible fixes from main trunk
- other fixes to AI and tactics
- fixed problems with enemy cowering animation that prevented AI from working sometimes
- interrupt fixes
- Drop/pick up backpacks - added check for DropPackFlag, only current squad will drop backpacks, added message for successful drop/pick up
- corpses on roof interaction fix

Improved Covert Operations:

- if player selected "Loose Disguise" from Ctrl+dot menu, spy will not disguise automatically until clothes are reapplied
- default civilian clothes: white + blue/jean
- don't use enemy military colors for civilian clothes
- moved some limits for covert soldiers to suspicion counter
- garotte attack has effect only when attacking at head

Any soldier will be uncovered immediately when:
- suspicion counter is red
- suspicious animation is seen by enemy
- civilian spy doesn't look like a civilian (has camo or gun in hand or any not covert weapons or military gear)
- soldier spy doesn't look like a soldier (he carries a corpse)
- spy has serious bleeding
- spy is very close to a corpse (standing next to it)

Civilian spy will be uncovered when:
- in restricted area with curfew = 2 or underground
- in restricted area with curfew = 1 at night
- he has suppressed guns on him (if they are not placed in covert LBE)

Soldier spy will be uncovered when:
- soldier is targetting a buddy of observing enemy
- drunk/under drugs soldier is standing next to enemy who sees him
- soldier's equipment is too good (close inspection can be performed only by officers of this or higher type, so elite officer can check any spy, army officer can only check army spy or admin spy etc...)
- soldier is using flashlight at night and alert is raised

All other conditions are moved to suspicion counter:

basic value is 1..5 depending on the level of enemy soldier
+1 for each squadleader skill of enemy soldier
+1 if spy is using flashlight
+1 if spy is bleeding
+1 if spy is drunk or under drugs
+2 if enemy is alerted
+2 if enemy is in combat (seen enemy recently or under attack)
+2 in capital (Meduna)
Total: 1..16 for each enemy observing our soldier

*2 if spy is running or crawling or swatting
*2 if when disguising as soldier

/2 if spy has covert skill, for each level of covert skill
/2 if spy has no covert skills but he is special NPC (native)
if observer is drunk, he is less suspicious (up to 75% penalty at max drunk level)
if observing soldier is farther than day vision range /4, value is reduced accordingly, so at full day visoin range value will be divided by 4

Finally, all suspicion values from observing soldiers are added, and then total value is multiplied by amount of spent APs and added to merc's suspicion counter.
Maximum value for merc's suspicion counter is 100 * AP_MAXIMUM, this means:
100 turns in turnbased being observed by low level enemy close without additional modifiers
50 turns in the same situation but with 2 observing enemies
25 turns if spy is disguised as soldier

So what this change means for player?
1. Less 'binary' playing - if your disguise is good, it doesn't mean you can go everywhere and walk endlessly in front of enemy.
2. You have to avoid big groups of enemy, avoid running or swatting/crawling, if enemy becomes alerted, playing covert becomes much harder.
3. You need to find some places to hide (to lower suspicion counter), so you need to plan your actions.
4. Performing spy actions in sectors with limited access (SAM sites etc) will be much harder, especially on high difficulty levels with many high level soldiers.
5. You have visual representation of covert status (merc name color), so this feature is now more player friendly.

Attached explosives:
To use attached explosives feature, you need to define tags in items.xml:


for all attachments you want to use with this feature - grenades, explosives, duct tape, rubber band, string, gas can, alcohol bottle and marbles.

To use some items as special explosive attachments, define buddy item for them, for example, in stock 1.13 define


for gas tank, then if you attach gas tank to TNT, explosive item will be activated to simulate gas explosion when this TNT will blow up.

For marbles, add


to use it as added fragments to any explosion.

For alcohol bottle, add


to use molotov fire explosion.

Any attached explosive should have volatility > 0 to be activated, also main item should be of normal explosion type (tripwaire activated items attached to tripwire don't need this as they use tripwire activation instead of detonation)/ If you attach mk2 grenade to gas grenade, it will not blow up.

Also turn on options in ja2_options.ini


New options in Ja2+AI:

[Extended Options]







转载请注明转自: 《JA2 1.13 稳定版 AI 增强 MOD【中文版】

]]> 5
天下无不散的宴席:再见,TBS Thu, 04 Feb 2021 16:13:50 +0000 在这只有R挡、可笑的环境下,TBS 还是迎来了“关闭”的决定。和我一样慢慢变老的菠萝语出了感慨和无奈:

当年,本应是三十而立的我就迎来了失业,回老家后无所事事,奶粉钱都只能靠仅存的丁点储蓄维持的我只能终日混在早在 2000 初就喜欢的 ja2 论坛 TBS,“自告奋勇”开始折腾铁友们自发的、无偿的 ja2 1.13 汉化技术方面的工作,铁友们的汉化热情还有玩家们的氛围让我开始逐渐恢复了信心,以此为契机让我开始接触 WordPress,也因此转行成功……




转载请注明转自: 《天下无不散的宴席:再见,TBS

]]> 12
伸手懒党遇到软路由重燃折腾心到犯低级错误 Wed, 27 Jan 2021 07:26:01 +0000 不知什么时候折腾心被生活、工作磨没了,什么东西都想伸手得到,但又没那个经济实力……

最近本来是想买台新的 MikroTik 无线路由器替换老 MikroTik 无线路由器,MikroTik 路由器实在是太稳定了,用了差不多 6 年了因为现在无法跑满 500Mbps 电信带宽才发现不行了。


欲换路由 2 选 1:

在麦田圈聊着选择型号时被老博友 Dick Wu 和 Derek 安利了软路由。


在听了双 D 建议,退了已下单的 MikroTik 新路由,买了台性能一般的 N37410 CPU 的软路由,买的是准系统,自己另外配了 4G + 60G,对于我来说就够了,主要是这特殊年头下价格可接受(谁不想买 i7 呢?)。


想着偷懒不折腾,配置资料什么的都从 DW 获取,没想到后面遇到很多坑,都感觉不好意思了,毕竟 DW 也是 996 “受害者”……

通常现实生活就是这样,你越想偷懒越多问题等着你,于是我遇到了《今日趣事》提到的软路由安装 ESXi 各种不顺……


在解决了 ESXi 后的第二天,我停掉了手头工作,打算给一天时间来折腾软路由,我就不信搞你不定!一开始想着就一个 OpenWrt 好了(你看,伸手懒党后遗症),但是遇到了些莫名其妙的问题,期间不断“骚扰” DW……

由于老是不顺,折腾心高涨,气死老大叔了,干脆就折腾本来想折腾的双路由,我还是喜欢用 Router OS,干脆就搞 ROS + OpenWrt 双路由好了:ROS 作为主路由,OpenWrt 做旁路由。以此实现 ROS 负责健康上网,OpenWrt 负责健康又科学的上网。

搞了半天,OpenWrt 上面的最重要套件怎么都安装不上,直接把 LUCI 界面搞坏了,好像是版本不对,重复安装、替换各种版本后,才发现最初那个版本的 OpenWrt 本身就自带了——开始犯低级错误了……

到晚饭前终于配置好了,PC 端已经能实现了最初的要求,家里安卓手机也没有问题。到了晚上,才发觉一个问题,就是我的 12 老是提示无法连到 Internet,看了下 WIFI 参数,网关和 DNS 变成、OpenWrt 的网关和 DNS 都不是这个),好像只有苹果设备才会这样。开始找问题原因,找了很久都没找到问题所在,然后又开始“骚扰”还在被 996 虐的 DW,讨论过程中 DW 得出了正确结论:网络有另一个 DHCP 服务……

我不断排查网络设备,直到深夜 2 点没找到,然后只能洗洗睡了,毕竟现在已经到了不能熬夜的年龄段了……


早上被一个想法惊醒:为何不用 ROS 来找出局域网内的错误 DHCP 服务器?立马起床刷牙吃早餐……

在 ROS 设置好局域网内的错误 DHCP 服务器报警,看 log 立即有 1 条 的 DHCP 服务 alert,查看 MAC 地址,不是家里路由器、手机、电视、扫地机、智能音箱的,我是不是漏了什么?



噗~ -_-|||



继续检查,发现 ROS 的 WAN 也接到交换机上了


然后把光猫线接到 ROS 的 WAN 口,想着终于解决了!

噗~ ROS 无法拨号……

额头流下了 3 滴竖杠汉~

难道…… ROS 的 WAN 端口配置有错?

进 ESXi 后台,查看虚拟机 ROS 的网络适配器配置……


原来是把 LAN 和 WAN 的网口都设为同一个 VM Network 了……

终于折腾好了……好累(2 点睡 7 点多就惊醒了)

开始工作前给了条自己犯了低级错误的 QQ 信息给 DW,想让他笑一下自己,好感谢他这几天的无私耐心解答,结果只给我 3 个无语点点点


由于环境非常恶劣,已经到了很多不可理喻甚至可笑的地步,就不写具体折腾的资料和步骤,有兴趣给软路由安装 ESXi 和搞双路由上网的可以参考下面的链接:

  • vSphere/ESXI 6.0 服务器U盘安装详细教程(6.7 版本一样)
    注意点1:如果遇到了 menu.c32,一定要按照文中解决,不然就和我一样无法安装成功)
    注意点2:如果遇到启动时停留在“Shutting down firmware services… Relocating modules and starting up the kernel…”,搜一下这些英文关键字即可搜到解决方案。
  • ROS + OpenWrt 双路由:视频1 + 视频2(视频说明有需要的固件)
    注意点1:ROS 的网络适配器端口要设对,还有光猫网线连接对




转载请注明转自: 《伸手懒党遇到软路由重燃折腾心到犯低级错误

]]> 18
今日趣事 Sun, 24 Jan 2021 19:27:33 +0000 早上发现 Gen8 服务器里面有个盘符不见了???

盘符对应硬盘是希捷 3 T,心头一紧!?!

用 DiskGenius 一看,能看到硬盘,窃喜!

细看参数,3.9……………………………………………………G 容量,冷汗大冒!~~~~~









提供下载 ESXi 的网站 500 了…… 我OOXX

过了好久恢复,下载回来,翻箱倒柜找 U 盘(这货好久没用了)……

制作 ESXi 安装盘,不管是 rufus、UltraISO、WinImage、diskimager 都给我颜色看,后来才发现是火绒影响了,哇咔咔咔,果然,混成不折腾星人后无限接近菜鸟……

U 盘搞好了,插入软路由 USB 口,点亮,来啦…………





Shutting down firmware services…

Relocating modules and starting up the kernel…

唉,网上找找说输入一个命令解决,然后就没有然后了,直接进入了 U 盘里面的 ESXi 管理界面,根本就没真正安装……



话说网上各个 ESXi 安装教程,怎么步骤都缺斤少两的,哪里像我当年写的 WordPress 教程连只知道 WP 是 Win Phone 的 WP(WordPress)新手都能照着折腾好……


转载请注明转自: 《今日趣事

]]> 21
G604 + 冬天来了 Sat, 02 Jan 2021 13:03:11 +0000 各位朋友,元旦快乐

2020 年,怎么说呢,给人感觉就是在快速刷时间,做啥都有点放不开的感觉,工作、玩都憋屈...

2021 第一天先送自己个新设备:罗技 G604,来个好的开始!

“老的 G700s 终于出现各种症状,先是配置随机切换,然后是部分按键时不时失灵,各种莫名其妙的问题,只好让它退役了”。新老合照:

只用了半天,感觉 G604 的抓握比 G700s 舒服,G700s 手心那边总觉得空空的,而 G604 后端比较高,所以能填充满。


新的 Logitech G Hub 软件设置感觉没有老的方便,感觉怪怪的,特别是按键自定义时只有个“识别”按钮给你,为何不直接标识到图片上呢?不方便


一直有人说今年会特别冷,但直到 12 月上旬,广东都还没真正的进入冬天,中旬降到 10 度左右,算有感觉,结果 12 月底升温接近 30 度,穿了几天的短袖,没想到接近元旦,来个急速降温,一晚上从 28 度降到 5 度,真厉害,今早更冷,来个 -2 度,开了几年车,第一次看到雪花图标亮起,以为车出了什么问题,噗~

“川”事:比去年怕冷,突然降温,然后到处找暖气神器,还看了日本丰臣热能对流式取暖炉,不管贵还是便宜都是费电费油费钱,转了2、3天突然醒目:既然都费电为何不用空调?家里的空调都是一级能耗冷暖型,- _ -||| Orz

转载请注明转自: 《G604 + 冬天来了

]]> 21
我的 G700s 啊 Thu, 17 Dec 2020 04:48:33 +0000 (好久不见,都快变成年更了……)

2015 年底买自美亚的罗技 G700s,由于此产品天生是耗电大户,直到 2018 年底才正式上岗,当作有线鼠标用。然后今年年初终于找到了它的电源搭档——5号充电锂电池,快乐地用到前几天……

最近几天 G700s 经常出现自动切换板载配置,非常烦。然后只好只打开一种配置让它无法选择,结果就出现 dpi 时快时慢,感觉是自动回到默认配置去了,动一下鼠标才又回到自定义设置。折腾了好久没法,也更新了罗技程序,问题依旧,估计是内部问题了。



新鼠标锁定雷蛇炼狱蝰蛇 V2/巴塞利斯蛇极速版、罗技 G502/G604,由于我的使用情景基本是工作 + 偶尔游戏,所以我偏向于大鼠标,而且不喜欢玩 FPS 类游戏(岁数大了,头晕),所以重量就不太需要考虑,倒是趴窝舒适度和按键量比较注重。

第一目标是 G604,但是贵啊




转载请注明转自: 《我的 G700s 啊

]]> 16