Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

All permissions are turned on for that folder. In addition, if I manually clone a particle file and change the name, I can see the newly created particle in the editor.

 

One thing I'm seeing is, whenever I save an edited particle, I get:

No mod base path found, falling back to user engine path to save particle file: C:\Users\Aosys\Desktop\darkmod\

That's the path I specified in game setup (I haven't set up a specific project, since I bounce back and forth between a few of them pretty frequently).

 

[Edit] Okay, so it works if I run DR as an administrator? But I don't want to do that all the time, it should be able to save using normal privileges... Also every time I do this, it tries to create a new particles folder on my desktop rather than finding the one already in my darkmod directory.

Edited by Aosys
Link to comment
Share on other sites

I need to see your Game Project dialog to see the paths you're using (engine path, mod path etc.). Maybe DR is missing something to generate useful paths to write to.

 

(Generally spoken, saving to some folders in Windows requires higher privileges, that's not something DarkRadiant can change. If that setup is problematic, maybe moving your stuff to different working locations might resolve the problem.)

Link to comment
Share on other sites

  • 2 weeks later...

I want to create a custom enemy for a horror mission that I've been blocking out a little bit over last few weeks. It's heavily inspired by these:

https://www.youtube.com/watch?v=VOfc5VZS2Cs

 

Basically, they can move only when they are not in the player's field of view, (plus in a different visleaf where they can't be seen so player FoV is not counted through walls?). That part is going to require a fair bit of scripting no doubt.

Visually I think it makes sense that they are statues, and I see one of two options.

1: Use existing statue model with only rotation and X,Y,Z position showing when the player sees it. When out of FoV it can even be invisible or whatever is easiest.

2: Use an existing model of an AI in game, reskin it with a sculpted stone texture, and make if forcibly freeze-frame while in player FoV.

 

Option one sounds like it would be easier in theory, with a slightly less dramatic result, though perhaps even creepier in one way. I know I've seen a proof of concept with statues that rotate to face you while they are outside of field of view (Obsttorte?) so that might be a foundation to stand on... Option 2 could be easier too though, I'm not sure what it would entail, and it may be more realistic if you suddenly turn around and there is a frozen statue right behind you with a sword raised about to kill you.

 

I'm not sure how involved a project this is, that's why I'm directing these questions to those who have more experience than me creating custom assets.

Edited by Bienie

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

I hope you don't want it as B-Movie-Style as in the video linked?! :D

 

But to answer your question. In theory a static model moved around by a script should be easier, but restricts the possibilitites. I am not sure to which degree ai animations and thinking can be "paused".

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 hope you don't want it as B-Movie-Style as in the video linked?! :D

How can you!? :o These are the creepiest opponents in Doctor Who. Granted, the chosen video definitely looks like a B-movie (not sure how many episodes before that had these opponents); the first episode they appear was just brilliant!

  • Like 2
Link to comment
Share on other sites

I hope you don't want it as B-Movie-Style as in the video linked?! :D

 

But to answer your question. In theory a static model moved around by a script should be easier, but restricts the possibilitites. I am not sure to which degree ai animations and thinking can be "paused".

 

Hah, it's not the best example of them for sure, but I think they will be very scary in TDM. I sure hope the pause thing won't be too hard to implement, as that is kind of the core feature of them. To balance that (albeit creepy) weakness, they would have to be fast when they can move and kill the player in one or two hits. I would also have them make creepy noises when they are moving so they player can tell. With a few of these around it could turn in to a puzzle ^^

So was it you that had made the statues that turn toward the player as he looks away? I know I saw that somewhere...

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

Hmmm... I do like the effect, and if I understood it correctly, you wouldnt really need a whole new character per se. Considering they just move when in complete darkness, and are frozen where they stand when light shines on them, you would actually need the "entity" to exist (either its a real AI entity if you can code that, or a collection of clever scripts, that would track and get near the player when in darkness), and the visual representation of it would be a few static models in different poses, that would show up and be still whenever light is on. The modeling side of it could easily be achieved with a good rigged statue model exported several times in each of the needed poses.

