Jump to content
The Dark Mod Forums
demagogue

Newbie DarkRadiant Questions

Recommended Posts

1 hour ago, peter_spy said:

Yes, use blend add stage for this.

 

25 minutes ago, Dragofer said:

Could look at the _selflit variants of window textures for examples of how to use that blend add stage.

Thank you! You both pushed me in the right direction. In media I found textures/darkmod/window/lamp_glass_lit_opaque_colorme that offers both a custom _color property and fake ambient light. I will use this definition.

Share this post


Link to post
Share on other sites

Just getting back into TDM mapping again after a hiatus for several months, and I'm have a...total newb question about lighting and those lovely prebuilt light entities.

What I'm hoping is that there is an easy way to increase the light radius on entity lights (like candles, desk lamps, gas lamps, etc. that are added as entities).  My understanding is that these entities create the light source when the map is loaded...so I don't actually have a light to edit directly.

I've tried modifying `light_radius` on the entity's properties with no success (as I sort of expected---my understanding is the entity is not the actual light).  Is there a way to modify properties of the light that gets spawned, or do I need to add a model and light separately?

 

Share this post


Link to post
Share on other sites

Just give the lamp the spawnarg "set light_radius on flame" with the desired light radius. It works this way for all entities that are def_attached, like a sword to an AI or a flame to a lamp. You can find what the original light_radius was by temporarily creating that entity in your map.

In this case, "flame" is the name that's given to most lamps' def_attached entity via a name_attach spawnarg; some use "light" instead - look into inherited properties to find out which it is. A name_attach is always required if you want to set spawnargs on that entity.

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I've got a couple instances of strange visportal behaviour in my map:

Staircase visportal becomes closed when too far away or viewed too directly. In the 2 shots I slightly turned my view, the defunct visportal is the one in the top right corner:

2ISidFH.jpg

apXZkWq.jpg

 

Large square visportal inside a defect in the wall. It should always be open, but instead it acts as if it were closed. r_showportals 2 claims it's open when viewed from one side:

gDwkvLm.jpg

NbRReRN.jpg

 

I've excluded that there's anything intersecting with the visportals, and I don't use func_portals. If I extract these segments into a testmap they work normally. Any ideas what can make visportals go funky like this?

Edited by Dragofer

Share this post


Link to post
Share on other sites

