Jump to content
The Dark Mod Forums

Recommended Posts

Posted
33 minutes ago, HMart said:

Afaik worldspawn is also a entity ( at lest in c++ it is a instance of idEntity), the only diference is that is a entity that represents all brush data.

So all brush data fits into 1 entity.

I always assumed I'd taste like boot leather.

 

Posted (edited)
7 hours ago, datiswous said:

Ok, weird, didn't know that. Means that every model is an entity already..

Dark Radiant includes an entity list. By pressing "J" this should appear on you screen:

grafik.png.c8ba49804999dc7dd7c6001ed5a4befe.png

 

As already mentioned, everything but each separate brush with the classname worldspan is an entity. The total of all worldspawn brushes is equal to one entity (entity name: "world"). Only sealing geometry should be in the  "worldspawn" class. If you have non sealing brushes, you should convert them into func_statics (and surround them with MC when AI can get involved). Converted func_static brushes must not necessarily be linked together - you can also have free space between the brushes.

I vaguely recall that someone (maybe grayman) once mentioned, that, If you want to use multiple instances of a func_static (consisting of brushes), then you should convert the grouped brushes into a model and you should not convert the brushes into func_static and clone it.

Func_static is also the classname for models in general. The "show help" info for func_static says, that "func_statics are brush models" - not sure what that means, maybe it should read "func_statics are groups of brushes converted into a func_static or models from the models list."

Edited by JackFarmer
Changed the last sentence.
  • Like 2
Posted (edited)
23 hours ago, AluminumHaste said:

So all brush data fits into 1 entity.

More or less, it doesn't save any real brush data in it, it is more like a "tag", is a peace of memory where info that should represent the entire "world" is defined and handled and brush data is "tagged" has THE worldspawn.

Again is where all map data that should effect the entire map is handled, it is where the map script is run/called and other global stuff.

Edited by HMart
Posted
2 hours ago, JackFarmer said:

I vaguely recall that someone (maybe grayman) once mentioned, that, If you want to use multiple instances of a func_static (consisting of brushes), then you should convert the grouped brushes into a model and you should not convert the brushes into func_static and clone it.

What is the benefit of converting to a model?

  • Like 1
Posted
21 hours ago, JackFarmer said:

As already mentioned, everything but each separate brush with the classname worldspan is an entity. The total of all worldspawn brushes is equal to one entity (entity name: "world").

The situation with "entity" is like "tomato". To a botanist, it's a fruit. To a grocer or chef, it's a vegetable. So if a mapper says "entity", often it's meant to exclude worldspawn, even though technically it's included. The meaning depends on context.

  • Like 2
Posted

Hello again TDMers.

I have a "fountain" (more like a big bird bath) that I want to have water in and some loot coins.  How do I make it so that the coins are frobable through the water?  I presently have a patch textured with water, however, it is not "frob-through."

Advice?

Clint

 

Posted

Is there any reason you can't fill the fountain with a brush and turn that into a proper water entity?

  • Like 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted
2 hours ago, cvlw said:

Hello again TDMers.

I have a "fountain" (more like a big bird bath) that I want to have water in and some loot coins.  How do I make it so that the coins are frobable through the water?  I presently have a patch textured with water, however, it is not "frob-through."

Advice?

Clint

 

Not sure if I understand correctly. However, you could try that:

1. make a clip brush and cover the item in question

2. convert the clip brush into func_static

3. give the func_static the property "frobable - 1"

4. bind the new func_static with the loot item

  • Thanks 1
Posted (edited)

Is it possible to have a triggerbox that changes a spawnarg on every entity that is moved in/through there?

Edit: I guess via Stim/Response . I have not worked with that yet.

Edited by datiswous
  • Thanks 1
Posted (edited)
9 hours ago, cvlw said:

Hello again TDMers.

I have a "fountain" (more like a big bird bath) that I want to have water in and some loot coins.  How do I make it so that the coins are frobable through the water?  I presently have a patch textured with water, however, it is not "frob-through."

Advice?

Clint

 

I think your problem is not the water patch itself. I just tested this and a coin is frobable by default though a patch with a water texture (even if you made it a func_static).  My guess is your fountain has a clip box that is covering the coin. What JackFarmer or datiswous suggested would likely work.

 

(edit) Also, make sure the coins are actual loot items and not just a func_static, otherwise they are not frobable! 

