Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Maybe the texture is one-sided and facing into the wrong direction?

 

I remember having that issue once, too, but I can't remember what the reason for it was. :(

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

Hm.. I can't seem to figure it out either but that's ok I will just delete it and move on.

 

Thanks for your help all!

Link to comment
Share on other sites

I took a look at it last night but didn't get far as it was bedtime. But I probably won't be able to resist going back to it.

 

It's not orientation. The problem afflicts patches that've been set up manually, not just prefabs.

 

The shader has 2 color stages: an alphatested diffuse map and a blend "filter" stage which is meant to add a shadow underneath. We should probably lose that anyway assuming the bump map is doing its job, as it's the equivalent of a baked-in shadow. The alpha channel is solid black/white so should be ok with the 0.5 alphatest. Both the diffuse map and and the fake shadow are dds files with their mipmaps built in. Anyone know whether that can cause a problem with alphatest or alpha blend stages? I wouldn't really expect it to, but I couldn't see anything wrong so I'm wanting to cross off possibilities.

 

An obvious next step is to try it without the fake shadow "blend filter" stage.

Link to comment
Share on other sites

The baked in shadow is supposed to be ambient occlusion, though I'm pretty sure it's not actually working because the alpha mask cuts it off.

Link to comment
Share on other sites

Hi all,

 

Forum lurker here with a DR question. I'm using DarkRadiant 1.8.0, and I've been recently messing around with it, following the A-Z Beginner's Guide and generally trying to figure out how things work. However, I've hit a bit of a snag with the prefabs. I can insert, say, a kitchen shelf just fine, but when I try to rotate it (I just want to change the direction the shelf is facing), the objects on said shelf end up at strange angles. Toggling "Rotate func_* Entities around origin" on doesn't seem to help. Is there any way to cleanly rotate this type of prefab?

Link to comment
Share on other sites

Hi and welcome :)

 

Unfortunately I suspect this is a bug in DR. I'm hoping a more experienced mapper might have a workaround, but models seem to rotate according to their own axes. If you just want to rotate around the z-axis, which is the normal way to rotate furniture i.e. not turning it on its side, then the parts of the prefab will behave correctly as long as they haven't already been tilted. You can tell which are the "ok" parts when you select the lot because they have the blue axis sticking straight upright. Prefab simple_kitchen_workbench_small.pfb has 22 models for example, and all but two of them are upright and so will behave right when you rotate the whole. The other 2 do crazy stuff.

 

Is there no workaround guys? Other than repositioning the tilted parts?

Link to comment
Share on other sites

Not sure what I'm doing wrong. I'm trying to get a door to close via a target_callobjectfunction entity. I have it targeted at the door and have the spawnarg "call" set to "Close." When I trigger the callobjectfunction entity, nothing happens. Not sure what I've missed...

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Should be working. Can you upload an example map?

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

Hmmm this is mysterious. Doors don't respond to target_callobjectfunction because they don't have a script object! There are documented and implemented script events for them so you can close one with a script by saying $mydoor.Close(), but they don't have a script object so the call object function doesn't work.

 

I need to start work but I'll track this later.

Link to comment
Share on other sites

Hi all,

 

Forum lurker here with a DR question. I'm using DarkRadiant 1.8.0, and I've been recently messing around with it, following the A-Z Beginner's Guide and generally trying to figure out how things work. However, I've hit a bit of a snag with the prefabs. I can insert, say, a kitchen shelf just fine, but when I try to rotate it (I just want to change the direction the shelf is facing), the objects on said shelf end up at strange angles. Toggling "Rotate func_* Entities around origin" on doesn't seem to help. Is there any way to cleanly rotate this type of prefab?

 

The issue is, there are multiple items in the prefab all with different origins. Can you select all the items and convert it to func_static? If so then you can hit V key and move the origin for the single FS and it will rotate fine. Once you have it where you want it, you can revert it to world spawn or leave it as FS. If you can't do that then you'd have to select each item and hit V and move each origin of each object to the same spot preferably on a largish grid so its easy to know all origins are in the same spot. I've done this with a gate prefab that I created, unless I'm misunderstanding the question.

Link to comment
Share on other sites

The issue is, there are multiple items in the prefab all with different origins. Can you select all the items and convert it to func_static?

The problem prefab that I tried was made up of multiple models, so you can't merge them into a single func static unfortunately.

 

Doors don't respond to target_callobjectfunction because they don't have a script object!

I've tracked this but I'm not sure how it should work. As I said on the tracker:

$mydoor.Close() works from a script. "call" "Close" on a target_callobjectfunction doesn't work. The idTarget_callObjectFunction::Activate() quits when it finds no script object.

 

I'm not sure I've diagnosed this correctly as I don't know what the setup should be. How would a script object that implements the functions call the same-named functions without recursing into a loop? But it wants looking into and fixing. target_callobjectfunctions definitely don't work on doors, and they should. Confirmed with Lock() too.

Obs you're the chap I know who knows the most about script objects :) What should this setup look like?

