Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I have three dozens of AI (one dozen replacing other, bound to other path nodes) and need to turn off their thinking for optimization. I thought "never dormant" "0" will do, but no -after replacement frame rate goes down (old AI are teleported to different area). I've tried "max_interleave_think_dist" "10" and "max_interleave_think_frames" "50" but then they are half frozen with animations out of sync. I can't reduce number of AI (it is ship crew on three different shifts) and been struggling with this one thing for a long time. Ideas?

 

They don't need to react to surroundings, just take one place and play animation.

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

So the description of setKey says "Sets a key on this entity's spawn args. Note that most spawn args are evaluated when this entity spawns in, so this will not change the entity's behavior in most cases. This is chiefly for saving data the script needs in an entity for later retrieval."

 

So is there a way to make the entity re-evaluate its script-updated spawnargs at runtime and act differently, or is this just for using entities as variable carriers?

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Good question! I want to exchange the xdata of a journal (first it is coded, after the player gets the cifer, it should be decoded). I have used the response "set spawnarg" to change the xdata_content, but nothing happens. Most likely I have to reload the xdata, but I have no idea, how to do it via script.

 

Edit: Reloading the xdata manually also does not help. It is still the coded journal.

Edited by Destined
Link to comment
Share on other sites

A readable is a GUI surface, so there should be some way to change its content via the GUI system, but not as simple as changing one spawnarg...

 

Any chance of having a script store the object's origin and rotation (if it's a moveable in the world rather than static or in the player's inventory), removing/hiding it and spawning/unhiding a replacement?

 

If an entity's spawnargs are used by a script (probably the entity's script object), then you can adapt the script to reread them as desired; if the behaviour you're interested in is defined by code in the spawnclass, then you can't change the entity's behaviour after spawn unless the code provides a means of doing that.

 

They don't need to react to surroundings, just take one place and play animation.

http://forums.thedarkmod.com/topic/13059-func-animate/ might be of interest.

Edited by VanishedOne
  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

If an entity's spawnargs are used by a script (probably the entity's script object), then you can adapt the script to reread them as desired; if the behaviour you're interested in is defined by code in the spawnclass, then you can't change the entity's behaviour after spawn unless the code provides a means of doing that.

In my case it's changing the conversation arguments inside an atdm:conversation_info, so I guess no go, since it looks to me those things interact straight with the SDK without any script objects.

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Any chance of having a script store the object's origin and rotation (if it's a moveable in the world rather than static or in the player's inventory), removing/hiding it and spawning/unhiding a replacement?

 

That was my first idea. But I thought just changing one spawnarg (if it had worked) would be much simpler than replacing the book. The book is moveable and can go into the inventory. So right now, I will first have to check, if it is in the inventory or not. If it is, I remove it from the inventory and add the decoded journal. If it is not, I will have to get the origin and orientation of the journal, transfer them to the decoded journal and then remove the coded journal. I am not too firm with scripting, so it might be a good excercise, but as I said: the other option appeared much simpler.

Link to comment
Share on other sites

The book in the inventory is not the same as the one the player frobs to pick it up iirc. This could be the reason why your xdata change doesn't work.

  • 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

Ah, good to know. I will try with a static one. But it would not make sense, if the player could not pick it up. I think I will deal with it later, but thanks anyway.

 

Edit: I could not resist and tested it. For the static book, it works to change the spawnarg, but only if the xdata is reloaded after that. So, as long as the player does not have the journal it should be possible via changing the spawnarg (if I find the correct script command, a simple reloadxdata does not work), but I have no idea how to target the journal in the incentory, as I have no idea what the entity is called then.

Edited by Destined
Link to comment
Share on other sites

I'll take a look tomorrow.

 

But just that I understand what you desire: You want the content of a readable in the inventory to change after a certain event has taken place?!

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

If you wanted to have a look and try and reverse engineer I know that Moonbo's House of Locked Secrets uses that exact technique. The main character Bolen has a diary that would be updated as the player progressed along the mission.

Link to comment
Share on other sites

Link to comment
Share on other sites

But just that I understand what you desire: You want the content of a readable in the inventory to change after a certain event has taken place?!

 

Yes, that pretty much sums it up. I could also let the player decode the journal himself, but it would take some time and I don't think that players would enjoy it, so I want to exchange the content with the coded journal with the decoded as soon as the player finds the cypher.

 

 

This does not really do, what I want, since I don't want to add the text behind the existing one, but replace the existing one. But it is good to know that this is possible for later :)

Link to comment
Share on other sites

Yeah, but it is basically the same.

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

Here ya go. The cube floating in the room is a button. Pressing it will cause to change the content of the book.

book.pk4.txt

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

Just an FYI that there is a limit to the number of characters that can be on a single page with Obsttorte's script. I think it was under 200, so I ended up having to swap out pre written journals via a script (which I could do since the player got the updates in a fixed order).

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

This is a different script.

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 would like to add new ambient sounds to my mission. I have most of the source files, and would like to convert them to TDM's preferred format. Is there a free and easy to use program to do it in a batch?

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

I use freemake video converter. But if you have no objections to console programs you can also just use ffmpeg.

 

EDIT freemake can't convert to ogg. So use ffmpeg or Super for example, which is build upon ffmpeg.

  • 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

I like Audacity but its ogg exporter doesn't give you any correct kbps option, it seems it just does an average bitrate which is not ideal but hey, at least TDM doesn't outright deny high bitrate files, they're just more space. File -> Export Multiple does allow you to batch export though (even though it's slow as it may ask you to fill metadata info for each exporting file, dunno if there's an option to turn that off).

  • Like 1

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

One of my objectives isn't completing and I don't know why. It's a simple one: when the player closes a readable, its completion target points to a speaker that plays a sound.

 

I get this in the console when I close the readable:

 

"WARNING: Objective System: GeComponentState: Component num 0 out of bounds for objective 16."

 

Can't find no component num 0 in the spawnargs and the speaker's right next to the readable. Any ideas?

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Thanks for the suggestions! fre:ac was just the right, simple tool for conversion. :)

 

Now how about something that can do something a little more complex - cutting a few seconds off of a sound?

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

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

    • 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
       
      · 2 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...