Sorry to answer a question with a question, but is the white outline around the door in the last image r_showPortals output? The descriptive text for the cvar only mentions green, yellow and red. (I'm not au fait with r_showPortals settings above 1; this is the only description of 2 and 3 I found in a quick site search.)


Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites
10 minutes ago, VanishedOne said:

Sorry to answer a question with a question, but is the white outline around the door in the last image r_showPortals output? The descriptive text for the cvar only mentions green, yellow and red. (I'm not au fait with r_showPortals settings above 1; this is the only description of 2 and 3 I found in a quick site search.)

It's probably yellow.

Share this post


Link to post
Share on other sites

I'm having some odd visual discrepancies in my map while trying to optimize my city streets with vis portals. I have a scene setup where the tops of the building are func_statics so that you can still see them through caulk brushes. The tops of the walls to this estate entrance is all caulk as well, not skybox.

The issue is that when you're standing on the street and the vis portal is open, you can see the building tops through the caulk brushes.. but as soon as you step inside the estate and the visportal closes behind you, they disappear which causes a rather jarring visual effect.

Is there a way to force it so that the func_statics will always show through caulk brushes?

 

Standing on the street

YRTKwxI.jpg

Stepping inside

VgHzVgf.jpg

Share this post


Link to post
Share on other sites

You need part of the func_stat inside the leaf for it to show.  I mean when one part is inside the leaf, the whole thing shows.

So the solution, I think, would to have some tiny or invisible bit of func_stat that you create as part the buildings object inside the leaf behind that portal, then the whole thing will still show. Recall that func_stats don't have to be contiguous objects.

  • Like 2

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Share this post


Link to post
Share on other sites
9 minutes ago, demagogue said:

You need part of the func_stat inside the leaf for it to show.  I mean when one part is inside the leaf, the whole thing shows.

So the solution, I think, would to have some tiny or invisible bit of func_stat that you create as part the buildings object inside the leaf behind that portal, then the whole thing will still show. Recall that func_stats don't have to be contiguous objects.

Fantastic, that has solved it.

 

Thank you!

Share this post


Link to post
Share on other sites
On 9/5/2019 at 11:13 AM, Dragofer said:

I've got a couple instances of strange visportal behaviour in my map:

 

I've excluded that there's anything intersecting with the visportals, and I don't use func_portals. If I extract these segments into a testmap they work normally. Any ideas what can make visportals go funky like this?

I've had issues similar to that which I was able to solve by moving the visportal 1 unit forward or backward.  Sometimes having two visportals on exactly the same horizontal or vertical plane can cause that problem.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Springheel said:

I've had issues similar to that which I was able to solve by moving the visportal 1 unit forward or backward.  Sometimes having two visportals on exactly the same horizontal or vertical plane can cause that problem.

Wow, I’ve had similar VP behavior with three doors on the same wall, two in one room one a floor above. They seemed ok but showed the void through even though they were red. Didn’t know how I fixed it, I just slightly adjusted all their dimensions .5 units at a time until they worked, all trial and error til by happy accident I stumbled upon the fix you described and even then I wasn’t sure how I came to it. Knowing what you just described helps a TON, thanks!

So to be redundant and extra clear, sometimes VPs behave odd if they are on the EXACT same X or Y plane??

 

Edited by Jedi_Wannabe

Share this post


Link to post
Share on other sites
1 hour ago, Jedi_Wannabe said:

So to be redundant and extra clear, sometimes VPs behave odd if they are on the EXACT same X or Y plane??

 

Yes.  Can't tell you why, but that's what I've observed.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks Springheel, but that wasn't it. I've altered those visportals and their surroundings numerous times without any effect. In the end I just deleted them because they were only minor visportals.

@Jedi_Wannabe an alternative explanation for void-showing doors is that your visportal surface (the pink-cream one) is slightly in front of the door instead of fully within. The door is still linked to the visportal, but the visportal's position gives you a view into the void. The solution remains the same as Springheel already described, to move the visportal surface a little (until it's inside the door).

  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you so much, both of you. It's been a frustration that I couldn't solve for a few weeks. What's the issue if i have one that displays the same symptoms but isn't part of a door?

Edited by Jedi_Wannabe

Share this post


Link to post
Share on other sites

Ok so what if the one VP in question is rotated offset 45 degrees from all other VPs in the map save for one? The other one works but isnt exactly 45 degrees offset, just kinda eyeballed it as I stretched it to fit the area and these two are NOT part of a door btw. It makes sense to me why it'd be weird when you throw in a door and more dimensions, but ALL my other outdoor VPs have been working OK except for these two. The result in game is quite funky, its like the world is sliced in half and you're just viewing outer space.

They have been working on and off and I can never nail down what exactly is happening. I'll adjust them and they work fine for a few versions, then after editing some other stuff I notice the VPs in question mysteriously break or stop working and I have to go back to guessing on adjustments. Been cyclic like that for a week or so, so I imagine that info about the doors will help a TON for my indoor and transitional VPs, I've since decided to simply redesign one doorway to eliminate one of them being an issue. But the offest ones outdoors...?

PtB0_2019-09-08_08.18.21.jpg

Could it also be an issue with copy pasta? Rather than copying one and moving and adjusting, ought I build them from scratch and rightclick to make VP?

Edited by Jedi_Wannabe
more ?s added pic, fewer posts

Share this post


Link to post
Share on other sites

Is there any way to easily cancel an objective? I.E. when the terms of the mission change? I feel like I've seen that in more than one mission but none come to my mind at the moment.

Share this post


Link to post
Share on other sites

Or maybe "done & hide" from a script:

sys.trigger($atdm_target_setobjective_visibility_hide_my_objectives);

$atdm_target_setobjective_state_hidden_done.activate($player1); // mark my hidden objectives as done 

 

Share this post


Link to post
Share on other sites

Recently, I wanted to express the TDM Objective: “don’t pick up a particular loot item”. I guessed there’s a way to do it in the Objectives Editor using an “Acquire entity” component, but I couldn’t figure out how to make that work. I ultimately succeeded with a different, script-based approach. But for future reference, how should I have done it with “Acquire entity”?

Details

What I tried: I added a new objective, with “Ongoing” checked, then added a component of type “Acquire entity” aka “Player possesses item”. As part of that, I selected the Item field prompt “Name of single entity” and in the field put the entity instance name. But that name did not seem to “stick” across invocations of Edit Objective. I set the flags “Satisfied at start” and “Boolean NOT” (i.e., item not acquired). It wasn’t clear what to do what to set “Amount” to… zero? 1?

What worked instead (abstracted here): A simple objective with default settings was used, with objective component type of “custom” / “Controlled by external script”. The loot item was given a frob_action_script spawnarg to call a script function, that in turn calls

                sys.trigger($atdm_target_setobjective_state_prohibited_loot_failed); // mission fail

This atdm_target_setobjective_state explicitly set the minimal objective to state 3 (fail).  (BTW, this overall approach made it easy to add bonus script-invoked sound-and-visual FXs as precursor to the “mission fail”. So all good.)

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, JackFarmer said:

Sorry, I do not understand. Do you want to remove the objective and replace it with an alternative objective?

 

Yes, exactly that. Something happens in the mission that changes the original premise.

12 hours ago, VanishedOne said:

Objectives can be set to an 'invalid' state, and since https://bugs.thedarkmod.com/view.php?id=3254 was resolved it should work correctly, though I haven't personally tried it.

I see... Unfortunately it doesn't go through the motions of how to implement it. 😕

If nobody knows I guess I could go with the method Geep suggested. Thanks for the info.

Share this post


Link to post
Share on other sites
23 minutes ago, Bienie said:

Yes, exactly that. Something happens in the mission that changes the original premise.

 

Hello Bienie,

Check the paragraph with the headline "How to make my invisible objective become visible to the player later" here:

http://wiki.thedarkmod.com/index.php?title=Objectives_Editor

In "Hidden Hands: Vitalic Fever" the objective #3 got removed and replaced with the hidden objective #4 with this method.

The event itself got triggered through the hidden objective 15. This activates a trigger once unit targeting two atdm_target_setobjective_visibility entities - one hiding the obsolet objective, the other showing the hidden objective.

 

Edited by JackFarmer
  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, JackFarmer said:

Hello Bienie,

Check the paragraph with the headline "How to make my invisible objective become visible to the player later" here:

http://wiki.thedarkmod.com/index.php?title=Objectives_Editor

In "Hidden Hands: Vitalic Fever" the objective #3 got removed and replaced with the hidden objective #4 with this method.

The event itself got triggered through the hidden objective 15. This activates a trigger once unit targeting two atdm_target_setobjective_visibility entities - one hiding the obsolet objective, the other showing the hidden objective.

 

Yes that may just be the easiest solution. I'm used to adding hidden objectives to my maps but I've never had one visible and then made it invisible. Functionally that should be the same as having the objective cancelled I guess.

Share this post


Link to post
Share on other sites

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.


×
×
  • Create New...