Jump to content


Photo

Newbie DarkRadiant Questions


8248 replies to this topic

#8226 Aosys

Aosys

    Member

  • Member
  • PipPip
  • 212 posts

Posted 19 June 2018 - 11:51 AM

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, 19 June 2018 - 12:35 PM.


#8227 greebo

greebo

    Heroic Coder

  • Root
  • 16053 posts

Posted 19 June 2018 - 01:26 PM

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.)



#8228 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 181 posts

Posted 30 June 2018 - 08:06 AM

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:

 

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, 30 June 2018 - 08:09 AM.


#8229 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5578 posts

Posted 30 June 2018 - 03:28 PM

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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8230 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1493 posts

Posted 30 June 2018 - 04:42 PM

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!


  • Abusimplea and Bienie like this

#8231 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 181 posts

Posted 30 June 2018 - 05:24 PM

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...



#8232 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1519 posts

Posted 30 June 2018 - 07:30 PM

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.thedar...-12#entry411281 ;) 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, 30 June 2018 - 07:31 PM.

  • Bienie likes this

#8233 Aosys

Aosys

    Member

  • Member
  • PipPip
  • 212 posts

Posted 30 June 2018 - 07:48 PM

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?

 

Spoiler

  • Bienie likes this

#8234 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5578 posts

Posted 01 July 2018 - 03:40 AM

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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8235 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5578 posts

Posted 01 July 2018 - 03:59 AM

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


  • Bienie likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8236 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1493 posts

Posted 01 July 2018 - 04:09 AM

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.thedar...-12#entry411281 ;) 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).



#8237 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1284 posts

Posted 02 July 2018 - 02:51 AM

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, 02 July 2018 - 03:13 AM.


#8238 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37172 posts

Posted 02 July 2018 - 07:43 AM

If your keys are not movable, then make sure you make them undroppable as well. 


  • Judith likes this

#8239 R Soul

R Soul

    Member

  • Member
  • PipPip
  • 122 posts

Posted 04 July 2018 - 07:14 AM

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?



#8240 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 37172 posts

Posted 04 July 2018 - 07:57 AM

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.



#8241 R Soul

R Soul

    Member

  • Member
  • PipPip
  • 122 posts

Posted 04 July 2018 - 08:25 AM

Thanks.



#8242 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 181 posts

Posted 04 July 2018 - 01:07 PM

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.thedar...-12#entry411281 ;) 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 ^^



#8243 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5578 posts

Posted 06 July 2018 - 06:58 AM


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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8244 Bienie

Bienie

    Member

  • Member
  • PipPip
  • 181 posts

Posted 08 July 2018 - 01:47 AM

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.



#8245 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1493 posts

Posted 08 July 2018 - 03:55 AM

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.

#8246 R Soul

R Soul

    Member

  • Member
  • PipPip
  • 122 posts

Posted 15 July 2018 - 10:34 AM

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.



#8247 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5578 posts

Posted 15 July 2018 - 12:02 PM

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
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#8248 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1519 posts

Posted 15 July 2018 - 12:04 PM

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.
  • Abusimplea and Destined like this

#8249 R Soul

R Soul

    Member

  • Member
  • PipPip
  • 122 posts

Posted Yesterday, 05:53 PM

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.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users