Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

There's definitely a script function for rotations, so you could script rotate it directly.

Actually here it is:

 

$<item>.rotate ('<vector rotate-axis>'); (makes the thing continuously spin on axis, Also see: rotateDownTo, rotateOnce, rotateTo, rotateUpTo, stopRotating, isRotating for variations)

 

I think rotateTo or rotateUpTo is what you'd want?

I believe it wouldn't be jerky because you set the rotation-axis as a vector (x-y-z offset from the center maybe?), so you'd just set exactly the axis of rotation you want and let it go. I think there are functions for speed & time rotating somewhere in there too, so you can get it to do a partial rotation at the speed you want.

 

Edit: Tragically modwiki is down! :(

That has the description and syntax for all the script functions.

It says it'll come back, but it's been down for a few months now...

We have a pared down list I made for our wiki, but it only has a couple of useful ones, far from all.

http://wiki.thedarkm...r-Friendly_List

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

As for the rotation, I think I tried a year or two back. Not sure I tried every script event but I think they all work a similar way. So basically x works, y, works, z works - they all end up at the same place but take different routes! So my idea is to only rotate 1 degree at a time then repeat in a loop. But it still might not work dunno.

Link to comment
Share on other sites

For a full list of script functions you can check here:

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

I'm not sure that I understood what you want to achieve. Do you want to have a door that is partially opened but else works as normal or do you want something like a trapdoor for a cellar for example? As for the rotation. If you set rotate to something like what you've mentioned, the door will rotate around all three axes what looks strange.

 

The rotate spawnarg on doors is a bit strange, as something like "90 0 0" does not mean that it rotates 90° around the x-axis. You have to check to see which setting works. For partiall opened doors check here:

http://wiki.thedarkmod.com/index.php?title=Func_darkmod_door#Open.2C_Partially_Open.2C_or_Closed_Door_at_Game_Start

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

Yeah, and since I have zero confidence in my scripting abilities I'll probably just change how I've got the door set up :-). Oh, random question: From the descriptions in Darkradiant it sounds like if you want to create a blocking volume that stops the player but nothing else (i.e. you can throw moveables at it and they won't be blocked) you should use the "Player Clip" texture. But when I do that, it won't let moveables pass...

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

That's strange, it should work for moveables. Maybe it is broken?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

What is the spawnarg for changing the colour of colorme lights? I added a "_color" spawnarg, which changed the colour of the light, but not the colour of the model's glass.

Link to comment
Share on other sites

Got three questions:

 

1) In setting up AIs sitting between chairs and tables, I did my best to follow Sotha's instructions (on this thread). I got it to work without any problems except that if the player rushes at the AI and gets right in their face before they stand, they get stuck on their chair and sort of spin around tracking the player but not getting up. Is there a map you guys recommend looking at so I can see what step I'm doing wrong?

 

2) Is it possible to attach a readable (like a rolled up scroll) as a prop to the hip of an AI?

 

3) Is it possible to have two different densities for two different SEED targets in a single SEED entity?

 

Thanks!

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

1) In setting up AIs sitting between chairs and tables, I did my best to follow Sotha's instructions (on this thread). I got it to work without any problems except that if the player rushes at the AI and gets right in their face before they stand, they get stuck on their chair and sort of spin around tracking the player but not getting up. Is there a map you guys recommend looking at so I can see what step I'm doing wrong?

 

This is a known bug. There's nothing you can do to prevent this until it's fixed. I don't know when that will be.

Link to comment
Share on other sites

2) Is it possible to attach a readable (like a rolled up scroll) as a prop to the hip of an AI?

this shouldn't be a problem. You have to place the scroll or whatever on the AI and set the appropiate spawnargs (something like "bind" or so). I will take a closer look on that and post it tomorrow if someone else didn't already. :smile:

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

Thanks Fidcal,

 

That article was what I needed. Another question...I want to add some custom sounds to my map but can't find any directions on how to do it. The closest I could find what this article, but that makes it sound like you need to write up custom soundshaders yourself?

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

I'm fairly sure you can directly access the sound file but the shaders are very easy to make. Just create a plain text file in a folder named sound within the game folder (eg, darkmod/sound or mymap/sound.)

 

In the text file, at its simplest essentials:

 

unique_name

{

sound/<path>/soundfile.suffix

}

Link to comment
Share on other sites

What Fids said.

If you are still unsure, you could check phrase_book.pk4 sound folder for an example soundshader (phrase_book.sndshd) and files.

 

Word of warning. In my tests, I discovered that sound files with a "-" letter will work in DR but not ingame, which is bizarre. Example "sound-file.ogg" does not work ingame but works in DR. "sound_file.ogg" works just fine. Hopefully this saves you the time to figure this detail out on your own. ;)

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Thanks Sotha, I was just a little intimidated by the idea of having to code something but you and Fidcal were right - it was pretty easy. So, thanks to all of your help I've pretty much finished putting together a small demo map, but I'm running into two final problems:

 

