Jump to content
The Dark Mod Forums

Recommended Posts

Posted

I was trying to recreate the extinguishable oil lamps for my current TDM 2.05 setup, but it seems as if nothing outside the pk4s is able to override the content inside. I even tested this with some simple text files like tdm_version.txt, so is there a new variable I need to set or is there something else I am overlooking?

Posted (edited)

I did this by

  • renaming the original file in the pk4 (that just a zip file is),
  • creating outside the pk4 (like in the fm\mymission folder), the same folder-structure that tdm uses
  • and change the file outside the pk4.
For your example:

Go inside tdm_base01.pk4, copy the file tdm_version.txt to darkmod\fm\wesp5mission\tdm_version.txt and change to content of the file in your fm folder.

Or

Go inside tdm_base01.pk4 and copy the file tdm_version.txt to darkmod\fm\wesp5mission\tdm_version.txt, rename the file in tdm_base01.pk4 and change to content of the file in your fm folder.

Edited by freyk

Info: My portfolio and darkmod graphical installer
Amnesty for Bikerdude!

Posted

you would need to create a def file for new objects and then that would override the lamp in the pk4.

How would I do that and make sure that TDM actually uses this?

Posted (edited)

Make sure the defs folder is on the mod root or in the mission root. Make sure the def you create has the same name as the one in mission.

I tried placing the modified tdm_lights_static.def file into the root, fms and my test mission (Bakery Job by Sotha) folders without any results.

 

I managed to improve some key definition infos in the strings/english.lang file though, which proves a) that some outside files override the ones inside the pk4s and that the warning inside the english.lang ("This file was generated automatically, DO NOT EDIT - all changes will be lost when the file is regenerated. Edit strings/all.lang instead!") seems not to be true, because changing the same in all.lang didn't do anything.

 

Back to the lights issue, could it be that I still have to edit tdm_response_effects.script for the following insert suggested by Destined to work?

 

"frobable" "1"

"sr_class_1" "S"

"sr_type_1" "STIM_FROB"

"sr_state_1" "1"

"sr_class_2" "R"

"sr_type_2" "STIM_FROB"

"sr_state_2" "1"

"sr_effect_2_1" "effect_light_off"

"sr_effect_2_1_arg1" "_SELF"

 

Edited by wesp5
Posted

Why don't you just create your own entity? I don'T see why it is neccessary to overwrite the existing ones.

 

Regarding the frob. If I understand you correctly you want the light to go off if it gets frobbed?! Than this should work:

 

"frobable" "1" // entity can be frobbed

"sr_class_1" "R" // this is a response to a stim

"sr_type_1" "STIM_FROB" // the stim it responses to is frobbing

"sr_state_1" "1" // the response is enabled

"sr_effect_1_1" "effect_light_off"// action to take place on response (turn off light)

"sr_effect_1_1" "_SELF" // the light to turn off (the entity itself)

 

In the setup posted above the light is also emitting a frob stim, which doesn't make much sense. If S&R doesn't work, you can also use a frob_action_script. There is actually one for exactly that purpose (created by tels). Just add the following spawnarg:

"frob_action_script" "frob_light_holder_ext"

 

This works on all entities with lights attached to them (like candles, torches etc...).

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

Posted (edited)

Why don't you just create your own entity? I don'T see why it is neccessary to overwrite the existing ones.

I don't want a new lamp entity to use in new maps, I want to have oil lamps exstinguishable in already existing maps, like was discussed here a long time ago. At the time I modified a local file in my setup that made this work, but of course the 2.05 update disabled that and now I can't remember how I did it! Can it be that the def file is only for DR and the tdm_response_effects.script file is the one I edited at the time to make it work in the game itself?

Edited by wesp5
Posted (edited)

The def files are for the game.

Then something is wrong with my setup, although I just reinstalled the whole game just to be sure. As a test to see if changes in tdm_lights_static.def are used or not, I just set the flames of all oil lamps from "def_attach" "light_candleflame" to "def_attach" "light_torchflame_small". Playing "Bakery Job" again, I don't see a change whatsoever, even if I copy the def file into the tdm_defs01.pk4! What is going on here? Shouldn't this have changed the oil lamp flames in the game?

Edited by wesp5
Posted

Did you place the file in the correct subfolder (def, not defs or similar)?

Is the name the same as the one you want to overwrite (check spelling)?

Did you restart the game afterwards?

Did you check the console for any errors?

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

Posted

Did you place the file in the correct subfolder (def, not defs or similar)?

Is the name the same as the one you want to overwrite (check spelling)?

Did you restart the game afterwards?

Did you check the console for any errors?

Yes and yes and yes and no, I hadn't yet checked the console and when I did, I thought I caught my problem. Obviously TDM loads every def file it finds, regardless of the name, so because I saved the original as backup, it loaded that too and I got warnings about duplicate content! I thought this was it, removed all other files except the changed tdm_lights_static and still no change inside the game. Neither regarding flame effects or extinguishable lamps...

Posted

In the setup posted above the light is also emitting a frob stim, which doesn't make much sense. If S&R doesn't work, you can also use a frob_action_script. There is actually one for exactly that purpose (created by tels). Just add the following spawnarg:

"frob_action_script" "frob_light_holder_ext"

This was my mistake. I thought that you always need the respective Stim to any Response you create on the same entity. In hindsight, I am not sure, why I thought that. Must have been some trial and error that worked this way... Well, I know it for the future :)

Posted

Well, entities don't stim themselves, so the light won't turn off itself. But placing two candles next to each other would probably cause them turn each other off. :)

 

@wesp5: Can you post a condump here? Enter condump anyname in the console, it will print the console output to a text file (anyname.txt). In addition, you could pack up your setup, upload it and pm me the link (or directly pm me the file if the file size allows it). It is probably some sort of typo.

 

I've overloaded stock files a dozen times and it always worked.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      While updating my first FM, I noticed a lot of silly things I did because I was still new to DR. For example, there was a model for a wheel that I wanted the player to be able to turn that had its origin off-center. I didn't know I could just re-export the model inside DR to fix its origin, so instead that wheel triggers a func_mover it's bound to. A silly solution in retrospect, has anyone else made somewhat janky or roundabout solutions to technical challenges in their maps? I'd love to hear about 'em!
      · 5 replies
    • datiswous

      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.
      · 0 replies
    • datiswous

      I just bought/build a new pc, so probably less performance related whining from my part from now on..
      Sorry in advance!
      Here are the specs
      · 4 replies
    • jivo

      In case you missed it, I updated the Visible Player Hands mod to version 2.0. It now works while a weapon is selected and has a Linux version too.
      Check it out if you're interested: Visible Player Hands 2.0
      · 0 replies
    • thebigh

      Starting a playthrough of the whole Dark Mod, from oldest mission to newest. I've knocked over the first few already and about to start Living Expenses. Only ~170 missions to go!
      · 12 replies
×
×
  • Create New...