Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab  » Additional tile properties
Additional tile properties[message #330919] Fri, 28 February 2014 19:18 Go to previous message
anv

 
Messages:231
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:
Toggle Spoiler

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.
http://farm4.staticflickr.com/3755/12837607174_9fc67225d3_o.png

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.
http://farm4.staticflickr.com/3826/12837173035_3c3f5839f2_o.png

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



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Externalised taunts
Next Topic: Description Box enhancement: Compare Items
Goto Forum:
  


Current Time: Mon Jan 27 20:24:12 EET 2020

Total time taken to generate the page: 0.01678 seconds