[Use Create Entity to add loot items to the map, don't use the coins found in Create Model as they are not frobable].

Edited by grodenglaive
  • Thanks 1
Posted (edited)

Thanks all for the suggestions.

I will give this a good poking at and see what I can see.  I have attached a pic of the fountain showing the fountain (func static), the coins, and the water patches (I have them as func static as I am trying things out).

And, newbie alert:  I ran into the pathfinding problem with a VisPortal that had one "nestled" side as caulk.  Tore my hair out figuring that one out.  I tried Scripts \\ Test for invalid VisPortals did not catch that (should it?).  I might do a more methodical test on that in the future.

Thanks again.

FountainCoinsWaterPatch.jpg

Edited by cvlw
Posted (edited)

Maybe frob_distance is better actually..

I wonder if you make the frobbox so large that it overlaps the other loot, you might pick up all in a single frob?

Edited by datiswous
Posted

Scripting help🤔 How do I query whether an objective has been completed? 

The wiki shows:

 

Quote

 

scriptEvent float getObjectiveState(float ObjNum);

Returns the current state of the objective with the number ObjNum. State is one of the following: OBJ_INCOMPLETE = 0, OBJ_COMPLETE = 1, OBJ_INVALID = 2, OBJ_FAILED = 3
ObjNum: Starts counting at 1
Spawnclasses responding to this event: idPlayer

 

but this is just gibberish to me. How do I actually write it as a script? I want to use it in an if statement, for example:
if (Obj1 = 0 && Obj2 = 0){
	sys.trigger( $thing1 );
}
	else {sys.trigger( $thing2 );}
 
 
Posted
12 minutes ago, grodenglaive said:

Scripting help🤔 How do I query whether an objective has been completed? 

The wiki shows:

 

but this is just gibberish to me. How do I actually write it as a script? I want to use it in an if statement, for example:
if (Obj1 = 0 && Obj2 = 0){
	sys.trigger( $thing1 );
}
	else {sys.trigger( $thing2 );}
 

You can see some usage examples from High Expectations here: https://github.com/FrostSalamander/fsx/blob/7e9bb0c837fc479503072f7dc443067ea59700aa/maps/fsx.script#L144

  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Posted (edited)
On 12/12/2023 at 2:40 PM, grodenglaive said:

Scripting help🤔 How do I query whether an objective has been completed? 

The wiki shows:

 

but this is just gibberish to me. How do I actually write it as a script? I want to use it in an if statement, for example:
if (Obj1 = 0 && Obj2 = 0){
	sys.trigger( $thing1 );
}
	else {sys.trigger( $thing2 );}
 

There's ages that a wrote scripting for TDM or idTech4 in general but I think something like this should work.

float objstate = $player1.getObjectiveState(objNum);

if(objstate == OBJ_INVALID) {
	sys.print("warning invalid Objective found!");
}
else if( objstate == OBJ_INCOMPLETE ){
	sys.print("Objective is not complete. Please find all the apples.");
}
else if(objstate == OBJ_COMPLETE ){
	sys.print("Objective is complete. Congrates you have all the apples!");
}
else if(objstate == OBJ_FAILED  ) {
	sys.print("Objective failed. The time to get all the apples as passed!");
}

edit: modified the script code to be more correct according too  @Dragofer suggestions bellow. :)

Edited by HMart
  • Thanks 1
Posted
16 hours ago, HMart said:

There's ages that a wrote scripting for TDM or idTech4 in general but I think something like this should work.

Looks almost right, just need to call script events on an object - in this case $player1 for getObjectiveState and sys for print.

  • Like 2
Posted
On 11/30/2023 at 10:22 PM, datiswous said:

What is the benefit of converting to a model?

When you move/clone brushes that you have converted into func_static, you have to dmap before testing the position in game.

When you convert these brushes into a model they behave like any other model and dmap is not required when testing the visuals  in game.

Posted
7 minutes ago, JackFarmer said:

When you move/clone brushes that you have converted into func_static, you have to dmap before testing the position in game.

When you convert these brushes into a model they behave like any other model and dmap is not required when testing the visuals  in game.

Wasn't it also to do with map file size?  if you use a single model and reference it 100 times it will be a smaller/simpler map file than if you duplicate a func_static 100 times.  I least I think I read that somewhere...

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Posted
7 minutes ago, Frost_Salamander said:

Wasn't it also to do with map file size?  if you use a single model and reference it 100 times it will be a smaller/simpler map file than if you duplicate a func_static 100 times.  I least I think I read that somewhere...

Yeah, I wrote earlier in this conversation, that grayman once mentioned the advantages of models vs. func_statics, but I did not really recall what he wrote.

Now that you mention it, I think he also confirmed that this approach would simplify the map/reduce the map size.

Posted (edited)
On 12/6/2023 at 2:10 PM, grodenglaive said:

Stim/Response confuses the heck out of me.

 

I know what you mean. Springheel used this once in a tutorial for traps, but in the end I just copied his methods and didn't understand much.

However, there is a different S/R application I understood and I find very handy. If you pick a random frobable entity, go to S/R and click on responses, you can select the Stim "Frob".

grafik.thumb.png.046a628af26dfc1d9f50d36da6886b9d.png

If you then press the right mouse button in the response effects area, you can activate effects such as:

  • clear/add targets on AI
  • turn off/on lights
  • play sounds
  • remove items
  • run scripts
  • change frobability
  • set skin
  • trigger entities
  • set light color

Unfortunately, the last one (changing the light color) doesn't work so well. I have noticed that this effect is reset when you save and reload the game. However, I have not yet noticed this with the other effects (and frobability/remove works perfectly, I use them all the time.

But that's only one of the possibilities, certain stims, as I understand it, work on approximation, and you can do cool things with them.

There's also a Wiki entry written by  Sparhawk, who coded it. Unfortunately I don't understand much there either.

I don't even dare to ask, because Geep has already done so much, if he could revise this section and provide understandable examples for both stims/responses.

@Geep Didn't you once open a topic in which you explained the use of stims? That was very informative, but unfortunately I can no longer find it.

 

Edited by JackFarmer
  • Like 2

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

    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 0 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 3 replies
    • Goblin of Akenash

      My mapping discord if anyone is interested, its more of a general modding thing rather than just for TDM 
      https://discord.gg/T4Jt4DdmUb

       
      · 0 replies
×
×
  • Create New...