-
Posts
2626 -
Joined
-
Last visited
-
Days Won
157
Posts posted by Dragofer
-
-
- Popular Post
- Popular Post
In the current user addons system, only one addon could ever be installed at a time. This was because every addon would try to overwrite tdm_user_addons.script, and only the one in the alphabetically latest .pk4 would win. Merging addons was not a practical solution for most since this required a similar level of proficiency as actually creating the addons.
Coming to the next dev build for 2.12, this limitation has been lifted by automatically including or calling all script files or functions that start with a specific prefix. Addon creators will need to choose unique names, however, which could for example include one's username.
For now, backwards compatibility with the old style of addons will be maintained so they will still work, but they will need to be updated before several can be installed at once.
Note to creators: as this may result in a surge of popularity of user addons to "mod the mod", it feels like some remarks are necessary:
- it's important to communicate to players downloading the addons that these are to be used at one's own risk and there's no certain way to ensure that no mission will break.
- releasing a stable mission with the default TDM package is hard enough. Addons create another layer of complexity that is out of the authors' hands. So while it's okay to ask, please respect the authors' decision not to support addons.
- savegames will only work with the exact combination and version of addons that they were created with.
Updated instructions for creating addons can be found here: https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Script_addons_for_players
- 3
- 3
-
On 11/4/2023 at 9:34 PM, MirceaKitsune said:
How do I attach a func_rotating propeller to an AI, but make it so that it stops rotating once the AI is dead?
The most appropriate method would be an on_death script. You can reference the fire elemental for an example.
Also, the sole purpose of tdm_custom_scripts.script is to allow mappers to add more .script files to their FM, so there's no reason not to use it.
-
18 minutes ago, STiFU said:
How the hell did you pull off
As part of the 2.10 update, a long extinct engine feature was restored by duzenko that allowed the visual changes to happen. Meanwhile, when the item is used its custom scriptobject cycles through all entities on the map that have been marked with a custom spawnarg and updates their solidity. 2.10 was a very feature-heavy update so that became a theme in the contest and using this back-then experimental feature gave bonus points. Meanwhile it's become a core feature.
@MirceaKitsuneas this FM is the first instance of the overhauled and quite complex multi-part version of this AI script, it'd probably be good to compile all known issues like yours so the script can be finetuned further. Could probably also do with a wiki page to describe how to use its features.
- 1
-
We have a whole folder of oil lamps in core assets since 2020 or so - for desks, walls, ceilings and freestranding. Also check out the vintage lamps.
- 1
-
For scripting it's essential what order the functions come in because a function can only call another function or access a variable if it has already been seen by the scripting engine. This would make auto-loading scripts in alphabetical order problematic unless all core and FM scripts have their names changed in a way that mimics their current #include orders. It would be better if the order no longer mattered, but that's probably a change in a different ballpark entirely.
Also note that tdm_custom_scripts.script is explicitly for mappers and tdm_user_addons.script is explicitly for users/addon creators, with warnings in the respective files similar to how most of our GUI files point people to which ones are safe for them to tamper with. The messup with Hazard Pay happened because the FM provided a copy of tdm_user_addons.script (accidentally left behind after testing), conflicting with other addons.
@wesp5files outside of .pk4s already overwrite same-named files inside .pk4s, both on the core and FM levels.
In any case, we've recently started looking into a way of supporting unlimited addons in parallel by auto-including and auto-calling script files and functions whose names follow a specific naming convention (tdm_user_addon*).
- 2
-
Alternatively, it's possible the update came from the old missions repo (packed) which still has the stealth scroll bug, instead of the new missions repo (unpacked) which has the fixed version. I just downloaded the FM for the first time on this install and it was the correct version.
-
10 minutes ago, wesp5 said:
I tested the new Hazard Pay version with my patch and I still get errors when starting it, because the mission contains the same statistics scroll script as my patch and doesn't like that variables and other things are reassigned. Is there an easy way to avoid missions breaking if they include duplicate scripts or do I need to rename everything in my version and hope that nobody uses the same names? I can imagine the same happening to snatchers mod, like if a mission editor likes a feature and includes it in his mission, the mission will break once snatcher's mod is installed in case names are the same...
The first thing you need is to make sure all your script files have inclusion guards so they can only be loaded into the script stack once (these are the #endif lines you see at the start and end of official TDM script files). If you have those, then as long as both your addon and the FM author use the same name for the same .script file there shouldn't be an issue in terms of re-inclusion.
Problems can still arise if both the author and you try to initialise the custom script separately, i.e. in this case you would have 2 copies of the stealth statistics scroll.
Another issue arises if the FM author overwrites tdm_user_addons.script, which is the case here, because that will overwrite your addons. This is an error that should be corrected by the FM author (they should use tdm_custom_scripts.script, which is designed for mappers to use), and I've already told kingsal about this just now.
Ultimately I think it's hard to avoid conflicts if the FM author integrates a user addon into his map. The best thing you can probably do besides what's above is to make sure each of your files and functions has unique names so both copies of the script can run in parallel in peace. Ofc this doesn't help if the author got the addon from your addon pack. We should probably discourage FM authors from integrating addon packs and instead ask them to point players to a download link.
- 2
-
51 minutes ago, datiswous said:
Btw. what happens if there's an ai patrol route in the location the player gets teleported to and the player ends in the place where the ai is at that moment?
I guess you'll have a horrible teleportation accident on your hands, then. I don't think the setOrigin code checks whether the destination is free and applies an offset.
-
6 hours ago, datiswous said:
I was just thinking, is it possible to make it behave as a normal door for ai but when the player interact with the door it behaves as a teledoor?
Something to try out...
Not with the current scripting, right now frobbing causes the door to open and close a little bit to simulate Skyrim-style opening of a closed door to another map section. This would conflict with the stock door opening effects. Apart from that I don't see a technical issue with adding new script effects to an existing door.
Conceptually, the teledoor script is designed for permanently closed doors. If the door can be used normally by AI you might find it fully opened. It would be odd if AIs and the player can walk through at will but if the player frobs it he gets teleported somewhere else.
-
1 minute ago, snatcher said:
I dare invoking @Dragofer to evaluate a "custom_script_ini()" on "script/tdm_custom_scripts.script".
Why would you need this? If a mapper wants to initialise custom scripts in his FM he can do so via the regular map scripts i.e. void main(). tdm_custom_scripts is only needed to add new files to the script inclusion chain.
-
I don't think you can create brushes on the fly because dmap is needed to give them their collisions.
- 2
-
7 hours ago, HMart said:
Thou the first thing that came to my mind when I read the question was using a func_mover, it exists exactly for that, I'm surprised if there's nothing in TDM wiki about it, if there's not here are something about it, and a more powerful and complex tutorial here thou a slide door is just a special binary func_mover.
I believe there's no way to control a func_mover without using a script. Doors have the advantage of having an inbuilt response to frobs and triggers. If you can script, then func_movers are the more elegant option. In this case their advantage would be that you can more easily make it a single-use thing.
- 1
-
3 hours ago, datiswous said:
Well I think there's just one guy doing that and you can just put him on ignore. Or apply moderation. But ok, I understand.
Ignoring is somewhat inadequate as you still see other members engaging in a discussion with the problematic user, and as Wellingtoncrab says such discussions displace all other content within that channel.
Moderation is also imperfect as being unpleasant to engage with is not in itself banworthy, so there is nothing more to do if such people return to their old behaviour after a moderator had a talk with them, except live with it or move away.
I'd be more willing to deal with it if it felt like there were more on-topic discussion, i.e. thoughts about recently played fan missions or mappers showcasing their progress, rather than a stream of consciousness about a meta topic that may or not have to do with TDM. I guess the forums already serve the desired purpose, or they just compartmentalise discussions better.
- 4
-
Yeah, I quit the official Discord after someone intensively argued with me that we shouldn't credit Grayman for Seeking Lady Leicester (but Black Mage was fine?). A few other mappers have left too after similar episodes.
-
- Popular Post
- Popular Post
Btw, last time I talked to Flood he said he wanted to step away from this task and is glad for the team to take over. The abandoned missions repo has also been moved to TDM's SVN server. I suppose any team member who manages FM uploads can also accept newly abandoned missions.
- 5
-
Could it be your map is leaking and therefore not generating physics for new geometry? If you use "testmap" instead of "dmap" + "map" it will load the map even if dmap failed.
-
- Popular Post
After a brief delay version 2 of the mission is now up for grabs from the downloader and from Google Drive. The above post does still hold true for the most part, all-round polishing what was already there of this first mission of mine. Retaken screenshots can be obtained here: Google Drive. Thanks go out to the betatesters of round 2: JackFarmer, joebarnin, The Black Arrow, datiswous, Acolytesix
- 7
-
3 hours ago, MirceaKitsune said:
Thanks for clarifying. Unfortunately there's still a bug as the barrier never goes away: When I first enter the apartment the husband says "is she hurt, please put her on the bed"... I do so and the objective is completed, but after that the husband says nothing else and the barrier never goes away. I looked around the room and tried frobbing him, but nothing ever happens for some odd reason. Wonder if some triggers or signals got broken in latest dev?
Hm, he's meant to continue talking after the placement is complete and the objective ticks off.
-
12 hours ago, MirceaKitsune said:
Ran into a few bugs. Most noteworthy is a breaking glitch that makes it impossible to continue without noclip:
Thanks for giving it a playthrough and leaving the detailed feedback. Regarding your supposed glitch, it's actually an intended feature to ensure the player stays inside the room while the NPC is talking to him to avoid missing cues and not seeing why the objectives were updated. The barrier should be gone afterwards.
-
1 hour ago, JackFarmer said:
If you don't want to try the script solution as described in the post above, you can try the following
1. Create a blue room far away from the map and put the fog light in it
2. Place an atdm:teleport entity at the fog light position in your map
3. Let the atdm:teleport target the fog light in the blue room
4. Trigger the atdm:teleport entity with a trigger_once entity or whatever you have in mind.
This would also have the advantage that the foglight wont be contributing to an extra rendering pass of everything it touches in the map, even if its transparency were ultra high. IIRC a foglight added 1000+ drawcalls to the Perilous Refuge harbour scene.
- 1
-
On a separate note, does the stealth score behave as expected now? 2.11 had some fixes regarding detections by guards in dark places and civilians.
-
Your approach is basically how I did it with the custom AI alert behaviour in Iris. You can only steer AIs while they're unalerted, so my script would tell them to approach the source of the commotion. Once they come close enough to see the problem, TDM's stock AI routines would take care of the rest.
- 1
- 1
-
14 hours ago, Skaruts said:
@Dragofer does your version work in 2.12? I'm confused about what to download. I tried one z_addon_stealth_statistic_2_07.pk4 that I found somewhere in this thread, but it didn't work.
I tried out @kcghost's version (it works on 2.12), but I found that it interferes too much with my usage of inventory items, so I'd like to try out yours to see if it's more comfortable to use. I think I've seen a youtuber use it before.
As the file name implies it's for v2.07, which was the last TDM version before a hook for custom user addons was added. It therefore overwrites the main TDM script file with a version from 2.07, which means several newer missions won't work anymore.
It looks like I made an updated version that should be compatible with all 2.08+ TDM versions, as per datiswous' post. Practically it's an inventory item that triggers a GUI message popup whenever you activate it in your inventory.
-
On 6/5/2023 at 10:17 AM, datiswous said:
Is it possible to teleport the player to different areas depending on a condition? For example a gui selection.
It would be nice to have a gui-selection menu opened up when you click on the door. You only get teleported after making a selection in the gui.
Yes. You would modify the function that gets called when the player frobs a teledoor to offer the player a GUI selection, wait for his input and then update the entity variable for which teledoor it's paired to, before the teleportation begins.
[2.12] Multi-addons support
in TDM Editors Guild
Posted
Pinging addon creators that are known to me:
@MirceaKitsune@wesp5@snatcher@Dragofer