Popular Post OGDA Posted March 22, 2021 Popular Post Report Posted March 22, 2021 (edited) Hello, as others have done, I'd like to start my own mapping thread to provide content I create in one place. Feel free to use anything from this map in your maps or for TDM integration. There is a book in the map with more description of the contained content. OGDA_Demomap Version v3: https://das-kartell.org/files/thedarkmod/ogda_demomap/ogda_demomap.zip Installation: Extract the content of the zip-file your "TDM install dir/fms" folder, the folder "TDM/fms/ogda_demomap" should be present afterwards. I'll post new versions from time to time when I have new content ready. Current map contents: v1: New Paintings (for details see here: New paintings thread v2: TDM Fountain prefab expanded with base, water, light and particles Drainable/fillable bath with sounds and secret compartment only accessible when drained Moving bookshelf with hidden compartment, very failsafe, the setup ensures no clipping or false states will happen (with one tiny exception, see book) Buildings (TDM defaults) with lights, monster-clip ond some details added New Buildings, mainly created from Springheel's TDM modules v3: Ambient light setup Additional info for the current version: - Foutain still needs monsterclipping - the largest building on the right side has a working window where the candle is, you can fill the room with content or revert the window to a func_static - most of the content that belongs together is grouped for easier copying/moving - most of the content is created for A night of loot 2, but that map is still in extremely early stages, there's no guarantee or release date for that one Credits: Additionally to content created by me, this map contains content provided by: - The Dark Mod - Obsttorte (i.a. fog script, texture blending) - Springheel (modules shipped with TDM) - TDM community github repo (Thread) Please let me know if you find content created by you in this map in case there isn't a mention yet. Screenshots: Edited April 22, 2021 by OGDA 5 1 Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
OGDA Posted March 22, 2021 Author Report Posted March 22, 2021 (edited) Space holder for further updates Edited March 22, 2021 by OGDA 1 Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
OGDA Posted March 27, 2021 Author Report Posted March 27, 2021 (edited) Ambient light setup It took me a while to figure this out, so I'm documenting it here. If there is a faster way to set the worldspawn lightgem_adjust arg per location than this or a technical mistake, please let me know. What this does: The location system allows to setup locations (areas), which enables each location to have unique settings like ambient sound, ambient light, etc. This setup here ensures that the ambient light for each location is adjustable and that the lightgem_adjust modifier of the global worldspawn gets adjusted for each area, instead of only setting this just once on map load. This solves a problem where guards in dark indoor areas don't recognize the player at normal distance and recognize the player far too soon when stepping outside in a moonlit street while the player is still in a "not active lit" place. It looks like a long act, but it doesn't take long and as soon as it is set up, the mapping for a new location is fast, as it is only setting up a few new entities and spawnargs/targets. ######## Definitions/needed objects, location system of TDM, this consists of: one atdm:location_settings entity (containing some definitions) several info_location entites (one in each location) several info_locationseparator entities (each sitting in the middle of a Visportal, so that all visportals which split off a location from another have one. Visportals within a location not leading to another location don't need this entity.) ######## I'm listing every property here, so some have just descriptive values. Worldspawn: Add the spawnarg lightgem_adjust: 0 to one brush (as usual, any worldbrush will then have it). ---- Create the ambient light by making a light entity (one per map). The _color (=intensity) gets set to zero. My ambient_light and ambient_light_dynamic definitions in the info_location entities otherwise would make the light far too bright (seems to get multiplied) and I define the light values solely with the info_location entities. Additionally this gives a nice effect at map startup, where the ambient is black first and then rises to the level of the current location, like as if the eyes are slowly adapting to the darkness. Entity Light: classname: light name: ambient_world _color: 0 0 0 light_center: 0 0 0 light_radius: scale, to cover your whole map nodiffuse: 0 noshadows: 0 nospecular: 0 origin: place, where you like parallel: 0 texture: lights/ambientlightnfo ---- Create the atdm:location_settings entity (one per map). You can define the sound definitions (property and value) as you like. Entity location_settings: classname: atdm:location_settings name: atdm:location_settings ambient_light_dist_scale: 1.0 ambient_light_dynamic_cap: 0.1 0.1 0.1 ambient_light_fade_time: 7 this is the it takes the ambient light to adjust when traversing to a new location and at map startup ambient_light_falloff: 1 origin: where you want to place it s_shader: silence snd_cellar: phantoms snd_inside: mansion_tense01a snd_outside: city_sleeps01 snd_placeholder1: desolation_loop snd_upstairs: derelict01 ... and so on with the sound definitions ---- In the middle of all Visportals, sealing one location from another, put a info_locationseparator entity. Entity info_locationseparator: classname: info_locationseparator name: info_locationseparator ..._1, ..._2, iterate, doesn't matter origin: middle of the according Visportal ---- Inside each location, put one info_location entity. Entity info_location: classname: info_location name: info_location ..._1, ..._2, iterate, doesn't matter ambient: snd_inside use a sound property-field defined in the adtm:location_settings entity ambient_light: 0.027 0.027 0.027 this is an example, use whatever light level you want to define for this location. 0.027 equals a light level of 7. Note, that if you use the color picker - red/green/blue of this field, the value might be automatically reduced each time you deselect/reselect, don't know if this is bug, so recheck the values. ambient_light_dynamic: 0 0 0 with an ambient_light of 7 = 0.027 this ambient_light_dynamic value of 0 gives a good shop indoor brightneess, if you set ambient_light_dynamic to 0.002 0.002 0.002 with ambient_light 7, this gives a much brighter moonlit street look, but you can also leave ambient_light_dynamic at 0 and just increase ambient_light. origin: in your location area volume: 0 loudest ambient sound call_on_entry: adjustlightgem the function name in yourmapname.script lightgemmodifier: -1 a custom spawnarg, read by the function adjustlightgem in yourmissionname.script For valid values for lightgemmodifier see this wiki page: https://wiki.thedarkmod.com/index.php?title=Virtual_Darkness For example an ambient_light value of 7 (with ambient_light_dynamic value 0) should have a lightgemmodifier of -1. ---- Create a textfile (replace yourmissionname everywhere): TDM/fms/yourmissionname/maps/yourmissionname.script with the content: #include "script/yourmissionname.script" ---- Create the folder: TDM/fms/yourmissionname/script And create the file (this looks a bit redundant here, but you can include several script files in the first file and reference them): TDM/fms/yourmissionname/script/yourmissionname.script and insert the content (extend as you like): void adjustlightgem(entity location) { string location_name = location.getName(); float lightgemmodifier = location.getFloatKey("lightgemmodifier"); // console debugging // sys.print ("Entering location: " + location_name + "\n"); // sys.print ("lightgemmodifier: " + lightgemmodifier + "\n"); $player1.setLightgemModifier("worldspawn", lightgemmodifier); } ---- Result: The ambient light transitions from location to location and the worldspawn lightgem_adjust arg gets set accordingly, and you have a nice effect at map startup. Edited March 28, 2021 by OGDA 3 Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
Obsttorte Posted March 27, 2021 Report Posted March 27, 2021 3 hours ago, OGDA said: If there is a faster way to set the worldspawn lightgem_adjust arg per location than this or a technical mistake, please let me know. If you wan't to adjust the lightgem modifier (or any other value) via the locations system, you should use the locations system. Modify the script to do what you desire and use an additional spawnarg on the location entities to specify the lightgem modifier for the respective location. 2 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
OGDA Posted March 28, 2021 Author Report Posted March 28, 2021 (edited) Ok, I think I have something, I'll try it out and then post it here. Edited March 28, 2021 by OGDA Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
OGDA Posted March 28, 2021 Author Report Posted March 28, 2021 (edited) Ambient light setup updated, it's now much simpler thanks to Obsttorte's hint. @Obsttorte Thank you very much! Updated to ogda_demomap v3. Edited March 28, 2021 by OGDA Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
Obsttorte Posted March 28, 2021 Report Posted March 28, 2021 You seemed to have misunderstood me. I was talking about adjusting the location_settings script object used by the location entities that gets shipped with the mod. This would completely neglect the need to call a seperate script function for each location. Instead, the only thing the mapper would have to do is to specify the lightgem adjust value one the location entity. Script functions placed in the mission script are normally only suitable for one time instances specific for the respective mission, like initiating a scripted sequence or event, something story-related, a custom objective or whatever. For reoccuring stuff that is intented to be reused in other missions setups as the above should be avoided, as they are hard to adjust, most often more time consuming to setup and much more sensitive to errors, not to mention the amount of time it takes to find and fix said errors. I would advise that you familiarize yourself with scriptobjects as well as entity definitions. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
OGDA Posted March 28, 2021 Author Report Posted March 28, 2021 (edited) I've only started getting into TDM scripting, so I'm not completely sure where to find that. Wouldn't that mean I would have to ship a script that overrides a default TDM function with the map? If that's the case, I would prefer the current way with a custom script and only one additional call (for future update security). If you mean something different, do you perhaps have an example in one of your maps where you've done something like that, I can look at? Edited March 28, 2021 by OGDA Quote FM: A Night Of Loot: One Man's Treasure Mapping: OGDA's Mapping Thread New Paintings for TDM: New Paintings Thread
Obsttorte Posted March 28, 2021 Report Posted March 28, 2021 Well, you can either override the scriptobject file in your fm or you store it under a different name and use that modified version in your fm. Either way, script objects don't altered all too often for compatibility sake. Worst case scenario when overriding the stock file is that the new line added would have to be added to the updated file. An example were I modify the location system is the hitman style script iirc. You can find the file and a description in my mapping thread as well as in one of my wiki articles. See my signature. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.