Jump to content
The Dark Mod Forums

Search the Community

Searched results for '/tags/forums/perl script/' or tags 'forums/perl script/q=/tags/forums/perl script/&'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • News & Announcements
    • The Dark Mod
    • Fan Missions
    • Off-Topic
  • Feedback and Support
    • TDM Tech Support
    • DarkRadiant Feedback and Development
    • I want to Help
  • Editing and Design
    • TDM Editors Guild
    • Art Assets
    • Music & SFX

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. As you probably know, overriding core files which are not specifically designed for that is fragile and unsupported. Indeed, it usually works... until it does not Here is the list of missions which completely override tdm_weapon_arrow.script: ahouseoflockedsecrets @Moonbo byanyothername @joebarnin cauldron_v2_2 @kingsal good @Amadeus hazard @kingsal northdale1 @Goldwell northdale2 @Goldwell seeking @Amadeus@Dragofer@Wellingtoncrab snowed_inn @Goldwell @kingsal written @Amadeus @Dragofer I have just got rid of creating cvars dynamically (5600), and shooting the bow stopped working in these missions. Because they distribute an old version of the script which runs in "debug mode" that relies on dynamic cvars. Core version was updated some time ago and this debug mode was removed. I'd like to ask authors: why did you decide to override this script? Perhaps we can add some customization points and delete overrides?
  2. For the FM? For beta 1 it's here: https://drive.proton.me/urls/H1QBB04GA0#oBZTb1CmVFQb I've already done around 100 fixes though, so you might want to wait for beta 2 which should be ready in a couple of days hopefully. All links are in the first post of the beta thread here: https://forums.thedarkmod.com/index.php?/topic/22439-the-lieutenant-3-foreign-affairs-beta-testing/
  3. For the people eager to play with the latest state of development, two things are provided: regular dev builds source code SVN repository Development builds are created once per a few weeks from the current trunk. They can be obtained via tdm_installer. Just run the installer, check "Get Custom Version" on the first page, then select proper version in "dev" folder on the second page. Name of any dev version looks like devXXXXX-YYYY, where XXXXX and YYYY are SVN revision numbers from which the build was created. The topmost version in the list is usually the most recent one. Note: unless otherwise specified, savegames are incompatible between any two versions of TDM! Programmers can obtain source code from SVN repository. Trunk can be checked out from here: https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/ SVN root is: https://svn.thedarkmod.com/publicsvn/darkmod_src Build instructions are provided inside repository. Note that while you can build executable from the SVN repository, TDM installation of compatible version is required to run it. Official TDM releases are compatible with source code archives provided on the website, and also with corresponding release tags in SVN. A dev build is compatible with SVN trunk of revision YYYY, where YYYY is the second number in its version (as described above). If you only want to experiment with the latest trunk, using the latest dev build gives you the maximum chance of success. P.S. Needless to say, all of this comes with no support. Although we would be glad if you catch and report bugs before the next beta phase starts
  4. After some amount of work I'm happy to be able to share my Christmas gift for TDM! Or at least half of it, considering the other half is still only in design phase. I created an addon that implements detailed player functionality, inspired by the first DeusEx game (The Conspiracy). It's NOT a mission script but an addon, meaning you place the pk4 in your TDM directory to enable the system and it will automatically work in each and every FM. Note that due to using tdm_user_addons.script / user_addon_init() it may disable or get disabled by other addons you have installed... this is a design limitation which can hopefully be lifted at some point in the future. This plugin will be included in my cyberpunk total conversion The Dark Module and automatically active with it, but first I shall design it and make it available as a small independent addon for vanilla TDM. In the current initial release it implements just per-limb damage; The upcoming plan is to add a skill / augmentation system, allowing the player to use loot as skill points to enhance various body parts and gain new or improved abilities. Due to the scripting system being very limited in what it lets me modify, I'm still gathering documentation on how to implement those skills and which I can have. So until then detailed body damage with penalties remains the only part that's theoretically finished so far (further improvements are required here too)... including a HUD component above the lightgem showing the status of each body part: Green = full health, yellow = half health, red = (close to) no health, black = no health left. The individual limbs available: Head, Torso, Left Arm, Right Arm, Left Leg, Right Leg... arms and legs work in unity however. They each take damage with the player as well as healing together with them. The more damaged a group is, the more a respective penalty is applied to the player. Groups and penalties include: Head: When the head is damaged, the player begins to get dizzy and has their vision impaired. Currently the only effect replicates the flashbomb, causing white dots to appear around the player and disrupt their view until the head is healed. As the player can't live without a head, reaching 0 will cause instant death. More effects are possible and pending. Torso: Damage to the torso translates to damage to the cloak, increasing the player's lightgem and rendering them more visible even in dark spots. As the player can't live without a torso, reaching 0 will cause instant death. Given script limitations I'm unable to simulate lung damage and decrease / limit the amount of air the player has. Arms: Arm damage makes it difficult for the player to hold items: In-world objects being held will probabilistically get dropped, more often the worse your arms are hurt. When both arms reach 0 health, the player can no longer pick up anything in the world without instantly dropping it... you also become unable to use any weapons. Due to limitations in the scripting system, I'm unable to decrease the speed or accuracy of the blackjack / sword / bow as was desired. Legs: As expected leg damage will make the player walk more slowly. It was desired that when one leg is lost the player can no longer jump, whereas when both legs are gone you remain stuck in crouch mode until healed... due to limitations in the scripting system this part is also not possible at the moment. A crude limitation is the fact that limb damage is primarily based on the direction the player is walking toward... for example, increased likelihood of suffering damage to your right arm and leg if strafing right the moment you take the damage. The script system doesn't let you extract the vector direction of the last damage event, thus I can't use the real direction the hit came from when calculating which body part should absorb the most health loss. This means that even if an arrow comes from above and hits the player's head area, the player will only take damage to the legs if they're falling downward the moment they got hit... for the time being this provides a bare minimum amount of realism but is a very bitter implementation. For this reason it would be greatly appreciated if any of the code developers could join this discussion and verify if they can help with adding the necessary hooks to external scripts: With 2.09 getting periodic beta releases at this point in time, it would be a great opportunity to make changes to the builtin player script that allow an external function to modify more player variables. This includes the efficiency of weapons, if the player is allowed to jump or forced to always crouch, and I'd also really appreciate a hook to manipulate the breath so air can be lowered as if the player is underwater. I understand other priorities exist or if the work may be considered too much, however this would help in being able to finish this mod with the proper functionality and planned skill set. In the meantime let me know what you think of this idea and how I went about it! So far no new assets are included except the GUI graphics: Everything is done with less than 250 lines of script which I'd say is a good achievement I've attached the pk4 and since it's so lightweight I'll also add the main script straight in this post. player_damage_1.0.pk4 #define DAMAGE_WAIT 0.0166667 #define EXPOSURE_ARM_LEFT 2 #define EXPOSURE_ARM_RIGHT 2 #define EXPOSURE_LEG_LEFT 2 #define EXPOSURE_LEG_RIGHT 2 #define EXPOSURE_HEAD 3 #define EXPOSURE_TORSO 1 #define PENALTY_TORSO_LIGHTGEM 4 player self; float damage_gui; boolean dizzy; entity dizzy_particles; float bound(float val, float min, float max) { if(val < min) return min; if(val > max) return max; return val; } // Range based probability: Calculates a probability per frame independent of wait time (0 - 1 range at 1 chance per second) boolean prob(float x) { return sys.random(1) > x && sys.random(1) < DAMAGE_WAIT; } // Directional exposure calculator float dex(vector dir, float ex_front, float ex_back, float ex_right, float ex_left, float ex_up, float ex_down) { float maxvel = 100; float dir_front = bound(dir_x / maxvel, 0, 1) * ex_front; float dir_back = bound(-dir_x / maxvel, 0, 1) * ex_back; float dir_right = bound(dir_y / maxvel, 0, 1) * ex_right; float dir_left = bound(-dir_y / maxvel, 0, 1) * ex_left; float dir_up = bound(dir_z / maxvel, 0, 1) * ex_up; float dir_down = bound(-dir_z / maxvel, 0, 1) * ex_down; return dir_front + dir_back + dir_right + dir_left + dir_up + dir_down; } void player_damage_update_arm(float dmg_l, float dmg_r) { float hl_l = self.getFloatKey("health_arm_left"); float hl_r = self.getFloatKey("health_arm_right"); float hl = (hl_l + hl_r) / 2; if(dmg_l != 0 || dmg_r != 0) { hl_l = bound(hl_l - dmg_l, 0, 1); hl_r = bound(hl_r - dmg_r, 0, 1); hl = (hl_l + hl_r) / 2; self.setKey("health_arm_left", hl_l); self.setKey("health_arm_right", hl_r); self.setGuiFloat(damage_gui, "PlayerDamage_ItemArmLeft", hl_l); self.setGuiFloat(damage_gui, "PlayerDamage_ItemArmRight", hl_r); // Penalty #1: Disable the weapon once the arm are damaged to minimum health if(hl == 0) { self.selectWeapon(WEAPON_UNARMED); self.disableWeapon(); } else { self.enableWeapon(); } } // Penalty #2: Probabilistically drop held items based on arm damage if(hl == 0 || prob(hl)) if(self.heldEntity() != $null_entity) self.holdEntity($null_entity); } void player_damage_update_leg(float dmg_l, float dmg_r) { float hl_l = self.getFloatKey("health_leg_left"); float hl_r = self.getFloatKey("health_leg_right"); float hl = (hl_l + hl_r) / 2; if(dmg_l != 0 || dmg_r != 0) { hl_l = bound(hl_l - dmg_l, 0, 1); hl_r = bound(hl_r - dmg_r, 0, 1); hl = (hl_l + hl_r) / 2; self.setKey("health_leg_left", hl_l); self.setKey("health_leg_right", hl_r); self.setGuiFloat(damage_gui, "PlayerDamage_ItemLegLeft", hl_l); self.setGuiFloat(damage_gui, "PlayerDamage_ItemLegRight", hl_r); // #Penalty #1: Make movement slower self.setHinderance("health", 0.25 + hl * 0.75, 1); } } void player_damage_update_head(float dmg) { float hl = self.getFloatKey("health_head"); float time_current = sys.getTime(); if(dmg != 0) { hl = bound(hl - dmg, 0, 1); self.setKey("health_head", hl); self.setGuiFloat(damage_gui, "PlayerDamage_ItemHead", hl); // Penalty #1: Without a head the player dies if(hl == 0) self.damage(self, self, self.getOrigin(), "damage_suicide", 1); // Penalty #2: Simulate dizzyness starting at half health if(hl <= 0.5) { if(!dizzy) { dizzy_particles = sys.spawn("func_emitter"); dizzy_particles.setModel("flashbomb.prt"); dizzy_particles.setOrigin(self.getEyePos()); dizzy_particles.bind(self); dizzy = true; } } else { if(dizzy) { dizzy_particles.remove(); dizzy = false; } } } } void player_damage_update_torso(float dmg) { float hl = self.getFloatKey("health_torso"); if(dmg != 0) { hl = bound(hl - dmg, 0, 1); self.setKey("health_torso", hl); self.setGuiFloat(damage_gui, "PlayerDamage_ItemTorso", hl); // Penalty #1: Without a torso the player dies if(hl == 0) self.damage(self, self, self.getOrigin(), "damage_suicide", 1); // Penalty #2: Torso damage negatively affects the lightgem self.setLightgemModifier("damage", (1 - hl) * PENALTY_TORSO_LIGHTGEM); } } void player_damage() { sys.waitFrame(); self = $player1; damage_gui = self.createOverlay("guis/player_damage.gui", 1); float health_old = 100; // Init by sending a heal event filling the limbs to full health player_damage_update_arm(-1, -1); player_damage_update_leg(-1, -1); player_damage_update_head(-1); player_damage_update_torso(-1); while(1) { // sys.waitFrame(); sys.wait(DAMAGE_WAIT); float health_current = self.getHealth(); float dmg = (health_old - health_current) / 100; float dmg_arm_left = dmg * EXPOSURE_ARM_LEFT; float dmg_arm_right = dmg * EXPOSURE_ARM_RIGHT; float dmg_leg_left = dmg * EXPOSURE_LEG_LEFT; float dmg_leg_right = dmg * EXPOSURE_LEG_RIGHT; float dmg_head = dmg * EXPOSURE_HEAD; float dmg_torso = dmg * EXPOSURE_TORSO; // If this is damage and not healing, apply directional damage to each limb if(dmg > 0) { // Currently we estimate damage direction based on the player's velocity, we should fetch the real direction of a damage event when this becomes possible vector dir = self.getMove(); vector ang = self.getViewAngles(); // Protections based on the player's position and relation to the environment // protection_look: 1 when looking up, 0 when looking down // protection_low: Higher as the lower part of the body is exposed float protection_look = 1 - (90 + ang_x) / 180; float protection_low = 1; if(self.AI_CROUCH) protection_low = 0; else if(self.AI_ONGROUND) protection_low = 0.75; // Use the dex function to calculate directional exposure patterns, direction order: Front, back, right, left, up, down // Arms: Somewhat likely to be hit, no added protection // Legs: Somewhat likely to be hit, added protection when the player is crouching // Head: Unlikely to be hit, added protection when the player is looking down // Torso: Likely to be hit, no added protection float exposure_arm_left = bound(sys.random(0.375) + dex(dir, 0.5, 0.25, 0.0, 1.0, 0.0, 0.25), 0, 1); float exposure_arm_right = bound(sys.random(0.375) + dex(dir, 0.5, 0.25, 1.0, 0.0, 0.0, 0.25), 0, 1); float exposure_leg_left = bound(sys.random(0.375) + dex(dir, 0.75, 0.5, 0.0, 0.5, 0.0, 1.0) * protection_low, 0, 1); float exposure_leg_right = bound(sys.random(0.375) + dex(dir, 0.75, 0.5, 0.5, 0.0, 0.0, 1.0) * protection_low, 0, 1); float exposure_head = bound(sys.random(0.25) + dex(dir, 0.25, 0.75, 0.5, 0.5, 1.0, 0.0) * protection_look, 0, 1); float exposure_torso = bound(sys.random(0.5) + dex(dir, 0.75, 1.0, 0.0, 0.0, 0.0, 0.0), 0, 1); // Apply the exposure to damage, multiplied to simulate the sensitivity / resistance of each limb dmg_arm_left = exposure_arm_left * dmg * EXPOSURE_ARM_LEFT; dmg_arm_right = exposure_arm_right * dmg * EXPOSURE_ARM_RIGHT; dmg_leg_left = exposure_leg_left * dmg * EXPOSURE_LEG_LEFT; dmg_leg_right = exposure_leg_right * dmg * EXPOSURE_LEG_RIGHT; dmg_head = exposure_head * dmg * EXPOSURE_HEAD; dmg_torso = exposure_torso * dmg * EXPOSURE_TORSO; } player_damage_update_arm(dmg_arm_left, dmg_arm_right); player_damage_update_leg(dmg_leg_left, dmg_leg_right); player_damage_update_head(dmg_head); player_damage_update_torso(dmg_torso); health_old = health_current; } }
  5. That is my recollection too. The i18n system was basically Tels' personal pet project (hence the Perl script which is unmaintained because nobody in the world except Tels and Larry Wall have any interest in writing code in Perl). Because of the various implementation problems and general user-unfriendliness, Greebo didn't approve of merging it into the main mod, so it became a sort of optional extra that individual mappers could use by accessing various resources on Tels' personal server.
  6. Hey @stgatilov, sorry for the late reply. In looking at the tdm_weapon_arrow.script in A House of Locked Secrets, there is a comment line that says "Adjusted to stop the raising and lowering animations during a realm transition." From what I remember, when the player was switching between the physical and spiritual realms, if the player was holding a bow the lowering animation would play upon starting the switch and the raising would play after it. And so we modified the script to disable those animations during a realm switch. That was the only adjustment that should be present. I think if you look for the line "if($info_player_realm.getKey("transiting") == "0")" it should be quick to spot where those checks were made. Thanks! -Gelo
  7. In By Any Other Name, I needed to deactivate the sword, bow, and blackjack for a while (during the middle part of the mission). I couldn't figure out how to "turn off" the bow, and then later turn it back on again. So I ended up cloning tdm_weapon_arrow.script, and modding it (adding a special variable that got checked when you tried to raise the bow). Pretty kludgy, and obviously can lead to breakage. (I also had to make similar changes to tdm_weapon_blackjack.script and tdm_weapon_shortsword.script.) Maybe all I need to do is remove all of the arrow ammo. That way the bow won't raise. That still leaves the blackjack and sword. I think there was a way of deactivating weapons, but I couldn't activate them back on again (?)
  8. So this revised script is part of Kingsal's arrow mod, and the script tweaks a few values such as the ARROW_zoomdelay from "6" seconds to "3" and a few other things. I also thought this was the script that increases bow draw speed, but I guess that is done in the associated .def files instead. These tweaks were made so that gameplay would feel a bit more fluid when drawing and firing arrows.
  9. ============== -= IRIS =- ============== WELLINGTONCRAB TDM v 2.10 REQ Ver. 1.2 *For Maureen* -=- "Carry the light of the Builder, Brother. Unto its end." -Valediction of the Devoted "What year is this? Am I dreaming?" -Plea of the Thief Dear Iris, I am old and broken. When we were young it felt like the words came easily. Now I find the ink has long dried on the pen and I'm as wanting for words as coin in my purse. I can tell we are nearing the end of the tale; time enough for one more job before the curtain call... ============== -Installation- Requires minimum version of TDM 2.10 -Iris does not support mods or the Unofficial Patch- Download and place the following .pk4 into you FMs directory: Iris Download ============== *Thank you for playing. Iris is a large mission which can either take as quickly or as long as you are compelled to play. I hope someone out there enjoys it and this initial release is not completely busted - I tried the best I could!* *Iris both is and isn't what it seems. If commenting please use spoiler tags where appropriate. If you are not certain if it would be appropriate a good assumption would be to use a spoiler tag* *Support TDM by rating missions on Thief Guild: https://www.thiefguild.com/* ============== WITH LASTING GRATITUDE: OBSTORTTE - Whose gameplay scripts from his thread laid the foundation which made the mission seem like something I could even pull off at all. Also fantastic tutorial videos! DRAGOFER - Who built upon that foundation and made it shine even brighter! And whom also provided immeasurable quantities of help and encouragement the past couple years on the TDM discord. ORBWEAVER & GIGAGOOGA - For generously offering their ambient music up for use. EPIFIRE - Who lent me his fine trash and trash receptacle models. AMADEUS - Who was the first person who wasn't me to play the damn thing and provided his excellent editorial services to improving the readers experience playing TESTERS AND TROUBLESHOOTERS: AMADEUS * DATISWOUS * SPOOKS * ALUMINUMHASTE * JAXA * JACKFARMER * WESP5 * ATE0ATE * MADTAFFER * STGATILOV * DRAGOFER * KINGSAL * KLATREMUS - What can I possibly say? Playing this thing over and over again could not have been easy. Deepest thanks and all apologies. -=THANKS TO ALL ON THE TDM DISCORD AND FORUM=- ==SEE README.TXT FOR ADDITIONAL ATTRIBUTIONS & INFORMATION== HONORABLE MENTION: GOLDWELL - If I hadn't by chance stumbled into Northdale back in 2018/2019 I would probably still be trying to get this thing to work in TDS, which means it probably would not exist - though more details on that in readme. ============== Boring Technical Information: *This mission makes use of volumetric lighting in several scenes. While optional if you wish to see this feature enable the "maps" lighting model and I recommend you also disable image sharpening. If you do not like the effect or are concerned about performance use stencil shadows* *Iris is a performance intensive mission and I recommend a GTX 1060 or equivalent. I find the performance similar to other demanding TDM missions on my machine, but mileage may vary and my apologies if this prevents anyone from enjoying the mission.* *Iris heavily modifies the behavior of AI in the game, how they relate/respond to each other and the player. So they may act even stranger than they do typically in TDM. Feedback on this is useful - as it can potentially be improved and expanded upon in future patches.* -=- This is my first release and it has been a long time coming! If I forgot anything please let me know! God Speed. 2.10 Features Used:
  10. Just wanted to say thank you for this install script. Made life easier! I'm new to the dark mod (but not to thief) and have just set up my steam deck to try it whilst away for a few days. Looking forward to some portable sneaking!
  11. Arrows are a core part of TDM. They should be moved to C++ and have dedicated Cvars for both players and mission authors. Plan: 1) Implement Arrows in C++ ( evaluate changing some old defaults ) 2) Make associated Cvars "non-archived" 3) Mappers add mission.cfg to enforce their customizations 4) Players can alter mission.cfg to their preference Along the way, reduce some of the performance impact of the weapon script constantly invoking "raise torso" and other nonsense due to using scripts rather than C++ https://bugs.thedarkmod.com/view.php?id=4203
  12. Yep, moved on to greener pastures. BTW, what I quoted above from him will soon be untrue for Stone 24pt due to my upcoming bitmap surgery. Actually, the values in the current stone .dat file are already misaligned with what any archival font patcher script would produce, due to 2.12 tweaks with q3font & refont. I'll add a note to the wiki about this (explaining it better than here).
  13. I wanted to internationalise The Hare in the Snare before I released it but I couldn't get the scripts to work and had some other questions as well. I posted about it Newbie Dark Radiant Questions and nobody replied, so I gave up. It being my first FM I didn't feel confident digging into it and just wanted to release the FM. I just got the impression that it wasn't a big deal and nobody cared about it. From memory, the script worked once but I needed to re-run it and just couldn't get it to work. It's also Perl which nobody really uses anymore. I think I recommended to a 'I want to help' person to convert it to Python, but that didn't go anywhere. I don't think you need the script though if you internationalise from the very beginning (i.e. create your own dictionaries). At the end of the day it's extra work for the mapper and if it adds too much overhead (i.e. is broken or is a PITA) then nobody is going to use it. https://wiki.thedarkmod.com/index.php?title=Internationalization
  14. Why the sad face? Also, Kingsal would be better able to explain the changes, and he actually modified the script so that it is more TDM-friendly. This modified script is in Eye on the Prize and Moongate Ruckus
  15. The Adventures of Thomas: Lucy's Quest Author: gg 2022-06-20 Version: 1.1 Required TDM Version: 2.10 or higher EFX: Yes ============================================================== Cautionary note: This FM needs a strong CPU/GPU combination sufficient to play the more demanding TDM FMs. Just as for many or most of the new FMs being released with the new gfx possibilities opened up it does a world of good to tweak the advanced video settings for the best combination of settings for your PC. For example, on my weaker laptop I set shadows as stencil and soft shadows off. On my desktop I set shadows as maps and soft shadows medium. Bloom off. Ambient occlusion off. Since the FM was built and extensively tested at these settings I believe either should produce a satisfactory experience. ============================================================== Sound Credits: freemusicarchive.org music Aislinn04_-_Aislinn_-_Lovely_Maria freesound.org klankbeeld_horror_1 freesound.org/people/CarlosCarty/sounds/522687/ om_aum_mantra_male_chant_bb freesound.org/people/Still%20Frames/sounds/37720/ still_frames freemusicarchive.org music The_Mind_Orchestra_Bruwynn tecknic.bandcamp.com/album/the-dark-mod-ambience-and-atmospheres Zack Bower Ancient_2, _3, _5. Solemn_1 freesound.org/people/Jagadamba/sounds/256006/ group_chanting_om_aum ============================================================== Thanks to: The TDM/DR developers for producing such a beautiful machine. The keepers of the wiki pages which are looking very good these days. Sotha for his invaluable tutorial "The Bakery Job". This tutorial is a jewel. Springheel for creating an atmosphere. Bikerdude for... ideas how to do things and scale things. Playtesters and advisors Dragofer, wesp5, datiswous, shadow. datiswous pointed out some immersion breaking lighting faults, so I got the idea. wesp5 gave me some good advice on how to tell the story - so it's more understandable. Dragofer gave me some early advice on optimizing the mission, which gave me a couple of months work with results that are well worth it. Dragofer wrote a script which optimizes CPU calculations of AI interactions. Shadow helped by testing the script, as well as testing other attempts at optimization. With the script in action only the minimal of AI interactions in the player's vicinity are called to be calculated. The script provides a general benefit but the results vary from computer to computer. The script targets a CPU task. ============================================================== Gameplay: Notes attached to objectives contain essential information on gameplay, on who the good/bad guys are, on what the player must do, and why. Mandatory objectives are linear, directing the player along a route to the goal. Optional objectives can be completed anytime. ============================================================== CAUTION: spiders, rats, undead, necrophiles, cannibals, psychotic thugs, and some generally unsavory characters. No snakes, though. The spiders ate them. ==============================================================
  16. edit: TL;DR: I've tweaked the .lwo exporter to preserve autosmooth angle Ahem. When I started writing this post a couple of days ago, it was supposed to be a "please help me, models won't smooth" kind of thing, but as I started taking screenshots and such for a comprehensive view of the problem, the question morphed into a "is there a hack to get .lwo's to export the way .ase's do", then to "how to get the same surface smoothing from Blender as you can get from Lightwave" and eventually to "does anyone around know python and blender enough to fix the export plugin". But then I fixed the addon myself, so it was almost as if there's no point to the thread. However, while googling around for a solution I stumbled upon a whole bunch of incomplete (1,2) or outright wrong (1,2) information, and whenever the question came up the issue was never really resolved completely. That might be because the problem isn't obvious, since a lot of exported models will actually end up correctly smoothed on export, leading one to believe wrong shading in rare cases is due to modeling mistakes / bad shadowmesh / etc. Point is, having the definitive .lwo smoothing post seems useful. Identifying the problem: Here's the mesh. I add an 'edge split' modifier (I use sharp edges while modeling the low poly, so I can uncheck the 'edge angle' option). I can now apply the modifier(s) and export to .ase (triple the mesh either in export options or in modifiers beforehand). The .ase looks alright in-game: Now I'll export it to .lwo using this script. Depending on export options, here are the results: If I also check "remove doubles", I'll lose all of the split (sharp) edges: (recalculating normals on export can be unpredictable as well, so clean up the model beforehand instead) Right about this point I start searching for a solution online, stumble upon this and try the renderbump hack. However, all it seems to do is weld all of the vertices back together at runtime and attempt to smooth the whole surface, similarly to "remove duplicates", but with no upper threshold. (to anyone possibly reading this in the future: don't forget to revert your changes to the materials!) Source of the problem: At this point I still wasn't sure if it's even possible to get .lwo's identical to .ase's, so I installed Lightwave. Naturally, it took some time to eventually stumble upon Surface Editor (F5), and the "smoothing threshold" contained therein. But then I just had to crank it up to 180 and export to "LWO2". That fixes everything in-game: So the issue is trivial, I just have to find a way to somehow pass on a smoothing angle through the exporter. However, the "auto smooth" option on the object data tab doesn't seem to affect anything regardless of angle. Long story short, after some hex-comparison magic, I home in on SMAN block in the exporter script: So what it actually does is set your smoothing angle to either 90°, 86°(??), or 0°, depending on whether you've chosen "idtech compatible", "smoothed", or neither. The solution: Now, I don't know Python and I don't know Blender scripting, so I can't say with full certainty that I didn't break anything. But I did cobble together a version of the script that seems to do the job. Here it is, mirror / do whatever you want with it. If your mesh has autosmooth enabled, and you've checked "idtech" or "smoothed" on export, your chosen autosmooth angle will now transfer to the surface in .lwo: I took the liberty of changing the default export options to what seems to suit TDM the best, you can just open the script in notepad and edit them to your taste. Wrapping up, there are still some mysteries I didn't solve, such as "idtech compatible" models taking up only half the size of models exported otherwise (including from Lightwave itself), there doesn't seem to be any visible difference in-game, at least in TDM. That "1.5 radian" in the code still makes me scratch my head. And I still don't know if the 4-8x size savings over .ase matter for in-game memory at all (but at least I know I won't have to edit the *BITMAPs manually anymore). Even after all this, the .ase still has just slightly better shading, but since the outputs of the exporter and Lightwave itself are now identical, seems safe to say it's as good as it gets.
  17. BTW, the Perl script I18N.pl expects only an integer value after "#str_". Could be modified (or deprecated).
  18. Taffers, Time ago @Obsttorte and I worked on an AutoHotKey script that allows to control the player speed with the mouse wheel. In a further attempt to reduce the amount of critical keys this game demands I also created back then a script that allows the Left Alt Key to act as a lean modifier: Left Alt + W = Lean forward Left Alt + A = Lean left Left Alt + D = Lean right I never got around publishing the script because it isn't as good as it needs to be but I think we can debate regardless whether such a Lean Modifier Key would be welcomed in the core game or not. The most interesting aspect in my opinion is that we can claim back important keys such as Q and E and use them for other purposes. ---------------------------------------------------------------------- Here below is the script in case anyone wants to give it a try (you must be familiar with AutoHotKey). The required key bindings for the script to work are: Move forward [W], Strafe Left [A], Strafe Right [D] Lean Forward [Numpad8], Lean Left [Numpad4], Lean Right [Numpad6] You can of course change the script to your liking.... #IfWinActive ahk_exe TheDarkModx64.exe ; run only when TDM is in focus <!w:: while (GetKeyState("LAlt", "P") && GetKeyState("w", "P")) { Send {Blind}{Numpad8 down} } Send {Numpad8 up} return <!a:: while (GetKeyState("LAlt", "P") && GetKeyState("a", "P")) { Send {Blind}{Numpad4 down} } Send {Numpad4 up} return <!d:: while (GetKeyState("LAlt", "P") && GetKeyState("d", "P")) { Send {Blind}{Numpad6 down} } Send {Numpad6 up} return Cheers!
  19. There's been talk over the years on how we could improve texture quality, often to no avail as it requires new high-resolution replacements that need to be created and will look different and add a strain on system resources. The sharpness post-process filter was supposed to improve that, but even with it you see ugly blurry pixels on any nearby surface. Yet there is a way, a highly efficient technique used by some engines in the 90's notably the first Unreal engine, and as it did wonders then it can still do so today: Detail textures. Base concept: You have a grayscale pattern for various surfaces, such as metal scratches or the waves of polished wood or the stucco of a rough rock, usually only a few highly generic patterns are needed. Each pattern is overlayed on top of corresponding textures several times, every iteration at a smaller... as with model LOD smaller iterations fade with camera distance as to not waste resources, the closer you get the more detail you see. This does wonders in making any texture look much sharper without changing the resolution of the original image, and because the final mixture is unique you don't perceive any repetitiveness! Here's a good resource from UE5 which seems to support them to this day: https://dev.epicgames.com/documentation/en-us/unreal-engine/adding-detail-textures-to-unreal-engine-materials Who else agrees this is something we can use and would greatly improve graphical fidelity? No one's ever going to replace every texture with a higher resolution version in vanilla TDM; Without this technique we'll always be stuck with early 2000's graphics, with it we have a magic way of making it look close to AAA games today! Imagine being able to see all those fine scratches on a guard's helmet as light shines on it, the thousands of little holes on a brick, the waves of wood as you lean into a table... all without even losing much performance nor a considerable increase in the size of game data. It's like the best deal one could hope for! The idTech 4 material system should already have what we need, namely the ability to mix any textures at independent sizes; Unlike the old days when only a diffuse texture was used, the pattern would now need to be applied to both albedo / specular / normal maps, to my knowledge there are shader keywords to combine each. Needless to say it would require editing every single material to specify its detail texture with a base scale and rotation: It would be painful but doable with a text injection script... I made a bash script to add cubemap reflections once, if it were worth it I could try adapting it to inject the base notation for details. A few changes will be needed of course: Details must be controlled by a main menu setting activating this system and specifying the level of detail, materials properties can't be controlled by cvars. Ultimately we may need to overlay them in realtime, rather than permanently modifying every material at load time which may have a bigger performance impact; We want each iteration to fade with distance and only appear a certain length from the camera, the effect will cause per-pixel lighting to have to render more detail per light - surface interaction so we'll need to control the pixel density.
  20. Some good news! Tels dug around further in his old computers and found some gold. Namely, a whole fonts directory that includes GIMP .xcf files. Tels says: "The XCF files esp. are what I used to manually draw the new characters (like adding dots to an u to convert it to ü etc.) They contain many layers with different characters, that are layout exactly in the place where they need to be for the patcher script." That is, for english stone 24 pt, one .xcf file contains two independent RGBA bitmap layers, that can be saved separately as two .dds files. A quick glance of that content appears to match the current distributed stone_0_24.dds and stone_1_24.dds. So I won't need to back-convert from DDS to TGA after all. @Amadeus, I think a copy of this should be added to the TDM assets repository. Could you do that? * http://bloodgate.com/mirrors/tdm/pub/scripts/tdm_font_source.7z
  21. Also, related to font improvement, I've just released "ExportFontToDoom3All256", a reconstruction of an earlier but now lost tool variant. This is described and available in the wiki article ExportFontToDoom3 I tested that tool using one of the TDM FM fonts, Andrew Script, for which a TTF file is available. I generated a fresh set of bitmaps (newly including any available Latin-1 characters). I also mucked about with FontForge, to reconfigure that TTF to be ordered like the TDM custom codepage. However, Andrew Script is missing a fair number of Latin-1 glyphs, so it would take some work to make it good (whether by editing in FontForge or post-export as bitmaps). I'm putting that aside for now, since the jury is out on whether Western language support in FMs and their fonts will become viable (see Western language support in 2024?). Instead, I plan to turn my font-improvement-for-2.13 attention to Stone 24pt, which (because its used in HUD captions) is more clearly worthwhile to work on. Looks like I'll have to convert the Stone DDS to TGA as a prerequisite to bitmap editing.
  22. Thought it would be a good idea to collate a useful list for new and old mappers alike and this post will update as we go. Abandoned works: Any WIP projects that were abandoned by the original author - http://forums.thedarkmod.com/topic/12713-abandoned-works/ Darkradiant & Darkmod shortcut settings: Some example settings for new mappers - http://forums.thedarkmod.com/topic/15152-darkradiant-and-darkmod-shortcut-folder-settings/ Darkradiant howto, must knows, tips and faqs - http://forums.thedarkmod.com/topic/12558-usefull-important-editing-links/?do=findComment&comment=272581 Info for Beginners: Newbie DarkRadiant Questions - http://forums.thedar...iant-questions/ Dark Radient Must Know Basic Intro - http://wiki.thedarkm...now_Basic_Intro Editing Tips for Beginners - http://wiki.thedarkm...s_for_Beginners Editing FAQ (Troubleshooting & How-To) - http://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To Sotha's excellent Mapping Tutorial series: http://forums.thedarkmod.com/topic/18680-lets-map-tdm-with-sotha-the-bakery-job/ Springheel's New Mapper's Workshop: http://forums.thedarkmod.com/topic/18945-tdm-new-mappers-workshop/ Inspiration: Collection of screenshots and images people have found online - http://forums.thedarkmod.com/topic/11610-darkmod-inspiration-thread/ Mapping Resources: List of Voice actors available for voice recording - http://modetwo.net/d...6-voice-actors/ Lengthy collection of city reference pictures - http://modetwo.net/d...rence-pictures/ Collection of texture resource sites - http://modetwo.net/d...ture-resources/ Free Ambient Tracks - http://skeksisnetlabel.wordpress.com/2009/12/30/10-songs-for-free-download-vol-10-full-moon-over-noricum/ Mapping Tools: 3 useful tools for texture creation - http://forums.thedarkmod.com/topic/18581-must-have-tools-for-the-descerning-mapper/ Modular Building: What is Modular building - http://forums.thedarkmod.com/topic/14832-modular-building-techniques/ Working example tutorial on modular building - http://forums.thedarkmod.com/topic/18680-lets-map-tdm-with-sotha-the-bakery-job/ Springheels new modular models - http://forums.thedarkmod.com/topic/18683-using-springheels-205-modules/ Some related mapper recipies - Easy Vaults - http://forums.thedarkmod.com/topic/14859-easy-vault-recipe/?hl=%2Beasy+%2Brecipe Easy Outdoors - http://forums.thedarkmod.com/topic/16159-easy-outdoors-recipe/?hl=%2Beasy+%2Brecipe Easy Caverns - http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/?hl=recipe Easy Alert Ai - http://forums.thedarkmod.com/topic/17157-easy-alert-ai-recipe/?hl=%2Beasy+%2Brecipe Easy Alert Ai Custom Behavour - http://forums.thedarkmod.com/topic/17160-easy-alert-ai-custom-behavior-recipe/?hl=recipe Tutorials: Collection of video tutorials for DR - http://modetwo.net/d...in-darkradiant/ Using Lighting and detail effectively: - http://forums.thedar...l-and-lighting/ Voice Actors list: List of available voice actors - http://forums.thedarkmod.com/topic/12556-list-of-available-voice-actors/ Usefull Console commands: A list of console commands for testing in-game - http://wiki.thedarkm...Useful_Controls
  23. Do we have any volunteer to participate in fixing these missions? The first (and perhapsthe most important) step is to download these missions, diff tdm_weapon_arrow.script against stock version, and list all the things that are actually customized.
  24. Is it not possibly to just add a small script to these missions that only does this: #define ARROW_ZOOMDELAY 3 //VOLTA MOD Edit: I haven't installed the newest tdm version yet, so I guess this might be complete nonsense..
  25. I can understand your frustrations, however the main reason why we have had to replace the core files is because we don’t have the ability to make tweaks to the core game without doing this. In particular having the bow speed reduced from 6 seconds to 3 feels a lot better ingame. And it’s something that I personally have in all of my missions since I saw it in Kingsal’s mission the first time. If it’s possible for us to tweak that variable without needing to replace the .script file that would be really handy.
×
×
  • Create New...