Files
source/Strategic/Game Event Hook.h
T
Wanne e64d5a2fa6 MERGED source code from development trunk revision 4545 up to latest current revision 4882
Development Trunk: https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: The source code for the official 2011 release (4870) has been branched here:
https://ja2svn.dyndns.org/source/ja2/branches/JA2_rev.4870_2011

This commit contains the following features:

*** Externalized Vehicles ***
o Now with this feature we can add/remove vehicles
o New XML File: TableData\Vehicles.xml
o Added a new function parameter to lua file Scripts\Overhead lua to set up the helicopter in method: SetUpHelicopterForPlayer()
o Added example mini (Docs\Externalized Vehicles Example.zip) mod which adds 2 additional vehicles (hummer and ice-cream truck to sector A9)

*** Up to 255 save slots ***
- There is a "Next" and "Prev" button where you can scroll through the save slots
- It is now possible to load the automatic save (SAVE_EVERY_N_HOURS) from the load screen. This is the first slot after the quickload slot
- Added the 2 alternate players end turn saves (which can be enabled/disabled in option screen) to the save/load game form

*** New Feature: Externalized emails from Emails.edt to XML***
o This feature can be enabled/disabled in the Source:
--> See email.cpp: If "ReadXMLEmail" == FALSE, then normal way (read from Email.edt) otherwise read from XML files
o 2 new XML files: TableData\Email\EmailMercAvailable.xml and EmailMercLevelUp.xml
o Renamed SenderNamesList.xml to EmailSenderNamesList.xml and moved from TableData folder to TableData\Email folder
o Names for mercenaries are get from the file MercProfiles.xml and different names get from the file EmailSenderNamesList.xml

*** Externalized Hidden Towns (Tixa, Orta) ***
o Now it is possible to add new hidden towns (locations)
o See file: TableData/Map/Cities.xml
o New variable in TableData/Map/Cities.xml
- hiddenTown:   0 = show on strategy map, 1 = Hide on strategy map
- townIcon:     1 = on, 0 = off (This is the icon you see on the strategy map)
- szIconFile:   The path to the sti icon file (eg: interface\prison.sti, interface\my_icon.sti)
- iconPosition: The x,y position of the icon on the strategy map

*** Encyclopedia and Briefing Room, reachable from the laptop ***
o 2 new ja2_options.ini properties: BRIEFING_ROOM, ENCYCLOPEDIA
o demonstration video: http://www.youtube.com/watch?v=7CIXdXWLrAo
o Added Example usage of the Briefing Room
- Extract it in your JA2 1.13 folder and use the latest development executable
- The briefing room can be reached from the laptop. Enter SN5631 for the code and then click the "Exit" button
- See "Info_BriefingRoom.txt" and "BriefingRoom_Mission1.png"

*** Improved interrupt system (IIS) ***
o This system changes the way interrupts work. See: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=290787#Post290787
o Option system (see ja2_options.ini: IMPROVED_INTERRUPT_SYSTEM)
o A few more settings for the interrupt system in ja2_options.ini
o INFO: Multiplayer games always use the "old" interrupt system, not matter what the user selects in the ja2_options.ini

*** Walking and sidestepping with weapon raised ***
o Enable/disable the walking/sidestepping with raised weapon in ja2_options.ini: ALLOW_WALKING_WITH_WEAPON_RAISED
o You can set an AP/BP modifier when walking/sidestepping with weapon raised in APBPConstants.ini: AP_MODIFIER_WEAPON_READY
o The following feature apply when you walk/sidestep with weapon raised:
-> limited angle of view, but you can see more farther when the weapon has a scope
-> better change for interrupts if you see an enemy
-> less APs and BPs when shooting, because the weapon is already raised
-> It should cost more APs when walking. Maybe you can export the additional AP and BP modifier to the APBPConstants.ini

*** Increase squad size to 8 (800x600) and 8 and 10 (1024x768) ***
o Squad sizes (dependend on the screen resolution) can be selected in the start new game screen
o In a multiplayer game, the squad size will always be 6, because it does not work with more soldiers/squad

