Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Thanks Jack and Grey - I'll add that as/when possible, unless someone else does.

Just to be clear:

- grab the entire TDM mainmenu_custom_defs.gui from the game's pk4 , goes into fms\missionname\guis , edit the lines at 426/7 & 434/5 that reference MM_brief/menu_CMD "music [names];" - semi-colon inside quotes.

- no need to add aditional #undef #define, because line edit #def's in relevent places for MM_whatever - in this instance 426 for menu & 434 for briefing screen (?).

- "mysong1" oggs go in ..\sound\ambient.

- make a sndshader that references the custom sound files and their place, with a few vars. desc. - more simple to follow convention of "mysong1, etc...". *.sndshd - Goes in ..\sound.

- section "mysong 1" in sndsnd is for mainmenu, at best vol, etc... Your "mysong2" in sndshd is for briefing, also best settings (but vol may need tweak depending on ogg gain/vol).

- works, so add documentation "Adding Custom Music to Main Menu and [de]Briefings", to provide limitation to subject, but pass info on how to do elsewhere with other MM_whatever "music name;"
(if the person looks in right place and sees the def for which they want to alter music/sound)

?

I'll merge info from both the posts - if I have it correct - and use your example shader for quick n dirty how-to, if ok, so others might achieve the same thing if looking at wiki briefing pages and follow "how to change the music" link.

Edited by teh_saccade
Link to comment
Share on other sites

How do you get a grammophone to play a sound file when you frob it? I know I've seen that in several missions, but I can't get it to work no matter what I try... I can add the sounds into the mission but the grammophone to speaker connection never works... -.-

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

You don't need to make the grammophone a button. Just make it frobable and add the spawnarg "frob_action_script" "frob_trigger". Let it then target a speaker as described by ERH+. frob_trigger is a helper script activating all targeted entities upon frob.

  • 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

Thanks Obs and ERH, I think that solved it. I added the "frob_action_script" "frob_trigger" on the grammophone and "s_waitfortrigger 1" on the speaker and it works properly enough now. The only thing is frobbing it restarts the speaker instead of resuming, but I think it's ok anyway.

 

While I have you guys here maybe you can help me with another stubborn bug. I have a chimney you can go down, but it seems to be messing with the visportals and bizarrely, the skybox. When the chute is open, the skybox works, but the visportals are not visible with the "r_showvisportals 1" command, but when it's closed, the visportals show up again, but the skybox disappears... I have no earthly idea what could be going on. At first I thought maybe the chute thing was clipping into the portal sky ceiling, but I raised the ceiling a lot and it made no difference... -.- I want to release this mission for Christmas so I need to have it ready for beta preferrably this weekend. Arghh :P

 

 

 

p3amr.jpg

 

rse6f6.jpg

 

 

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

My inclination would be to check for internal leaks, but the skybox thing is certainly a headscratcher, especially since it's not a caulk sky.

 

Wow, upon further inspection it was a caulk sky. I don't know how I missed that, thanks for the nudge. Changing it to portal sky solved the switching on and off of the skybox, but not the disappearing visportals. From what I can tell it's a harmless bug though, cause I did some perf checking witih r_showprimitives and it doesn't seem to be leaking to the outside of the building, it's also not snowing indoors... So unless I run into problems with diving the area into zones I think I will leave it at that. This is kind of a speed build anyway.

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

Chute is touching visportal and works like a door - visportal is open or close whenever you use chute. Move chimney visportal down so it won't touch chute, then look for holes connecting outer area and room at the end of chimney.

 

I was thinking that the visportal should close though, when the chute is closed. I'll take a look at the seams to see if there is a leak to the room below.

 

 

Ok, now I have an objective question... I want the main objective to be to place three items in three different places. The problem I'm running into is that the items I've created are discrete, as in not interchangeable. Item #1 should be able to go in any of the three locations, and the items themselves should preferably be stackable in the player inventory (though not strictly necessary if complicated). Do I need to create a custom spawnclass for them to do that? If so how? I don't find any information about how to do that. Or is there a better way to go about it?

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 know how you can make the grammaphone resume instead of cutting off as it's essentially the same logic as the ambient sound code. You'd just need more pieces. The first frob would trigger a script starting the speaker (which will stay on in a loop until the end of the game) and setting some global "triggered" variable, then second and later frobs, seeing the triggered conditional, would then toggle the volume between zero and full (using a second global volume variable "up"/"down" or some trick) as the speaker continues in a loop. But that takes more moving pieces & more places it could break and need fixing compared to the simple set up you have now.

  • Like 1

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

 

Ok, now I have an objective question... I want the main objective to be to place three items in three different places. The problem I'm running into is that the items I've created are discrete, as in not interchangeable. Item #1 should be able to go in any of the three locations, and the items themselves should preferably be stackable in the player inventory (though not strictly necessary if complicated). Do I need to create a custom spawnclass for them to do that? If so how? I don't find any information about how to do that. Or is there a better way to go about it?