1) I'm using the Springheel skybox but for some reason only part of it is showing up (the top part, the sides are just pitch black). Strangely enough, if I have the training mission installed and then I load up my map, the skybox shows up perfectly fine.

 

2) I've written the mission debriefing and have packaged the map. When I play the packaged fm on the computer that I built the map on, the debrief text pops up and everything works fine. But when I try installing the FM and playing it on another computer I get an error that says that it cannot find the mission debrief text. I really don't know what to do about this one...

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

Thanks Sotha, I was just a little intimidated by the idea of having to code something but you and Fidcal were right - it was pretty easy. So, thanks to all of your help I've pretty much finished putting together a small demo map, but I'm running into two final problems:

 

At your service. Usually, when it comes to mapping, things look difficult at start. Then you master them and they are easy as pie. ;) You will be writing advanced script files in no time.

 

1) I'm using the Springheel skybox but for some reason only part of it is showing up (the top part, the sides are just pitch black). Strangely enough, if I have the training mission installed and then I load up my map, the skybox shows up perfectly fine.

 

So you have smf/skybox texture applied to all the parts in the map where sky should be visible. Then you have a separately inserted skybox room with the skybox camera? Is it a prefab skybox? Did you forget to apply the actual skybox texture to the walls of the skybox room? ("actual skybox texture" being the material shader you apply to brush faces from the texture lists) Or is this skybox a custom texture, maybe parts of it are missing? Incorrectly defined or forgotten material file? Do you have error messages in the console that might give a clue? "warning: missing texture file xxx" or something?

 

2) I've written the mission debriefing and have packaged the map. When I play the packaged fm on the computer that I built the map on, the debrief text pops up and everything works fine. But when I try installing the FM and playing it on another computer I get an error that says that it cannot find the mission debrief text. I really don't know what to do about this one...

 

Mission debriefing? Or do you mean briefing? (The text in the start). Is it a text-only one or does it use time-flowed or button controlled briefing? This sounds like you forgot to put the mainmenu_briefing.gui (or briefing.xd) into your .pk4. Mainmenu_briefing.gui should be in the guis folder. If you used the text-only brieging,the briefing.xd should be in the xdata folder.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Hey Sotha,

 

I'm using a prefab (the "Springheel" skybox) and I'm pretty sure I've got it set up properly. But the sides of the skybox aren't always on. Here is how it is when I have my demo map installed (btw, if anyone can tell me how to use spoiler tags, I'll hide these images :-P):

 

requiemdemo201212311712.jpg

 

And here it is when I have the Training Mission installed, and then I just directly load up my map:

 

trainingmission20121231.jpg

 

For some reason the sides of the map are just disappearing (unless I have the training mission installed)...maybe I just have to erase the skybox and try placing it again?

 

For the briefing, I'm using a text-only briefing and I've placed the xd file in the xdata folder. It runs fine on the computer that I made the map on, but when I email the .pk4 file to another computer and try to play it, D3 says it can't find the xd file.

Edited by Moonbo

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

Have you definitely included the xd file in the right path in the pk4?

 

As for the skybox, where did you get it? If you extracted it from the trainer then is this the trainer I think is now included within Dark Mod? If so, possibly the texture is not included directly within the Dark Mod texture pk4s but within the trainer pk4? If so, you need to open that up and copy the relevant dds files and folder plus the material shader file all to your own pk4. The skyline actually looks like the custom one for the trainer as I recall whereas the 'ceiling' with the moon is probably the standard texture built into darkmod.

 

If, however, you used an official darkmod prefab with the skybox in then somebody needs to transfer those shaders into the main dark mod shader pk4's I think.

Link to comment
Share on other sites

I just took a quick look. Beneath some dds files as mentioned by ffidcal, it also seems like a model is part of the skybox (models/darkmod/misc/system). At least its name implies this.

 

EDIT: Just looked in DR. The model is definitely part of the skybox. So you have to use it as well. (There are also some skyboxes in the prefab menu if you don't want to use that model. Or you can just delete the model out of the skybox, so you would have a plain sky without the skyline.)

Edited by Obsttorte

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

Whew, solved both problems:

 

The reason the briefing text couldn't be found is because I had packaged the pk4 as a .RAR and not a .ZIP and so none of the files in it were being read, it just happened that the briefing text was the first error I ran across.

 

The skybox I used (tdm_springheel) is definitely in the provided prefab pk4, but the dds isn't - once I copied it from the training mission and stuck that in my pk4 file, that solved it.

Edited by Moonbo

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

Argh, looks like I fixed those just in time. My computer cashed with DarkRadiant still running, and now it crashes every time I try opening it. I tried looking in the darkradiant.log and it abruptly stops after trying to load ".../DarkRadiant/user.xml". Tried rebooting, but no luck :-/. Should I try erasing that user.xml file or will that make things worse?

Edited by Moonbo

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

Just rename the xml file - it'd be useful to see what is causing the crash (I wouldnt expect a completely malformed xml document could... interesting). It's just your settings for DR, which normally isnt too much.

 

If that fixes it, I'd appreciate a copy of that file :)

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

      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 )
      · 2 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
       
      · 5 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...