Commit Graph
62 Commits
Author SHA1 Message Date
Asdow 82aca548f5 Merge branch 'master' into ExtraMercs 2025-09-24 16:14:10 +03:00
Buscherandmajcosta 1004ab6c8c Added Right Click to time compression to fast forward a single hour 2025-08-24 15:06:10 -03:00
BeatAroundTheBuscherandGitHub ed00830202 Fixes Upper/Lower Casing for include paths (#487)
* Fixing upper/lower case for includes

types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
Asdow de56f653ec Use SoldierID 2024-11-30 23:47:00 +02:00
AsdowandGitHub 49a119e6b9 Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
2024-08-22 08:48:29 +03:00
Andrzej FałkowskiandGitHub a3be3ecd7e Specific drug types and drug items for background and facilities. (#226) 2023-10-02 19:30:59 +03:00
majcostaandGitHub 24425a82b1 More unused stuff removal (#49)
* More unused stuff removal

delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers

* remove mentions from vc proj files too

* remove preprocessor conditionals for unused definitions

find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'

then manually fixed a couple files the tool errored out on

* yes, the comments too

as title
2023-01-03 15:51:48 +02:00
rftrdev 7c6f7d6d09 Revert "Undo unrelated Chinese text changes"
This reverts commit 75332ea219.
2022-11-04 22:42:09 -07:00
rftrdev 75332ea219 Undo unrelated Chinese text changes 2022-11-04 22:39:33 -07:00
rftrdev feaf9827c9 Set up ASSIGNMENT_REBELCOMMAND
Hook up Start Mission button
2022-10-13 11:31:48 -07:00
Sevenfm 0fdaba84f6 World items patch (by Asdow).
Adds timing logs to savegame function, similar to how we already had in loading a save file. 
Uses a global struct for unloaded sectors' inventory instead of using map item temp files every time unloaded inventory is accessed.
From timing loading and saving functions with a save that has dozens of sectors with hundreds of items each, saving is a little bit slower than before, because map item temp files have to be written to disk just before the save, when that wasn't the case before (from ~0.3 s -> ~0.5s). It is offset by a decrease in loading a game (from ~1.1s -> 0.745s), once an older save is saved at least once. Any unloaded sector inventory access during gameplay is considerably faster and for example the autoresolve lag when militia is using sector equipment is completely gone for me.
Preserves save game compatibility

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9277 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-01-26 01:02:30 +00:00
Sevenfm 1ee875be61 New ingame options screen (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9212 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-11-17 07:50:20 +00:00
Sevenfm d3d06bced6 Mercs with the <druguse> tag in their background don't automatically consume drugs/alcohol if they are asleep (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9174 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-05 07:29:05 +00:00
Flugente eca080f0f9 New feature (by rftr): Arulco Rebel Command (ARC)
Improve you cities and overall campaign by choosing out of several upgrades

Requires GameDir >= r2613

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24884&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9153 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-08-22 19:00:09 +00:00
Flugente 960bb2d4ba New feature (by rftr): Mini events are a feature where the player can receive short text blurbs, and pick one of two outcomes.
Based on game implementations like Gloomhaven (road/city events) or Battletech (travel events).

For more info, see https://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24865&goto=363481&#msg_363481

Requires GameDir >= r2599

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9137 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-07-09 19:38:55 +00:00
Sevenfm b7cc3bbcf8 Fix for Dynamic Opinions feature not respecting ini setting and not allowing it to be disabled easily (by Shadooow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9002 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-05-05 03:40:57 +00:00
Flugente b1cfc516af Fix: unnecessary transaction
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8809 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-29 17:40:43 +00:00
Flugente ea1892c788 New feature: factories allows facilities to create items
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360075&#msg_360075

Requires GameDir >= r2534

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8804 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-17 20:52:27 +00:00
Sevenfm 1455409057 AI:
- before deciding anything, stop cowering animation
- before deciding anything, stop giving aid animation
- before deciding to raise weapon, check if weapon can be raised
- simplified scope check
- removed duplicate code in Red AI

Added missing actions to gzActionStr[].
Fixed OKLIFE checks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-25 19:02:53 +00:00
Sevenfm d02a4ddd7d Implemented some of the merc05's fixes (http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24256):
- fix for stopping snitches from preventing misbehavior
- fix for stopping snitches reports
- improved code for refused handcuffing
- fixed item bug with items dropping from backpack after using transformation in turnbased mode
- improved code for dart ammotype effect
- removed assert in AddCharacterToAnySquad to prevent crash when selecting merc in vehicle and plotting travel route
- added EXPLOSV_CREATUREGAS effect in UpdateAniTiles()

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8720 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-22 06:22:23 +00:00
Flugente 14619a22cc Revamped <scrounging>-tag of Backgrounds.xml: instead of hoarding items, mercs steal small amounts of money from the locals, which can lower loyalty.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=21308&goto=358321&#msg_358321

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8699 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-10-22 21:46:53 +00:00
Flugente 614d0c6c09 Fix: hourly drug addiction did not cause proper consumption of drugs
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8621 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-24 19:39:24 +00:00
Flugente 2dbacd32de The following options have been moved from the campaign the campaign start screen to JA2_Options.ini:
- Maximum number of IMPs (now MAX_IMP_CHARACTERS (Default: 10))
- Enemies drop all items (now DROP_ALL (Default: FALSE))
- Merc Story Backgrounds (now BACKGROUNDS (Default: TRUE))
- Food System (now FOOD (Default: FALSE))
- Improved Interrupt System (now IMPROVED_INTERRUPT_SYSTEM (Default: TRUE))
- Inventory Manipulation Costs AP (now INVENTORY_MANIPULATION_COSTS_AP (Default: FALSE))

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23855&goto=354656&#msg_354656

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8610 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-02 15:14:01 +00:00
Flugente 887170dda5 New merc (somewhat): Similar to Larry's two personalities, Buns now has an alternate personality as well.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23806&goto=354149&#msg_354149

Requires GameDir >= r2430.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-07-25 20:14:33 +00:00
Flugente e55b480996 New feature: Getting and using intel allows for more spy-related roleplay.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23643&goto=352475&#msg_352475

Requires GameDir >= r2401.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8522 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-02-18 23:17:34 +00:00
Flugente 8b41be236a If a merc harms themself, use a voice line
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8513 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-01-04 15:57:36 +00:00
Flugente e4e58e81d0 Fix: stealing from or in transit
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8499 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-10-19 17:46:17 +00:00
Flugente bc85245a53 Fix: Squadleader level bonus for other mercs was applied in strategic.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8479 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-09-24 15:49:41 +00:00
TheBob b60a94afc5 Added: Ctrl+Shift+E now fill LBE items in sector with other items and places them in vehicles first.
Added: Right-Click on remove attachments button on sector inventory screen will not empty LBE items in sector
Changed: SLAY_STAYS_FOREVER disables Slay's hourly chance to leave when unattended
Added: SLAY_HOURLY_CHANCE_TO_LEAVE setting to Ja2_Options.ini
Fixed: a bunch of array index out of bounds bugs
Fixed: a bunch of typos in if contitions
Fixed: BuildListFile() function loading items from index 1 instead 0
Added translation: Polish text for some map inventory screen items
Added translation: English texts for new functionality for other language files
Cleaned up some old TODOs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-05-19 13:40:34 +00:00
silversurfer fef0722178 Fixes (by The_Bob):
- Fixed random freeze on win8/10
- Fixed crash on mercs entering sector
- Fixed crash when using cover display (del/end)
- Fixed attachment popup showing incompatible attachments (crash/freeze/confusion on clicking the option)
- Fixed attachment popup positioning
- Fixed LBE contents corruption/deletion
- Fixed access violation (out of array bounds) in interrupt code
- Fixed a bunch of random old stuff
- Got the project to build on VS2015
- Improved popup class handling of grayed out options
- Improved performance of get item assignment check (added by Flugente)
- Added Ctrl+Space bind for testing/fixing broken LBE contents


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8399 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-04-12 08:09:12 +00:00
Flugente 4d48876c1f added new disability "Self-Harming"
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8359 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-01-11 22:32:33 +00:00
Sevenfm d2c1579786 HandleSnitchExposition: assignment instead of value check
HourlySnitchUpdate: NUM_PROFILES limit
Strategic AI.cpp: MAP_WORLD_X * MAP_WORLD_Y limit
RemoveMPButtonsForMapScreen: MAX_MP_BUTTONS limit
WrapString: '/0' char instead of '\0'

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8257 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 09:04:58 +00:00
Flugente 330925b0ef When displaying a merc's maximum assignment points, factor in backgrounds values.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8050 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-02-05 22:18:05 +00:00
Flugente 54d202fc79 - Fix: mercs can consume items that shouldnt' be consumed
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7900 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-07-05 10:37:27 +00:00
Flugente 4d9140da57 New Feature: Drug System Overhaul. The drug system has been completely overhauled.
Requires GameDir >= r2257.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=341541&#msg_341541

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7896 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-06-28 17:47:25 +00:00
Flugente 89b6f6aa81 Fix: dynamic opinions: mercs complain about a thief stealing, even if he fails
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7830 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-22 18:57:25 +00:00
silversurfer f3553cf888 Fix: Mercs that have the <druguse> tag in their background spawned a bottle of alcohol anywhere in there inventory at full hour when function HourlyLarryUpdate() was run. The bottle would spawn in invalid slots as well for example the backpack slot. Now the game will only spawn a 25% condition bottle which is consumed right away which solves the inventory problem. This is more or less a hackfix.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7766 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-03-04 10:54:28 +00:00
Flugente 3a9cb5ecc3 New Feature: dynamic dialogue is played when dynamic opinions are active. Mercs can comment on each others actions, and this can influence their opinions further. IMP character answers can even be chosen by the player.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7297 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-06-27 22:12:29 +00:00
Flugente 5e9289b450 - New Feature: dynamic opinions allows mercs to form opinions about each other depening on actions they/the player take or do not take. These can be viewed in the 'MeLoDY 'website. See also http://www.bears-pit.com/board/ubbthreads.php/topics/333259.html#Post333259
- Requires GameDir r2050.
- new background property: <dislikebackground> allows mercs to dislike specific backgrounds
- Fix: snitches did not correctly prevent misbehaviour
- Fix: morale event was not handled
- Fix: DropDowns did not refresh when using the arrow buttons

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7240 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-05-28 22:10:42 +00:00
Flugente 30060f0595 Merged revision(s) 7166-7177 from branches/ja2_source_official_2014:
- Flagmasks are unsigned, and should be called and treated as such
- Fix: experience gain from interrogation was too high
- Fix: chance of a prisoner becoming militia was calculated wrong
- default weight maximum for MOVE ITEM assignment increased from 30 to 40 kg
- Fix: snitches report the same event multiple times
- Fix: snitches treat vehicles as persons
- Fix: selection of launchables is inefficient, an does not take into account wether items are depending on day/night cycle
- new key combination: in strategic, pressing [CTRL] + [E] wile both a merc's inventory and the sector inventory are open will fill the merc's inventory with sector items
- trivial code cleanup
- if prisoners are taken in a sector that houses a prison, that prison can also be selected to house them
- Fix: distributing newly taken prisoners in a prison sector no longer redistributes all prisoners, only the new ones
- GetClosestFlaggedSoldierID can also be called without evaluation of sight
- Fix: Covert Ops: throwing/lobbing items or shooting rockets is deemed suspicious behaviour
- Fix: boxing was broken by loading a savegame
- Fix: campaign history rarely recorded kills in autoresolve
- There is no reason why the IDs that boxers are reset to before they are reinitialised would ever need to be altered by a modder. Required script change in stable GameDir r2024.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-04-30 21:36:18 +00:00
Wanne 8b494003fd New Feature: 2 new Iron Man game modes (by anv)
- Selectable at campaign start under "Extra Difficulty" label
- Soft Iron Man: No saving when in turn-based combat. Can save with enemies around (in sector) but only if still in real-time mode.
- Extreme Iron Man: No saving, except punctually at midnight - save screen opens by itself, so Player won't accidentally miss saving time window. Besides Player's save, game will be auto-saved at midnight too if auto-saving is on.
- New ja2_options.ini values for Extreme Iron Man setting: EXTREME_IRON_MAN_SAVING_TIME_NOTIFICATION, 


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7167 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-04-27 16:16:14 +00:00
Flugente fddb72a94e Merged revision(s) 7057 from branches/ja2_source_official_2014:
- increased background-based chance to steal to 50%, money/gold/solver will be preferred targets
- lowered exp stat gain for handling tripwire
- new background ability: disarm_trap alters effectivity at defusing bombs
- Fix: incorrectly deleted soldiers could still be counted as jamming/scanning

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7058 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-12 22:29:56 +00:00
Wanne 11037729f0 Merged from revision: 6905
Improved Snitch Trait (by anv)
- The snitch actions can be selected in the strategy view "Assignment" menu
o Spreading Propaganda: Accessible in town sectors
o Gathering Rumours: Accessible in town sectors
o Undercover Prison Snitch: Accessible from Facilities menu (Prison)
o Preventing Misbehaviour: New Snitch Menu
o Passive Reputation Increase
see: http://www.bears-pit.com/board/ubbthreads.php/topics/329412/1.html

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6906 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-02-12 17:22:40 +00:00
Flugente d6186aca15 Merged revision(s) 6826-6828 from branches/ja2_source_official_2014:
- Minor code improvements and cleanup
- Fix from r6775 is no longer necessary.
- Code improvement: Instead of calling inv.size() repeatedly, just call it once and remember that value

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-01-26 12:18:43 +00:00
Wanne 44cf72a2e0 - Fixed compilation error for JA2UB define (by anv)
- Added missing string to _FrenchText.cpp
- Renamed the "#if (defined JA2UB)" to "#ifdef JA2UB" so we are consistent through the code


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6719 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-28 18:27:09 +00:00
Flugente faba9ea713 Helicopter features (by anv):
- Waldo can now repair the helicopter for money
- alternative fuel system
- damage to helicopter can damage passengers

Appropriate Data in GameDir r1897.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6695 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-19 22:01:44 +00:00
Kriplo b91bc7b209 Brief: //dnl ch75
- More map editor fixes and map inventory pool performance improvement for big maps.
Details:
- Fix not showing expected messagebox on exit (ALT+x) which also throw exception and goes to improper mapeditor exit.
- Fix second annoying sticky message which shouldn't popup during map loading and performing RemoveProhibitedAttachments.
- Fix CTD when delete all enemies or civilians or all of them in map.
- Fix some std exception when reporting for missing optional xml file.
- Fix memory and map corruption in old mapeditors if loaded old map has item with invalid attachment and we try to attach something else.
- As years ago pInventoryPoolList had migrated from WORLDITEM* array to std::vector<WORLDITEM> it was time to do that with gWorldItems too, all necessary functions which need to be adopted to gWorldItems std::vector type are also changed.
- Resize code for gWorldItems is changed hoping will lead into less corruption problems as now could occur in mapeditor and game when code automatically doing attachment changes.
- Change code for handling map inventory which now should be fast enough to support AIMNAS project which will probably deal with thousands of items per map.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-03 16:26:30 +00:00
Flugente 4ccc6a5b2a - new feature: backgrounds allow more personalisation of mercenaries
- background feature replaces overheating on startup screen, moved overheating opion to ini

WARNING: GameDir revision >= 1748 is required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6353 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-03 20:55:33 +00:00
Flugente 3bc5ff75cc significantly cleaned up includes (by IoP)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6056 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-05-02 22:42:08 +00:00
Flugente 63a09bba5f - new option for militia command menu: crouch/all crouch
- Larry now consumes every drug

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5638 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-10-21 16:57:45 +00:00