Whether an inventory object is stackable or not is controlled via inv_stackable spawnarg. If you want the items to be placed at runtime (because for example their location is randomized) then you need a custom entity definition to refer to them. Otherwise you can place them hidden and just make them visible via the objective.

  • 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 know how you can make the grammaphone resume instead of cutting off as it's essentially the same logic as the ambient sound code. You'd just need more pieces. The first frob would trigger a script starting the speaker (which will stay on in a loop until the end of the game) and setting some global "triggered" variable, then second and later frobs, seeing the triggered conditional, would then toggle the volume between zero and full (using a second global volume variable "up"/"down" or some trick) as the speaker continues in a loop. But that takes more moving pieces & more places it could break and need fixing compared to the simple set up you have now.

 

Any idea how to do this with "closed loop" nurbs and movers?

 

I always experience a tiny stutter as the mover finishes its path and starts again.

 

Currently controlling via hidden switches and wiring in-game for trigger and script call, as none of the methods I understand or know of work to loop the script - the stutter is caused by the script "replaying", causing the mover to jump from the end to start of the painfully tuned nurbs, until the switch is off and stops the script.

 

If I can get this one thing sorted, I have the "CCTV", spotlights, "alarmsystem", "consequencepath" "motiondetector" and a bunch of other "fake" stuff (mechanical based, mostly tricks), working flawlessly instead of with that tiny stutter that means it's not up to standard. Well, except the nodraw spymirror - because the way skyportal works has changed, so that no longer functions, but I can take that hit the same way I took the movers don't cause damage hit and cope with it by crying in the corner.

 

I've asked several times before about this loop [and/or/if/then] but never received an answer - perhaps Stumpy gave me a lead once, but I couldn't figure it...

 

You guys know I don't ask a question until I've read everything and exhausted all my avenues to answer it myself.

Link to comment
Share on other sites

If it's a nurb loop then that sounds like an issue with physically aligning the start and end, and the fact it's not a native loop (in the sourcecode) but something you're creating artificially by script. I wouldn't know where to begin. It's different from a speaker loop, which inherently doesn't stutter when it restarts at its sourcecode.

 

Edit: I'd experiment with overlapping two on top of each other with different ends so that one hides the skip of the other, or something like that.

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

