mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Alternative IMP Background Selection
- two new options in ja2options.ini ALTERNATIVE IMP CREATION - adds new additional backgrounds, exclusive to this option - which IMP backgrounds will be available at selection is determined by previously made choices for skills, character traits and disablities - if a tag in background is contradicting to content of skill/character/disability, it won't be shown at selection - what's considered contradicting is based on what's been found in code for conntent of skill/character/disability - i.e. HeatIntolerant adds a penalty for desert and tropical sectors, so don't show backgrounds that add bonus for those sectortypes instead - a new tag <alt_impcreation, has been added to backgrounds for this as well - if that tag is found, it will be considered as additional IMP background exclusive to the option REDUCED IMP CREATION - same as above, but this time only the new additional backgrounds will be avaialable at selection - same rules for possible restrictions to be shown ALTERNATIVE IMP CREATION is required for REDUCED IMP CREATION to work For ja2options.ini, a new category, "Backgrounds" was created. This will contain the two new options and the general option to enable backgrounds Accompanying changes in gamedir: INIEditorJA2Options.xml ja2options.ini backgrounds.xml
This commit is contained in:
@@ -466,12 +466,13 @@ enum
|
||||
|
||||
#define BACKGROUND_ANIMALFRIEND 0x0000000000000200 //512 // refuses to attack animals
|
||||
#define BACKGROUND_CIVGROUPLOYAL 0x0000000000000400 //1024 // refuses to attack members of the same civgroup
|
||||
#define BACKGROUND_ALT_IMP_CREATION 0x0000000000000800 //2048 // BG can only be used when ALT_IMP_CREATION is TRUE in ja2options.ini (IMP creation)
|
||||
|
||||
#define BACKGROUND_FLAG_MAX 11 // number of flagged backgrounds - keep this updated, or properties will get lost!
|
||||
#define BACKGROUND_FLAG_MAX 12 // number of flagged backgrounds - keep this updated, or properties will get lost!
|
||||
|
||||
// some properties are hidden (forbid background in MP creation)
|
||||
// corruption property is not relevant in 1.13
|
||||
#define BACKGROUND_HIDDEN_FLAGS (BACKGROUND_NO_MALE|BACKGROUND_NO_FEMALE|BACKGROUND_CORRUPTIONSPREAD)
|
||||
#define BACKGROUND_HIDDEN_FLAGS (BACKGROUND_NO_MALE|BACKGROUND_NO_FEMALE|BACKGROUND_CORRUPTIONSPREAD|BACKGROUND_ALT_IMP_CREATION)
|
||||
|
||||
// anv: externalised taunts
|
||||
// taunt properties
|
||||
|
||||
@@ -152,7 +152,8 @@ backgroundStartElementHandle(void *userData, const XML_Char *name, const XML_Cha
|
||||
strcmp(name, "no_female") == 0 ||
|
||||
strcmp(name, "loyalitylossondeath" ) == 0 ||
|
||||
strcmp(name, "animal_friend") == 0 ||
|
||||
strcmp(name, "civgroup_loyal") == 0 ))
|
||||
strcmp(name, "civgroup_loyal") == 0 ||
|
||||
strcmp(name, "alt_impcreation") == 0 ))
|
||||
{
|
||||
pData->curElement = ELEMENT_PROPERTY;
|
||||
|
||||
@@ -693,6 +694,11 @@ backgroundEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curBackground.uiFlags |= (UINT16)atol(pData->szCharData) ? BACKGROUND_CIVGROUPLOYAL : 0;
|
||||
}
|
||||
else if (strcmp(name, "alt_impcreation") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curBackground.uiFlags |= (UINT16)atol(pData->szCharData) ? BACKGROUND_ALT_IMP_CREATION : 0;
|
||||
}
|
||||
else if (strcmp(name, "drugtypes") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
Reference in New Issue
Block a user