Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » Additional tile properties
Additional tile properties[message #330919]
|
Fri, 28 February 2014 19:18
|
|
anv |
|
Messages:258
Registered:March 2013 |
|
|
Additional Tile Properties
With Additional Tile Properties it's possible to supply all tiles with additional data, just like with .jsd files, except in XML.
Files need to have same name as tile's .sti and .jsd files, and be put in \tilesets\AdditionalProperties\, or in specific \tilesets\xx\.
Template:
Camouflage affinity
To quote source code - LOS.cpp:
case FLAT_GROUND:
// here it would be best if we could have a terrain texture -> camo association instead of terrain type -> camo
// but we need to allow modders to specify that information in an xml file
// this is because flat ground is used by both (it's irritating to see wood camo work perfectly on brown ground, at least ingame)
return max( GetDesertCamouflage(pSoldier), GetJungleCamouflage(pSoldier) ) * scaler/100;
At the moment, type of camouflage that works on any tile depends on tile's terrain id, which is distributed dynamically depending on tile's position in tileset. As a result:
- urban camo works perfectly on all floors and roofs,
- desert camo works perfectly on all dirt roads,
- wood camo works perfectly on any grass - and by "grass" I mean only fifth and sixth texture of every tileset, not neccessarily being grass,
- everywhere else wood and desert camo work both perfectly,
- snow camo doesn't work at all.
With additional properties it's possible to specify which camo type, and how effectively will work on any tile. Only snow camo will work on snow covered roofs, red carpet in palace won't perfectly cooperate with urban camo anymore, thick grass in the middle of the forest will provide better camouflage than sparse grass near the road.
While most of affinity of any map grid usually comes from surface tiles, other objects like weeds, grass, twigs etc. can influence final affinity too.
If given map tile works with more than one camo type, not the best type is chosen for calculation like before, but instead combination of all.
Example:
Merc's camouflage: 50% desert, 20% wood
Tile's affinities: 50% desert, 100% wood
Merc's effective camouflage: 0.5*0.5 + 0.2*1.0 = 45%
Camo type affinity of any given spot can be still checked with "f" key in tactical. Name of specific type will be shown if its affinity is at least 50%.
Walking and sneaking sounds
It's now possible to specify footstep volume and stealth difficulty modifier of any tile. Carpets will absorb noise, tile floors amplify it, twigs laying on the tile will make sneaking harder. Choose your path carefully, taffer.
Customization
Specifying additional property file for any tile is optional, so are tags inside it.
Feature can be completely disabled in .ini as COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES under Tactical Cover System Settings.
Files
XMLs for all passable tiles (grounds, floors, roofs, debris, weeds) in tilesets included. Some values might need further refinement.
Files + diff
[Updated on: Sat, 01 March 2014 01:57] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: Additional tile properties[message #330935]
|
Sat, 01 March 2014 10:59
|
|
Deleted. |
|
Messages:2663
Registered:December 2012 Location: Russian Federation |
|
|
@anv :bluecool:
This also opens possible door for future implementation of tile-crafting (take goods from tiles using 'hammer' cursor) and tile-transformations (build new road!)
p.s. what about 'shadow' tiles (near walls etc) that have the same light level as tiles in open? could they receive stealth bonus?
p.p.s. i have another crazy idea - mine planting restrictions/bonuses:
for example, it's easy to hide mine or trap in the grass (and it can receive trap bonus in grass or sand), but how will you bury it into the concrete floor?
[Updated on: Sat, 01 March 2014 13:39] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Additional tile properties[message #331005]
|
Mon, 03 March 2014 18:59
|
|
anv |
|
Messages:258
Registered:March 2013 |
|
|
Static shadows can work without additional data. Problem with them is just that while they drawn over one tile, they're actually situated on the other.
It's possible to check if tile up north (or rather tile being base tile of any multitile structure, that has a segment up north) from given position has shadow cast and then decrease brightness here, depending on how high casting segment is.
That method is not perfect, as there are high structures that (visually) cast almost no shadow - we could instead of height calculate average coverage in given plane, but that would be outright psychotic - plus it's somewhat operation heavy compared to the effect.
Another problem is position of shadows should change dynamically depending on current time of day... but maybe I'm looking too deep into that. At least they disappear at night. Now, if shadows instead of static .stis were based on dynamically transformed .jsd...
Changing which shadows structure cast should be easy, but despite changing sBuddyNum we'd need to add tile of given index to specific map grid, as it's normally done during map load.
Bonus to traps - now, that makes perfect sense.
0
Keeping in mind traps usually have level between 1-10:
- most floors and roofs get -3, since merc can't bury the trap there, just set it in on top (let's assume no jackhammers are involved),
- snow, sand: +1, because it's easy to bury something there without leaving any trace,
- deep snow: +2,
- debris that can be used to better camouflage trap: +1/+2.
Bonus is calculated during deploying trap by merc, doesn't influence levels of traps already set by mappers.
And of course I uploaded Data/AdditionalProperties while in code Data/tilesets/AdditionalProperties are read. But hey, worked for me
Update:
- fix: data read from Data/AdditionalProperties,
- new tag: + updated data for tiles, trap level influenced by terrain,
- new feature/option: COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS.
Source:
Toggle SpoilerIndex: GameSettings.cpp
===================================================================
--- GameSettings.cpp (revision 7001)
+++ GameSettings.cpp (working copy)
@@ -1486,6 +1486,8 @@
// anv: detailed tileset terrain types
gGameExternalOptions.fAdditionalTileProperties = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES", TRUE );
+ // static shadows decrease brightness
+ gGameExternalOptions.fStaticShadowsDecreaseBrightness = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS", FALSE );
//################# Tactical Suppression Fire Settings ##################
// These settings control the behavior of Suppression Fire, its severity, and its side-effects.
Index: GameSettings.h
===================================================================
--- GameSettings.h (revision 7001)
+++ GameSettings.h (working copy)
@@ -846,6 +846,8 @@
// anv: additional tile properties
BOOLEAN fAdditionalTileProperties;
+ // static shadows decrease brightness
+ BOOLEAN fStaticShadowsDecreaseBrightness;
// HEADROCK HAM B1: Global modifier for mine income (0 is automatically turned to 1 to avoid divide-by-zero.)
INT16 usMineIncomePercentage;
Index: Tactical/Handle Items.cpp
===================================================================
--- Tactical/Handle Items.cpp (revision 7001)
+++ Tactical/Handle Items.cpp (working copy)
@@ -1826,6 +1826,14 @@
if ( pSoldier->HasBackgroundFlag( BACKGROUND_TRAPLEVEL ) )
pSoldier->inv[ HANDPOS ][0]->data.bTrap++;
+ // anv: additional tile properties - modify trap level depending on its placement
+ if(gGameExternalOptions.fAdditionalTileProperties && Item[ pSoldier->inv[ HANDPOS ].usItem ].tripwire != 1 )
+ {
+ ADDITIONAL_TILE_PROPERTIES_VALUES zAllTileValues = GetAllAdditonalTilePropertiesForGrid( sGridNo, pSoldier->pathing.bLevel );
+ pSoldier->inv[ HANDPOS ][0]->data.bTrap += zAllTileValues.bTrapBonus;
+ }
+ pSoldier->inv[ HANDPOS ][0]->data.bTrap = __max( 0, pSoldier->inv[ HANDPOS ][0]->data.bTrap );
+
pSoldier->inv[ HANDPOS ][0]->data.misc.ubBombOwner = pSoldier->ubID + 2;
// Flugente: determine the direction we are looking at and apply that direction to our explosive
@@ -5765,6 +5773,7 @@
BOOLEAN fMining, fFoundMetal = FALSE;
// ITEM_POOL * pItemPool;
UINT8 ubMovementCost;
+ INT8 bTrapBonus = 0;
ubDetectLevel = 0;
Index: Tactical/XML_AdditionalTileProperties.cpp
===================================================================
--- Tactical/XML_AdditionalTileProperties.cpp (revision 7001)
+++ Tactical/XML_AdditionalTileProperties.cpp (working copy)
@@ -45,6 +45,7 @@
strcmp(name, "bCamoStanceModifer") == 0 ||
strcmp(name, "bSoundModifier") == 0 ||
strcmp(name, "bStealthDifficultyModifer") == 0 ||
+ strcmp(name, "bTrapBonus") == 0 ||
strcmp(name, "fBlockedWindow") == 0
))
{
@@ -122,6 +123,11 @@
pData->curElement = ELEMENT;
zAdditionalTileProperties.bStealthDifficultyModifer = (INT8) atol(pData->szCharData);
}
+ else if(strcmp(name, "bTrapBonus") == 0)
+ {
+ pData->curElement = ELEMENT;
+ zAdditionalTileProperties.bTrapBonus = (INT8) atol(pData->szCharData);
+ }
else if(strcmp(name, "fBlockedWindow") == 0)
{
pData->curElement = ELEMENT;
Index: TileEngine/lighting.cpp
===================================================================
--- TileEngine/lighting.cpp (revision 7001)
+++ TileEngine/lighting.cpp (working copy)
@@ -754,6 +754,23 @@
{
iSum=pNode->ubNaturalShadeLevel - (pNode->ubSumLights - pNode->ubFakeShadeLevel );
+ if(gGameExternalOptions.fStaticShadowsDecreaseBrightness && ( gRenderFlags & RENDER_FLAG_SHADOWS ))
+ {
+ INT32 sNewGridNo = NewGridNo( sGridNo, (UINT16)DirectionInc( NORTH ) );
+ STRUCTURE* pStructure = gpWorldLevelData[ sNewGridNo ].pStructureHead;
+ if(pStructure != NULL)
+ {
+ LEVELNODE* pShadowNode = NULL;
+ if(!(pStructure->fFlags & STRUCTURE_BASE_TILE))
+ pShadowNode = gpWorldLevelData[ FindBaseStructure(pStructure)->sGridNo ].pShadowHead;
+ else
+ pShadowNode = gpWorldLevelData[ sNewGridNo ].pShadowHead;
+ if(pShadowNode != NULL)
+ {
+ iSum += max( 0, (StructureHeight(pStructure) - 1 ) );
+ }
+ }
+ }
iSum=__min(SHADE_MIN, iSum);
iSum=__max(SHADE_MAX, iSum);
return( (UINT8) iSum );
Index: TileEngine/Tile Surface.cpp
===================================================================
--- TileEngine/Tile Surface.cpp (revision 7001)
+++ TileEngine/Tile Surface.cpp (working copy)
@@ -125,9 +125,9 @@
}
else
{
- // and if not found, then in /Tilesets/
+ // and if not found, then in /AdditionalProperties/
cEndOfName = strrchr( cAdditionalPropertiesFilename, '\\' );
- sprintf( cCommonAdditionalPropertiesFilename, "TILESETS\\ADDITIONALPROPERTIES%s", cEndOfName );
+ sprintf( cCommonAdditionalPropertiesFilename, "ADDITIONALPROPERTIES%s", cEndOfName );
if (FileExists( cCommonAdditionalPropertiesFilename ))
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
@@ -155,6 +155,8 @@
pTileSurf->bCamoStanceModifer = zAdditionalTileProperties.bCamoStanceModifer;
pTileSurf->bStealthDifficultyModifer = zAdditionalTileProperties.bStealthDifficultyModifer;
+ pTileSurf->bTrapBonus = zAdditionalTileProperties.bTrapBonus;
+
pTileSurf->uiAdditionalFlags = zAdditionalTileProperties.uiAdditionalFlags;
if (pStructureFileRef && pStructureFileRef->pAuxData != NULL)
Index: TileEngine/TileDat.cpp
===================================================================
--- TileEngine/TileDat.cpp (revision 7001)
+++ TileEngine/TileDat.cpp (working copy)
@@ -960,6 +960,7 @@
TileElement->bSoundModifier = 0;
TileElement->bCamoStanceModifer= 0;
TileElement->bStealthDifficultyModifer = 0;
+ TileElement->bTrapBonus = 0;
TileElement->uiAdditionalFlags = 0;
}
}
Index: TileEngine/tiledef.cpp
===================================================================
--- TileEngine/tiledef.cpp (revision 7001)
+++ TileEngine/tiledef.cpp (working copy)
@@ -694,6 +694,8 @@
TileElement.bSoundModifier = TileSurf->bSoundModifier;
TileElement.bStealthDifficultyModifer = TileSurf->bStealthDifficultyModifer;
+ TileElement.bTrapBonus = TileSurf->bTrapBonus;
+
TileElement.uiAdditionalFlags = TileSurf->uiAdditionalFlags;
// Check for multi-z stuff
Index: TileEngine/tiledef.h
===================================================================
--- TileEngine/tiledef.h (revision 7001)
+++ TileEngine/tiledef.h (working copy)
@@ -92,6 +92,8 @@
INT8 bSoundModifier;
INT8 bStealthDifficultyModifer;
+ INT8 bTrapBonus;
+
UINT32 uiAdditionalFlags;
@@ -151,6 +153,8 @@
INT8 bSoundModifier;
INT8 bStealthDifficultyModifer;
+ INT8 bTrapBonus;
+
UINT32 uiAdditionalFlags;
@@ -196,6 +200,8 @@
INT8 bSoundModifier;
INT8 bStealthDifficultyModifer;
+ INT8 bTrapBonus;
+
UINT32 uiAdditionalFlags;
} ADDITIONAL_TILE_PROPERTIES_VALUES;
Data:
Toggle SpoilerIndex: AdditionalProperties/2clumps.xml
===================================================================
--- AdditionalProperties/2clumps.xml (revision 1971)
+++ AdditionalProperties/2clumps.xml (working copy)
@@ -7,4 +7,5 @@
1
2
30
+2
\ No newline at end of file
Index: AdditionalProperties/2debrock.xml
===================================================================
--- AdditionalProperties/2debrock.xml (revision 1971)
+++ AdditionalProperties/2debrock.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/2flat.xml
===================================================================
--- AdditionalProperties/2flat.xml (revision 1971)
+++ AdditionalProperties/2flat.xml (working copy)
@@ -6,4 +6,5 @@
0
2
20
+2
\ No newline at end of file
Index: AdditionalProperties/2roadtle.xml
===================================================================
--- AdditionalProperties/2roadtle.xml (revision 1971)
+++ AdditionalProperties/2roadtle.xml (working copy)
@@ -6,4 +6,5 @@
0
0
10
+-3
\ No newline at end of file
Index: AdditionalProperties/2snowgrs.xml
===================================================================
--- AdditionalProperties/2snowgrs.xml (revision 1971)
+++ AdditionalProperties/2snowgrs.xml (working copy)
@@ -6,4 +6,5 @@
1
2
30
+2
\ No newline at end of file
Index: AdditionalProperties/2weeds.xml
===================================================================
--- AdditionalProperties/2weeds.xml (revision 1971)
+++ AdditionalProperties/2weeds.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/bombdeb.xml
===================================================================
--- AdditionalProperties/bombdeb.xml (revision 1971)
+++ AdditionalProperties/bombdeb.xml (working copy)
@@ -7,4 +7,5 @@
0
0
10
+1
\ No newline at end of file
Index: AdditionalProperties/bones.xml
===================================================================
--- AdditionalProperties/bones.xml (revision 1971)
+++ AdditionalProperties/bones.xml (working copy)
@@ -6,4 +6,5 @@
0
3
30
+1
\ No newline at end of file
Index: AdditionalProperties/bones2.xml
===================================================================
--- AdditionalProperties/bones2.xml (revision 1971)
+++ AdditionalProperties/bones2.xml (working copy)
@@ -6,4 +6,5 @@
0
3
30
+1
\ No newline at end of file
Index: AdditionalProperties/cvfl4.xml
===================================================================
--- AdditionalProperties/cvfl4.xml (revision 1971)
+++ AdditionalProperties/cvfl4.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/debrocks.xml
===================================================================
--- AdditionalProperties/debrocks.xml (revision 1971)
+++ AdditionalProperties/debrocks.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/f_weed.xml
===================================================================
--- AdditionalProperties/f_weed.xml (revision 1971)
+++ AdditionalProperties/f_weed.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/fl_weed.xml
===================================================================
--- AdditionalProperties/fl_weed.xml (revision 1971)
+++ AdditionalProperties/fl_weed.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/flat_06.xml
===================================================================
--- AdditionalProperties/flat_06.xml (revision 1971)
+++ AdditionalProperties/flat_06.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/flat_r1.xml
===================================================================
--- AdditionalProperties/flat_r1.xml (revision 1971)
+++ AdditionalProperties/flat_r1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/flat_r2.xml
===================================================================
--- AdditionalProperties/flat_r2.xml (revision 1971)
+++ AdditionalProperties/flat_r2.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/flat_r3.xml
===================================================================
--- AdditionalProperties/flat_r3.xml (revision 1971)
+++ AdditionalProperties/flat_r3.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/flat_r4.xml
===================================================================
--- AdditionalProperties/flat_r4.xml (revision 1971)
+++ AdditionalProperties/flat_r4.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_02.xml
===================================================================
--- AdditionalProperties/floor_02.xml (revision 1971)
+++ AdditionalProperties/floor_02.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_1.xml
===================================================================
--- AdditionalProperties/floor_1.xml (revision 1971)
+++ AdditionalProperties/floor_1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_2.xml
===================================================================
--- AdditionalProperties/floor_2.xml (revision 1971)
+++ AdditionalProperties/floor_2.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_3.xml
===================================================================
--- AdditionalProperties/floor_3.xml (revision 1971)
+++ AdditionalProperties/floor_3.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_4.xml
===================================================================
--- AdditionalProperties/floor_4.xml (revision 1971)
+++ AdditionalProperties/floor_4.xml (working copy)
@@ -6,4 +6,5 @@
0
2
20
+-3
\ No newline at end of file
Index: AdditionalProperties/floor_8.xml
===================================================================
--- AdditionalProperties/floor_8.xml (revision 1971)
+++ AdditionalProperties/floor_8.xml (working copy)
@@ -6,4 +6,5 @@
0
1
10
+-3
\ No newline at end of file
Index: AdditionalProperties/flortst3.xml
===================================================================
--- AdditionalProperties/flortst3.xml (revision 1971)
+++ AdditionalProperties/flortst3.xml (working copy)
@@ -6,4 +6,5 @@
0
-1
-10
+-3
\ No newline at end of file
Index: AdditionalProperties/flortst4.xml
===================================================================
--- AdditionalProperties/flortst4.xml (revision 1971)
+++ AdditionalProperties/flortst4.xml (working copy)
@@ -6,4 +6,5 @@
0
-1
-10
+-3
\ No newline at end of file
Index: AdditionalProperties/h-debri1.xml
===================================================================
--- AdditionalProperties/h-debri1.xml (revision 1971)
+++ AdditionalProperties/h-debri1.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/h-floor2.xml
===================================================================
--- AdditionalProperties/h-floor2.xml (revision 1971)
+++ AdditionalProperties/h-floor2.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/hos_deb1.xml
===================================================================
--- AdditionalProperties/hos_deb1.xml (revision 1971)
+++ AdditionalProperties/hos_deb1.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/hos_deb2.xml
===================================================================
--- AdditionalProperties/hos_deb2.xml (revision 1971)
+++ AdditionalProperties/hos_deb2.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/hosflor.xml
===================================================================
--- AdditionalProperties/hosflor.xml (revision 1971)
+++ AdditionalProperties/hosflor.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/i_floor.xml
===================================================================
--- AdditionalProperties/i_floor.xml (revision 1971)
+++ AdditionalProperties/i_floor.xml (working copy)
@@ -6,4 +6,5 @@
0
2
0
+-3
\ No newline at end of file
Index: AdditionalProperties/jaildeb.xml
===================================================================
--- AdditionalProperties/jaildeb.xml (revision 1971)
+++ AdditionalProperties/jaildeb.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/jaildeb2.xml
===================================================================
--- AdditionalProperties/jaildeb2.xml (revision 1971)
+++ AdditionalProperties/jaildeb2.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/jaildeb3.xml
===================================================================
--- AdditionalProperties/jaildeb3.xml (revision 1971)
+++ AdditionalProperties/jaildeb3.xml (working copy)
@@ -7,4 +7,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/jailflor.xml
===================================================================
--- AdditionalProperties/jailflor.xml (revision 1971)
+++ AdditionalProperties/jailflor.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/l_weed1.xml
===================================================================
--- AdditionalProperties/l_weed1.xml (revision 1971)
+++ AdditionalProperties/l_weed1.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/l_weed2.xml
===================================================================
--- AdditionalProperties/l_weed2.xml (revision 1971)
+++ AdditionalProperties/l_weed2.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/l_weed3.xml
===================================================================
--- AdditionalProperties/l_weed3.xml (revision 1971)
+++ AdditionalProperties/l_weed3.xml (working copy)
@@ -6,4 +6,5 @@
1
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/leaves.xml
===================================================================
--- AdditionalProperties/leaves.xml (revision 1971)
+++ AdditionalProperties/leaves.xml (working copy)
@@ -6,4 +6,5 @@
0
3
50
+2
\ No newline at end of file
Index: AdditionalProperties/litter.xml
===================================================================
--- AdditionalProperties/litter.xml (revision 1971)
+++ AdditionalProperties/litter.xml (working copy)
@@ -6,4 +6,5 @@
0
3
30
+1
\ No newline at end of file
Index: AdditionalProperties/miniweed.xml
===================================================================
--- AdditionalProperties/miniweed.xml (revision 1971)
+++ AdditionalProperties/miniweed.xml (working copy)
@@ -6,4 +6,5 @@
1
1
10
+1
\ No newline at end of file
Index: AdditionalProperties/p-debri1.xml
===================================================================
--- AdditionalProperties/p-debri1.xml (revision 1971)
+++ AdditionalProperties/p-debri1.xml (working copy)
@@ -7,4 +7,5 @@
0
-4
-40
+-3
\ No newline at end of file
Index: AdditionalProperties/p-debri2.xml
===================================================================
--- AdditionalProperties/p-debri2.xml (revision 1971)
+++ AdditionalProperties/p-debri2.xml (working copy)
@@ -7,4 +7,5 @@
0
-4
-40
+-3
\ No newline at end of file
Index: AdditionalProperties/p-debri3.xml
===================================================================
--- AdditionalProperties/p-debri3.xml (revision 1971)
+++ AdditionalProperties/p-debri3.xml (working copy)
@@ -7,4 +7,5 @@
0
-4
-40
+-3
\ No newline at end of file
Index: AdditionalProperties/p-floor1.xml
===================================================================
--- AdditionalProperties/p-floor1.xml (revision 1971)
+++ AdditionalProperties/p-floor1.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/p-floor2.xml
===================================================================
--- AdditionalProperties/p-floor2.xml (revision 1971)
+++ AdditionalProperties/p-floor2.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/p-floor3.xml
===================================================================
--- AdditionalProperties/p-floor3.xml (revision 1971)
+++ AdditionalProperties/p-floor3.xml (working copy)
@@ -6,4 +6,5 @@
0
0
30
+-3
\ No newline at end of file
Index: AdditionalProperties/p-floor4.xml
===================================================================
--- AdditionalProperties/p-floor4.xml (revision 1971)
+++ AdditionalProperties/p-floor4.xml (working copy)
@@ -6,4 +6,5 @@
0
-3
-20
+-3
\ No newline at end of file
Index: AdditionalProperties/p-roof1.xml
===================================================================
--- AdditionalProperties/p-roof1.xml (revision 1971)
+++ AdditionalProperties/p-roof1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/p-roof2.xml
===================================================================
--- AdditionalProperties/p-roof2.xml (revision 1971)
+++ AdditionalProperties/p-roof2.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/pit_1.xml
===================================================================
--- AdditionalProperties/pit_1.xml (revision 1971)
+++ AdditionalProperties/pit_1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+1
\ No newline at end of file
Index: AdditionalProperties/roadtle2.xml
===================================================================
--- AdditionalProperties/roadtle2.xml (revision 1971)
+++ AdditionalProperties/roadtle2.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/runway.xml
===================================================================
--- AdditionalProperties/runway.xml (revision 1971)
+++ AdditionalProperties/runway.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/s_water.xml
===================================================================
--- AdditionalProperties/s_water.xml (revision 1971)
+++ AdditionalProperties/s_water.xml (working copy)
@@ -6,4 +6,5 @@
0
0
5
+1
\ No newline at end of file
Index: AdditionalProperties/sand1.xml
===================================================================
--- AdditionalProperties/sand1.xml (revision 1971)
+++ AdditionalProperties/sand1.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/sand2.xml
===================================================================
--- AdditionalProperties/sand2.xml (revision 1971)
+++ AdditionalProperties/sand2.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/sand3.xml
===================================================================
--- AdditionalProperties/sand3.xml (revision 1971)
+++ AdditionalProperties/sand3.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/sand4.xml
===================================================================
--- AdditionalProperties/sand4.xml (revision 1971)
+++ AdditionalProperties/sand4.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/sblast.xml
===================================================================
--- AdditionalProperties/sblast.xml (revision 1971)
+++ AdditionalProperties/sblast.xml (working copy)
@@ -6,4 +6,5 @@
0
0
10
+1
\ No newline at end of file
Index: AdditionalProperties/sew_flor.xml
===================================================================
--- AdditionalProperties/sew_flor.xml (revision 1971)
+++ AdditionalProperties/sew_flor.xml (working copy)
@@ -6,4 +6,5 @@
0
3
40
+1
\ No newline at end of file
Index: AdditionalProperties/sn_grs_1.xml
===================================================================
--- AdditionalProperties/sn_grs_1.xml (revision 1971)
+++ AdditionalProperties/sn_grs_1.xml (working copy)
@@ -6,4 +6,5 @@
1
2
25
+1
\ No newline at end of file
Index: AdditionalProperties/sn_patch.xml
===================================================================
--- AdditionalProperties/sn_patch.xml (revision 1971)
+++ AdditionalProperties/sn_patch.xml (working copy)
@@ -7,4 +7,5 @@
1
2
25
+1
\ No newline at end of file
Index: AdditionalProperties/snow_1.xml
===================================================================
--- AdditionalProperties/snow_1.xml (revision 1971)
+++ AdditionalProperties/snow_1.xml (working copy)
@@ -6,4 +6,5 @@
1
2
30
+2
\ No newline at end of file
Index: AdditionalProperties/snow_2.xml
===================================================================
--- AdditionalProperties/snow_2.xml (revision 1971)
+++ AdditionalProperties/snow_2.xml (working copy)
@@ -6,4 +6,5 @@
0
1
25
+1
\ No newline at end of file
Index: AdditionalProperties/srunway.xml
===================================================================
--- AdditionalProperties/srunway.xml (revision 1971)
+++ AdditionalProperties/srunway.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/street2.xml
===================================================================
--- AdditionalProperties/street2.xml (revision 1971)
+++ AdditionalProperties/street2.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/sweeds.xml
===================================================================
--- AdditionalProperties/sweeds.xml (revision 1971)
+++ AdditionalProperties/sweeds.xml (working copy)
@@ -6,4 +6,5 @@
2
2
30
+1
\ No newline at end of file
Index: AdditionalProperties/t_sand1.xml
===================================================================
--- AdditionalProperties/t_sand1.xml (revision 1971)
+++ AdditionalProperties/t_sand1.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/t_sand3.xml
===================================================================
--- AdditionalProperties/t_sand3.xml (revision 1971)
+++ AdditionalProperties/t_sand3.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/template.xml
===================================================================
--- AdditionalProperties/template.xml (revision 1971)
+++ AdditionalProperties/template.xml (working copy)
@@ -13,5 +13,7 @@
0
0
+0
+
\ No newline at end of file
Index: AdditionalProperties/tr_water.xml
===================================================================
--- AdditionalProperties/tr_water.xml (revision 1971)
+++ AdditionalProperties/tr_water.xml (working copy)
@@ -6,4 +6,5 @@
0
1
20
+1
\ No newline at end of file
Index: AdditionalProperties/tweed.xml
===================================================================
--- AdditionalProperties/tweed.xml (revision 1971)
+++ AdditionalProperties/tweed.xml (working copy)
@@ -6,4 +6,5 @@
1
2
20
+1
\ No newline at end of file
Index: AdditionalProperties/twigs.xml
===================================================================
--- AdditionalProperties/twigs.xml (revision 1971)
+++ AdditionalProperties/twigs.xml (working copy)
@@ -6,4 +6,5 @@
0
3
30
+2
\ No newline at end of file
Index: AdditionalProperties/w-roof1.xml
===================================================================
--- AdditionalProperties/w-roof1.xml (revision 1971)
+++ AdditionalProperties/w-roof1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/welflor1.xml
===================================================================
--- AdditionalProperties/welflor1.xml (revision 1971)
+++ AdditionalProperties/welflor1.xml (working copy)
@@ -6,4 +6,5 @@
0
0
0
+-3
\ No newline at end of file
Index: AdditionalProperties/welflor2.xml
===================================================================
--- AdditionalProperties/welflor2.xml (revision 1971)
+++ AdditionalProperties/welflor2.xml (working copy)
@@ -6,4 +6,5 @@
0
-3
-20
+-3
\ No newline at end of file
Index: AdditionalProperties/welflor3.xml
===================================================================
--- AdditionalProperties/welflor3.xml (revision 1971)
+++ AdditionalProperties/welflor3.xml (working copy)
@@ -6,4 +6,5 @@
0
3
0
+-3
\ No newline at end of file
Index: AdditionalProperties/wp_deb.xml
===================================================================
--- AdditionalProperties/wp_deb.xml (revision 1971)
+++ AdditionalProperties/wp_deb.xml (working copy)
@@ -7,4 +7,5 @@
0
2
0
+-3
\ No newline at end of file
Index: AdditionalProperties/wp_floor.xml
===================================================================
--- AdditionalProperties/wp_floor.xml (revision 1971)
+++ AdditionalProperties/wp_floor.xml (working copy)
@@ -6,4 +6,5 @@
0
2
0
+-3
\ No newline at end of file
[Updated on: Mon, 03 March 2014 19:29] by Moderator Report message to a moderator
|
|
|
|
Re: Additional tile properties[message #331006]
|
Mon, 03 March 2014 19:18
|
|
Deleted. |
|
Messages:2663
Registered:December 2012 Location: Russian Federation |
|
|
@anv cool!
One suggestion - making <tripwire> usable without great penalties on the floor/road or any plain surface, because it's hard to see anyway, and you can then place tripwire in front of the door, and place tripwire-activated bomb aside.
Also, placing traps on roofs is not good idea now, because it's partially broken - you can place it, activate, but it will not disapper (endless trap).
And crouching in shadows behind the wall now makes more sense than just imaginary roleplaying.
[Updated on: Thu, 30 June 2016 18:43] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Additional tile properties[message #331289]
|
Sat, 15 March 2014 15:07
|
|
mmm |
|
Messages:63
Registered:May 2013 |
|
|
Yeah, I just realized it was not... I was thinking in terms of the requirement to achieve perfect camo(which I always do, by whatever mean possible) on a specific tile, which necessitate more than a perfect camo on a single terrain. Then I realized it is actually a penalty for mixed terrain types, which require a greater total sum of total camo index to achieve the same level of concealment. It's not "boosting" multi-terrain camo so to speak, rather it was the opposite, only by differing amount.
I see some implications though, considering it is in fact making certain terrains outright "harder", without necessarily encouraging the use of multi-terrain camo(one type is still more effective than others, unless you're maxing out the camo index sum above 100%, which is not possible through camo kit). It does not make a lot of sense to me, since I believe with the right mix of camo, it is still possible to hide no less effectively than on a simple, single type terrain.
I thought it would be wonderful to rather "cap" the maximum amount of "cover" granted by a single camo type on a certain tile. So say a 70% wood terrain will give you full benefit for wood camo, up to a wood camo index of 70%. The remaining 30% will have to be made up by another type of camo. So the total sum of camo index required achieve a certain level of "cover" is not necessarily increased, rather a right mix will be required. A perfect solution IMHO.
And that brought me to another idea: maybe introducing a cap(totally optional, adjustable, of course) for camo index granted by camo kit, too. In real life one could at most paint camo to exposed body parts. That should only represent a small fraction of total camo, say maybe 20%?
Edit: may I have you to clarify what exactly "stance partially ignored in camo calculations" means? Standing and crouching more effective?
[Updated on: Sat, 15 March 2014 15:10] by Moderator Report message to a moderator
|
Corporal
|
|
|
Re: Additional tile properties[message #331294]
|
Sat, 15 March 2014 19:35
|
|
anv |
|
Messages:258
Registered:March 2013 |
|
|
Update:
Alternate Multi Terrain Camo Calculation
Set under Tactical Cover System Settings > COVER_SYSTEM_ALTERNATE_MULTI_TERRAIN_CAMO_CALCULATION in Ja2_Options.INI.
Camo affinities will be used as caps not multipliers (suggested by mmm). It will be possible to achieve perfect camo on mixed terrain using mixed camo types. Works only if COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES = TRUE.
Example 1:
Merc's camouflage: 80% desert, 0% wood
Tile's affinities: 50% desert, 100% wood
Merc's effective camouflage: 0.8*0.5 + 0.0*1.0 = 40%
Merc's effective camouflage with alternate calculation: min(0.5, 0. + min(0.0, 1.0) = 50%
Example 2:
Merc's camouflage: 50% desert, 20% wood
Tile's affinities: 50% desert, 100% wood
Merc's effective camouflage: 0.5*0.5 + 0.2*1.0 = 45%
Merc's effective camouflage with alternate calculation: min(0.5, 0.5) + min(0.2, 1.0) = 70%
Example 3:
Merc's camouflage: 70% wood, 30% desert
Tile's affinities: 70% wood, 30% desert
Merc's effective camouflage: 0.7*0.7 + 0.3*0.3 = 58%
Merc's effective camouflage with alternate calculation: min(0.5, 0.5) + min(0.3, 0.3) = 100%
Source
Toggle SpoilerIndex: GameSettings.cpp
===================================================================
--- GameSettings.cpp (revision 7066)
+++ GameSettings.cpp (working copy)
@@ -1488,6 +1488,8 @@
gGameExternalOptions.fAdditionalTileProperties = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES", TRUE );
// static shadows decrease brightness
gGameExternalOptions.fStaticShadowsDecreaseBrightness = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS", FALSE );
+ // camo affinities will be used as caps not multipliers (suggested by mmm) - it will be possible to achieve perfect camo on mixed terrain using mixed camo types
+ gGameExternalOptions.fAlternateMultiTerrainCamoCalculation = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_ALTERNATE_MULTI_TERRAIN_CAMO_CALCULATION", TRUE );
//################# Tactical Suppression Fire Settings ##################
// These settings control the behavior of Suppression Fire, its severity, and its side-effects.
Index: GameSettings.h
===================================================================
--- GameSettings.h (revision 7066)
+++ GameSettings.h (working copy)
@@ -851,6 +851,8 @@
BOOLEAN fAdditionalTileProperties;
// static shadows decrease brightness
BOOLEAN fStaticShadowsDecreaseBrightness;
+ // camo affinities will be used as caps not multipliers (suggested by mmm) - it will be possible to achieve perfect camo on mixed terrain using mixed camo types
+ BOOLEAN fAlternateMultiTerrainCamoCalculation;
// HEADROCK HAM B1: Global modifier for mine income (0 is automatically turned to 1 to avoid divide-by-zero.)
INT16 usMineIncomePercentage;
Index: Tactical/LOS.cpp
===================================================================
--- Tactical/LOS.cpp (revision 7066)
+++ Tactical/LOS.cpp (working copy)
@@ -662,13 +662,24 @@
effectiveness += (UINT8)(pSoldier->GetBackgroundValue(BG_PERC_CAMO));
scaler = effectiveness * scaler / 6;
+ if(gGameExternalOptions.fAlternateMultiTerrainCamoCalculation)
+ {
+ iResult += min( -GetJungleCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bWoodCamoAffinity);
+ iResult += min( -GetDesertCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bDesertCamoAffinity);
+ iResult += min( -GetUrbanCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bUrbanCamoAffinity);
+ iResult += min( -GetSnowCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bSnowCamoAffinity);
+ iResult = min( iResult, 100);
+ iResult = -iResult;
+ }
+ else
+ {
+ iResult += GetJungleCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bWoodCamoAffinity / 100;
+ iResult += GetDesertCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bDesertCamoAffinity / 100;
+ iResult += GetUrbanCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bUrbanCamoAffinity / 100;
+ iResult += GetSnowCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bSnowCamoAffinity / 100;
+ }
- iResult += GetJungleCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bWoodCamoAffinity / 100;
- iResult += GetDesertCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bDesertCamoAffinity / 100;
- iResult += GetUrbanCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bUrbanCamoAffinity / 100;
- iResult += GetSnowCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bSnowCamoAffinity / 100;
-
- return (INT8)min(100, max(0, iResult));
+ return (INT8)max(-100, min(0, iResult));
}
/**
Ja2_Options.INI
Toggle SpoilerIndex: Ja2_Options.INI
===================================================================
--- Ja2_Options.INI (revision 1983)
+++ Ja2_Options.INI (working copy)
@@ -2052,6 +2052,11 @@
; Static shadows decrease brightness
COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS = TRUE
+; Camo affinities will be used as caps not multipliers (suggested by mmm).
+; It will be possible to achieve perfect camo on mixed terrain using mixed camo types.
+; Works only if COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES = TRUE.
+COVER_SYSTEM_ALTERNATE_MULTI_TERRAIN_CAMO_CALCULATION = TRUE
+
;******************************************************************************************************************************
;******************************************************************************************************************************
@mmm:
Cap for camo from camo kit is already in, check under CAMO_KIT_USABLE_AREA in .ini. It's only 5 (%) by default, rest of camo is taken from worn equipment.
Max amount of camo is scaled according to merc's stance, where stance value can be from 1 (prone), 3 (crouch) or 6 (stand). Final value of scaler is (7-stance)/6, so for different stances it's:
// stand = 7-6 => 10%, crouch = 7-3 => 66%, prone = 7-1 => 100%; Stance modifier decreases value of current stance (still limited between 1-6), so camo on given tile is less penalized due to merc's stance, e.g. in the thick bushes (modifier + 2) merc can crouch and be as well camouflaged as if he was prone in the open.
Report message to a moderator
|
|
|
|
Re: Additional tile properties[message #331305]
|
Sat, 15 March 2014 22:29
|
|
mmm |
|
Messages:63
Registered:May 2013 |
|
|
Wow, that was fast. Guess the idea is simple to start with. You've made my day, anv. Thanks.
anv
@mmm:
Cap for camo from camo kit is already in, check under CAMO_KIT_USABLE_AREA in .ini. It's only 5 (%) by default, rest of camo is taken from worn equipment.
Guess I'll need to switch to a less outdated build.
Thank you for explaining the effect of stance mathematically.
One more favor I can't help asking. It seems that the F key will not display the exact amount of affinity for a tile, will you consider make it do that? Sound modifiers too if possible. I feel a lot more secure when I have the complete info of a tile.
[Updated on: Sat, 15 March 2014 22:30] by Moderator Report message to a moderator
|
Corporal
|
|
|
Re: Additional tile properties[message #331319]
|
Sun, 16 March 2014 20:39
|
|
anv |
|
Messages:258
Registered:March 2013 |
|
|
COVER_TOOLTIP_DISPLAY_DETAILED_TILE_PROPERTIES under [Tactical Cover System Settings] set to true will let "f" cover tooltip to present detailed information about tile. Only relevant (non-zero) info will be shown.
Also fixed bug causing trap level to be ignored and limited final maximum and minimum camo of given map grid between 0 and 100.
Diffs include previous (alternate calculation) changes.
Source
Toggle SpoilerIndex: GameSettings.cpp
===================================================================
--- GameSettings.cpp (revision 7070)
+++ GameSettings.cpp (working copy)
@@ -1488,6 +1488,10 @@
gGameExternalOptions.fAdditionalTileProperties = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_ADDITIONAL_TILE_PROPERTIES", TRUE );
// static shadows decrease brightness
gGameExternalOptions.fStaticShadowsDecreaseBrightness = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_STATIC_SHADOWS_DECREASE_BRIGHTNESS", FALSE );
+ // camo affinities will be used as caps not multipliers (suggested by mmm) - it will be possible to achieve perfect camo on mixed terrain using mixed camo types
+ gGameExternalOptions.fAlternateMultiTerrainCamoCalculation = iniReader.ReadBoolean("Tactical Cover System Settings", "COVER_SYSTEM_ALTERNATE_MULTI_TERRAIN_CAMO_CALCULATION", TRUE );
+ // cover tooltip ("f") will display detailed properties and their values
+ gGameExternalOptions.fCoverTooltipDetailedTileProperties = iniReader.ReadBoolean("Tactical Cover System Settings","COVER_TOOLTIP_DISPLAY_DETAILED_TILE_PROPERTIES", TRUE);
//################# Tactical Suppression Fire Settings ##################
// These settings control the behavior of Suppression Fire, its severity, and its side-effects.
Index: GameSettings.h
===================================================================
--- GameSettings.h (revision 7070)
+++ GameSettings.h (working copy)
@@ -851,6 +851,10 @@
BOOLEAN fAdditionalTileProperties;
// static shadows decrease brightness
BOOLEAN fStaticShadowsDecreaseBrightness;
+ // camo affinities will be used as caps not multipliers (suggested by mmm) - it will be possible to achieve perfect camo on mixed terrain using mixed camo types
+ BOOLEAN fAlternateMultiTerrainCamoCalculation;
+ // cover tooltip ("f") will display detailed properties and their values
+ BOOLEAN fCoverTooltipDetailedTileProperties;
// HEADROCK HAM B1: Global modifier for mine income (0 is automatically turned to 1 to avoid divide-by-zero.)
INT16 usMineIncomePercentage;
Index: Tactical/DisplayCover.cpp
===================================================================
--- Tactical/DisplayCover.cpp (revision 7070)
+++ Tactical/DisplayCover.cpp (working copy)
@@ -710,9 +710,86 @@
if(gGameExternalOptions.fAdditionalTileProperties)
{
- ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE,
- gzDisplayCoverText[DC_MSG__COVER_INFORMATION],
- ubCover, GetDetailedTerrainName(zGivenTileProperties), ubBrightness );
+ if(!gGameExternalOptions.fCoverTooltipDetailedTileProperties)
+ {
+ ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE,
+ gzDisplayCoverText[DC_MSG__COVER_INFORMATION],
+ ubCover, GetDetailedTerrainName(zGivenTileProperties), ubBrightness );
+ }
+ else
+ {
+ ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE,
+ gzDisplayCoverText[DC_MSG__COVER_INFORMATION_WITH_DETAILED_CAMO],
+ ubCover, ubBrightness );
+
+ UINT8 ubApplicableProperties = 0;
+ swprintf( zOutputString, L"" );
+ if(zGivenTileProperties.bWoodCamoAffinity > 0)
+ {
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__WOOD]);
+ swprintf( zOutputString + wcslen(zOutputString), L": %d/100", zGivenTileProperties.bWoodCamoAffinity);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bDesertCamoAffinity > 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__DESERT]);
+ swprintf( zOutputString + wcslen(zOutputString), L": %d/100", zGivenTileProperties.bDesertCamoAffinity);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bUrbanCamoAffinity > 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__URBAN]);
+ swprintf( zOutputString + wcslen(zOutputString), L": %d/100", zGivenTileProperties.bUrbanCamoAffinity);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bSnowCamoAffinity > 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__SNOW]);
+ swprintf( zOutputString + wcslen(zOutputString), L": %d/100", zGivenTileProperties.bSnowCamoAffinity);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bSoundModifier != 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__DETAILED_SOUND]);
+ if(zGivenTileProperties.bSoundModifier > 0)
+ swprintf( zOutputString + wcslen(zOutputString), L": +%d", zGivenTileProperties.bSoundModifier);
+ else
+ swprintf( zOutputString + wcslen(zOutputString), L": %d", zGivenTileProperties.bSoundModifier);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bStealthDifficultyModifer != 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__DETAILED_STEALTH]);
+ if(zGivenTileProperties.bStealthDifficultyModifer > 0)
+ swprintf( zOutputString + wcslen(zOutputString), L": +%d/100", zGivenTileProperties.bStealthDifficultyModifer);
+ else
+ swprintf( zOutputString + wcslen(zOutputString), L": %d/100", zGivenTileProperties.bStealthDifficultyModifer);
+ ubApplicableProperties++;
+ }
+ if(zGivenTileProperties.bTrapBonus != 0)
+ {
+ if(ubApplicableProperties)
+ swprintf( zOutputString + wcslen(zOutputString), L", ");
+ swprintf( zOutputString + wcslen(zOutputString), gzDisplayCoverText[DC_TTI__DETAILED_TRAP_LEVEL]);
+ if(zGivenTileProperties.bTrapBonus > 0)
+ swprintf( zOutputString + wcslen(zOutputString), L": +%d", zGivenTileProperties.bTrapBonus);
+ else
+ swprintf( zOutputString + wcslen(zOutputString), L": %d", zGivenTileProperties.bTrapBonus);
+ ubApplicableProperties++;
+ }
+ if( wcslen(zOutputString) > 0 )
+ ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, zOutputString );
+ }
}
else
{
Index: Tactical/LOS.cpp
===================================================================
--- Tactical/LOS.cpp (revision 7070)
+++ Tactical/LOS.cpp (working copy)
@@ -520,6 +520,7 @@
INT16 iCamoStanceModifer = 0;
INT16 iSoundModifier = 0;
INT16 iStealthDifficultyModifer = 0;
+ INT16 iTrapBonus = 0;
UINT8 ubTerrainID = 0;
BOOLEAN fFoundBottom = FALSE;
@@ -576,6 +577,8 @@
iSoundModifier += gTileDatabase[ pNode->usIndex ].bSoundModifier;
iStealthDifficultyModifer += gTileDatabase[ pNode->usIndex ].bStealthDifficultyModifer;
+ iTrapBonus += gTileDatabase[ pNode->usIndex ].bTrapBonus;
+
ubTerrainID = gTileDatabase[ pNode->usIndex ].ubTerrainID;
// going from the top, if any tile has terrain type, we're ignoring all tiles below it
if(ubTerrainID != NO_TERRAIN)
@@ -586,15 +589,17 @@
}
- ubAllTileProperties.bWoodCamoAffinity = (INT8)iWoodCamoAffinity;
- ubAllTileProperties.bDesertCamoAffinity = (INT8)iDesertCamoAffinity;
- ubAllTileProperties.bUrbanCamoAffinity = (INT8)iUrbanCamoAffinity;
- ubAllTileProperties.bSnowCamoAffinity = (INT8)iSnowCamoAffinity;
+ ubAllTileProperties.bWoodCamoAffinity = (INT8)max(0, min(100, iWoodCamoAffinity));
+ ubAllTileProperties.bDesertCamoAffinity = (INT8)max(0, min(100, iDesertCamoAffinity));
+ ubAllTileProperties.bUrbanCamoAffinity = (INT8)max(0, min(100, iUrbanCamoAffinity));
+ ubAllTileProperties.bSnowCamoAffinity = (INT8)max(0, min(100, iSnowCamoAffinity));
ubAllTileProperties.bCamoStanceModifer = (INT8)iCamoStanceModifer;
ubAllTileProperties.bSoundModifier = (INT8)iSoundModifier;
ubAllTileProperties.bStealthDifficultyModifer = (INT8)iStealthDifficultyModifer;
+ ubAllTileProperties.bTrapBonus = (INT8)iTrapBonus;
+
return ubAllTileProperties;
}
@@ -662,13 +667,24 @@
effectiveness += (UINT8)(pSoldier->GetBackgroundValue(BG_PERC_CAMO));
scaler = effectiveness * scaler / 6;
+ if(gGameExternalOptions.fAlternateMultiTerrainCamoCalculation)
+ {
+ iResult += min( -GetJungleCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bWoodCamoAffinity);
+ iResult += min( -GetDesertCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bDesertCamoAffinity);
+ iResult += min( -GetUrbanCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bUrbanCamoAffinity);
+ iResult += min( -GetSnowCamouflage(pSoldier) * scaler / 100, zGivenTileProperties.bSnowCamoAffinity);
+ iResult = min( iResult, 100);
+ iResult = -iResult;
+ }
+ else
+ {
+ iResult += GetJungleCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bWoodCamoAffinity / 100;
+ iResult += GetDesertCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bDesertCamoAffinity / 100;
+ iResult += GetUrbanCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bUrbanCamoAffinity / 100;
+ iResult += GetSnowCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bSnowCamoAffinity / 100;
+ }
- iResult += GetJungleCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bWoodCamoAffinity / 100;
- iResult += GetDesertCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bDesertCamoAffinity / 100;
- iResult += GetUrbanCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bUrbanCamoAffinity / 100;
- iResult += GetSnowCamouflage(pSoldier) * scaler / 100 * zGivenTileProperties.bSnowCamoAffinity / 100;
-
- return (INT8)min(100, max(0, iResult));
+ return (INT8)max(-100, min(0, iResult));
}
/**
Index: Utils/_Ja25ChineseText.cpp
===================================================================
--- Utils/_Ja25ChineseText.cpp (revision 7070)
+++ Utils/_Ja25ChineseText.cpp (working copy)
@@ -500,7 +500,11 @@
L"沙漠和城市",
L"沙漠和雪地",
L"城市和雪地",
- L"-" // yes empty for now
+ L"-", // yes empty for now
+ L"隐蔽程度: %d/100, 光亮度: %d/100",
+ L"Footstep volume",// TODO.Translate
+ L"Stealth difficulty",// TODO.Translate
+ L"Trap level",// TODO.Translate
};
#endif
Index: Utils/_Ja25DutchText.cpp
===================================================================
--- Utils/_Ja25DutchText.cpp (revision 7070)
+++ Utils/_Ja25DutchText.cpp (working copy)
@@ -499,7 +499,11 @@
L"Desert and Urban",
L"Desert and Snow",
L"Urban and Snow",
- L"-" // yes empty for now
+ L"-", // yes empty for now
+ L"Cover: %d/100, Brightness: %d/100",
+ L"Footstep volume",
+ L"Stealth difficulty",
+ L"Trap level",
};
Index: Utils/_Ja25DutchText.h
===================================================================
--- Utils/_Ja25DutchText.h (revision 7070)
+++ Utils/_Ja25DutchText.h (working copy)
@@ -71,7 +71,11 @@
DC_TTI__DESERT_AND_URBAN,
DC_TTI__DESERT_AND_SNOW,
DC_TTI__URBAN_AND_SNOW,
- DC_TTI__UNKNOWN
+ DC_TTI__UNKNOWN,
+ DC_MSG__COVER_INFORMATION_WITH_DETAILED_CAMO,
+ DC_TTI__DETAILED_SOUND,
+ DC_TTI__DETAILED_STEALTH,
+ DC_TTI__DETAILED_TRAP_LEVEL,
};
extern STR16 gzDisplayCoverText[];
Index: Utils/_Ja25EnglishText.cpp
===================================================================
--- Utils/_Ja25EnglishText.cpp (revision 7070)
+++ Utils/_Ja25EnglishText.cpp (working copy)
@@ -498,7 +498,11 @@
L"Desert and Urban",
L"Desert and Snow",
L"Urban and Snow",
- L"-" // yes empty for now
+ L"-", // yes empty for now
+ L"Cover: %d/100, Brightness: %d/100",
+ L"Footstep volume",
+ L"Stealth difficulty",
+ L"Trap level",
};
#endif
Index: Utils/_Ja25EnglishText.h
===================================================================
--- Utils/_Ja25EnglishText.h (revision 7070)
+++ Utils/_Ja25EnglishText.h (working copy)
@@ -71,7 +71,12 @@
DC_TTI__DESERT_AND_URBAN,
DC_TTI__DESERT_AND_SNOW,
DC_TTI__URBAN_AND_SNOW,
- DC_TTI__UNKNOWN
+ DC_TTI__UNKNOWN,
+ DC_MSG__COVER_INFORMATION_WITH_DETAILED_CAMO,
+ DC_TTI__DETAILED_SOUND,
+ DC_TTI__DETAILED_STEALTH,
+ DC_TTI__DETAILED_TRAP_LEVEL,
+
};
extern STR16 gzDisplayCoverText[];
Index: Utils/_Ja25FrenchText.cpp
===================================================================
--- Utils/_Ja25FrenchText.cpp (revision 7070)
+++ Utils/_Ja25FrenchText.cpp (working copy)
@@ -498,7 +498,11 @@
L"D
Report message to a moderator
|
|
|
|
|
|
Re: Additional tile properties[message #331842]
|
Mon, 21 April 2014 00:42
|
|
CptMoore |
|
Messages:224
Registered:March 2009 |
|
|
Thank you anv! I was the guy making the comment in LOS.cpp, happy you changed the mechanics and made it work.
Report message to a moderator
|
Sergeant 1st Class
|
|
|
Goto Forum:
Current Time: Fri Apr 19 22:36:23 GMT+3 2024
Total time taken to generate the page: 0.07174 seconds
|