Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Thanks Sotha, for more complicated scripts I've read of instances where the scripts break when TDM is updated ...

 

Can you point me to these discussions?

 

We try hard not to break existing maps, and I haven't heard of any instances of script breakage.

Link to comment
Share on other sites

Yup, at least I've done some crazy scripting work, especially in Transaction cutscenes. Not a single thingy in my map scripts have been broken due to TDM updates so far...

Or at least none of such occurences have been reported.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Ah, I had read that In Remembrance of Him got broken but I might have misread that then.

 

Thanks everyone for giving me suggestions on how to get an item out of the player's inventory:

 

@ func_itemremove. it's a bit difficult to know if I'm using it correctly as I couldn't find any documentation on it (and don't know of any FM's where it's used). I added a "remove" spawnarg for the item I want to vanish from inventory and triggered the func_itemremove but nothing happened. I looked in the map warnings and noticed this though: "WARNING: Could not spawn 'func_itemremove'. Class 'idItemRemover' not found on 'RemoveSeal'". "RemoveSeal" is what I named the func_itemremove...is there a different spawnarg I should be using?

 

@ script objects. With scripts, I understand that I need to write the scripts in a script file that I place with my map, but what about script objects? What exactly makes a script object different from a standard script? It wasn't clear from the documentation on the wiki...

 

Final question related to another part of the same sequence as the item removal. I'm trying to have a func_static appear on a sliding door after it's frobbed. The func_static has to move along with the door after it appears. The easiest way to do this would be just to bind the two together and make the func_static invisible. It would then be turned visible after the player frobbed the door, but I have no idea how to switch the visibility of objects on and off.

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

Final question related to another part of the same sequence as the item removal. I'm trying to have a func_static appear on a sliding door after it's frobbed. The func_static has to move along with the door after it appears. The easiest way to do this would be just to bind the two together and make the func_static invisible. It would then be turned visible after the player frobbed the door, but I have no idea how to switch the visibility of objects on and off.

 

Bind the func_static on the door and give the func_static spawnarg "hide 1".

Then it is invisible.

 

Triggering it will make it visible and invisible.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

@ script objects. With scripts, I understand that I need to write the scripts in a script file that I place with my map, but what about script objects? What exactly makes a script object different from a standard script? It wasn't clear from the documentation on the wiki...

Scripts are something global. Script objects are entity related things. You define a script object and give the entity you want to use it the spawnarg "scriptobject" "name_of_your_scriptobject", which then defines the behaviour of the entity.

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, ic Obsttorte. You mentioned that I wouldn't need to rename my script file everytime I changed my map name if I used script objects. How is that so? Where exactly do I write the script objects?

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

A "script object" is just what you call the in-game instance part of the script running, so you could have two instances running the same script code, and it's two independent objects that happen the be running the same code independently.

 

Well to be precise, you call a entire individual script function itself an "object", everything inside the outer { }'s for the "void name". That's the actual "object" that's getting called to run in-game. I mean it's using "object" in the sense of "object oriented" programming. Code is organized into discrete objects you can call independently & have multiple instances running at the same time. That's what "object" means. (As opposed to linear programming where everything is lined up, and if you want to reuse something you do something like "goto 220". In object oriented programming, you call multiple objects to all do their own thing independently, and they'll maybe call other objects, when they finish they often return their output to the thing that called them like a function, often running objects need to get killed to release memory, etc, and stuff can get done more efficiently.).

 

So that's the relationship between the script code and a "script object" in particular.

 

Obs is talking about a feature in the Doom3 engine where you can have in-game entities that "call" script objects to run for themselves (A "call" is the in-game command that starts an instance of a script object running). There are actually a number of in-game ways to call a script object to run; that's just one of them. So I don't think that adds anything to answer your question beyond what explained above.

 

Then what you're calling the script file, the literal text file with the .script format, is only the placeholder file where all the script objects are held. That doesn't have anything to do with the scripts at all. That's just the Doom3 game engine's convention to look for script objects inside a text file with that name. So to your last question: you still need to rename the .script file every time you change your map name to the same name so the game engine can find your scripts.

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

@Sotha - thanks, that did the trick.

 

@Demagogue/Obs - So it sounds like with the func_removeitem not working that I have to use a script then. When I set it up, it works well except for one tiny issue. When I activate the script ("$player1.replaceInvItem ($FirstSeal, $null_entity)"), the key is properly removed from the inventory, but the key's inventory icon is still up on the HUD. You can't do anything with the icon and if you scroll through the inventory it disappears for good, but it's still a little disconcerting. Is there any way to get rid of the icon such as clearing the player's inventory selection ala the backspace key (or alternatively force the inventory to scroll over a slot so that the player doesn't see the icon, as it will disappear after that)?

 

Thanks!

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

Always check wiki.thedarkmod.com/index.php?title=TDM_Script_Reference to see what scripts are available.

 

In this case, I think the one you want might be:

scriptEvent entity setCurInvItem(string itemName);

Sets the inventory cursor to the named item. Returns: the item entity of the newly selected item (can be $null_entity).

Spawnclasses responding to this event: idEntity

 

Or I don't know. There's a lot of them. Just do a Find search for "inventory" on that page and experiment. That's how all of us learn these things.

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

Thanks Demagogue,

 

I had trouble with getting setCurInvItem() to work, but using getNextInvItem() to flip to the next inventory slot did the trick. The whole sequence works now without a hitch :-).

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

