Search the Community
Searched results for '/tags/forums/a script/' or tags 'forums/a script/q=/tags/forums/a script/&'.
-
I don't know of any "pure" way of doing this. But I think I've come up with a semi-kludgy way. Assumptions: path_cornerA points to path_cornerB (if guard) or path_cornerC (if thug). On the path_cornerA, target a atdm:target_callscriptfunction. This callscriptfunction object has the following spawnargs "foreach" "1" "call" "pathChoice" "target" "pathCornerA" path_cornerA also has two custom spawnargs: "guardPath" "pathCornerB" "thugPath" "patchCornerC" Write a script function, 'pathChoice': void pathChoice(entity ent_pathnode, entity ent_ai, entity ent_callscriptfunction) { if (ent_ai.getTeam() == 2) { sys.println("guard"); entity nextPathGuard = ent_pathnode.getEntityKey("guardPath"); sys.println("the next path is " + nextPathGuard.getName()); ent_ai.stopPatrol(); ent_ai.addTarget(nextPathGuard); ent_ai.restartPatrol(); } else if (ent_ai.getTeam() == 6) { sys.println("thug"); entity nextPathThug = ent_pathnode.getEntityKey("thugPath"); sys.println("the next path is " + nextPathThug.getName()); ent_ai.stopPatrol(); ent_ai.addTarget(nextPathThug); ent_ai.restartPatrol(); } } The script code determines whether the AI is a thug or a guard, and gets the appropriate custom spawnarg from the path_corner. You just need one pathChoice script. For each of the "decision" nodes, you need an atdm:target_callscriptfunction that targets back to the node. And the node needs the "guardPath" and "thugPath" spawnargs. Not perfect, but hopefully good enough?
-
Proposal - Changing some Text files to GPL3 licencing.
OrbWeaver replied to whoozzem's topic in TDM Tech Support
I would certainly be in favour of all DEF, MTR, SNDSHD and SCRIPT files being GPL3. Although these files may refer to artistic assets, they are not artwork themselves, but a form of code. -
I would like the development team to consider applying the GPL3 licence to the following Text file which was created by @Tels, @Greebo and @Dragofer. tdm_internal_engine.mtr (darkmod>materials) The reason for this request is that it is a critical core file and without it the engine (when built from source) cannot launch at all. I would also like to query whether the following script files created by @Obsttorte and @Dragofer: tdm_audiograph.script tdm_camgoyle.script tdm_grandfather_clock.script tdm_safe_lock.script tdm_safe.script tdm_turret.script were intentionally released under the CC-BY_NC_SA_3 licence or if this was an oversight? I ask since all other .script files included with TDM (and which are all called by the engine source) all contain GPL3 headers while these files have no licence information at all so naturally fall under the CC-BY_NC_SA_3 licence. Additionally in investigating which text files are required by the engine depending on scenario (and while I understand that the number of developers who are no longer on the development team may affect how many of these files can be licenced) I wondered if these too may be open for consideration as to their licence? tdm_base.def tdm_soundprop.def cursor.gui mainmenu_background_custom.gui mainmenu_background.gui mainmenu_briefing_video.gui mainmenu_briefing.gui mainmenu_credits_background.gui mainmenu_credits.gui mainmenu_custom_defaults.gui mainmenu_custom_defs.gui mainmenu_debriefing_video.gui mainmenu_defs.gui mainmenu_download.gui mainmenu_failure.gui mainmenu_loadsave.gui mainmenu_main_ingame.gui mainmenu_main.gui mainmenu_message.gui mainmenu_music.gui mainmenu_newgame.gui mainmenu_objectives.gui mainmenu_quit.gui mainmenu_settings_audio.gui mainmenu_settings_controls.gui mainmenu_settings_gameplay.gui mainmenu_settings_gamma.gui mainmenu_settings_guisize.gui mainmenu_settings_language.gui mainmenu_settings_video.gui mainmenu_settings.gui mainmenu_shop.gui mainmenu_success.gui mainmenu_utils.gui mainmenu.gui msg.gui tdm_objectives_core.gui tdm_subtitles_common.gui tdm_subtitles_message.gui tdm_gui.mtr tdm_tables.mtr tdm_guis.sndshd all.lang english.lang These provide the foundation of a working base main menu. TDM's main menu also includes several undocumented commands (that neither show in listcmds nor listcvars) which are useful to know for anyone wishing to use the base source code. I have listed the .lang files solely because of the #StringNum associations, I appreciate that they are not truly required for the above to be a foundation. While looking into how far I could break TDM in removal of files, I came across this thread by @Fiver suggesting a Libre version of TDM: https://forums.thedarkmod.com/index.php?/topic/22346-libre-version-of-tdm/ I believe that in that instance all text based files would need to be GPL3 licenced, leaving only videos, sounds, textures, models and the like as still being under the CC_BY_NC_SA_3 licence since remaking the files would likely result in most cases with near-identical looking files to the original. Thankyou for your consideration.
-
That does indeed sound useful. I ran into this problem with Foreign Affairs and all the custom textures. But I wonder if that functionality would be better placed in a DR script instead? Then everyone would benefit and not just users of this tool. Obviously it wouldn't prevent stuff getting packed in the FM, but it could identify the things not being used and the mapper could then manually remove them, leaving them with a clean source folder. Or even delete the stuff if you want it to?
-
It might be best to simply encourage them to come to the forums
-
There's a person messaging the Dark Mod twitter account, saying they can do a Catalan translation of the game. I pointed them in the direction of the Wiki and the forums, but they're saying they want to email someone about it. I'm not really involved in the translation side of things, so I don't have any useful input here. Any ideas?
-
The Black Mage (Grayman, JackFarmer & Friends), December, 24th, 2021
sullium replied to JackFarmer's topic in Fan Missions
Hi, sorry to say but I just got the "Multiple entities named 'PercyQuill'" error that was reported here before. Percy stands up from his desk to investigate a disturbance, then as he gets in position to sit back down I'm booted to the console/main menu. It isn't consistent, but I got it to happen twice: the first time when I was playing casually at 170 FPS, and the second time with the original "capped" 60 FPS mode after a while of testing from my most recent save. I'm also seeing another, more consistent issue with Percy and his quill: if I jump and land loudly a few feet away from him, his quill almost always flies out of his hand, and after this he becomes completely unresponsive. He just sits there, pretending to write with no quill in his hand, as I jump around and throw candles at him. I'm running TDM 2.12 on Windows 10, and the menu shows I'm playing version 4 of the mission. Otherwise I really like this mission so far! Next time I play I might try the script provided by Obsttorte above and see if it helps. -
I think only strings inside .script files are counted towards this memory limit, because they are stored in script program. Entity spawnargs are stored outside scripting system, then don't count towards the limit. In particular, "editor spawnargs" take a lot of memory, and nothing fails because of it. Actually, one of the greatest improvements in savefile size was to not save editor spawnargs in iot.
-
Can a script function be too big? My "holding item" state is getting pretty massive as I add new items and variables to support the logic that is needed to handle each use case and, since adding the flashbomb, I'm getting this error: "EnterFuncton: locals stack overflow"
-
Thank you It's just another attachment added to the "unarmed" def file that only shows when the holy water is used. It seems there's no limit to how many attachments you can add to a weapon entity, which is very useful for this mod. If a weapon is selected, it gets lowered the same way as when the player is mantling or using the inventory. In the particular case of the bow, it's the same animation but with the bottle on the right hand and the arrow on the left, since the holy water would be in the right hand in that case. Unfortunately I don't think so, at least with the way I'm doing it. I added a new cvar to the source code to detect when an item is used and which one, which involves prior knowledge of the name of the item entity, so it's a rather static method and only works with the default TDM items. If I can figure out some other way to detect what item was used through the script, I don't see why this wouldn't be possible. However, I tried a lot of scripting methods but they were very unreliable and also lacked in generalization. Are there a lot of FMs that use custom potions on specific arrows? I seem to spend more time working on the mod than actually playing the game, so my experience and knowledge of the custom content is limited. Animating is the part I like the least, the one I'm worst at, and the one that takes the longest. Also, working with md5 meshes is extremely boring and difficult, at least for me. This is the best I can do with my experience, sorry
-
Core Essentials must exist in some form or another. "Fast Doors", "Quiet Doors" and "Loot Animations" share the same core file (tdm_frobactions.script). I could probably set them apart but I must analyze the impact and whether it is worth the effort or not. "Dynamic Inventory" and "Stealth Monitor" have nothing to do with each other but share the same file (tdm_loot_gui.script). It took me a good deal of time to get "Dynamic Inventory" right and I am not changing this in the foreseeable future. "Blinking Items", "Smart Objects", "Fragile Bottles" and "Stealth Alert" share the same loop for convenience. "Stealth Alert" could be its own thing but, what's the value? "Smart Containers" could be its own thing as well but again, what's the value? And then there's the miscellaneous tweaks nobody should have any issues with. The fact that you don't like "Loot Animations" has been noted, @datiswous ! Allow me to say that while I like a praise as much as anyone else what really interests me is what you people don't like or disagree with and I ask everyone to keep the feedback coming, specially if it is non-positive. Be sincere and open, it is the only way to move things forward. I will always take it constructively Open script/tdm_frobactions.script, look for frob_item() and comment out mod_loot_animations(), like this: void frob_item(entity inv_item) { inv_item.activateTargets( $player1 ); // mod_loot_animations(inv_item); } You need in addition, to delete sound/meta/game/frob_loot.ogg
-
Personally I disagree with this, at least that you cannot enable/disable them seperatly. but I'm willing to edit the files myself to do the changes. I only need to edit the script files?
-
Hidden Hands: Blood & Metal (Campaign) - 01.09.2024
JackFarmer replied to JackFarmer's topic in Fan Missions
Yeah, the shop after mission 4 is a convention. Regarding your amusing bug: A future update will include a script event that hinders the player to do what you have done. -
Yeah, JSGME basically copies files from the MODS dir to tdm's root and deletes files from tdm's root. It isn't perfect though, review this post for it shortcomings. I will reply to this here, ok? Core Essentials is a mix of mods that I want to keep together in a single place. There's a little bit of everything in there: small tweaks, intertwined mods and mods that players may or may not like or use but don't deserve (imho) the spotlight on their own. To remove the loot grab animation open the pk4 with your favorite archiver and delete: script/tdm_frobactions.script sound/meta/game/frob_loot.ogg Mind you, by deleting the script you will be removing the "Fast Doors" and "Quiet Doors" mods as well! If you really dislike the loot grab animation but want to keep the rest I can provide an ad-hoc solution for you.
-
Unfortunately, I don’t think this is possible—at least not with the way the mod is currently implemented. All the models and animations are tied to the “unarmed” weapon entity, not the player entity. In order to have the legs and the rest of the body, we would need to add the models and animations to the player entity and modify the source code to allow the body to be visible, kind of like how it's done here. I did initially try this method but realized that the existing model/animations are a bit of a mess and it would be a LOT of work to make it look good. Also, I chose to do it this way to allow the mod to be compatible with everything, since the script and def files for the "unarmed" entity aren’t modified by any FMs (as far as I know—I haven’t tested them all). I assumed that someone may have tweaked the player files for their FM, as those are far more relevant than the "unarmed" files (which are essentially blank in the vanilla game). If I had overwritten them, I’d risk breaking their mission. There has been some discussion in the forums about having full body awareness and there didn't seem to be a lot of interest in it. Plus, it could end up being immersion-breaking. Imagine standing on a small rope and then looking down, only to see your feet just kind of floating in midair.
-
If you use DarkRadiant in Linux while using a dark theme, a large amount of the icons are hard to see, because it's dark-color on dark background (wish DR darkmode was a little less dark). A workaround is switching to a light theme when using DR. I'm using XFCE as DE, so I made this script (mostly copied from this code), which works as a toggle. Then I set it to a keyboard shortcut. The switch works even when DR is already opened.
current_theme=$(xfconf-query -c xfwm4 -p /general/theme) if [[ $current_theme == 'Adwaita-dark' ]]; then xfconf-query -c xsettings -p /Net/ThemeName -s 'Mint-X-Grey' xfconf-query -c xfwm4 -p /general/theme -s 'Mint-X-Grey' else xfconf-query -c xsettings -p /Net/ThemeName -s 'Adwaita-dark' xfconf-query -c xfwm4 -p /general/theme -s 'Adwaita-dark' fi
This only works for the XFCE DE though.
-
-
1
-
- Report
-
The executable is compiled with the 2.12 version of TDM. I believe "getcvarf" is a new script function introduced in 2.13 so it's going to cause problems with earlier versions of the game. I will update the mod when 2.13 is released but for now it only works with 2.12.
-
I get the following error with the 2.0 release on 2.13beta1, and that is without my patch being involved: Error during initialization. Error: file script/tdm_weapon_arrow.script, line 197: Unknown value "getcvarf"
-
Here is version 1.4, almost final. I am not longer using any def. Everything is done on the fly with a single script. The script can take up to a minute to complete on large missions. Few items are scanned on each frame and the impact on gameplay performance is, dare I say, zero. Here is the result in Iris: If anything, because of the all the string literals, the script memory usage raises considerably, but we still are under 50%. Again, in Iris: Since there is little interest in the initiative for the core game it will be integrated in the next version of the TDM Modpack. EDIT - The latest version can be found in the opening post.
-
You are assuming way too much, and you're creating artificial pressure. Nobody in the public forums knows whether TDM team even considered including this feature in TDM core, regardless of its completion state or quality. Obviously you have right to have a personal opinion on the modification itself (which I think is cool too). Sorry for the offtopic here Jivo, you're doing great, and don't let this little side note distract you from your work
-
yeah, that's exactly it. I'll fix the script tomorrow, test it, and it should be good to go after that
-
[Bug] On Launch, Distorted First Frame When AA
Daft Mugi replied to Daft Mugi's topic in TDM Tech Support
@stgatilov Even better news! The following commit fixed this issue regardless of r_tonemapOnlyGame3d setting. r10930 | stgatilov | 2025-01-25 | 7 lines Clear background during main menu. This fixes the issue e.g. with AT1: Lucy and tonemap disabled. The briefing there does not use any backgrounds, and no-clear policy results in HOM-like effects. Originally reported here: https://forums.thedarkmod.com/index.php?/topic/22635-beta-testing-213/#findComment-499723 -
Fan Mission: Cleighmoor (by grayman) (2014/3/1)
datiswous replied to grayman's topic in Fan Missions
Why? It's not using that. Edit: Well I don't know how this works internally. I guess core scripts are preloaded? Indeed tdm_invisibility_potion.script has endTime in it. In tdm_slowfall_potion.script there is endTimeSlowfall . Maybe endTime inside tdm_invisibility_potion.script should be endTimeInvpo or something, to not conflict with existing uses? -
If we get "the proper fix" in 2.14 we will owe you one, @Amadeus. Thanks for initiating all this. May ask you to edit your post and remove all instances of "mod_" from the quote? (just for the record). I did this quickly in the morning and made some mistakes. The final script is good, though. By having the proper fix in the source code: Players can consume food without dropping anything afterwards Players can deplete items of a kind (drink the last potion) without dropping anything afterwards We can re-enable the current item after unshouldering bodies without dropping anything afterwards Missions will not be impacted I will do a deeper analysis if my script makes it into the next beta.