Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


Recommended Posts

Alright, so the idea to use a prefab sign got me the solution.

Those sign readables do in fact ignore the xdata spawnarg and use a combination of a "gui" and "gui_parm1" spawnargs.

So as an example you can make the sign readable display text, if you give it the following spawnarg-value pairs.

 

"gui" "guis/readables/sign_text_decals/sign_text_carolingia.gui"

"gui_parm1" "put text here"

 

Some of them get their text via a guiParm on the entity.

If you ask a question, read the answers ;)

 

One downside of actually using the sign readable seems to be that the text is not centered on it. Are there any other spawnargs that can accomplish this?

Text alignment is handled via the gui. So for example, the above mentioned gui looks like this:

windowDef Desktop
{
    rect 0, 0, 640, 480
    backcolor 0, 0, 0, 0

    windowDef SignText
    {
        rect 0, 0, 640,480
        backcolor 0, 0, 0, 0
        text    "gui::gui_parm1"
        font "fonts/carolingia"
        textscale 2.25
        forecolor 0, 0, 0, 0.66
        visible 1
    }
}

The text parameter defines where to get the text from (gui_parm1 as you already noticed). There is no alignment command here, so it defaults to left alignment. If you want a different alignment you need to add the line

 

textalign x

to the SignText block, where x is 0,1 or 2. 0 means left alignment (the default), 1 is centered and 2 is right alignment. Of course you can make the textalign arg a guiparm, too, so you can handle it via the spawnargs. So in you case the gui should look like this

windowDef Desktop
{
    rect 0, 0, 640, 480
    backcolor 0, 0, 0, 0

    windowDef SignText
    {
        rect 0, 0, 640,480
        backcolor 0, 0, 0, 0
        text    "gui::gui_parm1"
        font "fonts/carolingia"
        textscale 2.25
        forecolor 0, 0, 0, 0.66
        visible 1
        textalign "gui::gui_parm2"
    }
}

Just create your own gui file and use that instead. Gui files are text files with a .gui ending that are stored in the guis subfolder. Use gui_parm2 on the entity to set the alignment.

 

Btw.: Gui parms don't need to be called gui_parm. You can use any name.

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

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites
  • Replies 10k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

So I have this gigantic scorpion, it is made out of pendulums bound together. I had an idea about dragging whole thing through a piled up crates (pretending to be stone blocks in a wall), but it looks

I'm just going to make the lute player an undead immortal skeleton called Ralph who is eternally bound to play his lute in the tavern, the residents are used to him now so they just happily co-exist a

Thanks for the advice about the tent, guys. Finally got around to (mostly) fixing it; shadows were indeed the problem.    

Posted Images

@Obsttorte, thank you for your detailed answer.

 

With that said, your previous answer was not useful to me. I am a newbie, explain it to me in detail. Your comment "Some of them get their text via a guiParm on the entity. Check the entity spawnargs." is perhaps helpful to someone who is more familiar with level design for The Dark Mod but as a newbie I couldn't use that information. What is a guiParm on the entity? How do I check the spawnargs for it? I know this now, but just for the future, assume that I don't know the answers to such questions. Especially considering this is the newbie questions megathread. The additional detail in your answers may also help others with similar problems in the future.

 

I do read the answers, but keep in mind not everyone has the experience you have. I'm not sure it was your intention, but your comment there read as very condescending to me in a situation that did not call for it.

Link to post
Share on other sites

"guiParm" is a spawnarg defined for the entity. Spawnargs are all the lines you can see in the first tab of the entity inspector. If you check "Show inherited properties" you can also see hidden ones. You can also check "Show help" for descriptions of the spawnargs (if available). If you find spawnargs that have values like "change accordingly" or "your text here" (like "guiParm" in the prefab shield) it really just means that you have to do that.

Link to post
Share on other sites

I do read the answers, but keep in mind not everyone has the experience you have. I'm not sure it was your intention, but your comment there read as very condescending to me in a situation that did not call for it.

The ;) was intented to stress that I did not meant it seriously. Sorry for the misunderstanding, it wasn't my intention to sound condescending.

  • Like 1

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

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

