- Deleted the "Data-Files" and "Language" folder for the UB Mod

git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1518 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
Wanne
2012-08-24 00:48:18 +00:00
parent 611fe54218
commit 4da23b24dc
4188 changed files with 0 additions and 127783 deletions
-451
View File
@@ -1,451 +0,0 @@
;******************************************************************************************************************************
; Jagged Alliance 2 v1.13
;******************************************************************************************************************************
; This file controls various settings for adjusting AP (Actions Points) and BP (Breath Points).
;
; If you want to have another AP/BP system, you simply have to change the AP_MAXIMUM property.
; All other properties in the file will be adjusted dynamically ingame.
; Howevery you can override the default values and the game will use them.
;------------------------------------------------------------------------------------------------------------------------------
[APConstants]
;***********************************************************************
;* The maximum number of Action Points a merc may have. *
;* Should be 5x MAX_AP_CARRIED for game-balance purposes. *
;***********************************************************************
AP_MAXIMUM = 100
;***********************************************************************
;* The minimum number of Action Points a merc should have. *
;***********************************************************************
AP_MINIMUM = 40
;***********************************************************************
;* The minimum number of Action Points a soldier (merc, enemy, ...) *
;* must have to get an interrupt. *
;***********************************************************************
MIN_APS_TO_INTERRUPT = 16
;***********************************************************************
;* The maximum number of Action Points for Crepitus. *
;***********************************************************************
AP_MONSTER_MAXIMUM = 160
;***********************************************************************
;* The maximum number of Action Points for vehicles. *
;***********************************************************************
AP_VEHICLE_MAXIMUM = 200
;***********************************************************************
;* This is the maximum number of Action Points that may be carried *
;* over from a previous round. It should be no more than 1/5 of *
;* AP_MAXIMUM, or game balance may be seriously disturbed. *
;***********************************************************************
MAX_AP_CARRIED = 20
;***********************************************************************
;* The following 5 values are actual percent adjustments. *
;* So 9 actually means 90% of whatever APs have been calculated. *
;* 15 = 150%. etc. *
;* *
;* AP_WRONG_MAG is the multiplier applied to reload AP cost when *
;* trying to reload from an improper sized mag *
;***********************************************************************
AP_YOUNG_MONST_FACTOR = 15
AP_MONST_FRENZY_FACTOR = 13
AP_CLAUSTROPHOBE = 9
AP_AFRAID_OF_INSECTS = 8
AP_WRONG_MAG = 15
;***********************************************************************
;* The amount of Action Points that are needed to exchange places *
;* with another character. *
;***********************************************************************
AP_EXCHANGE_PLACES = 20
;***********************************************************************
;* Movement costs are raised by this amount, when moving in reverse. *
;***********************************************************************
AP_REVERSE_MODIFIER = 4
;***********************************************************************
;* Movement costs are raised by this amount, when being stealthy. *
;***********************************************************************
AP_STEALTH_MODIFIER = 8
;***********************************************************************
;* The amount of Action Points that are needed to steal from an enemy. *
;***********************************************************************
AP_STEAL_ITEM = 56
;***********************************************************************
;* AP-cost for putting blood into a jar. *
;***********************************************************************
AP_TAKE_BLOOD = 40
;***********************************************************************
;* The amount of Action Points that are needed to talk to another *
;* character. *
;***********************************************************************
AP_TALK = 24
;***********************************************************************
;* Movement costs for different types of terrain. *
;***********************************************************************
AP_MOVEMENT_FLAT = 12
AP_MOVEMENT_GRASS = 14
AP_MOVEMENT_BUSH = 18
AP_MOVEMENT_RUBBLE = 24
AP_MOVEMENT_SHORE = 28
AP_MOVEMENT_LAKE = 36
AP_MOVEMENT_OCEAN = 32
;***********************************************************************
;* Movement modifiers based on move rate *
;***********************************************************************
AP_MODIFIER_RUN = -8
AP_MODIFIER_WALK = -4
AP_MODIFIER_SWAT = 0
AP_MODIFIER_CRAWL = 4
AP_MODIFIER_PACK = 4
; modifier when walking/sidestepping with weapon raised
AP_MODIFIER_WEAPON_READY = 1
;***********************************************************************
;* AP-cost for changing facing while standing. *
;***********************************************************************
AP_CHANGE_FACING = 4
;***********************************************************************
;* AP-cost for changing to another target inside current facing. *!
;***********************************************************************
AP_CHANGE_TARGET = 2
;***********************************************************************
;* AP-costs that are involved in throwing items other than to attack. *
;***********************************************************************
AP_TOSS_ITEM = 32
;***********************************************************************
;* AP-cost charged for refueling a vehicle *
;***********************************************************************
AP_REFUEL_VEHICLE = 40
;***********************************************************************
;* The cost for enemy soldiers to use their radio. *
;***********************************************************************
AP_RADIO = 20
;***********************************************************************
;* AP-costs to change stance *!
;***********************************************************************
AP_CROUCH = 6
AP_PRONE = 8
;***********************************************************************
;* AP-costs for looking (binocs) for various stances. *!
;***********************************************************************
AP_LOOK_STANDING = 4
AP_LOOK_CROUCHED = 6
AP_LOOK_PRONE = 8
;***********************************************************************
;* AP-costs for geting a weapon into position. *
;* Most are not used because these costs are also in weapons.xml *
;***********************************************************************
AP_READY_KNIFE = 0
AP_READY_DUAL = 4
;***********************************************************************
;* Maybe default values in case calculations come up with strange *
;* (negative?) results? *
;***********************************************************************
AP_MIN_AIM_ATTACK = 0
;***********************************************************************
;* AP-cost to place a bomb for demolition purposes. *
;***********************************************************************
AP_DROP_BOMB = 12
;***********************************************************************
;* Normally superseded by value in weapons.xml. *
;***********************************************************************
AP_RELOAD_GUN = 20
;***********************************************************************
;* AP-costs involved in First Aid. *
;***********************************************************************
AP_START_FIRST_AID = 20
;***********************************************************************
;* Self-explanatory, I believe ;-) *
;***********************************************************************
AP_START_REPAIR = 20
;***********************************************************************
;* This is a divisor so we don't want to adjust it's value. *!
;* It adjusts how many AP per damage point taken are lost. *!
;***********************************************************************
AP_GET_WOUNDED_DIVISOR = 1
;***********************************************************************
;* AP-loss from stepping on marbles or from getting hit very hard. *
;***********************************************************************
AP_FALL_DOWN = 16
;***********************************************************************
;* AP-costs involved in opening doors. *
;* AP_OPEN_DOOR is also used for closing doors *
;* AP_LOCK_DOOR exists, but I have never been able to lock a door *
;* in-game. *
;***********************************************************************
AP_OPEN_DOOR = 12
AP_PICKLOCK = 40
AP_EXAMINE_DOOR = 20
AP_BOOT_DOOR = 32
AP_USE_CROWBAR = 40
AP_UNLOCK_DOOR = 24
AP_LOCK_DOOR = 24
AP_EXPLODE_DOOR = 40
AP_UNTRAP_DOOR = 40
;***********************************************************************
;* AP-cost for cutting fences. *
;***********************************************************************
AP_USEWIRECUTTERS = 40
;***********************************************************************
;* AP-costs for climbing, obviously ;-) *
;***********************************************************************
AP_CLIMBROOF = 40
AP_CLIMBOFFROOF = 24
;***********************************************************************
;* AP-costs for jumping fences, without or with a backpack. *
;***********************************************************************
AP_JUMPFENCE = 24
AP_JUMPFENCEBPACK = 40
;***********************************************************************
;* Activating mounted or handheld switches. *
;***********************************************************************
AP_USE_REMOTE = 8
AP_PULL_TRIGGER = 8
AP_PUNCH = 16
;***********************************************************************
;* AP-cost for taking an item from the ground. *
;***********************************************************************
AP_PICKUP_ITEM = 12
;***********************************************************************
;* AP-cost to give an item to an adjacent merc. *
;***********************************************************************
AP_GIVE_ITEM = 4
;***********************************************************************
;* AP-cost to set a mine *
;***********************************************************************
AP_BURY_MINE = 30
;***********************************************************************
;* AP-cost to disarm a mine or booby trap *
;***********************************************************************
AP_DISARM_MINE = 40
;***********************************************************************
;* Application of items to the Body silhouette. *
;***********************************************************************
AP_DRINK = 20
AP_CAMOFLAGE = 40
;***********************************************************************
;* Self-explanatory. *
;***********************************************************************
AP_START_RUN_COST = 4
;***********************************************************************
;* AP-cost for attaching the soda can with string to a door. *
;***********************************************************************
AP_ATTACH_CAN = 20
;***********************************************************************
;* AP-cost to jump over a prone merc. *!
;***********************************************************************
AP_JUMP_OVER = 20
;***********************************************************************
;* Backpack-related AP-costs. *
;***********************************************************************
AP_BACK_PACK = 12
AP_OPEN_ZIPPER = 24
AP_CLOSE_ZIPPER = 28
;***********************************************************************
;* AP for aiming clicks. *
;***********************************************************************
AP_CLICK_AIM = 4
AP_FIRST_CLICK_AIM_SCOPE = 4
AP_SECOND_CLICK_AIM_SCOPE = 5
AP_THIRD_CLICK_AIM_SCOPE = 6
AP_FOURTH_CLICK_AIM_SCOPE = 7
AP_FIFTH_CLICK_AIM_SCOPE = 8
AP_SIXTH_CLICK_AIM_SCOPE = 9
AP_SEVENTH_CLICK_AIM_SCOPE = 10
AP_EIGHTH_CLICK_AIM_SCOPE = 11
;***********************************************************************
;* The following is used with the weapons.xml:bAutofireShotsPerFiveAP *
;* to determine how many AP we actually want the value to represent. *
;* "FiveAP" is right for a 25AP system, but 20 is more approriate for *
;* a 100AP system. *
;***********************************************************************
AUTOFIRE_SHOTS_AP_VALUE = 20
;***********************************************************************
;* Loose round reload system. *
;* Represents the AP cost to reload a single round of ammunition *
;***********************************************************************
AP_RELOAD_LOOSE = 8
;***********************************************************************
;* The AP shot cost at which a gun will be listed as "slow firing" *
;***********************************************************************
BAD_AP_COST = 36
;***********************************************************************
;* AP value to unjam a weapon *
;***********************************************************************
AP_UNJAM = 2
;***********************************************************************
;* The APs needed when you jump through a window *
;***********************************************************************
AP_JUMPWINDOW = 40
;***********************************************************************
;* The APs needed when you climb up/down a wall *
;***********************************************************************
AP_JUMPWALL = 40
AP_JUMPOFFWALL = 40
;***********************************************************************
;* Inventory costs: The APs needed to take an item from position *
;***********************************************************************
AP_INV_FROM_NONE = 0
AP_INV_FROM_HANDS = 0
AP_INV_FROM_EQUIPMENT = 15
AP_INV_FROM_VEST = 5
AP_INV_FROM_RIG = 4
AP_INV_FROM_CPACK = 6
AP_INV_FROM_BPACK = 8
AP_INV_FROM_SLING = 6
AP_INV_FROM_KNIFE = 5
AP_INV_FROM_FACE = 2
AP_INV_FROM_BIG_POCKET = 5
AP_INV_FROM_SMALL_POCKET = 4
;***********************************************************************
;* Inventory costs: The APs needed to move an item to position *
;***********************************************************************
AP_INV_TO_NONE = 0
AP_INV_TO_HANDS = 0
AP_INV_TO_EQUIPMENT = 20
AP_INV_TO_VEST = 6
AP_INV_TO_RIG = 5
AP_INV_TO_CPACK = 7
AP_INV_TO_BPACK = 8
AP_INV_TO_SLING = 7
AP_INV_TO_KNIFE = 6
AP_INV_TO_FACE = 2
AP_INV_TO_BIG_POCKET = 4
AP_INV_TO_SMALL_POCKET = 5
;***********************************************************************
;* Inventory costs: The maximum APs for inventory costs *
;***********************************************************************
AP_INV_MAX_COST = 25
;***********************************************************************
;* Suppression AP values *
;* Maximum AP penalty from suppression fire from a single attack *
;* Maximum AP penalty from suppression fire for an entire turn *
;* Modifier for how effective a suppression point is *
;* Modifier for how effective morale lost from suppression is *
;***********************************************************************
AP_MAX_SUPPRESSED = 64
AP_MAX_TURN_SUPPRESSED = 200
AP_SUPPRESSION_MOD = 24
AP_LOST_PER_MORALE_DROP = 12
;***********************************************************************
;* Minimum possible value AP can be reduced to *
;***********************************************************************
AP_MIN_LIMIT = -100
AP_SUPPRESSION_SHOCK_DIVISOR = 4
AP_LOSS_PER_LEGSHOT_DAMAGE = 4
;***********************************************************************
;* Default values to calculate AP-costs shown in Infoboxes of guns. *
;***********************************************************************
DEFAULT_APS = 80
DEFAULT_AIMSKILL = 80
[BPConstants]
BP_RATIO_RED_PTS_TO_NORMAL = 100
BP_RUN_ENERGYCOSTFACTOR = 3
BP_WALK_ENERGYCOSTFACTOR = 1
BP_SWAT_ENERGYCOSTFACTOR = 2
BP_CRAWL_ENERGYCOSTFACTOR = 4
BP_RADIO = 0
BP_USE_DETONATOR = 0
;***********************************************************************
;* These four values are dynamically adjusted based on AP_MAXIMUM *
;***********************************************************************
BP_PER_AP_NO_EFFORT = -50
BP_PER_AP_MIN_EFFORT = -25
BP_PER_AP_LT_EFFORT = -12
BP_PER_AP_MOD_EFFORT = 6
BP_MOVEMENT_FLAT = 5
BP_MOVEMENT_GRASS = 10
BP_MOVEMENT_BUSH = 20
BP_MOVEMENT_RUBBLE = 35
BP_MOVEMENT_SHORE = 50
BP_MOVEMENT_LAKE = 75
BP_MOVEMENT_OCEAN = 100
BP_MODIFIER_WEAPON_READY = 30
BP_CROUCH = 10
BP_PRONE = 10
BP_CLIMBROOF = 500
BP_CLIMBOFFROOF = 250
BP_JUMPFENCE = 200
BP_JUMPFENCEBPACK = 500
BP_STEAL_ITEM = 50
BP_START_FIRST_AID = 0
BP_GET_HIT = 200
BP_GET_WOUNDED = 50
BP_FALL_DOWN = 250
BP_OPEN_DOOR = 30
BP_PICKLOCK = 50
BP_EXAMINE_DOOR = 20
BP_BOOT_DOOR = 200
BP_USE_CROWBAR = 350
BP_UNLOCK_DOOR = 50
BP_EXPLODE_DOOR = 40
BP_UNTRAP_DOOR = 150
BP_LOCK_DOOR = 50
BP_USEWIRECUTTERS = 200
BP_DROP_BOMB = 0
BP_BURY_MINE = 250
BP_DISARM_MINE = 0
BP_JUMP_OVER = 250
BP_BACK_PACK = 50
BP_WORK_ZIPPER = 250
BP_UNJAM = 0
BP_JUMPOFFWALL = 250
BP_JUMPWALL = 500
Binary file not shown.
Binary file not shown.
-374
View File
@@ -1,374 +0,0 @@
;******************************************************************************************************************************
; Jagged Alliance 2 v1.13: New CTH System and Shooting Mechanism
;******************************************************************************************************************************
; These settings control the various parts of the new CTH and Shooting systems.
; Most of these settings are used as multipliers for the various factors that
; control CTH calculation and shooting accuracy.
;
; By raising or lowering a setting, you can influence the importance of a factor,
; for example how Marksmanship affects the total Base CTH you can have, or how
; bad it is to have wounds when trying to fire a gun.
;
; Other settings control the system more abstractly. For instance, you can control
; how hard it is to shoot moving targets, or the maximum possible deviation
; (inaccuracy) generated by guns.
;
; Each setting is accompanied by an explanation if possible. Make sure you know
; what the setting does, and how high or low you can set the value, before
; making any changes.
; Also please note that some values are FLOATS, meaning they need a decimal
; point behind them, even if that decimal point is followed by a 0. Other
; values are INTEGERS, and do not accept a decimal point at all.
;------------------------------------------------------------------------------------------------------------------------------
[General]
;------------------------------------------------------------------------------------------------------------------------------
; These settings control the shooting mechanism as a whole. In other words,
; changing these settings will affect every shooter under any conditions.
; You can use these settings to make shooting more or less accurate as you
; see fit.
;------------------------------------------------------------------------------------------------------------------------------
; This setting represents the longest distance at which Iron Sights are 100% effective.
; Beyond this range, shooting accuracy begins to drop, and a scope will be required
; to avoid that drop.
; ALL SCOPE RANGES ARE DETERMINED BY THIS VALUE. For instance, a 2x scope will
; negate penalties for shooting at twice this distance. A 10x scope will
; negate penalties for shooting at ten times this distance.
; By decreasing this value, you can make all shots more accurate, and naturally
; make scopes more powerful.
; This value is an INTEGER, with a range of 10 to 1000. The distance is
; measured in METERS, not tiles, so 100 means 10 tiles.
NORMAL_SHOOTING_DISTANCE = 70
; This is the maximum angle, to either side of the shooter, that a bullet may fly.
; The CTH system works by shooting bullets randomly inside this angle. Increasing
; your aim will make the angle smaller, thus making rounds more likely to hit the
; target.
;
; This value is a FLOAT, with a range of 0 to 22.5. If set to 0, all shots will
; be 100% on target, regardless of aiming.
; Decreasing this value causes all shots to be more accurate.
DEGREES_MAXIMUM_APERTURE = 11
; The Range Coefficient works with the listed weapon range to determine the weapons
; maximum range. Once a bullet reaches it's maximum range, gravity pulls it towards
; the ground.
RANGE_COEFFICIENT = 2.0
; The Gravity Coefficient determines how powerful gravity is once it kicks into
; action - this happens when the bullet reaches the "maximum range" of the gun
; that fired it.
; The lower this coefficient, the faster will bullets change their trajectory
; towards the ground, hitting it sooner.
; Conversely, by increasing this value you can let bullets fly further beyond
; the max range of the gun. That will effectivelly let guns hit targets further
; beyond their max range, though it is not a reliable way to hit any target.
GRAVITY_COEFFICIENT = 2.0
; The Vertical Bias "flattens" the target appeture which restricts the vertical amoun
; by which a bullet can travel. Vertical bias is ultimately based on stance where
; a standing shooter is always at 1.0, a prone shooter is at the indicated bias, and
; a crouching target is midway between the two.
VERTICAL_BIAS = 0.5
; The Scope Range Multiplier is applied against a scopes magnification to determine
; the scopes minimum effective range. Sniper and Hunter training has a slight effect
; on this. Valid range is 0.5 - 1.5, with a default of 0.7. The higher you set
; this multiplier, the less effective scopes become.
SCOPE_RANGE_MULTIPLIER = 0.7
; The Side Facing Divisor is applied against the shooting offsets when a target is
; facing directly perpendicular (i.e., East or West when shooter faces North or South)
; to the shooter. This is to account for a visual error in the NCTH system. The
; Valid range for this divisor is 1.0 - 10.0. If you don't think it should be as easy
; to hit a target from the side as from head on, just set this value to 1.0
SIDE_FACING_DIVISOR = 2.0
[Base CTH]
;------------------------------------------------------------------------------------------------------------------------------
; Base CTH is an amount of CTH given freely to the shooter for any shot he makes.
; The basic value is determined by skills, and later the modifiers reduce or
; increase it appropriately. Characters with low skills, or with bad factors
; affecting their performance, will receive bad base CTH.
; The maximum amount of Base CTH you can have is 33 points. This is only
; achievable by super-mercs in excellent conditions.
; These settings determine the importance of each character skill in calculating
; your Base CTH. By default, Experience is 3 times more important than the other
; skills. Base CTH, before modifiers, is equal to the sum of the player's skills,
; each multiplied by the appropriate value from these, and then divided by the
; sum of all these four values.
;
; These values are FLOATS, with a range of 0.0 to 10.0. Setting a value to 0
; will render the appropriate skill irrelevant for calculating base CTH. DO NOT
; set all four values to 0, unless you want to see lots of crashes.
;------------------------------------------------------------------------------------------------------------------------------
BASE_EXP = 3.0
BASE_MARKS = 1.0
BASE_WIS = 1.0
BASE_DEX = 1.0
;------------------------------------------------------------------------------------------------------------------------------
; These settings control the effect that various factors have on the shooter's
; Base CTH. By increasing a value, you can increase that factor's importance
; on raising or lowering Base CTH.
;
; These values are all FLOATS, with ranges of -1000.0 to 1000.0. Pay close attention
; to the positive/negative and read the explanations carefully. Some factors are
; better when HIGHER, others better when LOWER.
;
; After calculating Base CTH from skills (see above), the factors governing it
; (below) are all pooled together into one penalty value. That penalty value is
; then used as a percentage to increase or decrease your Base CTH. In other words,
; if all factors amount to -50.0, you'll lose half your Base CTH. If they amount
; to 20.0, you'll gain 20% extra base CTH.
;------------------------------------------------------------------------------------------------------------------------------
; This is a modifier given per each morale point below 50.
BASE_LOW_MORALE = -1.0
; This modifier is given per each morale point above 50.
BASE_HIGH_MORALE = 2.0
; This modifier is given to any character with the "PSYCHO" trait.
BASE_PSYCHO = -3.0
; This is the modifier given when shooting one "cube" upwards. A cube is
; 1/3 of a tile high. This takes into account both stance and level. For
; example, a standing merc shooting at the legs of a target on the roof
; gets 1*this modifier. A prone merc on ground level shooting at the
; head of a target on ground level gets 2*this modifier.
;
; The shooting upwards modifier is then divided by the range to the target
; (in tiles). In other words, at a range of 2 tiles the modifier is
; HALVED. at a range of 10 tiles, the modifier is divided by 10. Etcetera.
; This means that the further the target is, the less relevant the upwards
; angle is.
BASE_SHOOTING_UPWARDS = -15.0
; This is the MAXIMUM modifier given to a shooter when injured. To get this
; much, the shooter must be dead (0% health...). It's linear,
; so at 50% health the shooter gets exactly half the penalty.
; Note that "Bandaged" damage counts as half as much as bleeding damage.
; Therefore, 50% bandaged damage is as bad as only25% bleeding damage.
BASE_INJURY = -30.0
;------------------------------------------------------------------------------------------------------------------------------
; These are the modifiers given for different levels of drunkness. Naturally,
; the more drunk you are, the more your CTH suffers.
;------------------------------------------------------------------------------------------------------------------------------
BASE_DRUNK_TIPSY = -5.0
BASE_DRUNK = -20.0
BASE_DRUNK_WASTED = -50.0
BASE_DRUNK_HUNGOVER = -10.0
; This is the MAXIMUM modifier given to a shooter when fully fatigued (0% breath).
; It's linear, so at 50% breath you get half the modifier.
BASE_FATIGUE = -15.0
; This modifier is applied when shooting at the same target again. If the target
; has moved between shots, or the shooter does anything but shoot at the target,
; the modifier is lost.
BASE_SAME_TARGET = 5.0
; This is the modifier given when the shooter is in a cloud of gas and does
; not have a gas mask on.
BASE_GASSED = -15.0
; This modifier is applied when the shooter is being bandaged by someone else.
BASE_BEING_BANDAGED = -5.0
; This is the MAXIMUM modifier given when the target reaches the maximum number
; of Suppression Shock points, which by default would be 30. It's linear, so at
; 15 shock points you get half the penalty.
; Note that characters with high experience stop accumulating shock much earlier,
; and so are much less subject to this modifier than other characters.
BASE_SHOCK = -150.0
; This modifier is applied if the target has exceptional agility or experience level.
BASE_AGILE_TARGET = -5.0
; This modifier is applied if the shooter can't see the target. This happens
; when shooting at a target spotted by someone else.
BASE_TARGET_INVISIBLE = -100.0
;------------------------------------------------------------------------------------------------------------------------------
; These modifiers work very differently from the others. The are related to a
; concept called Gun Handling, which is still being adjusted. Basically,
; Gun Handling is equal to the AP Cost to Ready the gun. Heavier, more
; cumbersome guns like sniper rifles or machine guns get a high Gun Handling
; value, and thus decrease Base CTH proportionally. Pistols, on the other hand,
; have very low Gun Handling values.
;
; BASE_DRAW_COST is applied per each Gun Handling point.
;
; The other values act as multipliers applied directly to the Gun Handling
; value. For example, by default a pistol fired with one hand (other hand
; full or holding another pistol) gets its Gun Handling value doubled.
;
; Please note that all of these except BASE_DRAW_COST should be POSITIVE.
; The higher they are, the greater their effect.
;------------------------------------------------------------------------------------------------------------------------------
BASE_DRAW_COST = 2.0
BASE_TWO_GUNS = 5.0
BASE_ONE_HANDED = 2.5
BASE_STANDING_STANCE = 2.0
BASE_CROUCHING_STANCE = 3.0
BASE_PRONE_STANCE = 4.0
BASE_HEAVY_WEAPON = 2.0
;------------------------------------------------------------------------------------------------------------------------------
; These modifiers are applied based on game difficulty, and only affect
; the base CTH of ENEMY COMBATANTS.
;------------------------------------------------------------------------------------------------------------------------------
BASE_DIFFICULTY_NOVICE = -30.0
BASE_DIFFICULTY_EXPERIENCED = 0.0
BASE_DIFFICULTY_EXPERT = 20.0
BASE_DIFFICULTY_INSANE = 50.0
[Aiming CTH]
;------------------------------------------------------------------------------------------------------------------------------
; Aiming CTH is the amount of CTH you get for adding extra aiming to your
; shot, by paying extra APs.
;
; First, the game calculates the maximum CTH our shooter can have, using
; the shooter's skills as a guide. This is called the CTH cap, and the shooter
; can NEVER have more CTH than this cap, ever.
;
; The program then subtracts the Base CTH value from the CTH Cap, coming up
; with a number called the Maximum Aiming Bonus. At peak condition, and with
; the maximum number of aiming levels applied, the shooter will reach his
; CTH Cap, meaning he will be as accurate as he can be.
;
; Note that for each AP you spend on aiming, you only get PART of the Maximum
; Aiming Bonus. In fact, you get 8/36 of it for the first AP, 7/36 for the
; second AP, 6/36 for the third, and so forth. The last AP gives only 1/36
; of the total bonus, but that little bit can sometimes be crucial.
;------------------------------------------------------------------------------------------------------------------------------
AIM_EXP = 1.0
AIM_MARKS = 3.0
AIM_WIS = 1.0
AIM_DEX = 2.0
;------------------------------------------------------------------------------------------------------------------------------
; This value is multiplied against 1/2 the scopes mag factor to determine the
; actual penalty applied. Setting it too low will make it impossible to use
; scopes within effective range
;------------------------------------------------------------------------------------------------------------------------------
AIM_TOO_CLOSE_SCOPE = -4.0
AIM_GUN_CONDITION = -2.0
AIM_LOW_MORALE = -2.0
AIM_HIGH_MORALE = 1.0
AIM_PSYCHO = -5.0
AIM_VISIBILITY = -1.0
AIM_SHOOTING_UPWARDS = -20.0
AIM_INJURY = -60.0
AIM_DRUNK_TIPSY = -10.0
AIM_DRUNK = -40.0
AIM_DRUNK_WASTED = -90.0
AIM_DRUNK_HUNGOVER = -15.0
AIM_FATIGUE = -40.0
AIM_GASSED = -80.0
AIM_BEING_BANDAGED = -20.0
AIM_SHOCK = -150.0
AIM_TARGET_INVISIBLE = -50.0
AIM_SNIPER_SKILL = 25.0
AIM_DRAW_COST = 0.5
AIM_STANDING_STANCE = 1.5
AIM_CROUCHING_STANCE = 1.25
AIM_PRONE_STANCE = 1.0
AIM_TWO_GUNS = 4.0
AIM_ONE_HANDED = 2.5
AIM_HEAVY_WEAPON = 2.0
AIM_DIFFICULTY_NOVICE = -30.0
AIM_DIFFICULTY_EXPERIENCED = 0.0
AIM_DIFFICULTY_EXPERT = 20.0
AIM_DIFFICULTY_INSANE = 50.0
[Shooting Mechanism]
MOVEMENT_MRK = 3.0
MOVEMENT_WIS = 2.0
MOVEMENT_DEX = 1.0
MOVEMENT_EXP_LEVEL = 2.0
MOVEMENT_TRACKING_DIFFICULTY = 40
MOVEMENT_PENALTY_PER_TILE = 1.0
PRE_RECOIL_WIS = 2.0
PRE_RECOIL_EXP_LEVEL = 3.0
PRE_RECOIL_AUTO_WEAPONS_SKILL = 2.0
RECOIL_MAX_COUNTER_STR = 3.0
RECOIL_MAX_COUNTER_AGI = 1.0
RECOIL_MAX_COUNTER_EXP_LEVEL = 1.0
RECOIL_MAX_COUNTER_FORCE = 10.0
RECOIL_MAX_COUNTER_CROUCH = 10.0
RECOIL_MAX_COUNTER_PRONE = 25.0
RECOIL_COUNTER_ACCURACY_MIN_ERROR = 0.2
RECOIL_COUNTER_ACCURACY_DEX = 3.0
RECOIL_COUNTER_ACCURACY_WIS = 1.0
RECOIL_COUNTER_ACCURACY_AGI = 1.0
RECOIL_COUNTER_ACCURACY_EXP_LEVEL = 4.0
RECOIL_COUNTER_AUTO_WEAPONS_DIVISOR = 4.0
RECOIL_COUNTER_ACCURACY_TRACER_BONUS = 10.0
RECOIL_COUNTER_ACCURACY_ANTICIPATION = 25.0
RECOIL_COUNTER_ACCURACY_COMPENSATION = 2.0
RECOIL_COUNTER_FREQUENCY_AGI = 3.0
RECOIL_COUNTER_FREQUENCY_EXP_LEVEL = 2.0
RECOIL_COUNTER_FREQUENCY_AUTO_WEAPONS_DIVISOR = 4.0
;------------------------------------------------------------------------------------------------------------------------------
; These set the percentage by which the autofire target offset is improved. At 20%, it takes 5 "steps" (based on CFF)
; to reach best offset improvement.
;------------------------------------------------------------------------------------------------------------------------------
RECOIL_COUNTER_INCREMENT = 20
RECOIL_COUNTER_INCREMENT_TRACER = 25
;------------------------------------------------------------------------------------------------------------------------------
; This value determines the distance ratio for recoil. Higher values result in
; less overall recoil movement at longer ranges.
; This value is an INTEGER, with a range of 10 to 1000. The distance is
; measured in METERS, not tiles, so 100 means 10 tiles.
;------------------------------------------------------------------------------------------------------------------------------
NORMAL_RECOIL_DISTANCE = 140
MAX_BULLET_DEV = 5.0
RANGE_EFFECTS_DEV = TRUE
;------------------------------------------------------------------------------
; MAX_EFFECTIVE_RANGE_MULTIPLIER
; Maximum effective range of Gun that AI will still attempt to shoot
; Default: 1.1 which equates to 110% of the gun's effective range
; MAX_EFFECTIVE_RANGE_REDUCTION
; Maximum reduction of chance to hit when exceeding effective range
; Default: 0.5 which equates to 50% reduction
; MAX_EFFECTIVE_USE_GRADIENT
; Whether to apply the reduction as a flat reduction or as gradient
; Default: FALSE which is flat reduction when exceeding range
;------------------------------------------------------------------------------
MAX_EFFECTIVE_RANGE_MULTIPLIER = 1.1
MAX_EFFECTIVE_RANGE_REDUCTION = 0.5
MAX_EFFECTIVE_USE_GRADIENT = FALSE
Binary file not shown.
Binary file not shown.
-17
View File
@@ -1,17 +0,0 @@
; ---------------------------------------------------------------------------------------------------------------------------------
; To change the videos, simple change the filename from the "INTRO" folder.
; The file extension (*.bik, *.smk) can be ommitted.
; In that case the game tries to open the file with the *.bik (Bink Video) extension, and if that fails then fall back to
; *.smk (Smacker Video) files.
; If you do not want a video to be played, just delete the path.
; ---------------------------------------------------------------------------------------------------------------------------------
[INTRO]
; If you set this to TRUE, all the default JA2 videos will be disabled (not shown to the user).
NO_DEFAULT_VALUES = FALSE
[INTRO_BEGINNING]
INTRO_HELI_CRASH_SCENE = INTRO\\Intro
[INTRO_ENDING]
INTRO_END_SCENE = INTRO\\MissileEnding
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,381 +0,0 @@
Profil = {
ELDIN = 127,
BIGGENS = 61, -- UB
}
Team = {
OUR_TEAM = 0,
ENEMY_TEAM = 1,
CREATURE_TEAM = 2,
MILITIA_TEAM = 3,
CIV_TEAM = 4,
PLAYER_PLAN = 5,
LAN_TEAM_ONE = 6,
LAN_TEAM_TWO = 7,
LAN_TEAM_THREE = 8,
LAN_TEAM_FOUR = 9,
}
StatusAlert = {
STATUS_GREEN = 0,
STATUS_YELLOW = 1,
STATUS_RED = 2,
STATUS_BLACK = 3,
}
ActionType = {
AI_ACTION_GET_CLOSER = 5,
}
Facts = {
FACT_MUSEUM_ALARM_WENT_OFF = 278,
}
SoundVolume = {
LOWVOLUME = 25,
BTNVOLUME = 40,
MIDVOLUME = 65,
HIGHVOLUME = 127,
}
Sample = {
KLAXON_ALARM = 214,
}
Group = {
NON_CIV_GROUP = 0,
REBEL_CIV_GROUP = 1,
KINGPIN_CIV_GROUP = 2,
SANMONA_ARMS_GROUP = 3,
ANGELS_GROUP = 4,
BEGGARS_CIV_GROUP = 5,
TOURISTS_CIV_GROUP = 6,
ALMA_MILITARY_CIV_GROUP = 7,
DOCTORS_CIV_GROUP = 8,
COUPLE1_CIV_GROUP = 9,
HICKS_CIV_GROUP = 10,
WARDEN_CIV_GROUP = 11,
JUNKYARD_CIV_GROUP = 12,
FACTORY_KIDS_GROUP = 13,
QUEENS_CIV_GROUP = 14,
}
Civ_status = {
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
Noise = {
NOISE_UNKNOWN = 0,
NOISE_MOVEMENT = 1,
NOISE_CREAKING = 2,
NOISE_SPLASHING = 3,
NOISE_BULLET_IMPACT = 4,
NOISE_GUNFIRE = 5,
NOISE_EXPLOSION = 6,
NOISE_SCREAM = 7,
NOISE_ROCK_IMPACT = 8,
NOISE_GRENADE_IMPACT = 9,
NOISE_WINDOW_SMASHING = 10,
NOISE_DOOR_SMASHING = 11,
NOISE_SILENT_ALARM = 12,
}
local HEARD_3_TURNS_AGO = -4
local HEARD_2_TURNS_AGO = -3
local HEARD_LAST_TURN = -2
local HEARD_THIS_TURN = -1
local NOT_HEARD_OR_SEEN = 0
local SEEN_CURRENTLY = 1
local SEEN_THIS_TURN = 2
local SEEN_LAST_TURN = 3
local SEEN_2_TURNS_AGO =4
local SEEN_3_TURNS_AGO = 5
local ubProfil = 0
local MAX_MISC_NOISE_DURATION = 12
local iLoop
local NOBODY = 254
local LAST_TEAM = Team.LAN_TEAM_FOUR
local bTeam
function PerformItemAction( ActionID , sGridNo )
local ubID
-- Open Door
if ActionID == 1 then
ACTION_ITEM_OPEN_DOOR (sGridNo)
end
-- Open Close
if ActionID == 2 then
ACTION_ITEM_CLOSE_DOOR (sGridNo)
end
-- 3x3 Hidden Pit
if ActionID == 4 then
Add3X3Pit (sGridNo)
SearchForOtherMembersWithinPitRadiusAndMakeThemFall ( sGridNo, 1 )
end
-- 5x5 Hidden Pit
if ActionID == 5 then
Add5X5Pit (sGridNo)
SearchForOtherMembersWithinPitRadiusAndMakeThemFall ( sGridNo, 2 )
end
-- Toggle Door
if ActionID == 6 then
ACTION_ITEM_TOGGLE_DOOR (sGridNo)
end
-- Toggle Action1s
if ActionID == 7 then
ToggleActionItemsByFrequency( 1 )
end
-- Toggle Action2s
if ActionID == 8 then
ToggleActionItemsByFrequency ( 2 )
end
-- Toggle Action3s
if ActionID == 9 then
ToggleActionItemsByFrequency( 3 )
end
-- Toggle Action4s
if ActionID == 10 then
ToggleActionItemsByFrequency( 4 )
end
-- Enter Brothel
if ActionID == 11 then
-- Empty Action
end
-- Exit Brothel
if ActionID == 12 then
-- Empty Action
end
-- Kingpin Alarm
if ActionID == 13 then
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
if ( TacticalStatusTeamActive(Team.CIV_TEAM) == true ) then
SetPublicNoiseGridNo( Team.CIV_TEAM, sGridNo )
SetPublicNoiseVolume( Team.CIV_TEAM, MAX_MISC_NOISE_DURATION )
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
if ( CheckMercPtrsInSector (iLoop) == true and CheckMercPtrsInActive(iLoop) == true and CheckMercPtrsInCivilianGroup (iLoop) == Group.KINGPIN_CIV_GROUP ) then
SetNewSituationMercPtrs ( iLoop )
end
end
end
SetCivGroupHostile( Group.KINGPIN_CIV_GROUP , Civ_status.CIV_GROUP_HOSTILE )
for iLoop = GetTacticalStatusFirstID(Team.CIV_TEAM),GetTacticalStatusLastID(Team.CIV_TEAM) do
if ( CheckMercPtrsInSector (iLoop) == true and CheckMercPtrsInActive(iLoop) == true and CheckMercPtrsInCivilianGroup (iLoop) == Group.KINGPIN_CIV_GROUP ) then
for aimLoop=GetTacticalStatusFirstID(Team.OUR_TEAM),GetTacticalStatusLastID(Team.OUR_TEAM) do
if ( CheckMercPtrsID1SeenID2(iLoop,aimLoop) == SEEN_CURRENTLY ) then
MakeMercPtrsHostile( iLoop )
end
end
end
end
if ( CheckCombatMode == false ) then
EnterTeamCombatMode(Team.CIV_TEAM)
end
end
-- Sex with Prostitute
if ActionID == 14 then
ACTION_ITEM_SEX ()
end
-- Reveal Room
if ActionID == 15 then
ACTION_ITEM_REVEAL_ROOM (sGridNo)
end
-- Local Alarm
if ActionID == 16 then
MakeNoise( NOBODY, sGridNo, 0, WorldLevelDataTerrainID(sGridNo), 30, Noise.NOISE_SILENT_ALARM )
end
-- Global Alarm
if ActionID == 17 then
for i = 0 , LAST_TEAM do
if ( TacticalStatusTeamActive(i) == true ) then
if ( TacticalStatusTeamHuman(i) == false and ( not i == Team.CIV_TEAM ) ) then
SetPublicNoiseGridNo( i, sGridNo )
SetPublicNoiseVolume( i, MAX_MISC_NOISE_DURATION )
iLoop = GetTacticalStatusFirstID(i)
for o = iLoop,GetTacticalStatusLastID(iLoop) do
if ( CheckMercPtrsInSector (o) == true and CheckMercPtrsInActive(o) == true ) then
SetNewSituationMercPtrs( o )
WearGasMaskIfAvailable( o )
end
end
end
end
end
end
-- Klaxon Sound
if ActionID == 18 then
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
end
-- Unlock door
if ActionID == 19 then
ACTION_ITEM_UNLOCK_DOOR (sGridNo)
end
-- Toggle lock
if ActionID == 20 then
ACTION_ITEM_TOGGLE_LOCK (sGridNo)
end
-- Untrap door
if ActionID == 21 then
ACTION_ITEM_UNTRAP_DOOR (sGridNo)
end
-- Tog pressure items
if ActionID == 22 then
TogglePressureActionItemsInGridNo (sGridNo)
end
-- Museum alarm
if ActionID == 23 then
ubProfil = Profil.ELDIN
PlayJA2Sample( Sample.KLAXON_ALARM, SoundVolume.MIDVOLUME, sGridNo )
-- Eldin becomes aware of a very important "noise" coming from here!
-- So long as he hasn't already heard a noise a sec ago...
if ( TacticalStatusTeamActive(Team.CIV_TEAM) == true ) then
-- new situation for Eldin
if ( CheckSoldierInSector(ubProfil) == true and CheckSoldierActive(ubProfil) == true and CheckNPCLife(ubProfil) > 0 and ( CheckSoldierAlertStatus(ubProfil) == StatusAlert.STATUS_GREEN and CheckSoldierNoiseVolume(ubProfil) == 6 ) ) then
if ( SoldierTo3DLocationLineOfSightTest( ubProfil, sGridNo, 0, 0 ) == true ) then
-- sees the player now!
TriggerNPCWithIHateYouQuote(ubProfil)
SetNewSituation(ubProfil)
else
SetNoiseGridno(ubProfil,sGridNo)
SetNoiseVolume(ubProfil,6)
SetAlertStatus(ubProfil,StatusAlert.STATUS_GREEN)
if ( not CheckAction(ubProfil) == ActionType.AI_ACTION_GET_CLOSER ) or CheckFact (Facts.FACT_MUSEUM_ALARM_WENT_OFF) == false then
CancelAIAction( ubProfil)
SetNextAction(ubProfil , ActionType.AI_ACTION_GET_CLOSER )
SetNextActionData(ubProfil , sGridNo)
RESETTIMECOUNTER( ubProfil, 100 )
end
end
SetFactTrue( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
end
end
end
-- Bloodcat alarm
if ActionID == 24 then
bTeam = Team.CREATURE_TEAM
if ( TacticalStatusTeamActive(bTeam) == true ) then
if ( TacticalStatusTeamHuman(bTeam) == false and ( not bTeam == Team.CIV_TEAM ) ) then
SetPublicNoiseGridNo( bTeam, sGridNo )
SetPublicNoiseVolume( bTeam, MAX_MISC_NOISE_DURATION )
iLoop = GetTacticalStatusFirstID(bTeam)
for o = iLoop,GetTacticalStatusLastID(bTeam) do
if ( CheckMercPtrsInSector (o) == true and CheckMercPtrsInActive(o) == true ) then
SetNewSituationMercPtrs( o )
WearGasMaskIfAvailable( o )
end
end
end
end
end
-- UB Action
-- BIGGENS BOMBS
if ActionID == 25 then
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 17 ) == true ) then
HavePersonAtGridnoStop( sGridNo )
-- Make Biggens run for cover and then detonate the explosives
TriggerNPCRecord( Profil.BIGGENS , 17 )
end
end
-- BIGGENS WARNING
if ActionID == 26 then
if ( ShouldThePlayerStopWhenWalkingOnBiggensActionItem( 16 ) == true ) then
HavePersonAtGridnoStop( sGridNo )
-- Make Biggens run for cover and then detonate the explosives
TriggerNPCRecord( Profil.BIGGENS , 16 )
end
end
-- SEE FORTIFIED DOOR
if ActionID == 27 then
HandleSeeingFortifiedDoor( sGridNo )
end
-- OPEN FORTIFED DOOR
if ActionID == 28 then
HandleSwitchToOpenFortifiedDoor( sGridNo )
end
-- SEE POWER GEN FAN
if ActionID == 29 then
-- if the player is in the power plant
if( gWorldSectorX == 13 and gWorldSectorY == 10 and gbWorldSectorZ == 0 ) then
HandleSeeingPowerGenFan( sGridNo )
elseif( gWorldSectorX == 15 and gWorldSectorY == 12 and gbWorldSectorZ == 3 ) then
-- The player is hitting the switch to launch the missles
HandlePlayerHittingSwitchToLaunchMissles()
end
end
end
-892
View File
@@ -1,892 +0,0 @@
--[[
http://www.legion.zone.zg.pl/doku.php/modowanie/ja/art_ja_m_22_lua
**********************
** Global variables **
**********************
- newDIFFICULTY_LEVEL (Start new game setting)
1 = easy
2 = experienced
3 = expert
4 = insane
- newGAME_STYLE (Start new game setting)
0 = realistic
1 = sci fi
- is_networked (Multiplayer)
0 = no
1 = yes
- iniENABLE_CREPITUS (ja2_options.ini setting)
0 = no
1 = yes
- iniSTARTING_CASH_NOVICE, iniSTARTING_CASH_EXPERIENCED, iniSTARTING_CASH_EXPERT, iniSTARTING_CASH_INSANE (ja2_options.ini setting)
Starting cash
- iniMERC_WEBSITE_IMMEDIATELY_AVAILABLE (ja2_options.ini setting)
true = yes
false = no
- giHospitalTempBalance
set hospital balance
- gbHospitalPriceModifier
set hospital modifier
- giHospitalRefund
***************
** Functions **
***************
- AddAlternateSector, AddAltSector, AddAltSectorNew
add alternative sector
- AddNPC or AddNPCtoSector
add NPC\EPC\RPC to sector
- AddAltUnderGroundSector, AddAltUGSector or AddAltUGSectorNew
add alternative underground sector
- SetNPCData1 ( ProfilID, value )
set NPCData1
- GetStartingCashNovice()
get starting cash novice level
- GetStartingCashExperienced()
get starting cash experienced level
- GetStartingCashExpert()
get starting cash expert level
- GetStartingCashInsane()
get starting cash insane level
- GetWorldTotalMin()
get world time
- AddTransactionToPlayersBook(ubCode, ubSecondCode, uiDate, iAmount)
add transaction to player
- AddPreReadEmail (iMessageOffset, iMessageLength, ubSender)
iMessageOffset - record from email.edt
iMessageLength - record from email.edt
ubSender - uiIndex from SenderNameList.xml
- AddEmail (iMessageOffset, iMessageLength, ubSender, iCurrentIMPPosition, iCurrentShipmentDestinationID)
iMessageOffset - record from email.edt
iMessageLength - record from email.edt
ubSender - uiIndex from SenderNameList.xml
iCurrentIMPPosition - Default = -1, or the profile ID of the IMP
iCurrentShipmentDestinationID - Default = -1, or the Bobby Ray shipment destination ID
- HireMerc (MercID)
hires the merc with the specified MercID
**************
** Examples **
**************
-- Add Fatima to sector
Fatima = { }
Fatima.MercProfiles = 101
Fatima.sector = "A10-0"
AddNPC(Fatima)
-- Add Fatima to sector
AddNPC( { MercProfiles = 101 , sector = "A10-0" } )
-- Add Fatima to sector, only in a realistic game
if newGAME_STYLE == 0 then
Fatima = { }
Fatima.MercProfiles = 101
Fatima.sector = "A10-0"
AddNPC(Fatima)
end
-- Add alternative sector, only when starting cash = 4000 and game style SciFi
if (iniSTARTING_CASH_NOVICE == 4000 and newGAME_STYLE == 1) then
Fatima = { }
Fatima.MercProfiles = 101
Fatima.sector = "A10-0"
AddNPC(Fatima)
end
-- Add alternative sector, only realistic game
if newGAME_STYLE == 0 then
SectorA9 = { }
SectorA9.altSector = "A9"
AddAlternateSector(SectorA9)
end
-- Add alternative sector
SectorA9 = { }
SectorA9.altSector = "A9"
AddAlternateSector(SectorA9)
-- Add alternative underground sector
A10_b1 = { }
A10_b1.altSector = "A10-1"
AddAltUGSector(A10_b1)
-- Add alternative underground sector
AddAltUGSector( { altSector = "A10-1" } )
-- Add Skyrider to sector
AddNPCtoSector(97,9,1,0)
-- Add alternative sector C1
AddAltSectorNew (3,1)
-- Add alternative sector C1-3
AddAltUGSectorNew(3,1,3)
-- Hire Ivan
HireMerc(7)
]]
-- Initialize the pseudo random number generator
math.randomseed( os.time() ); math.random(); math.random(); math.random()
-- http://lua-users.org/wiki/MathLibraryTutorial
local MAX_EMAIL_LINES = 10 --max number of lines can be shown in a message
local MAX_MESSAGES_PAGE = 18 -- max number of messages per page
--JA25: New emails
-- email # 1
local EMAIL_STARTGAME = 0
local EMAIL_STARTGAME_LENGTH = 8
-- email # 2
local EMAIL_PILOTMISSING = (EMAIL_STARTGAME + EMAIL_STARTGAME_LENGTH)
local EMAIL_PILOTMISSING_LENGTH = 2
-- email # 3
local EMAIL_MAKECONTACT = (EMAIL_PILOTMISSING + EMAIL_PILOTMISSING_LENGTH)
local EMAIL_MAKECONTACT_LENGTH = 3
-- email # 4
local EMAIL_MANUEL = (EMAIL_MAKECONTACT + EMAIL_MAKECONTACT_LENGTH)
local EMAIL_MANUEL_LENGTH = 4
-- # email # 5 - only if Miguel is alive!
local EMAIL_MIGUELHELLO = (EMAIL_MANUEL + EMAIL_MANUEL_LENGTH)
local EMAIL_MIGUELHELLO_LENGTH = 3
-- email # 6 - player not advancing fast enough
local EMAIL_CONCERNED = (EMAIL_MIGUELHELLO + EMAIL_MIGUELHELLO_LENGTH)
local EMAIL_CONCERNED_LENGTH = 2
-- email # 7 - player still not advancing fast enough
local EMAIL_URGENT = (EMAIL_CONCERNED + EMAIL_CONCERNED_LENGTH)
local EMAIL_URGENT_LENGTH = 3
-- email # 8a - from Miguel
local EMAIL_MIGUELSORRY = (EMAIL_URGENT + EMAIL_URGENT_LENGTH)
local EMAIL_MIGUELSORRY_LENGTH = 3
-- email # 8b - from Miguel, mentioning Manuel
local EMAIL_MIGUELMANUEL = (EMAIL_MIGUELSORRY + EMAIL_MIGUELSORRY_LENGTH)
local EMAIL_MIGUELMANUEL_LENGTH = 4
-- email # 9 - Miguel sick
local EMAIL_MIGUELSICK = (EMAIL_MIGUELMANUEL + EMAIL_MIGUELMANUEL_LENGTH)
local EMAIL_MIGUELSICK_LENGTH = 3
-- email # 10a
local EMAIL_UNDERSTANDING = (EMAIL_MIGUELSICK + EMAIL_MIGUELSICK_LENGTH)
local EMAIL_UNDERSTANDING_LENGTH = 3
-- email # 10b - if we need extra cash
local EMAIL_EXTRACASH = (EMAIL_UNDERSTANDING + EMAIL_UNDERSTANDING_LENGTH)
local EMAIL_EXTRACASH_LENGTH = 4
-- email # 11
local EMAIL_PILOTFOUND = (EMAIL_EXTRACASH + EMAIL_EXTRACASH_LENGTH)
local EMAIL_PILOTFOUND_LENGTH = 2
-- email # 12a - Miguel dead, Manuel never recruited
local EMAIL_CONGRATS = (EMAIL_PILOTFOUND + EMAIL_PILOTFOUND_LENGTH)
local EMAIL_CONGRATS_LENGTH = 4
-- email # 12b - Miguel alive, Manuel never recruited
local EMAIL_CONGRATSICK = (EMAIL_CONGRATS + EMAIL_CONGRATS_LENGTH)
local EMAIL_CONGRATSICK_LENGTH = 5
-- email # 12c - Miguel alive, Manuel dead
local EMAIL_CONGRATMIGMANUELDEAD = (EMAIL_CONGRATSICK + EMAIL_CONGRATSICK_LENGTH)
local EMAIL_CONGRATMIGMANUELDEAD_LENGTH = 6
-- email # 12d - Miguel alive, Manuel recruited and alive
local EMAIL_CONGRATMIGMANUELALIVE = (EMAIL_CONGRATMIGMANUELDEAD + EMAIL_CONGRATMIGMANUELDEAD_LENGTH)
local EMAIL_CONGRATMIGMANUELALIVE_LENGTH = 6
-- email # 12e - Miguel dead, Manuel dead
local EMAIL_CONGRATMANUELDEAD = (EMAIL_CONGRATMIGMANUELALIVE + EMAIL_CONGRATMIGMANUELALIVE_LENGTH)
local EMAIL_CONGRATMANUELDEAD_LENGTH = 5
-- email # 12f - Miguel dead, Manuel recruited and alive
local EMAIL_CONGRATMANUELALIVE = (EMAIL_CONGRATMANUELDEAD + EMAIL_CONGRATMANUELDEAD_LENGTH)
local EMAIL_CONGRATMANUELALIVE_LENGTH = 5
-- email # 13 - original AIM email
local EMAIL_AIMDISCOUNT = (EMAIL_CONGRATMANUELALIVE + EMAIL_CONGRATMANUELALIVE_LENGTH)
local EMAIL_AIMDISCOUNT_LENGTH = 7
local MANUEL_AT_HOME_NOT_USED = ( EMAIL_AIMDISCOUNT + EMAIL_AIMDISCOUNT_LENGTH )
local MANUEL_AT_HOME_NOT_USED_LENGTH = 1
-- Email #14 Initial IMP email
local IMP_EMAIL_INTRO = (MANUEL_AT_HOME_NOT_USED + MANUEL_AT_HOME_NOT_USED_LENGTH )
local IMP_EMAIL_INTRO_LENGTH = 10
-- Email #15 Imp follow up
local IMP_EMAIL_AGAIN = (IMP_EMAIL_INTRO + IMP_EMAIL_INTRO_LENGTH)
local IMP_EMAIL_AGAIN_LENGTH = 5
-- Email #16 - ?? merc left-me-a-message-and-now-I'm-back emails
local AIM_REPLY_BARRY = ( IMP_EMAIL_AGAIN + IMP_EMAIL_AGAIN_LENGTH )
local AIM_REPLY_LENGTH_BARRY = 2
local AIM_REPLY_MELTDOWN = (AIM_REPLY_BARRY + ( 39 * AIM_REPLY_LENGTH_BARRY ))
local AIM_REPLY_LENGTH_MELTDOWN = AIM_REPLY_LENGTH_BARRY
local AIM_REFUND = ( AIM_REPLY_MELTDOWN + AIM_REPLY_LENGTH_MELTDOWN )
local AIM_REFUND_LENGTH = 3
local MERC_REFUND = ( AIM_REFUND + AIM_REFUND_LENGTH )
local MERC_REFUND_LENGTH = 3
local EMAIL_AIM_PROMOTION_1 = ( MERC_REFUND + MERC_REFUND_LENGTH )
local EMAIL_AIM_PROMOTION_1_LENGTH = 4
local EMAIL_MERC_PROMOTION_1 = ( EMAIL_AIM_PROMOTION_1 + EMAIL_AIM_PROMOTION_1_LENGTH )
local EMAIL_MERC_PROMOTION_1_LENGTH = 5
local EMAIL_AIM_PROMOTION_2 = ( EMAIL_MERC_PROMOTION_1 + EMAIL_MERC_PROMOTION_1_LENGTH )
local EMAIL_AIM_PROMOTION_2_LENGTH = 5
local IMP_EMAIL_PROFILE_RESULTS = ( EMAIL_AIM_PROMOTION_2 + EMAIL_AIM_PROMOTION_2_LENGTH )
local IMP_EMAIL_PROFILE_RESULTS_LENGTH = 1
local iStartingCash = 0
Fincances =
{
ACCRUED_INTEREST = 0,
ANONYMOUS_DEPOSIT = 1,
TRANSACTION_FEE = 2,
HIRED_MERC = 3,
BOBBYR_PURCHASE,
PAY_SPECK_FOR_MERC = 4,
MEDICAL_DEPOSIT = 5,
IMP_PROFILE = 6,
PURCHASED_INSURANCE = 7,
REDUCED_INSURANCE = 8,
EXTENDED_INSURANCE = 9,
CANCELLED_INSURANCE = 10,
INSURANCE_PAYOUT = 11,
EXTENDED_CONTRACT_BY_1_DAY = 12,
EXTENDED_CONTRACT_BY_1_WEEK = 13,
EXTENDED_CONTRACT_BY_2_WEEKS = 14,
DEPOSIT_FROM_GOLD_MINE = 15,
DEPOSIT_FROM_SILVER_MINE = 16,
PURCHASED_FLOWERS = 17,
FULL_MEDICAL_REFUND = 18,
PARTIAL_MEDICAL_REFUND = 19,
NO_MEDICAL_REFUND = 20,
PAYMENT_TO_NPC = 21,
TRANSFER_FUNDS_TO_MERC = 22,
TRANSFER_FUNDS_FROM_MERC = 23,
TRAIN_TOWN_MILITIA = 24,
PURCHASED_ITEM_FROM_DEALER = 25,
MERC_DEPOSITED_MONEY_TO_PLAYER_ACCOUNT = 26,
SOLD_ITEMS = 27,
FACILITY_OPERATIONS = 28,
MILITIA_UPKEEP = 29,
}
Sender =
{
MAIL_ENRICO = 0,
CHAR_PROFILE_SITE = 1,
GAME_HELP = 2,
IMP_PROFILE_RESULTS = 3,
SPECK_FROM_MERC = 4,
RIS_EMAIL = 5,
INSURANCE_COMPANY = 46,
BOBBY_R = 47,
KING_PIN = 48,
JOHN_KULBA = 49,
AIM_SITE = 50,
}
Modifier =
{
HOSPITAL_UNSET = 0,
HOSPITAL_NORMAL = 1,
HOSPITAL_BREAK = 2,
HOSPITAL_COST = 3,
HOSPITAL_FREEBIE = 4,
HOSPITAL_RANDOM_FREEBIE = 5,
}
SectorY =
{
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
Profil =
{
Manuel = 60,
Biggens = 61,
Kulba = 62,
Tex = 64,
JerryMilo = 76,
Morris = 75,
}
Facts =
{
FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD = 400,
FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE = 402,
}
local DIF_LEVEL_EASY = 1
local DIF_LEVEL_MEDIUM = 2
local DIF_LEVEL_HARD = 3
local DIF_LEVEL_INSANE = 4
ShopID = {
ARMS_DEALER_TONY = 0,
ARMS_DEALER_FRANZ = 1,
ARMS_DEALER_KEITH = 2,
ARMS_DEALER_JAKE = 3,
ARMS_DEALER_GABBY = 4,
ARMS_DEALER_HOWARD = 5,
ARMS_DEALER_SAM = 6,
ARMS_DEALER_FRANK = 7,
ARMS_DEALER_BAR_BRO_1 = 8,
ARMS_DEALER_BAR_BRO_2 = 9,
ARMS_DEALER_BAR_BRO_3 = 10,
ARMS_DEALER_BAR_BRO_4 = 11,
ARMS_DEALER_MICKY = 12,
ARMS_DEALER_ARNIE = 13,
ARMS_DEALER_FREDO = 14,
ARMS_DEALER_RAUL = 15, -- Raul UB
ARMS_DEALER_ELGIN = 16,
ARMS_DEALER_MANNY = 17,
ARMS_DEALER_BETTY = 18, -- Betty UB
}
local function AddTexsVideosToBettysInventory()
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_ATTACK_CLYDESDALES, 1 ) -- Attack of the Clydesdales
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_WILD_EAST, 1 ) -- Wild, Wild East
GuaranteeAtLeastXItemsOfIndex( ShopID.ARMS_DEALER_BETTY, itemTEX_MOVIE_HAVE_HONDA, 1 ) -- Have Honda, Will Travel
end
function InitStrategicLayer()
InitialHeliCrash(iniINGAMEHELICRASH)
if ( iniJERRY == true ) then
InitialProfile ( Profil.JerryMilo, iniDEFAULT_ARRIVAL_SECTOR_X, iniDEFAULT_ARRIVAL_SECTOR_Y,0, iniJERRYGRIDNO )
end
InitialJerryQuotes(iniJERRYQUOTES)
InitialLaptopQuest(iniLAPTOP_QUEST)
InitialHeliGridNo1(iniINITIALHELIGRIDNO1)
InitialHeliGridNo2(iniINITIALHELIGRIDNO2)
InitialHeliGridNo3(iniINITIALHELIGRIDNO3)
InitialHeliGridNo4(iniINITIALHELIGRIDNO4)
InitialHeliGridNo5(iniINITIALHELIGRIDNO5)
InitialHeliGridNo6(iniINITIALHELIGRIDNO6)
InitialHeliGridNo7(iniINITIALHELIGRIDNO7)
-- get DEFAULT_ARRIVAL_SECTOR_X and DEFAULT_ARRIVAL_SECTOR_Y from UB_Options.ini
SetDefaultArrivalSector( iniDEFAULT_ARRIVAL_SECTOR_X, iniDEFAULT_ARRIVAL_SECTOR_Y )
-- get NEW_MERC_ARRIVAL_LOCATION from UB_Options.ini
InternalLocateGridNo( iniNEW_MERC_ARRIVAL_LOCATION )
end
function InitNPCs()
local ran
local ubNumAdmins = 0
local ubNumTroops = 0
local ubNumElites = 0
local Test = false
local JohnKulbaText = true
if ( RandomManuelText == true ) then
-- Miguel is dead
Dead = math.random(1, 2)
if ( Dead == 1 ) then
SetFactTrue( 414 ) -- set fact
end
-- Fatima or Pacos is dead
Dead = math.random(1, 2)
if ( Dead == 1 ) then
SetFactTrue( 415 ) -- set fact
end
-- Carlos is dead
Dead = math.random(1, 2)
if ( Dead == 1 ) then
SetFactTrue( 416 ) -- set fact
end
-- Ira is dead
Dead = math.random(1, 2)
if ( Dead == 1 ) then
SetFactTrue( 417 ) -- set fact
end
-- Dimitri is dead
Dead = math.random(1, 2)
if ( Dead == 1 ) then
SetFactTrue( 418 ) -- set fact
end
end
-- Random John or Tex
if ( enabledJohnAndTex == false) then
ran = math.random(1, 2)
if ( ran == 1 ) then
if ( JohnKulbaText == true ) then
-- Mary is dead
MaryDead = math.random(1, 2)
if ( MaryDead == 1 ) then
SetFactTrue( Facts.FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD ) -- set fact
end
end
--John is available
Ja25JohnKulbaIsInGame (true)
--Tex is not available
SetFactFalse( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
Ja25JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
-- Randomly choose John's starting sector
if( math.random(1, 100 ) < 50 ) then
Ja25JohnKulbaInitialSectorX (10)
else
Ja25JohnKulbaInitialSectorX (11)
end
else
--John is not available
Ja25JohnKulbaIsInGame (false)
-- added video to Betty Shop
if ( Ja25CheckJohnKulbaIsInGame() == false ) then
AddTexsVideosToBettysInventory()
end
--Tex is available
SetFactTrue( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
end
-- John and Tex in game
elseif ( enabledJohnAndTex == true) then
if ( JohnKulbaText == true ) then
-- Mary is dead
MaryDead = math.random(1, 2)
if ( MaryDead == 1 ) then
SetFactTrue( Facts.FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD ) -- set fact
end
end
--John is available
Ja25JohnKulbaIsInGame (true)
Ja25JohnKulbaInitialSectorY (SectorY.MAP_ROW_I)
--Randomly choose John's starting sector
if( math.random(1, 100 ) < 50 ) then
Ja25JohnKulbaInitialSectorX (10)
else
Ja25JohnKulbaInitialSectorX (11)
end
-- added video to Betty Shop
AddTexsVideosToBettysInventory()
--Tex is available
SetFactTrue( Facts.FACT_TEX_IS_IN_GAME_AND_ALIVE_IN_STORE )
end
-- Added enemy to sector
if ( Test == false ) then
-- H7
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
end
SetNumberJa25EnemiesInSurfaceSector( 7, 8, ubNumAdmins, ubNumTroops, ubNumElites )
-- H8
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 6 + math.random( 1, 4 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 13 + math.random( 1, 3 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 16 + math.random( 1, 6 )
ubNumElites = 2 + math.random( 1,2 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 19 + math.random( 1, 9 )
ubNumElites = 2 + math.random( 1, 2 )
end
SetNumberJa25EnemiesInSurfaceSector( 8,8, ubNumAdmins, ubNumTroops, ubNumElites )
-- Guard Post
-- H9
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 5 )
ubNumElites = 1
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 16 + math.random( 1, 4 )
ubNumElites = 1
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 19 + math.random( 1, 4 )
ubNumElites = 3 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 19 + math.random( 1, 6 )
ubNumElites = 3 + math.random( 1, 2 )
end
SetNumberJa25EnemiesInSurfaceSector( 9,8, ubNumAdmins, ubNumTroops, ubNumElites )
-- H10
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 6 + math.random( 1, 5 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 9 + math.random( 1, 3 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 4 )
ubNumElites = 2 + math.random( 1, 4 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 4 )
ubNumElites = 2 + math.random( 1, 4 )
end
SetNumberJa25EnemiesInSurfaceSector( 10,8, ubNumAdmins, ubNumTroops, ubNumElites )
-- H11
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 6 + math.random( 1, 3 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 8 + math.random( 1, 3 )
ubNumElites = 2 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 4 )
ubNumElites = 4 + math.random( 1, 3 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 4 )
ubNumElites = 2 + math.random( 1, 3 )
end
SetNumberJa25EnemiesInSurfaceSector( 11,8, ubNumAdmins, ubNumTroops, ubNumElites )
-- I9
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 6 + math.random( 1, 5 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 9 + math.random( 1, 4 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 4 )
ubNumElites = 2 + math.random( 1, 4 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 6 )
ubNumElites = 2 + math.random( 1, 4 )
end
SetNumberJa25EnemiesInSurfaceSector( 9,9, ubNumAdmins, ubNumTroops, ubNumElites )
-- First part of town
-- I10
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 13 + math.random( 1, 6 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 16 + math.random( 1, 4 )
ubNumElites = 1 + math.random( 1, 3 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 14 + math.random( 1, 4 )
ubNumElites = 5 + math.random( 1, 3 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 4 )
ubNumElites = 5 + math.random( 1, 3 )
end
SetNumberJa25EnemiesInSurfaceSector( 10,9, ubNumAdmins, ubNumTroops, ubNumElites )
-- Second part of town
-- I11
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 14 + math.random( 1, 7 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 16 + math.random( 1, 5 )
ubNumElites = 2 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 14 + math.random( 1, 4 )
ubNumElites = 5 + math.random( 1, 4 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 17 + math.random( 1, 4 )
ubNumElites = 5 + math.random( 1, 4 )
end
SetNumberJa25EnemiesInSurfaceSector( 11,9, ubNumAdmins, ubNumTroops, ubNumElites )
-- I12
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 8 + math.random( 1, 6 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 12 + math.random( 1, 5 )
ubNumElites = 2 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 12 + math.random( 1, 6 )
ubNumElites = 3 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 6 )
ubNumElites = 3 + math.random( 1, 2 )
end
SetNumberJa25EnemiesInSurfaceSector( 12,9, ubNumAdmins, ubNumTroops, ubNumElites )
-- Abandoned mine
-- I13
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 0
ubNumElites = 0
end
SetNumberJa25EnemiesInSurfaceSector( 13,9, ubNumAdmins, ubNumTroops, ubNumElites )
-- J11
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 6 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 3 )
ubNumElites = 3 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 11 + math.random( 1, 5 )
ubNumElites = 6 + math.random( 1, 3 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 20 + math.random( 1, 5 )
ubNumElites = 6 + math.random( 1, 3 )
end
SetNumberJa25EnemiesInSurfaceSector( 11,10, ubNumAdmins, ubNumTroops, ubNumElites )
-- J12
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 12 + math.random( 1, 4 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 10 + math.random( 1, 4 )
ubNumElites = 1 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 11 + math.random( 1, 3 )
ubNumElites = 3 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 21 + math.random( 1, 3 )
ubNumElites = 3 + math.random( 1, 2 )
end
SetNumberJa25EnemiesInSurfaceSector( 12,10, ubNumAdmins, ubNumTroops, ubNumElites )
-- Power Generator, Ground Level
-- J13
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 15 + math.random( 1, 6 )
ubNumElites = 1
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 16 + math.random( 1, 5 )
ubNumElites = 5 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 18 + math.random( 1, 4 )
ubNumElites = 6 + math.random( 1, 3 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 18 + math.random( 1, 4 )
ubNumElites = 7 + math.random( 1, 3 )
end
SetNumberJa25EnemiesInSurfaceSector( 13,10, ubNumAdmins, ubNumTroops, ubNumElites )
-- Complex, Ground Level
-- K15
if ( difficultyLevel == DIF_LEVEL_EASY ) then
ubNumAdmins = 0
ubNumTroops = 14 + math.random( 1, 5 )
ubNumElites = 0
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
ubNumAdmins = 0
ubNumTroops = 18 + math.random( 1, 3 )
ubNumElites = 4 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
ubNumAdmins = 0
ubNumTroops = 17 + math.random( 1, 3 )
ubNumElites = 8 + math.random( 1, 2 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
ubNumAdmins = 0
ubNumTroops = 17 + math.random( 1, 3 )
ubNumElites = 8 + math.random( 1, 2 )
end
SetNumberJa25EnemiesInSurfaceSector( 15,11, ubNumAdmins, ubNumTroops, ubNumElites )
end
-- init hospital variables
HospitalTempBalance( 0 )
HospitalRefund( 0 )
HospitalPriceModifier( Modifier.HOSPITAL_UNSET )
end
function InitNewGame()
if ( is_networked == 0 ) then
--Add the initial email from enrico
AddEmail( EMAIL_STARTGAME, EMAIL_STARTGAME_LENGTH, Sender.MAIL_ENRICO, -1 , -1 )
--Add the initial email from AIM
AddEmail( EMAIL_AIMDISCOUNT, EMAIL_AIMDISCOUNT_LENGTH, Sender.AIM_SITE, -1 , -1 )
AddEmail(IMP_EMAIL_INTRO,IMP_EMAIL_INTRO_LENGTH,Sender.CHAR_PROFILE_SITE, -1 , -1 )
end
if ( difficultyLevel == DIF_LEVEL_EASY ) then
iStartingCash = GetStartingCashNovice()
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
iStartingCash = GetStartingCashExperienced()
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
iStartingCash = GetStartingCashExpert()
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
iStartingCash = GetStartingCashInsane()
end
AddTransactionToPlayersBook( Fincances.ANONYMOUS_DEPOSIT, 0, GetWorldTotalMin(), iStartingCash )
end
@@ -1,61 +0,0 @@
Facts = {
FACT_BROTHEL_OPEN = 251,
FACT_MUSEUM_OPEN = 250,
FACT_CLUB_OPEN = 252,
FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED = 107,
}
local p = 0
function HourlyQuestUpdate()
-- JA2
--[[
if (cHour >= 4 or cHour < 20) then
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
else
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
end
-- bar/nightclub
if ( cHour > 15 or cHour < 2) then
SetFactTrue( Facts.FACT_CLUB_OPEN )
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
-- reset boxes fought
for i = 0,3 do
-- set false
gfBoxerFought(i,false)
end
-- if # of boxing matches the player has won is a multiple of
-- 3, and the boxers haven't rested, then make them rest
if ( gfBoxersResting == true ) then
-- done resting now!
gfBoxersResting = false
gubBoxersRests = gubBoxersRests + 1
p = gubBoxingMatchesWon / 3
elseif ( p > gubBoxersRests ) then
-- time for the boxers to rest!
gfBoxersResting = true
end
else
SetFactFalse( Facts.FACT_CLUB_OPEN )
end
-- museum
if ( cHour >= 9 or cHour < 18 ) then
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
else
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
end
]]
end
@@ -1,21 +0,0 @@
-- SetNumberOfJa25BloodCatsInSector ( SectorX, SectorY, bNumBloodCats, bNumBloodCatPlacements )
local DIF_LEVEL_EASY = 1
local DIF_LEVEL_MEDIUM = 2
local DIF_LEVEL_HARD = 3
local DIF_LEVEL_INSANE = 4
function InitStrategicLayer ()
-- I10 BloodCats
if ( difficultyLevel == DIF_LEVEL_EASY ) then
SetNumberOfJa25BloodCatsInSector ( 10, 9, 3, 5 )
elseif ( difficultyLevel == DIF_LEVEL_MEDIUM ) then
SetNumberOfJa25BloodCatsInSector ( 10, 9, 4, 5 )
elseif ( difficultyLevel == DIF_LEVEL_HARD ) then
SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
elseif ( difficultyLevel == DIF_LEVEL_INSANE ) then
SetNumberOfJa25BloodCatsInSector ( 10, 9, 5, 5 )
end
end
@@ -1,100 +0,0 @@
Profil = {
CARMEN = 78,
MARIA = 88,
JOEY = 90,
SKYRIDER = 97,
JOHN = 118,
MARY = 119,
}
Group = {
NON_CIV_GROUP = 0,
REBEL_CIV_GROUP = 1,
KINGPIN_CIV_GROUP = 2,
SANMONA_ARMS_GROUP = 3,
ANGELS_GROUP = 4,
BEGGARS_CIV_GROUP = 5,
TOURISTS_CIV_GROUP = 6,
ALMA_MILITARY_CIV_GROUP = 7,
DOCTORS_CIV_GROUP = 8,
COUPLE1_CIV_GROUP = 9,
HICKS_CIV_GROUP = 10,
WARDEN_CIV_GROUP = 11,
JUNKYARD_CIV_GROUP = 12,
FACTORY_KIDS_GROUP = 13,
QUEENS_CIV_GROUP = 14,
}
StatusGroup = {
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
qStatus = {
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests = {
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
QUEST_KILL_DEIDRANNA = 25,
}
SectorY = {
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
Facts =
{
FACT_SKYRIDER_EVER_ESCORTED = 269,
}
function HandleStuffForNPCEscorted( ubNPC )
-- UB: Nothing to do here!
end
function CarmenLeavesSectorCallback()
-- UB: Nothing to do here!
end
@@ -1,40 +0,0 @@
SectorY = {
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
--[[
Przyklad :
function MakeBadSectorListFromMapsOnHardDrive ()
-- O15_b1
if ( FindUnderGroundSector ( 15, SectorY.MAP_ROW_O , 1 ) == true and FindUnderGroundSectorVisited ( 15, SectorY.MAP_ROW_O , 1 ) == false ) then
AddEnemyToUnderGroundSector (15,SectorY.MAP_ROW_O ,1,0,32,0)
end
-- O14_b1
if ( FindUnderGroundSector ( 15, SectorY.MAP_ROW_P, 1 ) == true and FindUnderGroundSectorVisited ( 15, SectorY.MAP_ROW_P , 1 ) == false ) then
AddEnemyToUnderGroundSector (15 ,SectorY.MAP_ROW_P, 1 ,0 ,32, 0)
end
end
]]
function MakeBadSectorListFromMapsOnHardDrive ()
end
-326
View File
@@ -1,326 +0,0 @@
local NPC_TALK_RADIUS = 4
local sDesiredMercDist
local NO_PROFILE = 200
Facts =
{
FACT_SKYRIDER_CLOSE_TO_CHOPPER = 43,
FACT_MARIA_ESCORTED_AT_LEATHER_SHOP = 117,
FACT_JOEY_NEAR_MARTHA = 110,
FACT_JOHN_ALIVE = 190,
FACT_MARY_OR_JOHN_ARRIVED = 192,
FACT_MARY_ALIVE = 187,
FACT_FIRST_ROBOT_DESTROYED = 203,
FACT_ROBOT_READY_SECOND_TIME = 205,
FACT_SECOND_ROBOT_DESTROYED = 206,
}
Attitude =
{
DEFENSIVE = 0,
BRAVESOLO = 1,
BRAVEAID = 2,
CUNNINGSOLO = 3,
CUNNINGAID = 4,
AGGRESSIVE = 5,
MAXATTITUDES = 6,
ATTACKSLAYONLY = 7,
}
Quests =
{
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
QUEST_KILL_DEIDRANNA = 25,
}
Profil =
{
MIGUEL = 57,
CARLOS = 58,
IRA = 59,
DIMITRI = 60,
SLAY = 64,
DYNAMO = 66,
SHANK = 67,
CARMEN = 78,
MARIA = 88,
ANGEL = 89,
JOEY = 90,
SKYRIDER = 97,
JOHN = 118,
MARY = 119,
JIM = 140,
JACK = 141,
OLAF = 142,
RAY = 143,
OLGA = 144,
TYRONE = 145,
MADLAB = 146,
}
What =
{
MERC_TYPE__PLAYER_CHARACTER = 0,
MERC_TYPE__AIM_MERC = 1,
MERC_TYPE__MERC = 2,
MERC_TYPE__NPC = 3,
MERC_TYPE__EPC = 4,
MERC_TYPE__NPC_WITH_UNEXTENDABLE_CONTRACT = 5,
MERC_TYPE__VEHICLE = 6,
}
Team =
{
OUR_TEAM = 0,
ENEMY_TEAM = 1,
CREATURE_TEAM = 2,
MILITIA_TEAM = 3,
CIV_TEAM = 4,
}
pQuest =
{
QUESTNOTSTARTED = 0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Group =
{
NON_CIV_GROUP = 0,
REBEL_CIV_GROUP = 1,
KINGPIN_CIV_GROUP = 2,
SANMONA_ARMS_GROUP = 3,
ANGELS_GROUP = 4,
BEGGARS_CIV_GROUP = 5,
TOURISTS_CIV_GROUP = 6,
ALMA_MILITARY_CIV_GROUP = 7,
DOCTORS_CIV_GROUP = 8,
COUPLE1_CIV_GROUP = 9,
HICKS_CIV_GROUP = 10,
WARDEN_CIV_GROUP = 11,
JUNKYARD_CIV_GROUP = 12,
FACTORY_KIDS_GROUP = 13,
QUEENS_CIV_GROUP = 14,
}
Status =
{
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
SectorY =
{
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
-- JA2 Remove
--[[
-- local function
local function HandleJohnArrival( ID )
local ID2 = nil
local sDist
if ( not ID ) then
ID = FindSoldierByProfileID (Profil.JOHN)
if ( not ID ) then
return
end
end
if ( PythSpacesAway( ID,8228) < 40 ) then
if ( CheckFact( Facts.FACT_MARY_ALIVE, 0 ) == true ) then
ID2 = FindSoldierByProfileID( Profil.MARY )
if ( ID2 ) then
if ( PythSpacesAway( ID, GetNPCGridNo(ID2) ) > 8 ) then
-- Too far away!
return
end
end
end
SetFactTrue( Facts.FACT_MARY_OR_JOHN_ARRIVED )
ActionStopMerc(ID)
-- If Mary is alive/dead
if ( ID2 ) then
ActionStopMerc(ID2)
TriggerNPCRecord( ID, 13 )
else
TriggerNPCRecord( ID, 12 )
end
end
end
-- end local function
-- local function
local function HandleMaryArrival( ID )
local sDist
if ( not ID ) then
ID = FindSoldierByProfileID (Profil.MARY)
if ( not ID ) then
return
end
end
if ( CheckFact( Facts.FACT_JOHN_ALIVE,0) == true ) then
return
--new requirements: player close by
elseif ( PythSpacesAway( ID,8228) < 40 ) then
if ( not TileIsOutOfBounds ( ClosestPC( ID, sDist )) and sDist > NPC_TALK_RADIUS * 2 ) then
--too far away
return
end
SetFactTrue( Facts.FACT_MARY_OR_JOHN_ARRIVED )
ActionStopMerc(ID)
TriggerNPCRecord( ID, 13 )
end
end
]]
-- end local function
function HandleAtNewGridNo( ProfileId )
-- Ja2 Remove
--[[
TeamSoldier = FindSoldierTeam (ProfileId)
if ( TeamSoldier == Team.OUR_TEAM ) then -- Team
if ( WhatKindOfMercAmI (ProfileId) == What.MERC_TYPE__EPC ) then -- what EPC
-- Skyrider
if ( ProfileId == Profil.SKYRIDER and CheckNPCSectorBool( Profil.SKYRIDER, 13, SectorY.MAP_ROW_B, 0 ) == true and PythSpacesAway( Profil.SKYRIDER,8842 ) < 11 ) then
ActionStopMerc(Profil.SKYRIDER)
SetFactTrue( Facts.FACT_SKYRIDER_CLOSE_TO_CHOPPER )
TriggerNPCRecord( Profil.SKYRIDER, 15 )
SetUpHelicopterForPlayer( 13, SectorY.MAP_ROW_B, Profil.SKYRIDER )
elseif ( ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then
-- Mary
if ( ProfileId == Profil.MARY ) then
HandleMaryArrival( Profil.MARY )
-- John
elseif ( ProfileId == Profil.JOHN ) then
HandleJohnArrival( Profil.JOHN )
end
-- Maria
elseif ( ProfileId == Profil.MARIA and CheckNPCSectorBool( Profil.MARIA, 6, SectorY.MAP_ROW_C, 0) == true and CheckFact(Facts.FACT_MARIA_ESCORTED_AT_LEATHER_SHOP,Profil.MARIA) == true ) then
if ( NPCInRoom( Profil.ANGEL, 2 ) == true ) then
TriggerNPCRecord( Profil.ANGEL, 12 )
end
-- Joey
elseif ( ProfileId == Profil.JOEY and CheckNPCSectorBool( Profil.JOEY, 8, SectorY.MAP_ROW_G, 0) == true and CheckFact(Facts.FACT_JOEY_NEAR_MARTHA,0) == true ) then
ActionStopMerc(Profil.JOEY)
TriggerNPCRecord( Profil.JOEY, 9 )
end
-- Drassen stuff for John & Mary
elseif ( CheckQuest(Quests.QUEST_ESCORT_TOURISTS) == pQuest.QUESTINPROGRESS and ProfileIdsSectorX == 13 and ProfileIdsSectorY == SectorY.MAP_ROW_B and ProfileIdbSectorZ == 0 ) then
if ( CheckFact( FACT_JOHN_ALIVE) == true ) then
HandleJohnArrival( nil )
else
HandleMaryArrival( nil )
end
elseif ( TeamSoldier == Team.CIV_TEAM and ProfileId ~= NO_PROFILE and CheckSoldierNeutral( ProfileId ) == true ) then
if ( ProfileId == Profil.JIM or ProfileId == Profil.JACK or ProfileId == Profil.OLAF or ProfileId == Profil.RAY or ProfileId == Profil.OLGA or ProfileId == Profil.TYRONE ) then
if ( not TileIsOutOfBounds( ClosestPC( ProfileId, sDesiredMercDist )) ) then
if ( sDesiredMercDist <= NPC_TALK_RADIUS * 2 ) then
CancelAIAction ( ProfileId )
AddToShouldBecomeHostileOrSayQuoteList( GetPlayerMercID(ProfileId) )
end
end
end
end -- End what EPC
end -- End team
]]
end
function HandlePlayerTeamMemberDeath( ProfileId )
local cnt
local iLoop
local pTeamSoldier
-- JA2 Remove
--[[
-- handle stuff for Carmen if Slay is killed
if ( ProfileId == Profil.SLAY ) then
pTeamSoldier = FindSoldierByProfileID( Profil.CARMEN )
if ( CheckSoldierAttitude ( pTeamSoldier ) == Attitude.ATTACKSLAYONLY and not TileIsOutOfBounds(ClosestPC( pTeamSoldier, nil )) ) then
-- Carmen now becomes friendly again
TriggerNPCRecord( Profil.CARMEN, 29 )
end
elseif ( ProfileId == Profil.ROBOT ) then
if ( CheckFact( Facts.FACT_FIRST_ROBOT_DESTROYED,0 ) == false ) then
SetFactTrue( Facts.FACT_FIRST_ROBOT_DESTROYED )
SetFactFalse( Facts.FACT_ROBOT_READY )
else
SetFactTrue( Facts.FACT_SECOND_ROBOT_DESTROYED )
end
end
]]
end
@@ -1,632 +0,0 @@
math.randomseed( os.time() ); math.random(); math.random(); math.random()
local MAX_EMAIL_LINES = 10 -- Max number of lines can be shown in a message
local MAX_MESSAGES_PAGE = 18 -- Max number of messages per page
local IMP_EMAIL_INTRO = 0
local IMP_EMAIL_INTRO_LENGTH = 10
local ENRICO_CONGRATS = (IMP_EMAIL_INTRO + IMP_EMAIL_INTRO_LENGTH)
local ENRICO_CONGRATS_LENGTH = 3
local IMP_EMAIL_AGAIN = (ENRICO_CONGRATS + ENRICO_CONGRATS_LENGTH)
local IMP_EMAIL_AGAIN_LENGTH = 6
local MERC_INTRO = (IMP_EMAIL_AGAIN + IMP_EMAIL_AGAIN_LENGTH)
local MERC_INTRO_LENGTH = 5
local MERC_NEW_SITE_ADDRESS = ( MERC_INTRO + MERC_INTRO_LENGTH )
local MERC_NEW_SITE_ADDRESS_LENGTH = 2
local AIM_MEDICAL_DEPOSIT_REFUND = ( MERC_NEW_SITE_ADDRESS + MERC_NEW_SITE_ADDRESS_LENGTH )
local AIM_MEDICAL_DEPOSIT_REFUND_LENGTH = 3
local IMP_EMAIL_PROFILE_RESULTS = ( AIM_MEDICAL_DEPOSIT_REFUND + AIM_MEDICAL_DEPOSIT_REFUND_LENGTH )
local IMP_EMAIL_PROFILE_RESULTS_LENGTH = 1
local MERC_WARNING = ( IMP_EMAIL_PROFILE_RESULTS_LENGTH + IMP_EMAIL_PROFILE_RESULTS )
local MERC_WARNING_LENGTH = 2
local MERC_INVALID = ( MERC_WARNING + MERC_WARNING_LENGTH )
local MERC_INVALID_LENGTH = 2
local NEW_MERCS_AT_MERC = ( MERC_INVALID + MERC_INVALID_LENGTH )
local NEW_MERCS_AT_MERC_LENGTH = 2
local MERC_FIRST_WARNING = ( NEW_MERCS_AT_MERC + NEW_MERCS_AT_MERC_LENGTH )
local MERC_FIRST_WARNING_LENGTH = 2
-- merc up a level emails
local MERC_UP_LEVEL_BIFF = ( MERC_FIRST_WARNING + MERC_FIRST_WARNING_LENGTH )
local MERC_UP_LEVEL_LENGTH_BIFF = 2
local MERC_UP_LEVEL_HAYWIRE = ( MERC_UP_LEVEL_LENGTH_BIFF + MERC_UP_LEVEL_BIFF )
local MERC_UP_LEVEL_LENGTH_HAYWIRE = 2
local MERC_UP_LEVEL_GASKET = ( MERC_UP_LEVEL_LENGTH_HAYWIRE + MERC_UP_LEVEL_HAYWIRE )
local MERC_UP_LEVEL_LENGTH_GASKET = 2
local MERC_UP_LEVEL_RAZOR = ( MERC_UP_LEVEL_LENGTH_GASKET + MERC_UP_LEVEL_GASKET )
local MERC_UP_LEVEL_LENGTH_RAZOR = 2
local MERC_UP_LEVEL_FLO = ( MERC_UP_LEVEL_LENGTH_RAZOR + MERC_UP_LEVEL_RAZOR )
local MERC_UP_LEVEL_LENGTH_FLO = 2
local MERC_UP_LEVEL_GUMPY = ( MERC_UP_LEVEL_LENGTH_FLO + MERC_UP_LEVEL_FLO )
local MERC_UP_LEVEL_LENGTH_GUMPY = 2
local MERC_UP_LEVEL_LARRY = ( MERC_UP_LEVEL_LENGTH_GUMPY + MERC_UP_LEVEL_GUMPY )
local MERC_UP_LEVEL_LENGTH_LARRY = 2
local MERC_UP_LEVEL_COUGAR = ( MERC_UP_LEVEL_LENGTH_LARRY + MERC_UP_LEVEL_LARRY )
local MERC_UP_LEVEL_LENGTH_COUGAR = 2
local MERC_UP_LEVEL_NUMB = ( MERC_UP_LEVEL_LENGTH_COUGAR + MERC_UP_LEVEL_COUGAR )
local MERC_UP_LEVEL_LENGTH_NUMB = 2
local MERC_UP_LEVEL_BUBBA = ( MERC_UP_LEVEL_LENGTH_NUMB + MERC_UP_LEVEL_NUMB )
local MERC_UP_LEVEL_LENGTH_BUBBA = 2
-- Merc left-me-a-message-and-now-I'm-back emails
local AIM_REPLY_BARRY = ( MERC_UP_LEVEL_LENGTH_BUBBA + MERC_UP_LEVEL_BUBBA )
local AIM_REPLY_LENGTH_BARRY = 2
local AIM_REPLY_MELTDOWN = (AIM_REPLY_BARRY + ( 39 * AIM_REPLY_LENGTH_BARRY ))
local AIM_REPLY_LENGTH_MELTDOWN = AIM_REPLY_LENGTH_BARRY
-- Old EXISTING emails when player starts game. They must look "read"
local OLD_ENRICO_1 = ( AIM_REPLY_LENGTH_MELTDOWN + AIM_REPLY_MELTDOWN )
local OLD_ENRICO_1_LENGTH = 3
local OLD_ENRICO_2 = ( OLD_ENRICO_1 + OLD_ENRICO_1_LENGTH )
local OLD_ENRICO_2_LENGTH = 3
local RIS_REPORT = ( OLD_ENRICO_2 + OLD_ENRICO_2_LENGTH )
local RIS_REPORT_LENGTH = 2
local OLD_ENRICO_3 = ( RIS_REPORT + RIS_REPORT_LENGTH )
local OLD_ENRICO_3_LENGTH = 3
-- Emails that occur from Enrico once player accomplishes things
local ENRICO_MIGUEL = ( OLD_ENRICO_3 + OLD_ENRICO_3_LENGTH )
local ENRICO_MIGUEL_LENGTH = 3
local ENRICO_PROG_20 = ( ENRICO_MIGUEL + ENRICO_MIGUEL_LENGTH )
local ENRICO_PROG_20_LENGTH = 3
local ENRICO_PROG_55 = ( ENRICO_PROG_20 + ENRICO_PROG_20_LENGTH )
local ENRICO_PROG_55_LENGTH = 3
local ENRICO_PROG_80 = ( ENRICO_PROG_55 + ENRICO_PROG_55_LENGTH )
local ENRICO_PROG_80_LENGTH = 3
local ENRICO_SETBACK = ( ENRICO_PROG_80 + ENRICO_PROG_80_LENGTH )
local ENRICO_SETBACK_LENGTH = 3
local ENRICO_SETBACK_2 = ( ENRICO_SETBACK + ENRICO_SETBACK_LENGTH )
local ENRICO_SETBACK_2_LENGTH = 3
local ENRICO_CREATURES = ( ENRICO_SETBACK_2 + ENRICO_SETBACK_2_LENGTH )
local ENRICO_CREATURES_LENGTH = 3
-- Insurance company emails
local INSUR_PAYMENT = ( ENRICO_CREATURES + ENRICO_CREATURES_LENGTH )
local INSUR_PAYMENT_LENGTH = 3
local INSUR_SUSPIC = ( INSUR_PAYMENT + INSUR_PAYMENT_LENGTH )
local INSUR_SUSPIC_LENGTH = 3
local INSUR_INVEST_OVER = ( INSUR_SUSPIC + INSUR_SUSPIC_LENGTH )
local INSUR_INVEST_OVER_LENGTH = 3
local INSUR_SUSPIC_2 = ( INSUR_INVEST_OVER + INSUR_INVEST_OVER_LENGTH )
local INSUR_SUSPIC_2_LENGTH = 3
local BOBBYR_NOW_OPEN = ( INSUR_SUSPIC_2 + INSUR_SUSPIC_2_LENGTH )
local BOBBYR_NOW_OPEN_LENGTH = 3
local KING_PIN_LETTER = ( BOBBYR_NOW_OPEN + BOBBYR_NOW_OPEN_LENGTH )
local KING_PIN_LETTER_LENGTH = 4
local LACK_PLAYER_PROGRESS_1 = ( KING_PIN_LETTER + KING_PIN_LETTER_LENGTH )
local LACK_PLAYER_PROGRESS_1_LENGTH = 3
local LACK_PLAYER_PROGRESS_2 = ( LACK_PLAYER_PROGRESS_1 + LACK_PLAYER_PROGRESS_1_LENGTH )
local LACK_PLAYER_PROGRESS_2_LENGTH = 3
local LACK_PLAYER_PROGRESS_3 = ( LACK_PLAYER_PROGRESS_2 + LACK_PLAYER_PROGRESS_2_LENGTH )
local LACK_PLAYER_PROGRESS_3_LENGTH = 3
-- A package from bobby r has arrived in Drassen
local BOBBYR_SHIPMENT_ARRIVED = ( LACK_PLAYER_PROGRESS_3 + LACK_PLAYER_PROGRESS_3_LENGTH )
local BOBBYR_SHIPMENT_ARRIVED_LENGTH = 4
-- John Kulba has left the gifts for theplayers in drassen
local JOHN_KULBA_GIFT_IN_DRASSEN = ( BOBBYR_SHIPMENT_ARRIVED + BOBBYR_SHIPMENT_ARRIVED_LENGTH )
local JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH = 4
-- When a merc dies on ANOTHER assignment ( ie not with the player )
local MERC_DIED_ON_OTHER_ASSIGNMENT = ( JOHN_KULBA_GIFT_IN_DRASSEN + JOHN_KULBA_GIFT_IN_DRASSEN_LENGTH )
local MERC_DIED_ON_OTHER_ASSIGNMENT_LENGTH = 5
local INSUR_1HOUR_FRAUD = ( MERC_DIED_ON_OTHER_ASSIGNMENT + MERC_DIED_ON_OTHER_ASSIGNMENT_LENGTH )
local INSUR_1HOUR_FRAUD_LENGTH = 3
-- When a merc is fired, and is injured
local AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND = ( INSUR_1HOUR_FRAUD + INSUR_1HOUR_FRAUD_LENGTH )
local AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH = 3
-- When a merc is fired, and is dead
local AIM_MEDICAL_DEPOSIT_NO_REFUND = ( AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND + AIM_MEDICAL_DEPOSIT_PARTIAL_REFUND_LENGTH )
local AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH = 3
local BOBBY_R_MEDUNA_SHIPMENT = ( AIM_MEDICAL_DEPOSIT_NO_REFUND + AIM_MEDICAL_DEPOSIT_NO_REFUND_LENGTH )
local BOBBY_R_MEDUNA_SHIPMENT_LENGTH = 4
History =
{
HISTORY_ENTERED_HISTORY_MODE = 0,
HISTORY_HIRED_MERC_FROM_AIM = 1,
HISTORY_HIRED_MERC_FROM_MERC = 2,
HISTORY_MERC_KILLED = 3,
HISTORY_SETTLED_ACCOUNTS_AT_MERC = 4,
HISTORY_ACCEPTED_ASSIGNMENT_FROM_ENRICO = 5,
HISTORY_CHARACTER_GENERATED = 6,
HISTORY_PURCHASED_INSURANCE = 7,
HISTORY_CANCELLED_INSURANCE = 8,
HISTORY_INSURANCE_CLAIM_PAYOUT = 9,
HISTORY_EXTENDED_CONTRACT_1_DAY = 10,
HISTORY_EXTENDED_CONTRACT_1_WEEK = 11,
HISTORY_EXTENDED_CONTRACT_2_WEEK = 12,
HISTORY_MERC_FIRED = 13,
HISTORY_MERC_QUIT = 14,
HISTORY_QUEST_STARTED = 15,
HISTORY_QUEST_FINISHED = 16,
HISTORY_TALKED_TO_MINER = 17,
HISTORY_LIBERATED_TOWN = 18,
HISTORY_CHEAT_ENABLED = 19,
HISTORY_TALKED_TO_FATHER_WALKER = 20,
HISTORY_MERC_MARRIED_OFF = 21,
HISTORY_MERC_CONTRACT_EXPIRED = 22,
HISTORY_RPC_JOINED_TEAM = 23,
HISTORY_ENRICO_COMPLAINED = 24,
HISTORY_WONBATTLE = 25,
HISTORY_MINE_RUNNING_OUT = 26,
HISTORY_MINE_RAN_OUT = 27,
HISTORY_MINE_SHUTDOWN = 28,
HISTORY_MINE_REOPENED = 29,
HISTORY_DISCOVERED_TIXA = 30,
HISTORY_DISCOVERED_ORTA = 31,
HISTORY_GOT_ROCKET_RIFLES = 32,
HISTORY_DEIDRANNA_DEAD_BODIES = 33,
HISTORY_BOXING_MATCHES = 34,
HISTORY_SOMETHING_IN_MINES = 35,
HISTORY_DEVIN = 36,
HISTORY_MIKE = 37,
HISTORY_TONY = 38,
HISTORY_KROTT = 39,
HISTORY_KYLE = 40,
HISTORY_MADLAB = 41,
HISTORY_GABBY = 42,
HISTORY_KEITH_OUT_OF_BUSINESS = 43,
HISTORY_HOWARD_CYANIDE = 44,
HISTORY_KEITH = 45,
HISTORY_HOWARD = 46,
HISTORY_PERKO = 47,
HISTORY_SAM = 48,
HISTORY_FRANZ = 49,
HISTORY_ARNOLD = 50,
HISTORY_FREDO = 51,
HISTORY_RICHGUY_BALIME = 52,
HISTORY_JAKE = 53,
HISTORY_BUM_KEYCARD = 54,
HISTORY_WALTER = 55,
HISTORY_DAVE = 56,
HISTORY_PABLO = 57,
HISTORY_KINGPIN_MONEY = 58,
HISTORY_WON_BOXING = 59,
HISTORY_LOST_BOXING = 60,
HISTORY_DISQUALIFIED_BOXING = 61,
HISTORY_FOUND_MONEY = 62,
HISTORY_ASSASSIN = 63,
HISTORY_LOSTTOWNSECTOR = 64,
HISTORY_DEFENDEDTOWNSECTOR = 65,
HISTORY_LOSTBATTLE = 66,
HISTORY_FATALAMBUSH = 67,
HISTORY_WIPEDOUTENEMYAMBUSH = 68,
HISTORY_UNSUCCESSFULATTACK = 69,
HISTORY_SUCCESSFULATTACK = 70,
HISTORY_CREATURESATTACKED = 71,
HISTORY_KILLEDBYBLOODCATS = 72,
HISTORY_SLAUGHTEREDBLOODCATS = 73,
HISTORY_NPC_KILLED = 74,
HISTORY_GAVE_CARMEN_HEAD = 75,
HISTORY_SLAY_MYSTERIOUSLY_LEFT = 76,
HISTORY_MERC_KILLED_CHARACTER = 77,
}
Sender =
{
MAIL_ENRICO = 0,
CHAR_PROFILE_SITE = 1,
GAME_HELP = 2,
IMP_PROFILE_RESULTS = 3,
SPECK_FROM_MERC = 4,
RIS_EMAIL = 5,
BARRY_MAIL = 6,
BOBBY_R = 7,
KING_PIN = 8,
JOHN_KULBA = 9,
AIM_SITE = 10,
}
Items =
{
MONEY = 219,
SW38 = 5,
STUN_GRENADE = 131,
DESERTEAGLE = 7,
GASMASK = 213,
}
Profil =
{
FATHER = 100,
HAMOUS = 63,
PROF_ICECREAM = 162,
RAT = 81,
VINCE = 69,
STEVE = 80,
JENNY = 132,
DARREN = 87,
TONY = 91,
DEVIN = 61,
CARMEN = 78,
SAL = 99,
PABLO = 98,
SPIKE = 93,
ROBOT = 62,
JOEY = 90,
MADLAB = 146,
CONRAD = 70,
KINGPIN = 86,
MADAME = 107,
}
Facts =
{
FACT_VINCE_EXPECTING_MONEY = 149,
FACT_TONY_NOT_AVAILABLE = 86,
FACT_DAVE_HAS_GAS = 226,
FACT_PABLOS_BRIBED = 41,
FACT_PACKAGE_DAMAGED = 58,
FACT_SHIPMENT_DELAYED_24_HOURS = 56,
FACT_PACKAGE_LOST_PERMANENTLY = 58,
FACT_PABLO_RETURNED_GOODS = 39,
FACT_PABLO_PUNISHED_BY_PLAYER = 37,
FACT_REALLY_NEW_BOBBYRAY_SHIPMENT_WAITING = 34,
FACT_LARGE_SIZED_SHIPMENT_WAITING = 62,
FACT_LARGE_SIZED_OLD_SHIPMENT_WAITING = 35,
FACT_24_HOURS_SINCE_DOCTOR_TALKED_TO = 306,
FACT_24_HOURS_SINCE_JOEY_RESCUED = 305,
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
FACT_KINGPIN_DEAD = 308,
FACT_KINGPIN_CAN_SEND_ASSASSINS = 276,
FACT_FOOD_QUEST_OVER = 52,
FACT_WILLIS_HEARD_ABOUT_JOEY_RESCUE = 271,
FACT_BRENDA_PATIENCE_TIMER_EXPIRED = 360,
FACT_FIRST_ROBOT_DESTROYED = 203,
FACT_ROBOT_READY_SECOND_TIME = 205,
FACT_ROBOT_READY = 202,
FACT_JOEY_ESCORTED = 108,
FACT_KIDS_ARE_FREE = 318,
FACT_OK_USE_HUMMER = 224,
}
Flags2 =
{
PROFILE_MISC_FLAG2_DONT_ADD_TO_SECTOR = 1,
PROFILE_MISC_FLAG2_LEFT_COUNTRY = 2,
PROFILE_MISC_FLAG2_BANDAGED_TODAY = 4,
PROFILE_MISC_FLAG2_SAID_FIRSTSEEN_QUOTE = 8,
PROFILE_MISC_FLAG2_NEEDS_TO_SAY_HOSTILE_QUOTE = 16,
PROFILE_MISC_FLAG2_MARRIED_TO_HICKS = 32,
PROFILE_MISC_FLAG2_ASKED_BY_HICKS = 64,
}
SectorY =
{
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
NpcAction =
{
NPC_ACTION_ADD_JOEY_TO_WORLD = 136,
NPC_ACTION_RETURN_STOLEN_SHIPMENT_ITEMS = 108,
NPC_ACTION_SET_RANDOM_PACKAGE_DAMAGE_TIMER = 116,
NPC_ACTION_ENABLE_CAMBRIA_DOCTOR_BONUS = 139,
NPC_ACTION_TRIGGER_END_OF_FOOD_QUEST = 112,
NPC_ACTION_DELAYED_MAKE_BRENDA_LEAVE = 121,
NPC_ACTION_SET_DELAY_TILL_GIRLS_AVAILABLE = 126,
NPC_ACTION_SET_GIRLS_AVAILABLE = 125,
NPC_ACTION_READY_ROBOT = 194,
NPC_ACTION_SEND_ENRICO_MIGUEL_EMAIL = 230,
NPC_ACTION_TIMER_FOR_VEHICLE = 211,
NPC_ACTION_FREE_KIDS = 117,
}
Sectors =
{
HOSPITAL_SECTOR_X = 8,
HOSPITAL_SECTOR_Y = 6,
HOSPITAL_SECTOR_Z = 0,
}
EventTypes =
{
EVENT_SET_BY_NPC_SYSTEM = 27,
}
Group =
{
KINGPIN_CIV_GROUP = 2,
}
StatusGroup =
{
CIV_GROUP_NEUTRAL = 0,
CIV_GROUP_WILL_EVENTUALLY_BECOME_HOSTILE = 1,
CIV_GROUP_WILL_BECOME_HOSTILE = 2,
CIV_GROUP_HOSTILE = 3,
}
qStatus =
{
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests =
{
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
QUEST_KILL_DEIDRANNA = 25,
}
ProfileType =
{
None = 0,
AIM = 1,
MERC = 2,
RPC = 3,
NPC = 4,
Vehicle = 5,
IMP = 6,
}
local MERC_OK = 0
local MERC_HAS_NO_TEXT_FILE = -1
local MERC_ANNOYED_BUT_CAN_STILL_CONTACT = -2
local MERC_ANNOYED_WONT_CONTACT = -3
local MERC_HIRED_BUT_NOT_ARRIVED_YET = -4
local MERC_IS_DEAD = -5
local MERC_RETURNING_HOME = -6
local MERC_WORKING_ELSEWHERE = -7
local MERC_FIRED_AS_A_POW = -8
local guiPabloExtraDaysBribed = 0
local BOBBYR_SHIPPING_DEST_SECTOR_X = 13
local BOBBYR_SHIPPING_DEST_SECTOR_Y = 2
local BOBBYR_SHIPPING_DEST_SECTOR_Z = 0
local BOBBYR_SHIPPING_DEST_GRIDNO = 10112
local PABLOS_STOLEN_DEST_GRIDNO = 1
local LOST_SHIPMENT_GRIDNO = 2
local NPC_SYSTEM_EVENT_ACTION_PARAM_BONUS = 10000
local gubCambriaMedicalObjects
function HandleEarlyMorningEvents()
-- JA2 Remove
--[[
for i = 0, 254 do
if ( WhoIs(ProfileType.RPC,i) == i or WhoIs(ProfileType.NPC,i) == i or WhoIs(ProfileType.Vehicle,i) == i ) then
-- Set FALSE
-- Loop through all *NPCs* and reset "default response used recently" flags
SetThreatenDefaultResponseUsedRecently(i,false)
SetRecruitDefaultResponseUsedRecently(i,false)
SetFriendlyOrDirectDefaultResponseUsedRecently(i,false)
SetMiscFlags2(i,Flags2.PROFILE_MISC_FLAG2_BANDAGED_TODAY)
end
end
r = math.random(1, 4)
SetNPCData1(Profil.FATHER,r)
-- Set Walker's location
o = math.random(1, 2)
if (o > 1) then
-- Move the father to the other sector, provided neither are loaded
if (not ( ( gWorldSectorX == 13) and ( ( gWorldSectorY == 3) or gWorldSectorY == 4 ) and ( gbWorldSectorZ == 0 ) )) then
SetCharacterSectorX(Profil.FATHER,13)
SectorY = CheckCharacterSectorY(Profil.FATHER)
-- Swap his location
if ( SectorY == 3 ) then
SetCharacterSectorY(Profil.FATHER,4)
else
SetCharacterSectorY(Profil.FATHER,3)
end
end
end
if ( CheckLastDateSpokenTot(Profil.TONY) > 0 and not ( gWorldSectorX == 5 and gWorldSectorY == 3 and gWorldSectorZ == 0 )) then
-- San Mona C5 is not loaded so make Tony possibly not available
p = math.random(0, 100)
if ( p <= iniCHANCE_TONY_AVAILABLE ) then
-- Tony IS available
SetFactFalse( Facts.FACT_TONY_NOT_AVAILABLE )
AddNPCtoSector (Profil.TONY,5,3,0)
else
-- Tony is NOT available
SetFactTrue( Facts.FACT_TONY_NOT_AVAILABLE )
AddNPCtoSector (Profil.TONY,0,0,0)
end
end
if ( CheckLastDateSpokenTot(Profil.DEVIN) == 0 ) then
DData = CheckNPCData1 (Profil.DEVIN)
i = DData + 1
SetNPCData1 (Profil.DEVIN,i)
if ( CheckNPCData1 (Profil.DEVIN) > 3 ) then
Devinid,Devinx,Deviny,Devinz = CheckNPCinSector(Profil.DEVIN)
if ( not ( (gWorldSectorX == Devinx) and (gWorldSectorY == Deviny) and (gWorldSectorZ == 0) ) ) then
-- Ok, Devin's sector not loaded, so time to move!
-- Might be same sector as before, if so, oh well!
p = math.random(1, 5)
if ( p == 1 ) then
--G9
AddNPCtoSector (Profil.DEVIN,9,7,0)
elseif ( p == 2 ) then
--D13
AddNPCtoSector (Profil.DEVIN,13,4,0)
elseif ( p == 3 ) then
--C5
AddNPCtoSector (Profil.DEVIN,5,3,0)
elseif ( p == 4 ) then
--H2
AddNPCtoSector (Profil.DEVIN,2,8,0)
elseif ( p == 5 ) then
--C6
AddNPCtoSector (Profil.DEVIN,6,3,0)
end
end
end
end
-- Stop moving the truck if Hamous is dead!!
-- Stop moving them if the player has the truck or Hamous is hired!
HAMOUSid,HAMOUSx,HAMOUSy,HAMOUSz = CheckNPCinSector(Profil.HAMOUS)
if ( CheckNPCLife(Profil.HAMOUS) > 0 and CheckMercIsDead (Profil.HAMOUS) == false and CheckMercIsDead (Profil.PROF_ICECREAM) == false and (not ( (gWorldSectorX == HAMOUSx) and (gWorldSectorY == HAMOUSy) and (gWorldSectorZ == 0) )) ) then
-- Ok, HAMOUS's sector not loaded, so time to move!
-- Might be same sector as before, if so, oh well!
i = math.random(1, 5)
if i == 1 then
-- G6
AddNPCtoSector (Profil.HAMOUS,6,7,0)
AddNPCtoSector (Profil.PROF_ICECREAM,6,7,0)
elseif i == 2 then
-- F12
AddNPCtoSector (Profil.HAMOUS,12,6,0)
AddNPCtoSector (Profil.PROF_ICECREAM,12,6,0)
elseif i == 3 then
-- D7
AddNPCtoSector (Profil.HAMOUS,7,4,0)
AddNPCtoSector (Profil.PROF_ICECREAM,7,4,0)
elseif i == 4 then
-- D3
AddNPCtoSector (Profil.HAMOUS,3,4,0)
AddNPCtoSector (Profil.PROF_ICECREAM,3,4,0)
elseif i == 5 then
-- D9
AddNPCtoSector (Profil.HAMOUS,9,4,0)
AddNPCtoSector (Profil.PROF_ICECREAM,9,4,0)
end
end
-- Does Rat take off?
if ( CheckNPCData1 (Profil.RAT) > 0) then
SetCharacterSectorX (Profil.RAT,0)
SetCharacterSectorY (Profil.RAT,0)
SetCharacterSectorZ (Profil.RAT,0)
end
-- Empty money from pockets of Vince 69, Willis 80, and Jenny 132
SetMoneyInSoldierProfile( Profil.VINCE, 0 )
SetMoneyInSoldierProfile( Profil.STEVE, 0 )
SetMoneyInSoldierProfile( Profil.JENNY, 0 )
-- Vince is no longer expecting money
SetFactFalse( Facts.FACT_VINCE_EXPECTING_MONEY )
-- Reset Darren's balance and money
SetNPCBalance(Profil.DARREN,0)
SetMoneyInSoldierProfile( Profil.DARREN, 15000 )
-- Set Carmen to be placed on the map in case he moved and is waiting off screen
if CheckMiscFlags2(Profil.CARMEN,Flags2.PROFILE_MISC_FLAG2_DONT_ADD_TO_SECTOR) == 1 then
SetMiscFlags2(Profil.CARMEN, Flags2.PROFILE_MISC_FLAG2_DONT_ADD_TO_SECTOR)
-- Move Carmen to C13
AddNPCtoSector (Profil.CARMEN,13,3,0)
-- We should also reset # of terrorist heads and give him cash
if CheckNPCData2 (Profil.CARMEN) > 0 then
Money = CheckMoney(Profil.CARMEN)
if (Money < 10000 ) then
uiAmount = 0
else
uiAmount = Money
end
uiAmount = uiAmount + 10000 * CheckNPCData2( Profil.CARMEN )
SetMoneyInSoldierProfile( Profil.CARMEN, uiAmount )
SetNPCData2(Profil.CARMEN,0)
for i = 248, 254 do
RemoveObjectFromSoldierProfile( Profil.CARMEN, i )
end
end
else
-- Randomize where he'll be today... so long as his sector's not loaded
CARMENid,CARMENx,CARMENy,CARMENz = CheckNPCinSector(Profil.CARMEN)
if ( CARMENx ~= gWorldSectorX or CARMENy ~= gWorldSectorY ) then
i = math.random(1, 3)
if i == 1 then
AddNPCtoSector (Profil.CARMEN,5,3,0) -- C5
elseif i == 2 then
AddNPCtoSector (Profil.CARMEN,13,3,0) -- C13
elseif i == 3 then
AddNPCtoSector (Profil.CARMEN,9,7,0) -- G9
end
-- He should have $5000... unless the player forgot to meet him
if ( CheckMoney(Profil.CARMEN) < 5000 ) then
SetMoneyInSoldierProfile( Profil.CARMEN, 5000 )
end
end
end
i = math.random(1, 3)
if i == 1 then
SetFactTrue( Facts.FACT_DAVE_HAS_GAS )
else
SetFactFalse( Facts.FACT_DAVE_HAS_GAS )
end
if ( gWorldSectorX == Sectors.HOSPITAL_SECTOR_X and gWorldSectorY == Sectors.HOSPITAL_SECTOR_Y and gWorldSectorZ == Sectors.HOSPITAL_SECTOR_Z ) then
CheckForMissingHospitalSupplies()
end
]]
end
@@ -1,322 +0,0 @@
--[[
http://www.legion.zone.zg.pl/doku.php/modowanie/ja/art_ja_m_22_lua
Global :
- giLairID
1 - Drassen
2 - Cambria
3 - Alma
4 - Grumm
Function :
- SectorEnemyControlled ( IDSector )
check if enemy controls sector
- SECTOR( SectorX, SectorY )
- CheckMercIsDead (ProfilID)
check merc is dead
- AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
- IncrementTownLoyaltyEverywhere( idLoyalty )
increment all town loyalty
- IncrementTownLoyalty ( idLoyalty )
increment town loyalty
- DecrementTownLoyalty ( idTown, idLoyalty )
decrement town loyalty
- DecrementTownLoyaltyEverywhere ( idLoyalty )
decrement all town loyalty
- SetTownLoyalty ( idTown, idLoyalty )
set town loyalty
Example :
if SectorEnemyControlled ( SECTOR(4,13) ) == false then
-- instructions
end
if SectorEnemyControlled ( SECTOR(4,13) ) == false then
-- instructions
else
-- instructions
end
if ( CheckMercIsDead (101) == true ) then
-- merc is dead
else
-- instructions
end
-- 1 * 500 = 500 = 4%
DecrementTownLoyaltyEverywhere ( 1 )
-- 10 * 500 = 5000 = 45%
IncrementTownLoyalty (10)
-- 20 * 500 = 10000 = 90%
DecrementTownLoyalty ( 2 , 20 )
-- 30 * 500 = 15000 = 100%
IncrementTownLoyaltyEverywhere (30)
-- 100 = 100%
SetTownLoyalty ( 1, 100 )
-- 30 = 30%
SetTownLoyalty ( 1, 30 )
EventGlobal = {
GLOBAL_LOYALTY_BATTLE_WON = 0,
.
.
MY_GLOBAL_LOYALTY_13 = 13,
MY_GLOBAL_LOYALTY_14 = 14,
.
.
.
MY_GLOBAL_LOYALTY_100 = 100,
}
]]
Profil = {
MIGUEL = 57,
DOREEN = 139,
MARTHA = 109,
KEITH = 147,
YANNI = 108,
AUNTIE = 76,
MATT = 148,
JOEY = 90,
}
Town = {
OMERTA = 1,
DRASSEN = 2,
ALMA = 3,
GRUMM = 4,
CAMBRIA = 6,
SANMONA = 7,
ESTONI = 8,
BALIME = 10,
MEDUNa = 11,
CHITZENA = 12,
}
-- gain pts per real loyalty pt
local GAIN_PTS_PER_LOYALTY_PT = 500
-- --- LOYALTY BONUSES ---
-- Omerta
local LOYALTY_BONUS_MIGUEL_READS_LETTER = (10 * GAIN_PTS_PER_LOYALTY_PT) -- multiplied by 4.5 due to Omerta's high seniment, so it's 45%
-- Drassen
local LOYALTY_BONUS_CHILDREN_FREED_DOREEN_KILLED = (10 * GAIN_PTS_PER_LOYALTY_PT) -- +50% bonus for Drassen -- Overhead.cpp
local LOYALTY_BONUS_CHILDREN_FREED_DOREEN_SPARED = (20 * GAIN_PTS_PER_LOYALTY_PT) -- +50% bonus for Drassen -- Overhead.cpp
-- Cambria
local LOYALTY_BONUS_MARTHA_WHEN_JOEY_RESCUED = (15 * GAIN_PTS_PER_LOYALTY_PT) -- -25% for low Cambria sentiment
local LOYALTY_BONUS_KEITH_WHEN_HILLBILLY_SOLVED = (15 * GAIN_PTS_PER_LOYALTY_PT) -- -25% for low Cambria sentiment
-- Chitzena
local LOYALTY_BONUS_YANNI_WHEN_CHALICE_RETURNED_LOCAL = (20 * GAIN_PTS_PER_LOYALTY_PT) -- +75% higher in Chitzena -- no used
local LOYALTY_BONUS_YANNI_WHEN_CHALICE_RETURNED_GLOBAL = (10 * GAIN_PTS_PER_LOYALTY_PT) -- for ALL towns!
-- Alma
local LOYALTY_BONUS_AUNTIE_WHEN_BLOODCATS_KILLED = (20 * GAIN_PTS_PER_LOYALTY_PT) -- Alma's increases reduced by half due to low rebel sentiment
local LOYALTY_BONUS_MATT_WHEN_DYNAMO_FREED = (20 * GAIN_PTS_PER_LOYALTY_PT) -- Alma's increases reduced by half due to low rebel sentiment
local LOYALTY_BONUS_FOR_SERGEANT_KROTT = (20 * GAIN_PTS_PER_LOYALTY_PT) -- Alma's increases reduced by half due to low rebel sentiment (Interface Dialogue.cpp)
-- Everywhere
local LOYALTY_BONUS_TERRORISTS_DEALT_WITH = ( 5 * GAIN_PTS_PER_LOYALTY_PT)
local LOYALTY_BONUS_KILL_QUEEN_MONSTER = (10 * GAIN_PTS_PER_LOYALTY_PT)
-- Anywhere
-- loyalty bonus for completing town training
local LOYALTY_BONUS_FOR_TOWN_TRAINING = ( 2 * GAIN_PTS_PER_LOYALTY_PT ) -- 2% (Town Militia.cpp i Map Screen Interface Map.cpp)
EventGlobal = {
-- There are only for distance-adjusted global loyalty effects. Others go into list above instead!
GLOBAL_LOYALTY_BATTLE_WON = 0,
GLOBAL_LOYALTY_BATTLE_LOST = 1,
GLOBAL_LOYALTY_ENEMY_KILLED = 2,
GLOBAL_LOYALTY_NATIVE_KILLED = 3,
GLOBAL_LOYALTY_GAIN_TOWN_SECTOR = 4,
GLOBAL_LOYALTY_LOSE_TOWN_SECTOR = 5,
GLOBAL_LOYALTY_LIBERATE_WHOLE_TOWN = 6, -- awarded only the first time it happens
GLOBAL_LOYALTY_ABANDON_MILITIA = 7,
GLOBAL_LOYALTY_GAIN_MINE = 8,
GLOBAL_LOYALTY_LOSE_MINE = 9,
GLOBAL_LOYALTY_GAIN_SAM = 10,
GLOBAL_LOYALTY_LOSE_SAM = 11,
GLOBAL_LOYALTY_QUEEN_BATTLE_WON = 12,
}
function CheckConditionsForTriggeringCreatureQuest( sSectorX, sSectorY, bSectorZ )
local ubValidMines = 0
if ( gameStyle == 0 or enableCrepitus == 0 ) then
return -- No scifi, no creatures...
end
if ( giLairID ) then
return -- Creature quest already begun
end
-- Count the number of "infectible mines" the player occupies
-- SEC_D13
if SectorEnemyControlled ( SECTOR(4,13) ) == false then
ubValidMines = ubValidMines + 1
end
-- SEC_H8
if SectorEnemyControlled ( SECTOR(8,8) ) == false then
ubValidMines = ubValidMines + 1
end
-- SEC_I14
if SectorEnemyControlled ( SECTOR(9,14) ) == false then
ubValidMines = ubValidMines + 1
end
-- SEC_H3
if SectorEnemyControlled ( SECTOR(8,3) ) == false then
ubValidMines = ubValidMines + 1
end
if ( ubValidMines >= 3 ) then
InitCreatureQuest()
end
end
function HandleGlobalLoyaltyEvent( ubEventType, sSectorX, sSectorY, bSectorZ )
local iLoyaltyChange = 0
if ubEventType == EventGlobal.GLOBAL_LOYALTY_BATTLE_WON then
CheckConditionsForTriggeringCreatureQuest( sSectorX, sSectorY, bSectorZ )
iLoyaltyChange = 500
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_QUEEN_BATTLE_WON then
CheckConditionsForTriggeringCreatureQuest( sSectorX, sSectorY, bSectorZ )
iLoyaltyChange = 1000
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_BATTLE_LOST then
iLoyaltyChange = -750
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_ENEMY_KILLED then
iLoyaltyChange = 50
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_NATIVE_KILLED then
-- note that there is special code (much more severe) for murdering civilians in the currently loaded sector.
-- this event is intended more for processing militia casualties, and the like
iLoyaltyChange = -50
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_ABANDON_MILITIA then
-- it doesn't matter how many of them are being abandoned
iLoyaltyChange = -750
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_GAIN_TOWN_SECTOR then
iLoyaltyChange = 500
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_LOSE_TOWN_SECTOR then
iLoyaltyChange = -1000
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_LIBERATE_WHOLE_TOWN then
iLoyaltyChange = 1000
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_GAIN_MINE then
iLoyaltyChange = 1000
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_LOSE_MINE then
iLoyaltyChange = -1500
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_GAIN_SAM then
iLoyaltyChange = 250
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
elseif ubEventType == EventGlobal.GLOBAL_LOYALTY_LOSE_SAM then
iLoyaltyChange = -250
AffectAllTownsLoyaltyByDistanceFrom( iLoyaltyChange, sSectorX, sSectorY, bSectorZ )
end
end
function HandleLoyaltyChangeForNPCAction( ubNPCProfileId )
-- Omerta loyalty increases when Miguel receives letter from Enrico
if ubNPCProfileId == Profil.MIGUEL then
IncrementTownLoyalty ( Town.OMERTA, LOYALTY_BONUS_MIGUEL_READS_LETTER )
end
-- having freed the child labourers... she is releasing them herself!
if ubNPCProfileId == Profil.DOREEN then
IncrementTownLoyalty( Town.DRASSEN, LOYALTY_BONUS_CHILDREN_FREED_DOREEN_SPARED )
end
-- if Joey is still alive
if ubNPCProfileId == Profil.MARTHA then
if ( CheckMercIsDead(Profil.JOEY) == false ) then
IncrementTownLoyalty( Town.CAMBRIA, LOYALTY_BONUS_MARTHA_WHEN_JOEY_RESCUED )
end
end
-- Hillbilly problem solved
if ubNPCProfileId == Profil.KEITH then
IncrementTownLoyalty( Town.CAMBRIA, LOYALTY_BONUS_KEITH_WHEN_HILLBILLY_SOLVED )
end
-- Chalice of Chance returned to Chitzena
if ubNPCProfileId == Profil.YANNI then
IncrementTownLoyalty( Town.CHITZENA, LOYALTY_BONUS_YANNI_WHEN_CHALICE_RETURNED_LOCAL )
-- NOTE: This affects Chitzena,too, a second time, so first value is discounted for it
IncrementTownLoyaltyEverywhere( LOYALTY_BONUS_YANNI_WHEN_CHALICE_RETURNED_GLOBAL )
end
-- Bloodcats killed
if ubNPCProfileId == Profil.AUNTIE then
IncrementTownLoyalty( Town.ALMA, LOYALTY_BONUS_AUNTIE_WHEN_BLOODCATS_KILLED )
end
-- Brother Dynamo freed
if ubNPCProfileId == Profil.MATT then
IncrementTownLoyalty( Town.ALMA, LOYALTY_BONUS_MATT_WHEN_DYNAMO_FREED )
end
end
-362
View File
@@ -1,362 +0,0 @@
--[[
*************
** Remarks **
*************
The purpose of this Lua script is to provide the code and data needed to
initialize the strategic mines. There are two reasons for the game to make
calls to this script:
1. The strategic layer gets initialized.
Right after a new game is started, the program calls InitializeMines to
gather the data defining the mines (see §1.). It then uses that data to
actually create the mines.
2. The player enters a mine sector.
When a mine sector gets loaded (tactical mode), the program calls
InitializeHeadMiners to collect information on creation of head miners
and how to distribute them among the mines (see §2.).
**********************
** Global variables **
**********************
- newDIFFICULTY_LEVEL (Start new game setting)
1 = easy
2 = experienced
3 = expert
4 = insane
- iniWHICH_MINE_SHUTS_DOWN (ja2_options.ini setting)
-1 = Game chooses a mine randomly.
0 = No mine will shut down!
2 = Drassen
3 = Alma
4 = Cambria
5 = Chitzena
6 = Grumm
]]
-- For debugging purposes you might want to have some basic logging output
-- from the game. Uncommenting the following line will create "initmines.log"
-- in your profile directory.
--logging = true
----------------------------------------
-- §0. Some setup code to get started --
----------------------------------------
-- Initialize the pseudo random number generator
math.randomseed( os.time() ); math.random(); math.random(); math.random()
-- http://lua-users.org/wiki/MathLibraryTutorial
MineType = { Silver = 0, Gold = 1 }
-----------------------------
-- §1. Mine initialization --
-----------------------------
--[[
function InitializeMines()
Gets called on initialization of strategic layer.
This function is supposed to return an array table of initialization data
for each mine. Every element itself must be a table consisting of the
following members:
- Location (required)
String, defining the sector to place the mine, e.g. "A10".
- Type
Use MineType.Gold or MineType.Silver (cp. §0.).
- MaxRemovalRate
Amount of income to be gained at each production period ( = 1/4 of
daily income).
- RemainingOreSupply
Total amount of money available to be extracted.
- Infectible (0/1)
Boolean, specifying whether or not a mine can be infected by crepitus.
This is kind of a hack until creature quest becomes externalized.
Do not set this to 1 for mines other than Drassen, Alma, Cambria, Grumm.
- AssociatedUnderground
Array table of strings specifying sector coordinates, e.g. "A10-1".
This relates underground sectors to the mine. In these sectors the game
adds miners working underground, and also uses that information to build
the sector name.
]]
function InitializeMines()
--------------------------------------
-- §1.1. Set up initial mine status --
--------------------------------------
local mines = {
--UB mine--
-- Abandoned mine near Varrez
{
Location = "I13", Type = MineType.Gold,
MinimumProduction = 0,
AssociatedUnderground = { "I13-1", "J13-1", "K14-1", "K15-1", "K15-2", "L15-2", "L15-3" },
},
--[[
-- San Mona
{
Location = "D4", Type = MineType.Gold,
MinimumProduction = 0,
AssociatedUnderground = { "D4-1", "D5-1" },
},
-- Drassen
{
Location = "D13", Type = MineType.Silver,
MinimumProduction = 1000,
AssociatedUnderground = { "D13-1", "E13-1" },
Infectible = 1,
},
-- Alma
{
Location = "I14", Type = MineType.Silver,
MinimumProduction = 1500,
AssociatedUnderground = { "I14-1", "J14-1" },
Infectible = 1,
},
-- Cambria
{
Location = "H8", Type = MineType.Silver,
MinimumProduction = 1500,
AssociatedUnderground = { "H8-1", "H9-1" },
Infectible = 1,
},
-- Chitzena
{
Location = "B2", Type = MineType.Silver,
MinimumProduction = 500,
AssociatedUnderground = { "B2-1" },
},
-- Grumm
{
Location = "H3", Type = MineType.Gold,
MinimumProduction = 2000,
AssociatedUnderground = { "H3-1", "I3-1", "I3-2", "H3-2", "H4-2" },
Infectible = 1,
},
]]
}
-----------------------------------
-- §1.2. Vanilla JA2 logic below --
-----------------------------------
--[[
-- create variables for easy identification at quest related stuff
local DrassenMine = mines[2]
local AlmaMine = mines[3]
-- more initialization
for i = 1, #mines do
local m = mines[i]
m.MaxRemovalRate = m.MinimumProduction
if m.MinimumProduction > 0 then
m.RemainingOreSupply = 999999999
else
m.RemainingOreSupply = 0
end
end
-- Randomize the exact size of each mine. The total production is always
-- the same and depends on the game difficulty, but some mines will
-- produce more in one game than another, while others produce less.
local numProductionIncreases = ({ 25, 25, 20, 15 })[newDIFFICULTY_LEVEL]
while numProductionIncreases > 0 do
local m
-- pick a producing mine at random and increase its production
repeat
m = mines[math.random(#mines)]
until m.MinimumProduction > 0
-- increase mine production by 20% of the base (minimum) rate
m.MaxRemovalRate = m.MaxRemovalRate + m.MinimumProduction / 5
numProductionIncreases = numProductionIncreases - 1
end
-- Incorporate cheat option...
-- switch on iniWHICH_MINE_SHUTS_DOWN
-- 0: no mine runs out, skip this altogether
-- -1: choose mine randomly
-- >0: ID of the mine that shall run out
if iniWHICH_MINE_SHUTS_DOWN ~= 0 then
local m
if iniWHICH_MINE_SHUTS_DOWN == -1 then
-- Choose which mine will run out of production.
-- This will never be the Alma mine or an empty mine (San Mona)...
-- choose randomly
repeat
m = mines[math.random(#mines)]
-- Alma mine can't run out for quest-related reasons
until m.MinimumProduction > 0 and m ~= AlmaMine
else
-- Select mine by given index
-- No safety checks whatsoever, any error will be pretty much in
-- your face. If it breaks it's all their fault, I don't care...
m = mines[iniWHICH_MINE_SHUTS_DOWN]
end
if m == DrassenMine then
minDaysBeforeDepletion = 20
else
minDaysBeforeDepletion = 10
end
m.RemainingOreSupply = minDaysBeforeDepletion * 4 * m.MaxRemovalRate
-- We don't want the creatures to infect the mine that runs out.
m.Infectible = 0
end
]]
return mines;
end -- function InitializeMines
------------------------------------
-- §2. Head miners initialization --
------------------------------------
--[[
function InitializeHeadMiners(mines, currentMine)
This function is called when the player enters a mine sector.
It can return either nil or the head miners initialization and
distribution. If it returns nil, it will be called again when a mine
sector gets loaded. If it returns a value other than nil, it will not be
called again.
Parameters:
- mines
An array of tables featuring only the following member:
- MaxRemovalRate
- currentMine
This is the index of the mine being entered by the player (cp. §1.1.).
If the function does not return nil but the head miners distribution, it
must return an array of tables consisting of the following members:
- Profile
The profile ID of the head miner.
- Quotes
Array of exactly four integers defining the quote IDs of the head miner
for the following strategic events:
1. RUNNING_OUT
2. CREATURES_ATTACK
3. CREATURES_GONE
4. CREATURES_AGAIN
It is valid to insert -1 for missing quotes.
- MineID
The index of the mine the head miner is assigned to (cp. §1.1.).
]]
function InitializeHeadMiners(mines, currentMine)
local headMinerInfo = {
-- Fred
{ Profile = 106, Quotes = { 17, 18, 27, 26 }, },
-- Matt
{ Profile = 148, Quotes = { -1, 18, 32, 31 }, },
-- Oswald
{ Profile = 156, Quotes = { 14, 15, 24, 23 }, },
-- Calvin
{ Profile = 157, Quotes = { 14, 15, 24, 23 }, },
-- Carl
{ Profile = 158, Quotes = { 14, 15, 24, 23 }, },
}
local Fred = headMinerInfo[1]
local Matt = headMinerInfo[2]
local AlmaID = 3 -- cp. §1.1.
-- don't place miners until player enters a producing mine
if mines[currentMine].MaxRemovalRate == 0 then
return nil
end
-- Matt is always head miner in Alma
Matt.MineID = AlmaID
-- Fred is the first miner the player encounters unless it's Alma
if currentMine ~= AlmaID then
Fred.MineID = currentMine
end
-- collect IDs of all producing mines except Alma mine and Fred's
local MinesLeft = {}
for i = 1, #mines do
if i ~= AlmaID and i ~= currentMine then
if mines[i].MaxRemovalRate > 0 then
table.insert(MinesLeft, i)
end
end
end
-- randomly distribute miners
for i = 1, #headMinerInfo do
if headMinerInfo[i].MineID == nil then
local index = math.random(#MinesLeft)
headMinerInfo[i].MineID = MinesLeft[index]
table.remove(MinesLeft, index)
end
end
return headMinerInfo
end -- function InitializeHeadMiners
@@ -1,455 +0,0 @@
--[[
December 27, 2010
TOC
===
Preamble
§0. Constants
§1. Underground sector list compilation
§2. Defining enemy garrisons and creature population
§3. Internal workings
§3.1. Underground sector names
Preamble
========
This script sets up and initializes underground sectors. It defines where
underground sectors are located on the map, what enemy garrisons and
creature population they feature, and what loading screen to present to
the player.
Sector definitions are read whenever a new game starts. They are then
stored within the savegame meaning various changes to this script don't
have an effect on a game in progress.
Modders likely want to focus on §1. and §2.
There is also another script closely related to this one, which defines
sector names ("undergroundsectornames.lua" and localized versions). See
§3.1. for more details.
The game will call this script for any of three reasons:
1. When a new game starts it will call 'BuildUndergroundSectorList' in
order to create and initialize the array of underground sectors.
2. The game will call 'GetLoadscreen' whenever an underground sector
needs to be loaded.
3. When the game requests an underground sector name it will call
'GetSectorName'.
Remarks
- Several vanilla JA2 sectors may be unsafe to remove due to hardcoded
behaviour such as creature spreading, Deidranna escaping or other quest
related links.
- Contrary to random number generators used in JA2, Lua's math.random
function includes the range boundaries. Also, indexing in Lua starts at
1 as opposed to C (starting at 0). For further information about Lua
consult the Lua documentation at http://www.lua.org/docs.html
]]
-- For debugging purposes you might want to have some basic logging output
-- from the game. Uncommenting the following line will create
-- "initunderground.log" in your profile directory.
--logging = true
-- Initialize the pseudo random number generator
math.randomseed( os.time() ); math.random(); math.random(); math.random()
-- http://lua-users.org/wiki/MathLibraryTutorial
-------------------
-- §0. Constants --
-------------------
Habitat = { -- creature type distribution in percentages
-- young young adult adult
-- larvae infants male female male female
QueenLair = 0, -- 20 40 0 0 30 10 (default)
Lair = 1, -- 15 35 10 5 25 10
LairEntrance = 2, -- 0 15 30 10 35 10
InnerMine = 3, -- 0 0 20 40 10 30
OuterMine = 4, -- 0 0 10 65 5 20
FeedingGrounds = 5, -- - - - - - - (unused)
MineExit = 6, -- 0 0 10 65 5 20
}
CreatureMusic = {
Compat = 0, -- default, use creepy music in the presence of creatures
-- or blue lights (default, also vanilla default);
Auto = 1, -- use creepy music if and only if there any creatures
-- present (ignoring lights);
Never = 2, -- do not use creepy music, regardless of any creatures;
Always = 3, -- do use creepy music, regardless of any creatures
}
---------------------------------------------
-- §1. Underground sector list compilation --
---------------------------------------------
--[[
In this list add underground sectors by specifying their location.
If no loadscreen attribute is given the script will use "LS_Mine" for
level 1 sectors and "LS_Cave" for level 2 and level 3 sectors (see §3.).
Also specify any other static attributes in this list (cf. §2.)
]]
local sectorList = {
{ location = "I13-1", loadscreen = "LS_MINEDAY", },
{ location = "J13-1", loadscreen = "LS_MINEDAY", },
{ location = "J14-1", loadscreen = "LS_TUNNELS", },
{ location = "K14-1", loadscreen = "LS_TUNNELS", },
{ location = "K15-1", loadscreen = "LS_UPSTAIRS", },
{ location = "K15-2", loadscreen = "LS_UPSTAIRS", },
{ location = "L15-2", loadscreen = "LS_COMPLEXBSMNT", },
{ location = "L15-3", loadscreen = "LS_BASEMENT_GENERIC", },
-- Demoville
{ location = "P1-1", loadscreen = "LS_Basement", },
{
location = "P1-2", loadscreen = "LS_Cave",
creatureHabitat = Habitat.InnerMine, music = CreatureMusic.Compat,
},
}
--[[
PopulateSectors
Remarks
This function is supposed to initialize sector settings that depend on
what difficulty level and game style the player chooses.
Parameters
difficultyLevel (integer)
Indicates the level of difficulty.
1: easy, 2: experienced, 3: expert, 4: insane
gameStyle (integer)
Indicates whether or not the player selected the scifi option.
0: realistic, 1: scifi
]]
local function PopulateSectors(difficultyLevel, gameStyle)
local s = sectorList
----------------------------------------------------------
-- §2. Defining enemy garrisons and creature population --
----------------------------------------------------------
if difficultyLevel == 1 then
s["K15-1"].numTroops = 14 + math.random(0, 6)
s["K15-1"].numElites = 0
elseif difficultyLevel == 2 then
s["K15-1"].numTroops = 14 + math.random(0, 4)
s["K15-1"].numElites = 4 + math.random(0, 3)
elseif difficultyLevel == 3 then
s["K15-1"].numTroops = 15 + math.random(0, 4)
s["K15-1"].numElites = 6 + math.random(0, 4)
elseif difficultyLevel == 4 then
s["K15-1"].numTroops = 14 + math.random(0, 6)
s["K15-1"].numElites = 10 + math.random(0, 2)
end
if difficultyLevel == 1 then
s["K15-2"].numTroops = 10 + math.random(0, 3)
s["K15-2"].numElites = 0
elseif difficultyLevel == 2 then
s["K15-2"].numTroops = 15 + math.random(0, 2)
s["K15-2"].numElites = 5 + math.random(0, 2)
elseif difficultyLevel == 3 then
s["K15-2"].numTroops = 12 + math.random(0, 3)
s["K15-2"].numElites = 10 + math.random(0, 2)
elseif difficultyLevel == 4 then
s["K15-2"].numTroops = 14 + math.random(0, 6)
s["K15-2"].numElites = 10 + math.random(0, 2)
end
if difficultyLevel == 1 then
s["L15-2"].numTroops = 12 + math.random(0, 2)
s["L15-2"].numElites = 1 + math.random(0, 2)
elseif difficultyLevel == 2 then
s["L15-2"].numTroops = 17 + math.random(0, 2)
s["L15-2"].numElites = 5 + math.random(0, 2)
elseif difficultyLevel == 3 then
s["L15-2"].numTroops = 10 + math.random(0, 3)
s["L15-2"].numElites = 14 + math.random(0, 2)
elseif difficultyLevel == 4 then
s["L15-2"].numTroops = 14 + math.random(0, 6)
s["L15-2"].numElites = 10 + math.random(0, 2)
end
if difficultyLevel == 1 then
s["L15-3"].numTroops = 26
s["L15-3"].numElites = 2
elseif difficultyLevel == 2 then
s["L15-3"].numTroops = 20
s["L15-3"].numElites = 8
elseif difficultyLevel == 3 then
s["L15-3"].numTroops = 13
s["L15-3"].numElites = 15
elseif difficultyLevel == 4 then
s["L15-3"].numTroops = 10
s["L15-3"].numElites = 22
end
end
---------------------------
-- §3. Internal workings --
---------------------------
--[[
BuildUndergroundSectorList
Remarks
This function gets called by the game when a new game starts. It is
supposed to return the initialized list of underground sectors.
Parameters
gameSettings
Table holding these keys:
- difficultyLevel (integer)
1: easy, 2: experienced, 3: expert, 4: insane
- gameStyle (integer)
0: realistic, 1: scifi
Return value
This function shall return a table of tables that may feature the
following keys:
- location (required)
string of the form "[R][C]-[L]", where [R] is a row
identifier (A-P), [C] is a column identifier (1-16), [L] is a
sublevel identifier (1-3), e.g. "A9-1"
- numAdmins
- numTroops
- numElites
integers, specifying numbers of enemy garrisons, default: 0
- numBloodcats
integer, specifying quantity of bloodcat population, default: 0
This requires bloodcat placements to be set in the map itself.
- numCreatures
integer, specifying number of creatures in total, default: 0
Distribution of creature types depends on creature habitat (see §0.)
- creatureHabitat
integer, specifying creature distribution type
Use one of the constants from the Habitat enumeration (see §0.)
- music
integer, specifying under which circumstances to use creepy music
Use one of the costants from CreatureMusic enumeration (see §0.)
]]
function BuildUndergroundSectorList(gameSettings)
local difficultyLevel = gameSettings["difficultyLevel"]
local gameStyle = gameSettings["gameStyle"]
PopulateSectors(difficultyLevel, gameStyle)
return sectorList
end
--[[
GetLoadscreen
Remarks
Provides the game with the name and file format of the loadscreen for a
given sector. The function forwards the loadscreen attribute as declared
in the sectorList (cf. §1.) or uses default screens.
The game will use the name and format as well as screen resolution to
build the complete file name itself.
Parameters
location (string)
The usual sector location string of the sector the loadscreen is
requested for, e.g. "A10-1".
timeOfDay (integer)
The time in minutes that has passed since midnight.
Return values
This function shall return a 2-tuple of strings, of which the first shall
be the loadscreen name and the second the file extension.
]]
function GetLoadscreen(location, timeOfDay)
local function Return(name)
return "Loadscreens\\" .. name, "sti"
end
local s = sectorList[location]
if s ~= nil then
-- multiple screens to choose from?
if s.loadscreens ~= nil and #s.loadscreens > 0 then
local screen = s.loadscreens[math.random(#s.loadscreens)]
return Return(screen)
end
-- single screen?
if s.loadscreen ~= nil then
return Return(s.loadscreen)
end
end
-- resorting to defaults
do
-- get last character, aka z level
local level = location:sub(#location, #location)
if level == "1" then
return Return("LS_Mine")
else
return Return("LS_Cave")
end
end
end
------------------------------------
-- §3.1. Underground sector names --
------------------------------------
--[[
Before the game loads this very script it processes another one,
'undergroundsectornames.lua', specifically. For this purpose, it basically
concatenates the two scripts.
'undergroundsectornames.lua' shall define a table of strings, which will
then be referenced in this script to provide the game with sector names.
That specific table shall be called 'sectornames', so make sure to not
overwrite that variable by accident.
]]
--[[
GetSectorName
Remarks
Provides the game with underground sector names.
This function can be called often (i.e. every frame) since currently the
result will not be cached.
Parameters:
sectorCoods
usual coordiantes string, e.g. "A10-1"
sectorDetails
table featuring the following items
- visited (boolean)
Indicates if the player has entered the sector at least once.
- creaturesPresent (boolean)
Indicates whether or not there are any monsters alive.
- detailed (boolean)
Indicates whether the game requests a detailed name.
Return value
This function shall return the requested sector name as a UTF-8 encoded
string.
]]
function GetSectorName(sectorCoords, sectorDetails)
if sectorDetails.visited then
local dash = sectorCoords:find("-")
local coords = sectorCoords:sub(1, dash-1)
if sectornames[sectorCoords] ~= nil then
return coords .. ": " .. sectornames[sectorCoords]
elseif sectornames[sectorCoords:lower()] ~= nil then
-- try lowercase version
return coords .. ": " .. sectornames[sectorCoords:lower()]
else
if sectorDetails.creaturesPresent then
return coords .. ": " .. sectornames.creatureLair
else
return sectorCoords
end
end
else
-- not visited
return ""
end
end
-- For convenient access allow indexing the sectorList by location string.
mt = {}
setmetatable(sectorList, mt)
mt.__index = function(table, key)
for i = 1, #table do
local t = rawget(table, i)
if (t.location == key) then
return t
end
end
return nil
end
-148
View File
@@ -1,148 +0,0 @@
Video = {
INTRO_NO_VIDEO = -1,
INTRO_REBEL_CRDT = 0,
INTRO_OMERTA = 1,
INTRO_PRAGUE_CRDT = 2,
INTRO_PRAGUE = 3,
-- there are no more videos shown for the begining
INTRO_END_END_SPEECH_MIGUEL = 4,
INTRO_END_END_SPEECH_NO_MIGUEL = 5,
INTRO_END_HELI_FLYBY = 6,
INTRO_END_SKYRIDER_HELICOPTER = 7,
INTRO_END_NOSKYRIDER_HELICOPTER = 8,
INTRO_SPLASH_SCREEN = 9,
INTRO_SPLASH_1 = 10,
INTRO_HELI_CRASH_SCENE_1 =11,
INTRO_END_SCENE_1 = 12,
-- there are no more videos shown for the endgame
INTRO_LAST_END_GAME = 13,
INTRO_FIRST_VIDEO = 255,
}
IntroType = {
INTRO_HELI_CRASH = 0,
INTRO_BEGINNING = 1, -- set when viewing the intro at the begining of the game
INTRO_ENDING = 2, -- set when viewing the end game video.
INTRO_SPLASH = 3,
}
ScreenTypes =
{
EDIT_SCREEN = 0,
SAVING_SCREEN = 1,
LOADING_SCREEN = 2,
ERROR_SCREEN = 3,
INIT_SCREEN = 4,
GAME_SCREEN = 5,
ANIEDIT_SCREEN = 6,
PALEDIT_SCREEN = 7,
DEBUG_SCREEN = 8,
MAP_SCREEN = 9,
LAPTOP_SCREEN = 10,
LOADSAVE_SCREEN = 11,
MAPUTILITY_SCREEN = 12,
FADE_SCREEN = 13,
MSG_BOX_SCREEN = 14,
MAINMENU_SCREEN = 15,
AUTORESOLVE_SCREEN = 16,
SAVE_LOAD_SCREEN = 17,
OPTIONS_SCREEN = 18,
SHOPKEEPER_SCREEN = 19,
SEX_SCREEN = 20,
GAME_INIT_OPTIONS_SCREEN = 21,
DEMO_EXIT_SCREEN = 22,
INTRO_SCREEN = 23,
CREDIT_SCREEN = 24,
}
function PrepareToExitIntroScreen()
-- Ja25: no begining intro
-- if its the heli crash intro
if ( gbIntroScreenMode == IntroType.INTRO_HELI_CRASH ) then
-- go to the init screen
-- Ja25: no longer going to initscreen ( cause this is now AFTER mapscreen )
SetIntroExitScreen ( ScreenTypes.GAME_SCREEN )
SetCurrentWorldSector( sSelMapX, sSelMapY, iCurrentMapSectorZ )
-- if its the intro at the begining of the game
elseif ( gbIntroScreenMode == IntroType.INTRO_SPLASH ) then
-- display a logo when exiting
DisplaySirtechSplashScreen()
SetDoneWithSplashScreen ( true )
SetIntroExitScreen ( ScreenTypes.INIT_SCREEN )
elseif ( gbIntroScreenMode == IntroType.INTRO_ENDING ) then
SetIntroExitScreen ( ScreenTypes.GAME_SCREEN )
SetCurrentWorldSector( iniDEFAULT_END_SECTOR_X, iniDEFAULT_END_SECTOR_Y, iniDEFAULT_END_SECTOR_Z )
EnterTacticalInFinalSector()
-- Dont leave tactical
SetEnteringMapScreen (false)
else
-- We want to reinitialize the game
ReStartingGame()
SetIntroExitScreen ( ScreenTypes.CREDIT_SCREEN )
end
SetIntroScreenExit (true)
end
function GetNextIntroVideo( uiCurrentVideo )
-- UB Intro
-- switch on whether it is the beginging or the end game video
if ( gbIntroScreenMode == IntroType.INTRO_HELI_CRASH ) then
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
SetVideo ( Video.INTRO_HELI_CRASH_SCENE_1 )
StopVideo()
end
-- end game
elseif ( gbIntroScreenMode == IntroType.INTRO_ENDING ) then
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
SetVideo ( Video.INTRO_END_SCENE_1 )
StopVideo()
end
elseif ( gbIntroScreenMode == IntroType.INTRO_SPLASH ) then
if ( uiCurrentVideo == Video.INTRO_FIRST_VIDEO ) then
StartVideo()
SetVideo ( Video.INTRO_SPLASH_SCREEN )
StopVideo()
end
end
end
function SetIntroType( bIntroType )
-- UB Intro
if( bIntroType == IntroType.INTRO_HELI_CRASH ) then
SetIntroScreenMode ( IntroType.INTRO_HELI_CRASH )
elseif( bIntroType == IntroType.INTRO_ENDING ) then
SetIntroScreenMode ( IntroType.INTRO_ENDING )
elseif( bIntroType == IntroType.INTRO_SPLASH ) then
SetIntroScreenMode ( IntroType.INTRO_SPLASH )
end
end
-247
View File
@@ -1,247 +0,0 @@
--[[
Global:
guiNumWorldItems
]]
Items = {
MONEY = 219,
}
SectorY = {
MAP_ROW_A = 1,
MAP_ROW_B = 2,
MAP_ROW_C = 3,
MAP_ROW_D = 4,
MAP_ROW_E = 5,
MAP_ROW_F = 6,
MAP_ROW_G = 7,
MAP_ROW_H = 8,
MAP_ROW_I = 9,
MAP_ROW_J = 10,
MAP_ROW_K = 11,
MAP_ROW_L = 12,
MAP_ROW_M = 13,
MAP_ROW_N = 14,
MAP_ROW_O = 15,
MAP_ROW_P = 16,
}
EventTypes = {
EVENT_SET_BY_NPC_SYSTEM = 27,
}
qStatus = {
QUESTNOTSTARTED =0,
QUESTINPROGRESS = 1,
QUESTDONE = 2,
}
Quests = {
QUEST_DELIVER_LETTER = 0,
QUEST_FOOD_ROUTE = 1,
QUEST_KILL_TERRORISTS = 2,
QUEST_KINGPIN_IDOL = 3,
QUEST_KINGPIN_MONEY = 4,
QUEST_RUNAWAY_JOEY = 5,
QUEST_RESCUE_MARIA = 6,
QUEST_CHITZENA_IDOL = 7,
QUEST_HELD_IN_ALMA = 8,
QUEST_INTERROGATION = 9,
QUEST_ARMY_FARM = 10,
QUEST_FIND_SCIENTIST = 11,
QUEST_DELIVER_VIDEO_CAMERA = 12,
QUEST_BLOODCATS = 13,
QUEST_FIND_HERMIT = 14,
QUEST_CREATURES = 15,
QUEST_CHOPPER_PILOT = 16,
QUEST_ESCORT_SKYRIDER = 17,
QUEST_FREE_DYNAMO = 18,
QUEST_ESCORT_TOURISTS = 19,
QUEST_FREE_CHILDREN = 20,
QUEST_LEATHER_SHOP_DREAM = 21,
-- QUEST_KILL_DEIDRANNA = 25, -- JA2
-- UB Quests
QUEST_DESTROY_MISSLES = 23,
QUEST_FIX_LAPTOP = 24,
QUEST_GET_RID_BLOODCATS_AT_BETTYS = 25,
QUEST_FIND_ANTIQUE_MUSKET_FOR_RAUL = 26,
}
Facts = {
FACT_MUSEUM_ALARM_WENT_OFF = 278,
FACT_KINGPIN_KNOWS_MONEY_GONE = 103,
FACT_KINGPIN_DEAD = 308,
FACT_ALL_TERRORISTS_KILLED = 156,
}
local KINGPIN_MONEY_SECTOR_X = 5
local KINGPIN_MONEY_SECTOR_Y = 4 -- MAP_ROW_D
local KINGPIN_MONEY_SECTOR_Z = 1
local HOSPITAL_SECTOR_X = 8
local HOSPITAL_SECTOR_Y = 6 -- MAP_ROW_F
local HOSPITAL_SECTOR_Z = 0
History = {
HISTORY_ENTERED_HISTORY_MODE = 0,
HISTORY_HIRED_MERC_FROM_AIM = 1,
HISTORY_HIRED_MERC_FROM_MERC = 2,
HISTORY_MERC_KILLED = 3,
HISTORY_SETTLED_ACCOUNTS_AT_MERC = 4,
HISTORY_ACCEPTED_ASSIGNMENT_FROM_ENRICO = 5,
HISTORY_CHARACTER_GENERATED = 6,
HISTORY_PURCHASED_INSURANCE = 7,
HISTORY_CANCELLED_INSURANCE = 8,
HISTORY_INSURANCE_CLAIM_PAYOUT = 9,
HISTORY_EXTENDED_CONTRACT_1_DAY = 10,
HISTORY_EXTENDED_CONTRACT_1_WEEK = 11,
HISTORY_EXTENDED_CONTRACT_2_WEEK = 12,
HISTORY_MERC_FIRED = 13,
HISTORY_MERC_QUIT = 14,
HISTORY_QUEST_STARTED = 15,
HISTORY_QUEST_FINISHED = 16,
HISTORY_TALKED_TO_MINER = 17,
HISTORY_LIBERATED_TOWN = 18,
HISTORY_CHEAT_ENABLED = 19,
HISTORY_TALKED_TO_FATHER_WALKER = 20,
HISTORY_MERC_MARRIED_OFF = 21,
HISTORY_MERC_CONTRACT_EXPIRED = 22,
HISTORY_RPC_JOINED_TEAM = 23,
HISTORY_ENRICO_COMPLAINED = 24,
HISTORY_WONBATTLE = 25,
HISTORY_MINE_RUNNING_OUT = 26,
HISTORY_MINE_RAN_OUT = 27,
HISTORY_MINE_SHUTDOWN = 28,
HISTORY_MINE_REOPENED = 29,
HISTORY_DISCOVERED_TIXA = 30,
HISTORY_DISCOVERED_ORTA = 31,
HISTORY_GOT_ROCKET_RIFLES = 32,
HISTORY_DEIDRANNA_DEAD_BODIES = 33,
HISTORY_BOXING_MATCHES = 34,
HISTORY_SOMETHING_IN_MINES = 35,
HISTORY_DEVIN = 36,
HISTORY_MIKE = 37,
HISTORY_TONY = 38,
HISTORY_KROTT = 39,
HISTORY_KYLE = 40,
HISTORY_MADLAB = 41,
HISTORY_GABBY = 42,
HISTORY_KEITH_OUT_OF_BUSINESS = 43,
HISTORY_HOWARD_CYANIDE = 44,
HISTORY_KEITH = 45,
HISTORY_HOWARD = 46,
HISTORY_PERKO = 47,
HISTORY_SAM = 48,
HISTORY_FRANZ = 49,
HISTORY_ARNOLD = 50,
HISTORY_FREDO = 51,
HISTORY_RICHGUY_BALIME = 52,
HISTORY_JAKE = 53,
HISTORY_BUM_KEYCARD = 54,
HISTORY_WALTER = 55,
HISTORY_DAVE = 56,
HISTORY_PABLO = 57,
HISTORY_KINGPIN_MONEY = 58,
HISTORY_WON_BOXING = 59,
HISTORY_LOST_BOXING = 60,
HISTORY_DISQUALIFIED_BOXING = 61,
HISTORY_FOUND_MONEY = 62,
HISTORY_ASSASSIN = 63,
HISTORY_LOSTTOWNSECTOR = 64,
HISTORY_DEFENDEDTOWNSECTOR = 65,
HISTORY_LOSTBATTLE = 66,
HISTORY_FATALAMBUSH = 67,
HISTORY_WIPEDOUTENEMYAMBUSH = 68,
HISTORY_UNSUCCESSFULATTACK = 69,
HISTORY_SUCCESSFULATTACK = 70,
HISTORY_CREATURESATTACKED = 71,
HISTORY_KILLEDBYBLOODCATS = 72,
HISTORY_SLAUGHTEREDBLOODCATS = 73,
HISTORY_NPC_KILLED = 74,
HISTORY_GAVE_CARMEN_HEAD = 75,
HISTORY_SLAY_MYSTERIOUSLY_LEFT = 76,
HISTORY_MERC_KILLED_CHARACTER = 77,
}
function HandleQuestCodeOnSectorEntry( sNewSectorX, sNewSectorY, bNewSectorZ )
end
function HandleQuestCodeOnSectorExit( sOldSectorX, sOldSectorY, bOldSectorZ )
local pSoldier
-- JA2
--[[
if ( sOldSectorX == KINGPIN_MONEY_SECTOR_X and sOldSectorY == KINGPIN_MONEY_SECTOR_Y and bOldSectorZ == KINGPIN_MONEY_SECTOR_Z ) then
CheckForKingpinsMoneyMissing( true )
end
if ( sOldSectorX == 13 and sOldSectorY == SectorY.MAP_ROW_H and bOldSectorZ == 0 and CheckFact( Facts.FACT_CONRAD_SHOULD_GO,0 ) == true) then
-- remove Conrad from the map
SetCharacterSectorX(Profil.CONRAD, 0)
SetCharacterSectorY(Profil.CONRAD, 0)
end
if ( sOldSectorX == HOSPITAL_SECTOR_X and sOldSectorY == HOSPITAL_SECTOR_Y and bOldSectorZ == HOSPITAL_SECTOR_Z ) then
CheckForMissingHospitalSupplies()
end
-- reset the state of the museum alarm for Eldin's quotes
SetFactFalse( Facts.FACT_MUSEUM_ALARM_WENT_OFF )
]]
-- UB
if ( sOldSectorX == 7 and sOldSectorY == SectorY.MAP_ROW_H and bOldSectorZ == 0 ) then
-- remove Jerry from the map
SetCharacterSectorX( 76, 0)
SetCharacterSectorY( 76, 0)
end
-- if the player is leaving a sector with Tex in it
if ( sOldSectorX == CheckCharacterSectorX(64) and sOldSectorY == CheckCharacterSectorY(64) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 64 ) > 0 ) then
pSoldier = FindSoldierByProfileID( 64 ) -- TEX
-- if the npc isnt on the players team AND the player has never spoken to them
if ( pSoldier == nil and CheckLastDateSpokenTot( 64 ) > 0 ) then
--remove Tex from the map
SetCharacterSectorX( 64, 0)
SetCharacterSectorY( 64, 0)
end
end
-- if the player is leaving a sector with John kulba in it
if ( sOldSectorX == CheckCharacterSectorX(62) and sOldSectorY == CheckCharacterSectorY(62) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 62 ) > 0 ) then
pSoldier = FindSoldierByProfileID( 62 ) -- John
-- if the npc isnt on the players team AND the player has never spoken to them
if ( pSoldier == nil and CheckLastDateSpokenTot( 62 ) > 0 ) then
--remove Tex from the map
SetCharacterSectorX( 62, 0)
SetCharacterSectorY( 62, 0)
end
end
-- if the player is leaving a sector with Manuel in it
if ( sOldSectorX == CheckCharacterSectorX(60) and sOldSectorY == CheckCharacterSectorY(60) and bOldSectorZ == 0 and CheckLastDateSpokenTot( 60 ) > 0 ) then
pSoldier = FindSoldierByProfileID( 60 ) -- John
-- if the npc isnt on the players team AND the player has never spoken to them
if ( pSoldier == nil and CheckLastDateSpokenTot( 60 ) > 0 ) then
--remove Tex from the map
SetCharacterSectorX( 60, 0)
SetCharacterSectorY( 60, 0)
end
end
end
@@ -1,31 +0,0 @@
--[[
This file (or its localized versions respectively) are included in
"initunderground.lua" to provide the underground sector names.
Make sure to save this file as UTF-8, preferably with BOM signature in
order to help editors to not mess up the encoding. Also make sure to not
save BOM in any other script unless it explicitly allows that.
]]
sectornames = {
["I13-1"] = "unknown",
["J13-1"] = "Abandoned Mine",
["J14-1"] = "unknown",
["K14-1"] = "Tunnel",
["K15-1"] = "Complex",
["K15-2"] = "Complex",
["L15-2"] = "Complex",
["L15-3"] = "Complex",
creatureLair = "Creature Lair",
}
-710
View File
@@ -1,710 +0,0 @@
; ;
; ***** *** * * ***** *** ;
; * * * * * * * * ;
; * *** * * * * *** ;
; * * * ***** * * * ;
; * * * * * * * *** ;
; ;
;*********************************;
[Generic Traits Settings]
;******************************************************************************************************************************
; !IMPORTANT! - all following settings only work in games, where "New Trait System" was chosen.
;------------------------------------------------------------------------------------------------------------------------------
;******************************************************************************************************************************
; Maximum number of Skill Traits available for player mercs. (Enemies and militia have always 2-3 traits max.)
; Values from 2 to 30 are allowed.
; WARNING: MAX_NUMBER_OF_TRAITS must be higher than NUMBER_OF_MAJOR_TRAITS_ALLOWED at least by 1.
;------------------------------------------------------------------------------------------------------------------------------
MAX_NUMBER_OF_TRAITS = 3
; Number of Major Trait slots allowed for player mercs.
; Values from 2 to 20 are allowed.
NUMBER_OF_MAJOR_TRAITS_ALLOWED = 2
; Allow Dr.Q to have one more trait? (giving him Martial Arts + Paramedic + Night Ops)
ALLOW_EXCEPTION_FOR_DR_Q = TRUE
; Do traits set minimum attributes when selected?
SET_MINIMUM_ATTRIBUTES_FOR_TRAITS = TRUE
;******************************************************************************************************************************
; The following modifiers simply affects relevant weapons CtH (or dodging)
; keep in mind that all of this can be compensated through skill traits
;------------------------------------------------------------------------------------------------------------------------------
ASSAULT_RIFLES_CTH_MODIFIER = -5
SNIPER_RIFLES_CTH_MODIFIER = -10
RIFLES_CTH_MODIFIER = -5
SMGS_CTH_MODIFIER = -5
LMGS_CTH_MODIFIER = -10
SHOTGUNS_CTH_MODIFIER = -5
PISTOLS_CTH_MODIFIER = -5
MACHINE_PISTOLS_CTH_MODIFIER = -5
ROCKET_LAUNCHERS_CTH_MODIFIER = -25
GRENADE_LAUNCHERS_CTH_MODIFIER = -25
MORTAR_CTH_MODIFIER = -60
THROWING_KNIVES_CTH_MODIFIER = -15
THROWING_GRENADES_CTH_MODIFIER = -10
HTH_ATTACK_CTH_MODIFIER = -15
CHANCE_TO_DODGE_HTH_MODIFIER = -10
KNIFE_ATTACK_CTH_MODIFIER = -10
CHANCE_TO_DODGE_KNIFE_MODIFIER = -10
;******************************************************************************************************************************
; basic modifier to robot's CtH (technicians can compensate this)
;------------------------------------------------------------------------------------------------------------------------------
ROBOT_CTH_MODIFIER = -10
;******************************************************************************************************************************
; CtH penalty to both shots if firing two weapons
;------------------------------------------------------------------------------------------------------------------------------
DUAL_SHOT_CTH_PENALTY = 25
;******************************************************************************************************************************
; The following affects how much stamina is lost for relevant close combat attacks
; (zero is normal, minus means less breath lost than normal), keep in mind that
; martial arts can compensate this
;------------------------------------------------------------------------------------------------------------------------------
PERCENT_BREATH_LOSS_ON_HTH_ATTACK_MODIFIER = -10
PERCENT_BREATH_LOSS_ON_KNIFE_ATTACK_MODIFIER = -25
PERCENT_BREATH_LOSS_ON_BLUNT_MELEE_ATTACK_MODIFIER = -20
;******************************************************************************************************************************
; this controls how many APs the aimed punches or knife-stabs cost
; The modifier presents a number multiplied by basic aim-click AP cost (usually 4) added
; to the original punch/stab APs.
; So "3" set here means +12 APs on top of basic punch/stab APs.
;------------------------------------------------------------------------------------------------------------------------------
MODIFIER_FOR_APS_ADDED_ON_AIMED_HTH_ATTACKS = 3
MODIFIER_FOR_APS_ADDED_ON_AIMED_BLADE_ATTACKS = 3
;******************************************************************************************************************************
; decreases/increases effectiveness of certain assignments (compensated by some traits)
; negative value makes the assignment harder and vice versa
;------------------------------------------------------------------------------------------------------------------------------
DOCTORING_SPEED_MODIFIER = -25
BANDAGING_SPEED_MODIFIER = -25
REPAIRING_SPEED_MODIFIER = -25
TRAIN_MILITIA_MODIFIER = -10
TEACHING_OTHERS_MODIFIER = -15
LOCKPICKING_CHECK_MODIFIER = -10
;******************************************************************************************************************************
; Modifiers for certain skill checks, negative values make the check harder
;------------------------------------------------------------------------------------------------------------------------------
ATTACHING_DETONATORS_CHECK_MODIFIER = -15
SET_EXPLOSIVES_CHECK_MODIFIER = -15
DISARM_EXPLOSIVE_TRAPS_CHECK_MODIFIER = -15
DISARM_ELECTRONIC_TRAPS_CHECK_MODIFIER = -15
ATTACH_SPECIAL_ITEMS_CHECK_MODIFIER = -15
;******************************************************************************************************************************
; Damage resistance of tanks can be changed here, zero means normal, it is set to 40 by default
; to make Heavy Weapons trait more useful
;------------------------------------------------------------------------------------------------------------------------------
TANKS_DAMAGE_RESISTANCE_MODIFIER = 40
;******************************************************************************************************************************
; This is the minimum damage a soldier can receive for stat loss to occur.
; The chance to loose any stat is also measured by this.
; Normally this was 30, we set it to half by default in STOMP, because we can repair stats now with doctor trait
;------------------------------------------------------------------------------------------------------------------------------
DAMAGE_NEEDED_TO_LOSE_STATS = 15
;******************************************************************************************************************************
;******************************************************************************************************************************
[Auto Weapons]
; Percentage APs reduction needed to fire LMGs on burst or autofire modes
FIRING_SPEED_BONUS_LMGS = 10
; CtH bonuses for specialization
BONUS_CTH_ASSAULT_RIFLES = 5
BONUS_CTH_SMGS = 5
BONUS_CTH_LMGS = 5
; Percentage reduction of auto fire penalty
AUTOFIRE_PENALTY_REDUCTION = 30
; Increased autofire control
; (in Ja2 1.13 this was 2, but better keep it around 4)
UNWANTED_BULLETS_REDUCTION = 5
; Percentage reduction for APs needed to ready/raise LMGs
PERCENT_AP_READY_LMG_REDUCTION = 10
;******************************************************************************************************************************
;******************************************************************************************************************************
[Heavy Weapons]
; Increased speed by percentage when firing
GRENADE_LAUNCHERS_FIRE_AP_REDUCTION = 20
ROCKET_LAUNCHERS_FIRE_AP_REDUCTION = 20
; CtH bonuses
BONUS_CTH_GRENADE_LAUNCHERS = 25
BONUS_CTH_ROCKET_LAUNCHERS = 25
; Percentage APs reduction needed to fire mortar
MORTAR_FIRE_AP_REDUCTION = 10
; Mortar CtH penalty percentage adjustment
MORTAR_CTH_PENALTY_REDUCTION = 50
; Damage to tanks increased by percentage
DAMAGE_TO_TANKS_PERCENT_BONUS = 30
; General damage except tanks increased by percentage
HW_DAMAGE_PERCENT_BONUS = 15
;******************************************************************************************************************************
;******************************************************************************************************************************
[Sniper]
; CtH bonus for specialization
BONUS_CTH_RIFLES = 5
BONUS_CTH_SNIPER_RIFLES = 10
; Reduced effective range to target for aim calculations
EFFECTIVE_RANGE_TO_TARGET_REDUCTION = 5
; Bonus to CtH per click for rifles
AIMING_BONUS_PER_CLICK_RIFLES = 10
; These two determines damage bonus beyond certain number of clicks. The second value means
; from which click included the damage bonus applies, can be also set to zero meaning you gain
; the bonus even without aiming
GUN_DAMAGE_BONUS_PER_CLICK = 5
GUN_DAMAGE_BONUS_FROM_NUM_CLICKS = 3
; Percentage bonus to speed when chambering new round in bolt action rifles
CHAMBER_ROUND_APS_REDUCTION = 25
; Bonus aim clicks for rifles (you should keep dynamic aiming
; ON for this to make sense)
POSSIBLE_AIM_CLICK_ADDED_RIFLES = 1
;******************************************************************************************************************************
;******************************************************************************************************************************
[Ranger]
; CtH bonus for specialization
BONUS_CTH_RIFLES = 5
BONUS_CTH_SHOTGUNS = 10
; Percentage APs reduction needed to pump shotguns
PUMP_SHOTGUNS_APS_REDUCTION = 25
; Strategic map travel speed increased by a percentage if a ranger is present in group
GROUP_TIME_SPENT_FOR_TRAVELLING_BY_FOOT_REDUCTION = 20
GROUP_TIME_SPENT_FOR_TRAVELLING_IN_VEHICLE_REDUCTION = 10
; Maximum of above travel time bonuses that can be stacked for one group (1 Hunter = 1 bonus, 1 Ranger = 2 bonuses,
; 1 Ranger + 1 Hunter = 3 bonuses etc.)
MAX_STACKABLE_LESS_TRAVEL_TIME_BONUSES = 2
; Percentage reduction of stamina burn when travelling
; (This only applies for ranger himself.)
ENERGY_SPENT_TRAVEL_REDUCTION = 35
; Percentage of weather penalties reduced
WEATHER_PENALTIES_REDUCTION = 25
; Percentage of ranger camouflage effectiveness increased
; <Not Used By Now!>
;CAMO_EFFECTIVENESS_BONUS_PERCENT = 10
; Camouflage wear out percentage speed reduction
CAMO_WORNOUT_SPEED_REDUCTION = 50
;******************************************************************************************************************************
;******************************************************************************************************************************
[Gunslinger]
; CtH bonus for specialization
BONUS_CTH_PISTOLS = 10
BONUS_CTH_MACHINE_PISTOLS = 5
; If this is true, the above bonus to CtH for machine pistols only applies on single shots
CTH_MP_EXCLUDE_AUTOFIRE = TRUE
; Bonus to CtH per click with pistols and machine pistols
AIMING_BONUS_PER_CLICK_HANDGUNS = 5
; Percentage APs reduction needed to fire pistols and revolvers
; You should consider that "15" means that expert gunslinger has the same bonus to firing
; speed as if you would place reflex sights on your gun. While no pistols are allowed to mount
; reflex sights, this gives them at least some compensation
FIRING_SPEED_BONUS_PISTOLS = 15
; Percentage bonus to pistols range
; (Well, this bonus can look weird, I know..)
FEFFECTIVE_RANGE_BONUS_PISTOLS = 10
; Percentage APs reduction needed to ready/raise pistols and revolvers
PERCENT_AP_READY_PISTOLS_REDUCTION = 15
; Percentage APs reduction needed to reload pistols and such
RELOAD_SPEED_HANDGUNS_BONUS = 25
; This option increases possible aiming clicks for handguns (you should keep dynamic aiming
; restriction ON for this to make sense)
POSSIBLE_AIM_CLICK_ADDED_HANDGUNS = 1
;******************************************************************************************************************************
;******************************************************************************************************************************
[Martial Arts]
; Percentage APs reduction needed for a HtH attack.
; Doesn't work if you have weapon in your hands such as nunchaku/baton. Only brass knuckles
; are allowed for this.
PUNCH_APS_REDUCTION = 15
; CtH bonus for specialization with bare hands
BONUS_CTH_BARE_HANDS = 30
; CtH bonus for specialization with brass knuckles
BONUS_CTH_KNUCKLES = 25
; Percent bonus to HtH damage
BONUS_HTH_DAMAGE = 30
; Percentage bonus to target's energy loss due to your HtH attacks
BONUS_HTH_BREATH_DAMAGE = 15
; This option controls how long it takes the enemy before they start to regain their lost energy
; when hit by your martial artist. "100" means they are knocked out and the enemy can stay down even 12
; turns before getting up.
LOST_BREATH_REGAIN_PENALTY = 100
; Percentage bonus to damage dealt with aimed punches or spinning kicks
AIMED_PUNCH_DAMAGE_BONUS = 75
; CtH bonus with aimed punches or spinning kicks.
; Right now, the CtH bonus with aimed punch for anyone is +20%, you can however modify that
; for martial artists here as you like. (I would prefer to make it slightly lesser accurate to
; compensate the huge damage it deals.)
AIMED_PUNCH_CTH_MODIFIER = 0
; Bonus chance to dodge HtH attacks no matter what you're carrying in your hands
BONUS_CHANCE_TO_DODGE_HTH = 30
; Extra chance to dodge if bare handed
ONTOP_BONUS_CTD_HTH_WITH_BARE_HANDS = 5
; Extra chance to dodge if wielding brass knuckles
ONTOP_BONUS_CTD_HTH_WITH_KNUCKLES = 0
; Extra chance to dodge blades and blunt melee weapons
BONUS_CHANCE_TO_DODGE_MELEE = 20
; Percentage APs reduction when grabbing enemy weapons from their hands
APS_TO_STEAL_WEAPON_REDUCTION = 25
; Percentage APs reduction needed to crouch, go prone, and stand up
APS_CHANGE_STANCE_REDUCTION = 25
; Percentage APs reduction needed to turn around
APS_TURN_AROUND_REDUCTION = 25
; Percentage APs reduction needed to climb on/off roofs and jump fences
APS_CLIMB_OR_JUMP_REDUCTION = 25
; Chance to be interrupted by enemies when moving (only applyable when using Improved Interrupt System)
REDUCED_CHANCE_TO_BE_INTERRUPTED_WHEN_MOVING = 35
; Extra chance to knock open doors
CHANCE_KICK_DOORS_BONUS = 25
; If set to true, you may gain fancy martial arts animations only if chosen "Martial Arts" as both major traits
PERMIT_EXTRA_ANIMATIONS_TO_EXPERT_MARTIAL_ARTS_ONLY = TRUE
;******************************************************************************************************************************
;******************************************************************************************************************************
[Squadleader]
; Determines the proximity mercs have to be in order to receive bonuses from the squadleader (in tiles)
BONUSES_RADIUS_NORMAL = 10
; If both squadleader and the soldier wear extended ears(or similar devices), the proximity is increased to this value tiles
BONUSES_RADIUS_EXTENDED_EAR = 20
; Max number of active bonuses from squadleaders/deputies for a single soldier
MAX_STACKABLE_BONUSES = 3
; Percentage bonus for mercs' max APS in squadleader's vicinity
BONUS_APS_PERCENT_IN_RADIUS = 5
; Bonus to XP level for mercs in squadleader's vicinity
EFFECTIVE_LEVEL_OF_OTHERS_IN_RADIUS = 1
; Effective level value of squadleader is increased by this value when acting as "psychic support" for suppression tolerance of nearby soldiers
; The option "NEARBY_FRIENDLIES_AFFECT_TOLERANCE" must be set TRUE for this to work (in JA2_Options.ini)
EFFECTIVE_LEVEL_AS_STANDBY = 1
; Bonus to the ability to trigger collective interrupts (works with Improved Interrupt System only)
TRIGGER_COLLECTIVE_INTERRUPTS_BONUS = 20
; Bonus to suppression tolerance for the squadleader and teammates in his vicinity
OVERALL_SUPRESSION_BONUS_PERCENT = 20
; Bonus to morale gain for mercs in vicinity
MORALE_GAIN_BONUS = 1
; Morale goes down slower if squadleader is in vicinity
MORALE_LOSS_REDUCTION = 1
; Squadleader's resistance to fear percentage
SL_FEAR_RESISTANCE = 50
; Multiplier effecting morale loss in case of squadleader's death
SL_DEATH_MORALE_LOSS_MULTIPLIER = 1
;******************************************************************************************************************************
;******************************************************************************************************************************
[Technician]
; Percentage bonus to repair speed
REPAIR_SPEED_BONUS_PERCENT = 25
; Percentage bonus to lockpicking including electronic locks
LOCKPICKING_BONUS = 30
; Percentage bonus to disarming electronic traps
DISARMING_ELECTRONIC_TRAPS_BONUS = 40
; Percentage bonus to attaching and merging items
COMBINING_ITEMS_BONUS = 40
; Percentage bonus to unjamming weapons
UNJAMMING_GUN_BONUS = 20
; Penalty to repair speed of electronics is reduced by this percentage
REPAIR_ELECTRONICS_PENALTY_REDUCTION = 50
; Increases the chance to find hidden traps and mines
EFFECTIVE_LEVEL_TO_FIND_TRAPS_BONUS = 2
; Bonus CtH when controlling the robot
ROBOT_CTH_BONUS = 10
; Repairing speed of the robot is penalized, but this number reduces percentually this penalty
REPAIR_SPEED_ROBOT_PENALTY_REDUCTION = 33
; How many technician traits are needed to be able to repair the robot. (0 = everyone can repair it; 1 = technicians and engineers; 2 = engineers only)
NUMBER_TRAITS_TO_BE_ABLE_TO_REPAIR_THE_ROBOT = 1
;******************************************************************************************************************************
;******************************************************************************************************************************
[Doctor]
; How many doctor traits are needed to be able to perform surgery.
; Value can be 0, 1 or 2 :
; 0 - Everyone can do a surgery, but can only heal BASE_PERCENT_SURGERY_HEAL percent of lost health
; 1 - Only Paramedics and doctors can perform the surgery
; 2 - Only Doctors can perform the surgery
NUMBER_OF_TRAITS_NEEDED_FOR_SURGERY = 1
; How many life can be restored by surgery from every wound is based on these two values.
; The percent health healable is : ( base_percent_surgery_heal + <num of doctor traits merc has> * ontop_percent_surgery_heal_per_trait )
BASE_PERCENT_SURGERY_HEAL = 10
ONTOP_PERCENT_SURGERY_HEAL_PER_TRAIT = 20
; Determines the percentage of medical supplies are used for surgery
MEDICAL_BAG_CONSUMPTION_BY_SURGERY = 100
; Pacients stamina points lost per percents of life point healed
MAX_ENERGY_LOSS_FOR_LIFE_HEALED = 100
; The speed rateof stat repairing is : ( repair_stats_rate_basic + <num of doctor traits merc has> * repair_stats_rate_ontop )
; (With values 20 and 40, this means that paramedic has a rate of 60, Doctor a rate of 100.)
REPAIR_STATS_RATE_BASIC = 20
REPAIR_STATS_RATE_ONTOP = 40
; Percentage reduction of repairing lost stats speed if healing health at the same time
REPAIR_STATS_RATE_REDUCTION_IF_ALSO_HEALING = 50
; Percentage reduction of healing health speed if repairing lost stats at the same time
HEALING_RATE_REDUCTION_IF_ALSO_REPAIRING_STATS = 50
; Display message about regaining stats
SHOW_MESSAGE_ABOUT_STATS_REGAINED = TRUE
; Percentage bonus to doctor assignment effectiveness
DOCTOR_ASSIGNMENT_BONUS_PERCENT = 25
; Percentage bonus to bandaging speed
BANDAGING_SPEED_PERCENT = 30
; Percentage bonus to natural regeneration speed for other mercs in the same sector
NATURAL_REGENERATION_IN_SECTOR_BONUS = 10
; Max stackable Paramedic(Doctor is counted for two) traits for regeneration of nearby mercs
MAX_NATURAL_REGEN_BONUSES = 4
;******************************************************************************************************************************
;******************************************************************************************************************************
[Ambidextrous]
; CtH penalty when dual shooting is reduced by this many percents
PENALTY_TO_SHOOT_DOUBLE_GUNS_REDUCTION = 100
; Percentage bonus to reload speed for all magazine weapons
RELOAD_SPEED_WITH_MAGAZINE_BONUS = 20
; Percentage bonus to reload speed for all loose rounds weapons
RELOAD_SPEED_WITH_LOOSE_ROUNDS_BONUS = 33
; Percentage bonus to item pickup speed
PICK_ITEM_AP_REDUCTION = 33
; Percentage bonus to speed when using a backpack
WORK_BACKPACK_AP_REDUCTION = 33
; Percentage bonus to speed when handling doors
HANDLE_DOORS_AP_REDUCTION = 33
; Percentage bonus to speed when using bombs
HANDLE_BOMBS_AP_REDUCTION = 33
; Percentage bonus to speed when merging items
ATTACH_ITEMS_AP_REDUCTION = 33
;******************************************************************************************************************************
;******************************************************************************************************************************
[Melee]
; Percentage bonus to speed when using blades
BLADE_ATTACK_APS_REDUCTION = 20
; CtH bonus when using blades
CTH_BLADES_BONUS = 35
; CtH bonus when using blunt weapons (except brass knuckles)
CTH_BLUNT_WEAPONS_BONUS = 25
; Percentage bonus to damage when using all blades
DAMAGE_BONUS_BLADES = 30
; Percentage bonus to damage when using blunt weapons (except brass knuckles)
DAMAGE_BONUS_BLUNT_WEAPONS = 30
; Percentage bonus to damage when using an aimed attack in melee
AIMED_MELEE_ATTACK_DAMAGE_BONUS = 60
; Percentage bonus to dodge a blade attack
BONUS_CHANCE_TO_DODGE_BLADES = 30
; Extra Percentage bonus to dodge a blade attack if wielding a blade
ONTOP_CHANCE_TO_DODGE_BLADES_WITH_BLADE = 20
; Percentage bonus to dodge a blunt weapon attack
BONUS_CHANCE_TO_DODGE_BLUNT_WEAPONS = 20
; Extra Percentage bonus to dodge a blunt weapon attack if wielding a blade
ONTOP_CHANCE_TO_DODGE_BLUNT_WITH_BLADE = 10
;******************************************************************************************************************************
;******************************************************************************************************************************
[Throwing]
; Percentage bonus to speed when throwing blades
THROW_BLADE_APS_REDUCTION = 20
; Percentage bonus to max range when throwing blades
TH_BLADES_RANGE_BONUS = 15
; CtH bonus when throwing blades
TH_BLADES_CTH_BONUS = 25
; CtH bonus per aim click
TH_BLADES_CTH_BONUS_PER_AIM_CLICK = 5
; Percentage bonus to damage when throwing blades
TH_BLADES_DAMAGE_BONUS = 15
; Percentage bonus to damage per aim click when throwing blades
TH_BLADES_DAMAGE_BONUS_PER_AIM_CLICK = 10
; Percentage bonus to inflict a critical hit when throwing blades if not detected by enemy
TH_BLADES_SILENT_CRITICAL_HIT_CHANCE = 20
; Critical hit damage multiplier bonus
SILENT_CRITICAL_HIT_MULTIPLIER_BONUS = 1
; Bonus aim clicks when throwing knives
POSSIBLE_AIM_CLICK_ADDED_TH_KNIVES = 1
;******************************************************************************************************************************
;******************************************************************************************************************************
[Night Ops]
; Bonus to sight range in dark
SIGHT_RANGE_BONUS_IN_DARK = 1
; General bonus to hearing range (everytime)
BASIC_HEARING_RANGE_BONUS = 1
; Added hearing range bonus when on dark places
ONTOP_HEARING_RANGE_BONUS_IN_DARK = 2
;Increased chance to get interrupts during night time
INTERRUPTS_BONUS_IN_DARK = 2
;Stamina burn decreased
NEED_FOR_SLEEP_REDUCTION = 3
;******************************************************************************************************************************
;******************************************************************************************************************************
[Stealthy]
; The amount of APs added for sneaking is reduced by this percentage
STEALTH_MODE_SPEED_BONUS = 50
; Percentage bonus to move silently
BONUS_TO_MOVE_STEALTHILY = 40
; Percentage bonus to overall stealth, which gives better cover.
STEALTH_BONUS = 25
; Chance to be interrupted by enemies (only applyable when using Improved Interrupt System)
REDUCED_CHANCE_TO_BE_INTERRUPTED = 30
; Cover penalty for moving is reduced by this value percentually
CHANCE_TO_BE_SPOTTED_FOR_MOVING_REDUCTION = 25
;******************************************************************************************************************************
;******************************************************************************************************************************
[Athletics]
; Percentage bonus when moving
APS_NEED_FOR_MOVEMENT_REDUCTION = 25
; Percentage bonus to stamina burn when moving
BPS_SPENT_FOR_MOVEMENT_REDUCTION = 33
;******************************************************************************************************************************
;******************************************************************************************************************************
[Bodybuilding]
; Percentage bonus to damage resistance
DAMAGE_RESISTANCE = 25
; Percentage bonus to max carrying weight capacity
CARRY_WEIGHT_BONUS = 30
; Percentage reduction of stamina loss when hit by HtH attack
BREATH_LOSS_FOR_HTH_HIT_REDUCTION = 50
; Percentage bonus to knock down resistance if hit in legs
INCREASE_DAMAGE_NEEDED_TO_FALL_DOWN_IF_HIT_TO_LEGS = 100
;******************************************************************************************************************************
;******************************************************************************************************************************
[Demolitions]
; Bonus CtH when throwing grenades
CTH_WHEN_THROWING_GRENADES = 30
; Percentage APs reduction when throwing grenades
APS_NEEDED_TO_THROW_GRENADES_REDUCTION = 25
; Percentage bonus to max range when throwing grenades
MAX_RANGE_TO_THROW_GRENADES = 20
; Percentage bonus to damage inflicted by bombs and mines
DAMAGE_OF_PLACED_BOMBS_AND_MINES = 25
; Percentage bonus to attaching detonators to bombs
ATTACH_DETONATOR_CHECK_BONUS = 50
; Percentage bonus when planting bombs and mines
PLANT_AND_REMOVE_BOMBS_AND_MINES_BONUS = 50
; Makes bombs and mines harder to detect by enemies
PLACED_BOMBS_AND_MINES_DETECTION_DIFFICULTY_BONUS = 5
; Increased chance of using shaped charge successfully
SHAPED_CHARGE_DAMAGE_MULTIPLIER = 3
;******************************************************************************************************************************
;******************************************************************************************************************************
[Teaching]
; Percentage bonus to speed when training militia
BONUS_TO_TRAIN_MILITIA = 40
; Percentage bonus to leadership when determining effectiveness
EFFECTIVE_LEADERSHIP_FOR_MILITIA_TRAINING = 40
; Percentage bonus to speed when teaching other mercs
BONUS_TO_TEACH_OTHER_MERCS = 40
; Bonus points to skill when teaching said skill
EFFECTIVE_SKILL_VALUE_TO_TEACH_OTHERS_BONUS = 25
; Percentage bonus to speed when practicing self.
BONUS_ON_PRACTISING = 25
;******************************************************************************************************************************
;******************************************************************************************************************************
[Scouting]
; Bonus to sight range when using stand alone scopes or binoculars
SIGHT_RANGE_INCREASED_WITH_BINOCULARS = 40
; Bonus to sight range with scopes attached to weapons
SIGHT_RANGE_INCREASED_WITH_SCOPES = 10
; Percentage reduction to tunnel vision when using binoculars or stand alone scopes
TUNNEL_VISION_REDUCED_WITH_BINOCULARS = 20
; Ability to detect enemy presence in adjacent sectors
CAN_DETECT_ENEMY_PRESENSE_IN_SECTORS_AROUND = TRUE
; Ability to determine exact enemy numbers in adjacent sectors
CAN_DETERMINE_ENEMY_NUMBERS_IN_SECTORS_AROUND = TRUE
; Ability to detect enemy presence in sectors adjacent diagonally
ALLOW_DETECTION_IN_DIAGONAL_SECTORS = FALSE
; Ability to prevent enemy ambushes
PREVENTS_ENEMY_AMBUSHES = TRUE
; Ability to prevent bloodcat ambushes
PREVENTS_BLOODCATS_AMBUSHES = TRUE
; Display message if an ambush has been prevented
SHOW_MESSAGE_IF_AMBUSH_PREVENTED = TRUE
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More