Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

The call comes directly from the trigger_touch.

Excellent, that's all I still needed. I forgot trigger brushes themselves can call scripts.

 

I've got a working setup now, attached it here. Brief description:

- This teleports the player and other entities, but not AI and func_static, between 2 locations.

- At each end there's a trigger_entityname brush (entityname: player1) and a trigger_touch. The trigger_entityname should be well within the trigger_touch.

 

- The player walks into the trigger_entityname brush. This calls a script which for a split-second actives the large trigger_touch brush, which registers all entities within its volume.

- Each entity that's not a func_static is teleported. The vector of the teleport is defined at the top of the script, i.e. '0 200 0' units.

 

 

Some limitations:

 

1) the moveables do flash briefly, even if it's just a single crate, despite my efforts to keep the per-moveable script as short and simple as possible.

2) grabbed and dragged items only get teleported if they're within the trigger_touch. They could be added to the script as well, but I suspect this would visibly slow down its execution. This can be worked around by placing the initial trigger well within the trigger_touch.

3) when I teleported an AI via the trigger_touch he disappeared. Maybe I did something wrong, but I was going to use an AI-free antechamber in any case to avoid opening what's almost certainly a can of worms.

4) having moveables within the trigger_touch at mapstart may sometimes be problematic because the first teleportation activates their physics, potentially setting them in motion. This is fine if they're positioned in an orderly manner.

mass_teleport.pk4.txt

Edited by Dragofer
  • Like 1
Link to comment
Share on other sites

post-37993-0-75226500-1534698322_thumb.jpg

 

All additional entities are bind to the func pendulum.

 

As long as I do not add an AI, all entities (including the func pendulum itself) bob up and down as I want it.

 

If I bind the AI to the pendulum, then the AI vanishes.

If I leave the AI as it is and just bind the rest of the entities to the func pendulum, then the effect does not appear and the boat and all other stuff within it show the regular immobile behaviour.

 

Does the setup as depicted in the image only work with static entities?

Edited by JackFarmer
Link to comment
Share on other sites

Binding AI to something is probably not the way to go if you want them to be able to do anything. If the AI doesn't need to move or interact, using an ambient AI is probably better. If they do, I would put a wood collision brush under the AI and bind that to the func_pendulum, and just let the AI stand on it.

Link to comment
Share on other sites

Sorry Springheel, I did not put it correctly.

 

The person shall not interact but the person shall sit in the boat and hold a book, and everything shall bob up and down:

 

post-37993-0-89999200-1534702680_thumb.jpg

 

Can this be done as well? What is an ambient AI? I cannot find this term in the Wiki and (as far as I can see) there is no related folder in DR.

Link to comment
Share on other sites

 


I would put a wood collision brush under the AI and bind that to the func_pendulum, and just let the AI stand on it.

This can still lead to issues with pathfinding if the bobbing is strong enough.

 

Generally only static entities or articulated figures (like ropes) should be bound to moving entities, but the latter only if the movement isn't too strong.

 


If I leave the AI as it is and just bind the rest of the entities to the func pendulum, then the effect does not appear and the boat and all other stuff within it show the regular immobile behaviour.

The ai is probably blocking the movers. Check the inherited spawnargs.

 


What is an ambient AI?

an articulated figure that can run animations (like ai) but does not think (unlike ai). Thinking means pathfinding, alert system, physics etc...

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

 


What is an ambient AI? I cannot find this term in the Wiki and (as far as I can see) there is no related folder in DR.

 

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

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Sorry Springheel, I did not put it correctly.

 

The person shall not interact but the person shall sit in the boat and hold a book, and everything shall bob up and down:

 

Can this be done as well? What is an ambient AI? I cannot find this term in the Wiki and (as far as I can see) there is no related folder in DR.

 

If you add entity and go to AI/Ambient, you can try one of the "audience" entities. They're already set up to be sitting down (you may need to attach the head separately).

Link to comment
Share on other sites

Sorry, I couldn't find a better thread to ask.

I want to test rendering of a particular material (textures/water_source/sea_wave_01) but I'm clueless with DR. How can I find an existing mission that uses that material?

I know that nbohr1more and some others have a method of searching for keywords in all mission packages. In this case you'd find the material name within the .map file if it occurs on one of the brushes or patches.

 

In any case I've thrown that material into a testmap here. The .pk4 version can be treated like a normal fm package, while the .map version can be placed in darkmod/maps and run via console -> testmap test_map. Delete the .txt extension ofc.

test_map.pk4.txt

test_map.map.txt

  • Like 1
Link to comment
Share on other sites

So I've taken a look and it is possible to pause the animations. Two side effects, though.

  • The timer for the animation is continuing. This means that upon reenabling the animation you would see a clear jump in the anim. As the ai is only supposed to move when not visible, this won't be an issue, though.
  • Pausing the anim stops the transitional movement of the ai (not the rotatory surprisingly, this has to be taken care of additionally), but the code doesn't seem to consider that. This causes the latter to "think" that the path the ai is taking is somehow blocked, causing it to move a bit odd. In this specific usecase this probably isn't an issue either, but it is hard to judge as the implications are hard to foresee.

The command to pause the animation is

	void pauseAnim(float channel, float bPause);

channel is the animation channel to apply the command on. bPause is a boolean that will pause the animation if set to 1, and will unpause it if set to 0. The animation channels are