No problemo :D

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

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

AI can see and navigate around brushwork. It's entities that they don't detect, so you surround those with monsterclip brushes.

Link to post
Share on other sites

If you have crazy terrain like a broken bridge or catwalk, or a concave & sloping dirt path with dips and rocks in it, etc, (you'd probably be making that with entities and patches, anyway, but brushes might be involved) then you may want to lay down an invisible clip brush to make a clean path for the AI & player to easily walk on and give the illusion they're walking on the crazy surface when they're really on the invisible brush. You'd use one of the clip brushes with a named surface (dirt, wood, etc) so that it gives the proper footstep sound.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

I recently figured out how to export from Blender to DR. I found the .lwo importer/exporter easily enough, but the material was a little harder to fathom. After importing an existing DR object, I found that the Blender material name has to be the path we see in DR, e.g. textures/darkmod/stone/natural/rock_grey_rough

 

This is with version 2.78c. The .ase tools do not seem to work. I've been modifying the python file and have fixed two types of error, but another one has now appeared which is harder to understand.

 

How are lwo objects interpreted by the AI with regards to navigation? It it like with complicated brushwork, which benefits from monsterclip brush? Can the AI walk on them? Any other things I should watch out for?

Link to post
Share on other sites

As far I know, AI don't "see" models or entities, unless they have a separate monsterclip textured brushwork. They are however solid, and AI will walk on/in to them and will be blocked but won't know that.

I always assumed I'd taste like boot leather.

 

Link to post
Share on other sites

How are lwo objects interpreted by the AI with regards to navigation? It it like with complicated brushwork, which benefits from monsterclip brush? Can the AI walk on them? Any other things I should watch out for?

 

Think of the world as being seen through two sets of glasses:

 

1 - What the player sees: a complex, visually interesting world full of brushwork, patches, and models.

 

post-3633-0-03020600-1500816172_thumb.jpg

 

2 - What the AI 'sees': a world made of monsterclip and worldspawn brushes.

 

post-3633-0-42448500-1500816189_thumb.jpg

 

 

 

The func_static crosses and the statue models have been surrounded by monsterclip. The bushes don't need monsterclip because they're set to "noclipmodel", so the AI can walk through them.

 

Note that the monsterclip brushes extend up to a horizontal monsterclip. If the monsterclip you create around your model stops at the model's top, the AAS compiler will create flat areas on top of the model where it thinks the AI should be able to walk. This complicates the AI's pathfinding and sometimes causes him to jump up on things where he doesn't belong.

 

Think of monsterclip as the tunnels through which an AI can walk to navigate the world.

  • Like 1
Link to post
Share on other sites

You don't need to put monsterclip around moveables (objects the player can pick up and/or move).

 

For example if you have two chairs in a room, one static (won't move) and one moveable (can move), put m/c around the static chair but not the moveable chair.

 

The AI will navigate around both.

 

You don't want to m/c the moveable chair because the player might move the chair, and the AI will still walk around the spot where the chair used to be, which is not believable.

Link to post
Share on other sites

How to change swimming speed? Can be constant or switched on and off.

 

It appears to be one speed underwater. (If 'running' underwater adds something, I can't detect it.)

 

No switching on/off.

Link to post
Share on other sites

Is it something like this:

$player1.setcvar(pm_walkspeed, 0.9);

How exactly should it look like?

 

 

seta is used in console to set a cvar and writes it to cfg file.

set is supposed to just be for the session.

Not all CVAR's are archivable to cfg file.

Does it mean it need to be refreshed if player save/load the mission?

S2wtMNl.gif

Link to post
Share on other sites

No, only when you quit then restart.

However, I'm not sure that's still the case anymore as many cvar's have been set to be written to the cfg file even without seta command.

I always assumed I'd taste like boot leather.

 

Link to post
Share on other sites

Is it something like this:

$player1.setcvar(pm_walkspeed, 0.9);

How exactly should it look like?

 

sys.setcvar("pm_walkspeed","0.9");

The arguments are strings!

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

Texture Blending in DR: DR ASE Blend Exporter

Link to post
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.


×
×
  • Create New...