Link to comment
Share on other sites

It should work like that if the door has the right scriptobject. Thinking about that it may be that the door moonbo uses is custom and don't use the correct spawnclass. It's CFrobDoor. If used Open(), Lock() etc. on doors in previous times and it always worked for me.

 

Regarding recursion, imho idTech4 script isn't really capable of doing recursion, at least not in the scope of scriptobjects. But I never really aimed for this to be honest, as I prefer iterative algorithms. So it may be possible.

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

It should work like that if the door has the right scriptobject. Thinking about that it may be that the door moonbo uses is custom and don't use the correct spawnclass. It's CFrobDoor. If used Open(), Lock() etc. on doors in previous times and it always worked for me.

The door in my test map is a CFrobDoor and it doesn't work. Also, it doesn't have a script object. Apparently doors don't have script objects at all!

 

Regarding recursion, imho idTech4 script isn't really capable of doing recursion, at least not in the scope of scriptobjects. But I never really aimed for this to be honest, as I prefer iterative algorithms. So it may be possible.

That's not what I meant... The CFrobDoor class defines a Close() script event, for example. I was wondering what syntax would be needed for a function in a script object called Close() to call CFrobDoor::Event_Close() without calling itself, i.e. how would the Close() function in the script object avoid calling itself?

Link to comment
Share on other sites

That's not what I meant... The CFrobDoor class defines a Close() script event, for example. I was wondering what syntax would be needed for a function in a script object called Close() to call CFrobDoor::Event_Close() without calling itself, i.e. how would the Close() function in the script object avoid calling itself?

Why should it do so? In the scriptobject, to just run the command Close(); This causes the CFrobDoor::Event_Close() function to be executed, that's it.

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

Whats the spawnarg on a door which controls noise suppression when inside a room again? I remember seeing it a while ago but I can't seem to remember it and I can't find it for some reason

Link to comment
Share on other sites

Did this -->site:http://forums.thedarkmod.com sound propogation closed door

 

Got this -->http://forums.thedarkmod.com/topic/12479-using-sound-loss-on-visportals/

 

Page 2 of that thread refers to a sound_loss_closed and sound_loss_open but I don't think they were implemented at that time. Might try them.

  • Like 1
Link to comment
Share on other sites

Did this -->site:http://forums.thedarkmod.com sound propogation closed door

 

Got this -->http://forums.thedarkmod.com/topic/12479-using-sound-loss-on-visportals/

 

Page 2 of that thread refers to a sound_loss_closed and sound_loss_open but I don't think they were implemented at that time. Might try them.

 

Thanks but unfortunately that only controls how the AI hear the sound.. I need to control how the player hears the noise because there are sound entities that play outside of this room which is fine but once inside you can hear them just as clearly as outside. So I need to reduce outside noise once inside the room for the player basically

Link to comment
Share on other sites

Hey Goldwell,

 

You can put an info_portalsettings entity on your visportal and then put the spawnarg "sound_loss" "20" on it. That should block sound coming to the player from the visportal. The "loss_closed" spawnarg can be used on doors (though it will only block sounds when the door and related visportal is closed).

Edited by Moonbo
  • Like 1

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Hey Goldwell,

 

You can put an info_portalsettings entity on your visportal and then put the spawnarg "sound_loss" "20" on it. That should block sound coming to the player from the visportal. The "loss_closed" spawnarg can be used on doors (though it will only block sounds when the door and related visportal is closed).

 

That worked perfectly! Thank you so much :)

Link to comment
Share on other sites

Has anyone figured out how to make AI to do custom things if they are alerted?

 

AI finds player, but does not attack or flee, but does something else, like runs to nearby alarm switch and pulls it, or runs to kill the hostage and that sort of thing?

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Has anyone figured out how to make AI to do custom things if they are alerted?

 

AI finds player, but does not attack or flee, but does something else, like runs to nearby alarm switch and pulls it, or runs to kill the hostage and that sort of thing?

 

Oh, I figured out it on my own. Here is how:

1) Make a hidden objective "AI servant1 is alerted to alert level 4."

2) Completion target targets "start" scipt. (Or actually targets a atdm:target_callscriptfunction, that fires the desired script declared in mapname.script.)

3) Start script does the following: put AI in a neutral team. Make AI blind. Remove all alert levels from the AI so that he can participate in conversations.

void start()
{
sys.println("blind guard1");
$servant1.setTeam(5);
$servant1.setAcuity("tact", 0);
$servant1.setAcuity("vis", 0);
$servant1.setAcuity("aud", 0);
$servant1.setAlertLevel(0);
sys.trigger($start_custom_action);
}

4) start_custom_action actually starts an ordinary conversation that instructs the AI to do something special. Pull a lever. Kill a hostage. Make a specific call for help. Say something witty.

5) when the custom action ends, be sure to put the servant1 back to to the correct team and set all acuitys back to 100. It might be a good idea to also give him some alert levels or make him head back to the location where he saw the player.

  • Like 1

Clipper

-The mapper's best friend.

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...