*** Added UB-1.13 source code ***
o Merged the UB-1.13 source code (Revision: 4721) from svn: http://subversion.assembla.com/svn/ub-source113
o If you want to build UB-EXE or UB-MapEditor, just enable the 2 defines (JA2UB and JA2UBMAPS) in "builddefines.h"
o The UB-Verion reads from "ja2_UB.ini" instead of "ja2.ini"
o There are 2 new XML files
- Layout\LayoutMainMenu.xml
- MapAction\ActionItems.xml
o There are 2 new LUA-Script files
- Scripts\ExplosionControl.lua
- Scripts\InterfaceDialogue.lua

*** Hide enemy health text / enemy hit count ***
o ja2_options.ini: HIDE_ENEMY_HEALTH_TEXT, HIDE_ENEMY_HIT_COUNT
o both new settings only have effect in a singleplayer game
o see: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=128840&page=1


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4885 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-01-18 11:19:01 +00:00

172 lines
7.7 KiB
C

#ifndef __GAME_EVENT_HOOK_H
#define __GAME_EVENT_HOOK_H
#include "types.h"
enum
{
EVENT_CHANGELIGHTVAL = 1,
EVENT_WEATHERSTART,
EVENT_WEATHEREND,
EVENT_CHECKFORQUESTS,
EVENT_AMBIENT,
EVENT_AIM_RESET_MERC_ANNOYANCE,
EVENT_BOBBYRAY_PURCHASE, // WANNE: Unused (old Bobby Ray Shipment EVENT)
EVENT_DAILY_UPDATE_BOBBY_RAY_INVENTORY,
EVENT_UPDATE_BOBBY_RAY_INVENTORY,
EVENT_DAILY_UPDATE_OF_MERC_SITE,
EVENT_DAY3_ADD_EMAIL_FROM_SPECK,
EVENT_DELAYED_HIRING_OF_MERC,
EVENT_HANDLE_INSURED_MERCS,
EVENT_PAY_LIFE_INSURANCE_FOR_DEAD_MERC,
EVENT_MERC_DAILY_UPDATE,
EVENT_MERC_ABOUT_TO_LEAVE_COMMENT,
EVENT_MERC_CONTRACT_OVER,
EVENT_GROUP_ARRIVAL,
EVENT_DAY2_ADD_EMAIL_FROM_IMP,
EVENT_MERC_COMPLAIN_EQUIPMENT,
EVENT_HOURLY_UPDATE,
EVENT_HANDLE_MINE_INCOME,
EVENT_SETUP_MINE_INCOME,
EVENT_QUEUED_BATTLE,
EVENT_LEAVING_MERC_ARRIVE_IN_DRASSEN, // unused
EVENT_LEAVING_MERC_ARRIVE_IN_OMERTA, // unused
EVENT_SET_BY_NPC_SYSTEM,
EVENT_SECOND_AIRPORT_ATTENDANT_ARRIVED,
EVENT_HELICOPTER_HOVER_TOO_LONG,
EVENT_HELICOPTER_HOVER_WAY_TOO_LONG,
EVENT_HELICOPTER_DONE_REFUELING,
EVENT_MERC_LEAVE_EQUIP_IN_OMERTA,
EVENT_MERC_LEAVE_EQUIP_IN_DRASSEN,
EVENT_DAILY_EARLY_MORNING_EVENTS,
EVENT_GROUP_ABOUT_TO_ARRIVE,
EVENT_PROCESS_TACTICAL_SCHEDULE,
EVENT_BEGINRAINSTORM,
EVENT_ENDRAINSTORM,
EVENT_HANDLE_TOWN_OPINION,
EVENT_SETUP_TOWN_OPINION,
EVENT_MAKE_CIV_GROUP_HOSTILE_ON_NEXT_SECTOR_ENTRANCE,
EVENT_BEGIN_AIR_RAID,
EVENT_TOWN_LOYALTY_UPDATE, /* Delayed loyalty effects elimininated. Sep.12/98. ARM */
EVENT_MEANWHILE,
EVENT_BEGIN_CREATURE_QUEST,
EVENT_CREATURE_SPREAD,
EVENT_DECAY_CREATURES,
EVENT_CREATURE_NIGHT_PLANNING,
EVENT_CREATURE_ATTACK,
EVENT_EVALUATE_QUEEN_SITUATION,
EVENT_CHECK_ENEMY_CONTROLLED_SECTOR,
EVENT_TURN_ON_NIGHT_LIGHTS,
EVENT_TURN_OFF_NIGHT_LIGHTS,
EVENT_TURN_ON_PRIME_LIGHTS,
EVENT_TURN_OFF_PRIME_LIGHTS,
EVENT_MERC_ABOUT_TO_LEAVE,
EVENT_INTERRUPT_TIME,
EVENT_ENRICO_MAIL,
EVENT_INSURANCE_INVESTIGATION_STARTED,
EVENT_INSURANCE_INVESTIGATION_OVER,
EVENT_MINUTE_UPDATE,
EVENT_TEMPERATURE_UPDATE,
EVENT_KEITH_GOING_OUT_OF_BUSINESS,
EVENT_MERC_SITE_BACK_ONLINE,
EVENT_INVESTIGATE_SECTOR,
EVENT_CHECK_IF_MINE_CLEARED,
EVENT_REMOVE_ASSASSIN,
EVENT_BANDAGE_BLEEDING_MERCS,
EVENT_SHOW_UPDATE_MENU,
EVENT_SET_MENU_REASON,
EVENT_ADDSOLDIER_TO_UPDATE_BOX,
EVENT_BEGIN_CONTRACT_RENEWAL_SEQUENCE,
EVENT_RPC_WHINE_ABOUT_PAY,
EVENT_HAVENT_MADE_IMP_CHARACTER_EMAIL,
EVENT_RAINSTORM,
EVENT_QUARTER_HOUR_UPDATE,
EVENT_MERC_MERC_WENT_UP_LEVEL_EMAIL_DELAY,
EVENT_MERC_SITE_NEW_MERC_AVAILABLE,
EVENT_POSTAL_SERVICE_SHIPMENT,
// EVENT_CHECK_FOR_AIR_RAID,
#ifdef JA2UB
//Ja25:
EVENT_ATTACK_INITIAL_SECTOR_IF_PLAYER_STILL_THERE,
EVENT_SAY_DELAYED_MERC_QUOTE,
EVENT_DELAY_SOMEONE_IN_SECTOR_MSGBOX,
EVENT_SECTOR_H8_DONT_WAIT_IN_SECTOR,
EVENT_SEND_ENRICO_UNDERSTANDING_EMAIL,
#endif
#ifdef CRIPPLED_VERSION
EVENT_CRIPPLED_VERSION_END_GAME_CHECK,
#endif
/*
HEY, YOU GUYS AREN'T DOING THIS!!!!!! (see below)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! IMPORTANT NOTE !!
!! FOR ALL NEW EVENTS: For text debug support, make sure you add the text version of the !!
!! new event into the gEventName[] at the top of Game Events.c. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
NUMBER_OF_EVENT_TYPES_PLUS_ONE,
NUMBER_OF_EVENT_TYPES = NUMBER_OF_EVENT_TYPES_PLUS_ONE - 1
};
// This value is added to the param value for NPC-system-created events which are based on an
// action rather than a fact:
#define NPC_SYSTEM_EVENT_ACTION_PARAM_BONUS 10000
//One Time Events
//These events are scheduled to happen, and when their time is up, they are processed
//once, and deleted. The first prototype requires the actual world time in minutes
//included the current day, and the additional ones are wrappers which calculate the
//actual world time for you.
BOOLEAN AddStrategicEvent( UINT8 ubCallbackID, UINT32 uiMinStamp, UINT32 uiParam );
BOOLEAN AddSameDayStrategicEvent( UINT8 ubCallbackID, UINT32 uiMinStamp, UINT32 uiParam );
BOOLEAN AddFutureDayStrategicEvent( UINT8 ubCallbackID, UINT32 uiMinStamp, UINT32 uiParam, UINT32 uiNumDaysFromPresent );
//Same but uses seconds instead of minutes.
BOOLEAN AddStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiSecondStamp, UINT32 uiParam );
BOOLEAN AddSameDayStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiSecondStamp, UINT32 uiParam );
BOOLEAN AddFutureDayStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiSecondStamp, UINT32 uiParam, UINT32 uiNumDaysFromPresent );
//Ranged Events
//In certain cases, you may wish to create an event that has a start time and an end
//time. If this is used, then the execution of the event will happen once at the
//beginning of the event and once at the expiration time of the event. A flag,
//pEvent->fEndEvent is set for the second call. It is up to you process it
//separately. An example use of ranged events would be for ambient sounds. The
//start time would be called to define the sounds for use within the game. The end
//time would be used to remove the sound from the system.
BOOLEAN AddRangedStrategicEvent( UINT8 ubCallbackID, UINT32 uiStartMin, UINT32 uiLengthMin, UINT32 uiParam );
BOOLEAN AddSameDayRangedStrategicEvent( UINT8 ubCallbackID, UINT32 uiStartMin, UINT32 uiLengthMin, UINT32 uiParam);
BOOLEAN AddFutureDayRangedStrategicEvent( UINT8 ubCallbackID, UINT32 uiStartMin, UINT32 uiLengthMin, UINT32 uiParam, UINT32 uiNumDaysFromPresent );
BOOLEAN AddRangedStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiStartSeconds, UINT32 uiLengthSeconds, UINT32 uiParam );
BOOLEAN AddSameDayRangedStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiStartSeconds, UINT32 uiLengthSeconds, UINT32 uiParam);
BOOLEAN AddFutureDayRangedStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiStartSeconds, UINT32 uiLengthSeconds, UINT32 uiParam, UINT32 uiNumDaysFromPresent );
//EveryDay Events
//A second special case event, this event will get processed automatically at the
//same time every day. Time of day lighting is a perfect example. Other events
//such as checking for quests, can also be automated using this system. NOTE:
//Only specify the time of day in minutes (don't add the actual day to this value)
BOOLEAN AddEveryDayStrategicEvent( UINT8 ubCallbackID, UINT32 uiStartMin, UINT32 uiParam );
BOOLEAN AddEveryDayStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiStartSeconds, UINT32 uiParam );
//Periodic Events
//Event will get processed automatically once every X minutes. The period is added to the current time for
//the time stamp.
BOOLEAN AddPeriodStrategicEvent( UINT8 ubCallbackID, UINT32 uiOnceEveryXMinutes, UINT32 uiParam );
BOOLEAN AddPeriodStrategicEventUsingSeconds( UINT8 ubCallbackID, UINT32 uiOnceEveryXSeconds, UINT32 uiParam );
//Hybrids that aren't based from the current time. They are offsetted from the current time first.
BOOLEAN AddPeriodStrategicEventWithOffset( UINT8 ubCallbackID, UINT32 uiOnceEveryXMinutes, UINT32 uiOffsetFromCurrent, UINT32 uiParam );
BOOLEAN AddPeriodStrategicEventUsingSecondsWithOffset( UINT8 ubCallbackID, UINT32 uiOnceEveryXSeconds, UINT32 uiOffsetFromCurrent, UINT32 uiParam );
//Searches for and removes the first event matching the supplied information. There may very well be a need
//for more specific event removal, so let me know (Kris), of any support needs. Function returns FALSE if
//no events were found.
BOOLEAN DeleteStrategicEvent( UINT8 ubCallbackID, UINT32 uiParam );
void DeleteAllStrategicEventsOfType( UINT8 ubCallbackID );
void DeleteAllStrategicEvents();
#endif