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

                                The Wizard's Treasure                             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

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

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

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

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

    • Sotha

      WIP mission name confirmed: "The Last Offering"
       
      · 5 replies
    • Sotha

      Today I started writing readables for my WIP mission.
      I wrote my usual text and then crammed it into AI and boom, high quality stuff comes out.
      I used to say that clipper is the mappers best friend, but now it seems it is more like "AI is the mappers best friend."
      · 2 replies
    • The Black Arrow

      Just saw further into 2.13 development, or is it 2.14? Anyway, proper Parallax Mapping...Absolutely fuck yes, please!
      · 2 replies
    • nbohr1more

      Happy Halloween! "Gem of Souls" is out:
       
      Psst, someone let Darkfate know...
      · 1 reply
    • The Black Arrow

      Is there a thread for "Moving Day 2: Look Who's Moving Now"? If not, could someone hint me on what is Dick's birthday? This mission is quite enjoyable on its disturbing creepy implications.
      · 3 replies
×
×
  • Create New...