Actualy Ive got just the thing... http://forums.thedarkmod.com/topic/13926-rpgistas-mapping-and-modeling-thread/page-12?do=findComment&comment=411281 ;) But if you are interested in that, you would need to adapt your story so as make it about a single menacing statue that will hunt the player down (instead of a bunch of them like in the video).

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

I actually tried something a little like this awhile ago, after Obsttorte kindly brewed up that great turning statue script. My attempt at rejiggering it absolutely doesn't work (I'm totally clueless when it comes to scripting); maybe someone else can get it to?

 

 

 

//Statue Look script by Obsttorte

object statue_move
{
	void init();
	void loopLook();
	vector viewDir;
	vector direction;
	float cosine;
	float tolerance;
};
void statue_move::init()
{
	thread loopLook();
}
void statue_move::loopLook()
{
	while(1)
	{
		if (distanceTo($player1)<1024)
		{
			viewDir=sys.angToForward($player1.getViewAngles());
			direction=getOrigin()-$player1.getOrigin();
			cosine=viewDir*direction/sys.vecLength(direction);
			direction_z=0;
			if (cosine<sys.cos($player1.getFov()/2+30))
			{
				setAngles(sys.VecToAngles(-direction)+'0 90 0');
				//Note: this currently doesn't work
				setOrigin($player1.getOrigin());
			}
		}
		sys.waitFrame();
	}
	
}

 

 

  • Like 1
Link to comment
Share on other sites

 

setOrigin($player1.getOrigin());

You are trying to teleport the statue to the position the player is currently standing. In games like Unreal Tournament or Painkiller this would be called a telefrag (bloody pieces of flesh flying around included) :) Probably not what you are aiming for ;)

 

I'll take a look at whether it is possible to pause ai animations.

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

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

  • 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

Hmmm... I do like the effect, and if I understood it correctly, you wouldnt really need a whole new character per se. Considering they just move when in complete darkness, and are frozen where they stand when light shines on them, you would actually need the "entity" to exist (either its a real AI entity if you can code that, or a collection of clever scripts, that would track and get near the player when in darkness), and the visual representation of it would be a few static models in different poses, that would show up and be still whenever light is on. The modeling side of it could easily be achieved with a good rigged statue model exported several times in each of the needed poses.

Actualy Ive got just the thing... http://forums.thedarkmod.com/topic/13926-rpgistas-mapping-and-modeling-thread/page-12?do=findComment&comment=411281 ;) But if you are interested in that, you would need to adapt your story so as make it about a single menacing statue that will hunt the player down (instead of a bunch of them like in the video).

They actually only move, while they are not seen by anyone (in his case most likely just the player). If it is completely dark, this is the case, of course, but it also happens, if one turns their back on them or even if one just blinks (hence the name "Don't Blink" as the first episodes these appear).

Link to comment
Share on other sites

I made a key model, and I thought I'd just switch it in existing entity (brass key simple). So I added it to my map and switched the model, but then I got a collision error. Only after I made a collision mesh for the key, it appeared in game. Is it necessary for keys to be moveable?

 

Edit: it looks like keys don't have to be moveable, I changed the spawnclass to idStaticEntity, and it works fine without additional collision mesh.

Edited by Judith
Link to comment
Share on other sites

When a model has skins, we can go to Choose Model, find it, and expand to see a list of skins. Can the same be done with entities?

 

Yes. You just have to type in a dummy skin value to bring up the skin chooser button.

Link to comment
Share on other sites

Hmmm... I do like the effect, and if I understood it correctly, you wouldnt really need a whole new character per se. Considering they just move when in complete darkness, and are frozen where they stand when light shines on them, you would actually need the "entity" to exist (either its a real AI entity if you can code that, or a collection of clever scripts, that would track and get near the player when in darkness), and the visual representation of it would be a few static models in different poses, that would show up and be still whenever light is on. The modeling side of it could easily be achieved with a good rigged statue model exported several times in each of the needed poses.

Actualy Ive got just the thing... http://forums.thedarkmod.com/topic/13926-rpgistas-mapping-and-modeling-thread/page-12?do=findComment&comment=411281 ;) But if you are interested in that, you would need to adapt your story so as make it about a single menacing statue that will hunt the player down (instead of a bunch of them like in the video).

 