@Moonbo: I did some testing: The func_removeitem does not work as the console reported to you, too. The is also a func_remove, but it just removes the item behind the inventory item, not the inventory item itself (so the item is still in the inventory, but doesn't work).

 

So scripting is really the only way it seems. But as you got it working, I guess this isn't a problem anymore. If you have troubles setting up scriptobjects, you can take a look at the in-game shop scriptobject I created a while ago. You can find it in my mapping thread and there is also a wiki entry for it (see links below). It does something similar, the only difference is that it adds things to the inventory instead of removing them.

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

hallo everyone!

faultSky_01.jpg

 

i'm having visible stitch at the TOP section of skybox no matter what side its turned on

The other sides are ok though

Terragen camera settings: Horizontal FOV = 90; Rotation = 90-00-00; Focal lentgh =18; Film Aperture=36

What im i doing wrong?

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

If simple rotation really does not help, then the top shot is mismatching somehow, probably because of incorrect capture parameters.

 

Did you capture the shots as described in this tutorial?

http://wiki.thedarkm...Skybox_Tutorial

 

I've done a few skyboxes according to this and it works just fine. Terragen defaults to zoom of ~1.4, which ruins skyboxes. Maybe you had incorrect zoom for the top shot?

 

Try to recapture the thing with by carefully following the description.

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

If simple rotation really does not help, then the top shot is mismatching somehow, probably because of incorrect capture parameters.

 

Did you capture the shots as described in this tutorial?

http://wiki.thedarkm...Skybox_Tutorial

 

I've done a few skyboxes according to this and it works just fine. Terragen defaults to zoom of ~1.4, which ruins skyboxes. Maybe you had incorrect zoom for the top shot?

 

Try to recapture the thing with by carefully following the description.

Is there a camera zoom in Terragen 2?

I think its FOV now

here goes the tip https://developer.va...with_Terragen_2 about changing FOV for bottom-top shots

Nope.That doesnt help

Edited by someTaff

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Is there a way to animate a tree a little? Like windswell

 

Some of the trees models in TDM do have a mild sway, I think.

Creating such by oneself, should require modeling skills and a custom model.

 

A crazy attempt would be to model the tree in DR yourself, then make branches by yourself. The wind sway could be made by making the branches into "func_pendulum":S and giving them mild movement. I do not know if it would look good or not...

 

 

Is there a camera zoom in Terragen 2?

I think its FOV now

 

My tutorial is for Terragen. "Terragen 2" I have never used it. Looks like the web page the tutorial points to is not anymore the same it used to be.

Tutorial is for terragen classic:

http://www.planetsid...erragen-classic

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

If you found a method that works for Terragen 2, you need to add it to the Skybox Tutorial on the wiki (the link is above) so that we can all benefit from it. If you don't have access to the tutorial, then post the method here & we can add it.

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

If you found a method that works for Terragen 2, you need to add it to the Skybox Tutorial on the wiki (the link is above) so that we can all benefit from it. If you don't have access to the tutorial, then post the method here & we can add it.

Nothing new, same 0 0 0,0 90 0,0 180 0 ,0 270 0, 90 0 0, -90 0 0 cameras, FOV 90

Still, in case of skybox for map it falures top section. Will do research

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Sorry. You said "method i used seems to works", which sounds like you got the skybox to work.

But now you're saying you still have the problem with a top seam.

Well, keep researching and experimenting with the FOV or whatever else and hopefully you can find a solution.

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

I've done a few skyboxes according to this and it works just fine.

 

Anything indoor? I'm still looking for something to replace the gen2 skybox with.

Link to comment
Share on other sites

Ended up with photoshoping the stitches. It's a known issue with Terragen 2 and called GI mismatch. Found one tutorial about making 360 Panorama with PTGui Pro, so scratch that.

TerragenSkybox110_Template.jpg

When i try to rebuld skybox from panorama, bottom piece won't fit

 

Looks like there is a workaround by substitute GI with 3 fill lights

http://www.nwdanet.c...-terragen-2-faq

http://forums.planet...php?topic=580.0

P.S. This is works, no stitch!

 

 

And another technique, cashing GI for each shot, and then shot 6 times with blended GI cashe

http://www.planetsid...opic,14504.html

Not tried yet

Edited by someTaff

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Moonlight as to cast shadows for outside area? Use a simple light, with proper moon color. Place it high so it casts nice shadows.

 

Moonlight causes a more bright area in terms of ambient light? Use location system to increase the ambient_light brightness in the outside area location:

http://wiki.thedarkm...cation_Settings

 

Moonlight to seep in through a window, use a spot light with a light texture that looks like the window through which the light is seeping through.

  • 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

    • 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.
      · 1 reply
    • 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
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...