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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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.
      · 4 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
×
×
  • Create New...