Wow, those statues look great! If I do decide on trying the fully animated route I'll most likely want to use that. How big is it in game terms? Is the size easily modified?

 

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

 

That does look promising, but also more complicated than the static statue option. I should probably try the simplest solution at first, and if I don't like the result I can think about the fully rigged model option. The script Aosys posted would be a good starting point to figure that out I guess. Is there perhaps a way to put the statue close to the player origin but not on it? Could this be constrained by monster clip perhaps? Many questions and not enough knowledge to even know where to begin looking ^^

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

 


Is there perhaps a way to put the statue close to the player origin but not on it?

Well, you could place it a bit away. Calculate the direction from the player to the statue, normalize it and multiply it with an appropiate distance. The downside is that this could potentially cause the statue to end up in a wall. You could also use predefined locations where the statue gets teleported to. Monsterclip will not work btw., as it is meant for monsters and not for func_statics.

 

I think that using an ai here is much easier. You don't need to create a new animated model. Just use an existing ai and reskin it, so it looks like a statue (you may have to remove the attachments or reskin them, too).

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

Well, you could place it a bit away. Calculate the direction from the player to the statue, normalize it and multiply it with an appropiate distance. The downside is that this could potentially cause the statue to end up in a wall. You could also use predefined locations where the statue gets teleported to. Monsterclip will not work btw., as it is meant for monsters and not for func_statics.

 

I think that using an ai here is much easier. You don't need to create a new animated model. Just use an existing ai and reskin it, so it looks like a statue (you may have to remove the attachments or reskin them, too).

 

I see your point. Seems to be a lot fewer issues to solve with using an AI. I need to figure out the skin, sounds and the pause system and that's basically it. That's still a lot for me though, not having tinkered with these things before.

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

For the skin you should have a look at an existing one and simply exchange each entry with a stone material (e.g. marble). If you are lucky, it does not look too bad and you don't have to create a new UV-map etc. If you need a list of all entries for the AI of your choice just ask.

Link to comment
Share on other sites

Is there an easy way to evaluate custom assets without integrating them into the FM? If you have a new asset (either made by you or downloaded from someone else), it will probably have multiple files in multiple folders (e.g. models, materials, textures...). If your FM already has custom assets, the files/folders of the new one will get mixed in with what's already there. If you don't like the object, or it's your own and you want to package it to be shared, finding all the relevant files could be a bit of a chore, and prone to errors.

 

As far as I know, assets can go in the current FM folder or the main TDM folder. The latter isn't ideal because it already has a prefabs folder and a new asset may get mixed in there.

 

We could make a new FM for it, but I think it's best to be able to evaluate it in your actual FM to see if it's a good fit.

Link to comment
Share on other sites

You can't have both. If you want to test the asset in the context of your fm, you have to include it in the respective folder ... and have to delete the files if you don't like it.

 

If you just want to test it independently, you create a new fm folder and a small test map for it. Actually you can reuse the test map, as you just have to delete all folders except the maps folder after testing.

 

You could also use a file managing program. Just google it, there seem to be some. I don't have any experience with them, so I can't give you any recommendation.

 

Another relatively easy way would be to create a copy of your fm (or a backup), insert the asset, and after testing you could simple delete the folder and use the old one if you don't want to include the asset.

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

You can keep the custom assets as individual pk4 files. All the folders and files are in the pk4 package, and you can place them in your mission folder and take them out easily, without them having to be extracted everywhere.

  • Like 2
Link to comment
Share on other sites

Thanks for the advice. I've tried making a pk4 file. It's mostly fine, but in order to update the asset I have to close both TDM and DR.

 

Regarding a file manager, I've just had a look at one called FreeCommander, which has a folder synchronization tool. That can delete files, but it won't delete empty folders. They can be deleted by the main interface, but it's a slightly inelegant process. The asset's files would be in some intermediate folder, and in the FM folder. FC could be used to remove them. I can see that being easily useful for trying out and then removing an asset. For managing the user's own ones it'll also be fully functional, but possibly error prone. It could be easy to, for example, edit an mtr file in the intermediate folder and then wonder why there was no change in TDM. Still, I think it's worth a go.

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.
      · 0 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
    • 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...