Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

5 hours ago, datiswous said:

Maybe increasing the frobbox_size of the loot item might help?

https://wiki.thedarkmod.com/index.php?title=Frobbing

Boom.  This was the suggestion that fixed my problem.  Adding 3 to the frobbox_size arg on each coin made them comfortably frobable in this situation.  Now I can easily get the frob dot.

Very much appreciated.

FountainCoinsWaterPatch2.jpg

FountainCoinsWaterPatch3.jpg

  • Like 1
Link to comment
Share on other sites

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 );}
 
 
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
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.


  • Recent Status Updates

    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...