0 - any (not all, not sure what it is used for)

1 - torso

2 - legs (this stops the movement)

3 - head

4 - eyelids

 

Was going to try and look in to this but I'm having trouble finding the "vanilla" script for AIs that would allow me to make a modified version for my new enemies. I extracted all the .pk4 files but couldn't find anything in the resulting folder structure that contained anything related to AI scripts. Where would I find this? Unfortunately the wiki is very sparse on guidance when it comes to making custom AIs, the closest thing I found was this: http://wiki.thedarkmod.com/index.php?title=How_to_Make_Your_AI_Unique which really only deals with changing AI through spawnargs.

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

script/tdm_ai_base.script.

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I know that nbohr1more and some others have a method of searching for keywords in all mission packages. In this case you'd find the material name within the .map file if it occurs on one of the brushes or patches.

 

In any case I've thrown that material into a testmap here. The .pk4 version can be treated like a normal fm package, while the .map version can be placed in darkmod/maps and run via console -> testmap test_map. Delete the .txt extension ofc.

Thanks.

 

Is it supposed to be still as it looks to me? The material seems to mention some time-based animation.

It's only glowing with time, but not moving.

 

Could you make that object a separate entity as well? So that other objects don't show with r_singleEntity filter.

Link to comment
Share on other sites

Is it supposed to be still as it looks to me? The material seems to mention some time-based animation.

It's only glowing with time, but not moving.

Something seems to be wrong at your end: for me there are two lines of waves which are translated across the patch's surface.

 

Here's the test map with a duplicate of both wave patches, this time as entities.

test_map.map.txt

  • Like 1
Link to comment
Share on other sites

I cannot solve the problem with the objectives: if I complete the objectives in any order, I cannot pick up certain other critical items and thus the remaining objective(s) cannot be completed.

 

ERH+ suggested to remove the objectives entity, save the file under a new name and start from scratch, but the problem remains:

 

post-37993-0-75871500-1535268087_thumb.jpg

 

Sometimes this problem start after completion of just one objective, sometimes it starts after completion of two objectives. Why is that and what can I do to fix this?

Edited by JackFarmer
Link to comment
Share on other sites

I cannot solve the problem with the objectives: if I complete the objectives in any order, I cannot pick up certain other critical items and thus the remaining objective(s) cannot be completed.

 

ERH+ suggested to remove the objectives entity, save the file under a new name and start from scratch, but the problem remains:

 

attachicon.gifconsole_report.jpg

 

Sometimes this problem start after completion of just one objective, sometimes it starts after completion of two objectives. Why is that and what can I do to fix this?

Are you picking items of the same name and category? If so, it must be "stackable".

Please see the full source code for this action here

https://github.com/duzenko/darkmod-experiments/blob/e4f05ec7b92f103d0e1632c5ab3f2fd238090f9a/game/Inventory/Inventory.cpp#L498

Link to comment
Share on other sites

Hello duzenko,

 

You give me too much credit; I feel flattered but my codings skills are inferior, mildly spoken. :)

 

However:

 

--> the code section you quoted leads to the console report "Cannot put xxx in inventory[...]"

--> my console reports "Couldn't add xxx to inventory of player1"

 

This seems to be something different?

 

The items in question have the same class name but differing individual names. I also tried different class names, but the problem remains.

 

Can I simply add the property "stackable" "1"? I tried that, but it had no effect as well.

Link to comment
Share on other sites

Sometimes this problem start after completion of just one objective, sometimes it starts after completion of two objectives. Why is that and what can I do to fix this?

Are you ever able to pick up all 3 items? If you have no objectives entity are you able to reliably pick up all 3 items? These questions are to track down whether the problem lies with the items or the objectives.

 

If the objectives cause the problem, and you don't need the items to be moveables which you can throw around, then an alternative would be to let the objectives complete as soon as you frob the items, set up via stim/response to respond to frobbing by triggering a setobjectivestate entity for each objective.

Link to comment
Share on other sites

do the items have the same "inv_name" as you can't pick up more than one item of the same inventory name unless its stackable like loot or projectiles, inventory names have to be unique.

 

stackable items get destroyed and a count of items in a stack increases or decreases, there are not multiple items in a stack, there's just one item. afaik

Edited by stumpy
Link to comment
Share on other sites

One of my lazy guards shall carry out the following:

 

1. Sit down

2. Fall to sleep

3. Wait a few seconds and then move to the next path corner.

 

The setup looks as below:

 

post-37993-0-91510500-1535804661_thumb.jpg

 

1 = path_sit

2 = path_sleep

3 = path_wait with target next path corner

 

Ingame the guard sits down and does nothing else (no sleep, no walk to the next path corner) but uses bad language every once in a while.

 

I don't get it; it is the same setup as with the path anims I've already integrated; I just replaced the latter with sit and sleep pns. What is my mistake? I have already checked the monster clips and made sure that they do not touch the entities.

Edited by JackFarmer
Link to comment
Share on other sites

Hello grayman,

 

You are not a TDM hero, you are a TDM god.

 

That's it, now it works. How can I control the sleeping interval of my guard? The inherited list does not include such a property as well.

 

In general: Sometimes there are entities which can be allocated with properties not available in the "inherited" list.

 

Is there some other external list somewhere showing these "hidden" properties for all entities?

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...