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

    • Frost_Salamander

      @taaaki Wiki seems broken. Main page works but click any link and:

      · 0 replies
    • Goblin of Akenash

      Another goblin secrets episode on the way with the new update
      Focuses are:
      supporting 100% runs on shadow playstyles
      fixing the softlock
      and a tiny visual upgrade

      · 0 replies
    • STiFU

      Sorry for not being around enough lately. I am extremely busy at the moment. We are trying to build a home and the German bureaucracy is killing me! Meanwhile, child number 2 is underway. 🙂
      · 0 replies
    • cvlw

      Yo TDMers.
      It has been a while.  This past year or so I have encountered some tough family issues, became a grandfather, had a job change, and then Steam offered Dishonored and Dishonored 2 along with all DLC for like 5 dollars.  So... have played that.  What a game; highly recommend.
      I am looking to resume TDM activity soon.
      Clint
      · 2 replies
    • Airship-Ballet

      If anyone would like some ambient sounds for any of their work please do hit me up - I've tons of strings both physical and sampled that I love making loops with
      · 2 replies
×
×
  • Create New...