The co-ords are as near perfect as they can be for the loops (it's the same as a bezier curve describing a circle, really).

Yeah, tried that also - one way to keep the direction of, eg, a light/camera/thing, constant is to bind to two nurbs so one is used as ante-rotation so the thing follows the outward face, changing angle as it moves around the curve instead of facing straight, as a moving platform might (which doesn't really require nurbs, if using args and script to simply move something like an elevator or "crumbling platform puzzle jump bit" or whatever).

Idk either... idk it was a "hacky" thing - that might explain a lot of the issues when using them when args don't achieve what's required.

Might have to simply redesign the system - perhaps a 2nd loop can fill in a few milliseconds behind so that tiny stutter is masked by another, and the 2nd loop' stutter is masked by the first.
Appreciate the bounce - I'll try using the masking technique to hide the stutter, seems the most simple solution... dunno why didn't think of it earlier - that's a very obvious way to hide it.

The hidden mechanics, it doesn't matter so much - the player never sees this.

Ducttape and builder's foam fixes everything...

// nice one - copy pasting the thing in DR and then renaming and copy pasting the same script but offset time by a little appears to hide the stutter.

; (good luck trying to select it again though... map>findbrush seems to work, move it and then re-insert position if tweak needed)


Thanks.

Edited by teh_saccade
Link to comment
Share on other sites

Whether an inventory object is stackable or not is controlled via inv_stackable spawnarg. If you want the items to be placed at runtime (because for example their location is randomized) then you need a custom entity definition to refer to them. Otherwise you can place them hidden and just make them visible via the objective.

 

Thanks, I got them to stack in the inventory, and I believe they will work in the objectives... but it introduced a new set of bugs instead.

Now when I pick up the items and have more than one in my inventory at the same time, if I drop one with the R key the game crashes with messages in the console

 

 

20t1k3q.jpg

 

 

 

Now I don't know why this collision model error is happening. I have a .cm file connected to the model, and dropping the object while there is only one in the inventory doesn't cause any crashes or bugs, Furthermore, I have the mission map as a scroll you can pick up in the game, and if you do that while having more than one of the stackable custom items in the inventory the game crashes directly to desktop with no error message or logs. Any ideas of what's happening?

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

Can you post the entity definition of your custom stackable item here? The issue is probably to be found in there.

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

Can you post the entity definition of your custom stackable item here? The issue is probably to be found in there.

 

I need to make one of those? Is it because it's stackable? I remember adding custom movables to my last map and it never had issues, but they weren't stackable. What information does it need to have in it? Is there a template I can use?

 

I spoke too soon on the objectives as well. It seems that the objectives editor doesn't recognize SDK-level spawnclass "atdm:moveable_custom_item" as my item, since it doesn't tick off as completed. I'm going to give it another go with a different method to make sure but if that doesn't work I'm stumped. I also seem to be having trouble triggering "set target frobable" after dropping the item... too many bugs and so little time!! >.<

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

atdm:moveable_custom_item isn't a spawnclass. An atdm:moveable_custom_item entity has the spawnclass idMoveable, which is the internal engine code for it to use. Entity classes like atdm:moveable_custom_item are assigned in an entity's "classname" spawnarg, not its "spawnclass" spawnarg. Multiple entity classes can share a spawnclass, e.g. pretty much any moveable will be an idMoveable.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

atdm:moveable_custom_item isn't a spawnclass. An atdm:moveable_custom_item entity has the spawnclass idMoveable, which is the internal engine code for it to use. Entity classes like atdm:moveable_custom_item are assigned in an entity's "classname" spawnarg, not its "spawnclass" spawnarg. Multiple entity classes can share a spawnclass, e.g. pretty much any moveable will be an idMoveable.

 

Good lord... well that's a worthless option in the objectives then. Is there a way to have some kind of "OR" variable in that box? I.E. "Name of specific entity" "item 1" OR "item 2" OR "item 3"? I don't know if anything can be done about the stacking crash, otherwise I might just have to revert to my original set up where each item belongs in one specific spot.

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

time it takes to get going in seconds

<$name of item on nurbs curve>.accelTime(1.0);

time it takes to stop in seconds

<$name of item on nurbs curve>.decelTime(0.0);

 

eg.

 

void fairypathone()
{
$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(1.0);
$fairy_light_mover.decelTime(0.0);
$fairy_light_mover.startSpline($fairy_light_path_1_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(0.0);
$fairy_light_mover.decelTime(0.0);
$fairy_light_mover.startSpline($fairy_light_path_2_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(0.0);
$fairy_light_mover.decelTime(0.0);
$fairy_light_mover.startSpline($fairy_light_path_3_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(0.0);
$fairy_light_mover.decelTime(0.0);
$fairy_light_mover.startSpline($fairy_light_path_4_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(0.0);
$fairy_light_mover.decelTime(0.0);
$fairy_light_mover.disableSplineAngles();
$fairy_light_mover.startSpline($fairy_light_path_5_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_mover.time(5);
$fairy_light_mover.accelTime(0.0);
$fairy_light_mover.decelTime(1.0);
$fairy_light_mover.disableSplineAngles();
$fairy_light_mover.startSpline($fairy_light_path_6_mover);
sys.waitFor($fairy_light_mover);

$fairy_light_thing.remove();
sys.wait( 4 );
<do something(removed cause it gives too much away)>
}

 

 

basically just wanders around in a circle, until it does something

Edited by stumpy
Link to comment
Share on other sites

 

Good lord... well that's a worthless option in the objectives then. Is there a way to have some kind of "OR" variable in that box? I.E. "Name of specific entity" "item 1" OR "item 2" OR "item 3"? I don't know if anything can be done about the stacking crash, otherwise I might just have to revert to my original set up where each item belongs in one specific spot.

It's ages since I did anything with objectives, but I think you'd define multiple components for the objective, then put the boolean stuff in the success logic.

 

Does 'Any entity of specified class' (in place of 'Any entity with SDK-level spawnclass') not use entity classnames?

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

It's ages since I did anything with objectives, but I think you'd define multiple components for the objective, then put the boolean stuff in the success logic.

 

Does 'Any entity of specified class' (in place of 'Any entity with SDK-level spawnclass') not use entity classnames?

 

Changing to the category "any entity of specified class" actually worked. Thanks for the suggestion! However, it doesn't stop the bug where the game crashes if the items are in a stack in the player's inventory and you try to take one out with R. If I can't get that solved soon I'll have to rethink the game process, maybe giving the player only one at a time and making them unfrobable once placed in the correct spot (which I'm having trouble with for some reason).

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

Ok I got the objective settled now. Changing to "group identifier" was the ticket. Still completely unclear on what I have to do get my custom items to stack without crashing the game. I thought maybe the definition doesn't accomodate stackable+dropable items, but I changed them to one that does "atdm:playertool_stackable" and it introduced a bunch of other odd glitches instead... I guess I would need a special one called "atdm:custom_movable_item_stackable" or something, but I wouldn't know how to write that file.

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

Ok I got the objective settled now. Changing to "group identifier" was the ticket. Still completely unclear on what I have to do get my custom items to stack without crashing the game. I thought maybe the definition doesn't accomodate stackable+dropable items, but I changed them to one that does "atdm:playertool_stackable" and it introduced a bunch of other odd glitches instead... I guess I would need a special one called "atdm:custom_movable_item_stackable" or something, but I wouldn't know how to write that file.

Bump. Nobody knows how to get stackable custom items that you can take out of your inventory one at a time without the game crashing? (AFAIK health potions work like this) I'm now in beta and want to get my mission presentable before the end of the weekend if possible, and this bug is holding it back.

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

Bump. Nobody knows how to get stackable custom items that you can take out of your inventory one at a time without the game crashing? (AFAIK health potions work like this) I'm now in beta and want to get my mission presentable before the end of the weekend if possible, and this bug is holding it back.

I'll do some experimenting later today. Don't get your hopes up - I'm no expert. But I'll give it a shot.

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

    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...