Page 1 of 1

Getting Names of Things

Posted: Sun Apr 23, 2006 10:04 am
by Broadus
I've been modifying the original stock maps of Allied Assault by using scripts, as I'm sure you all know by now. However, I often run into situations where I want to modify something, but I can't get its name.
I downloaded some script that modified the first level of Spearhead to be a DM-compatible level. In the script, they remove a ton of stuff, mainly things that don't originally have names in the scripts.

How can I find the names of pretty much everything, like characters and entity brushes? (They're called entities in Half-Life, anyway.) Does it require Radiant or a decompiler or something?

I would especially like to know the names of "entity brushes" (if they have names, which I would hope so) so I can get rid of those annoying AI-blocking invisible walls forever.

Posted: Sun Apr 23, 2006 10:13 am
by lizardkid
you can use removeclass to remove everything by a classname, which is generally how it's done. however i think bdbodger made a small menu to MOH that allows you to walk around and click at any object and the first thing it finds is reported, like all it's interesting flags like targetname, health, etc.

at least i think it was bodger. but i know i've seen it.

Posted: Sun Apr 23, 2006 12:18 pm
by Master-Of-Fungus-Foo-D
you could also decompile the map and use alienx's map2script program. it changes all of the entities in the .map and puts them into a script listing their properties and such.
or if you don't want to find the map2script program, you could just as easily look in the .map file with notepad. (in notepad do a serach for the word entity to skip straight to the entites, because you get a bunch of brushes up top)

Posted: Sun Apr 23, 2006 7:43 pm
by Broadus
Yeah, I just decompiled the .BSPs and checked out the entities in the .MAP as a text file. I would have liked to view the .MAP in Radiant to make finding certain things easier, but I couldn't find the download for Radiant anywhere.

Thanks for the help, dudes.

leveldesign

Posted: Sun Apr 23, 2006 9:29 pm
by tltrude
I think the menu lizardkid is thinking of is leveldesign. You can bring it up in the game by typing togglemenu leveldesign in the console.

Posted: Sun Apr 23, 2006 10:58 pm
by neillomax
I loaded Pflughaffen, with the console enabled, typed in the above, got screen to come up, but couldn't get anything to work. Didn't list anything. All it said in console was this or that is cheat protected. What am I doing wrong ? This is a new one for me. Cheats is enabled at the desktop start.

cheats

Posted: Mon Apr 24, 2006 12:08 am
by tltrude
Yes, cheats must be on to use it. There are a number of configuration files in pak0.pk3 and one is called development.cfg -- where I found the leveldesign menu bound to a key. I don't really know how to switch from unnamedsoldier.cfg to that one. If all else fails, you can add bind F8 "togglemenu leveldesign" to the unnamedsoldier.cfg file -- which is what I did long ago.

Here is what development.cfg looks like.

Code: Select all

// Development related bindings should go here

// easy access cheat codes
bind n "noclip"
bind m "dog"
bind g "give all"

bind i "getchshader" // command for getting the shader that's under the crosshair
//bind o "editchshader" // command for editing the shader that's under the crosshair

bind MOUSE3 "+cameralook"
bind t "toggle cg_3rd_person"

alias trisa "set r_showtris 0;bind F8 trisb"
alias trisb "set r_showtris 1;bind F8 trisc"
alias trisc "set r_showtris 2;bind F8 trisd"
alias trisd "set r_showtris 3;bind F8 trisa"
bind F8 "trisb"

bind F1 "togglemenu leveldesign"
bind F2 "togglemenu animate2"
bind F3 "togglemenu emitter"
bind F4 "togglemenu camera"
//bind F5 "togglemenu zound"
bind F5 "savegame quick"
bind F6 "togglemenu decals"
//bind F7 "togglemenu smoke"
//bind F7 "togglemenu aipaths"
bind F8 "toggle fps"
//bind F9 "toggle fps"
bind F9  "loadgame quick"
bind F10 "editscript"
bind F11 "toggle cg_3rd_person"
bind F12 "screenshot"

bind l "noclip;togglemenu lodtool"

alias vma0 "set cg_drawviewmodel 0;bind home vma1"
alias vma1 "set cg_drawviewmodel 1;bind home vma2"
alias vma2 "set cg_drawviewmodel 2;bind home vma0"
bind home "vma0"

alias hudon "ui_hud 1; bind del hudoff"
alias hudoff "ui_hud 0; bind del hudon"
bind del hudoff

bind ins "toggle ui_compass"
bind [ "timescale 100"
bind ] "timescale 1"
I also found this by searching the forum for "leveldesign".

..\MOHAA.exe" +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +set g_gametype 4 +devmap obj/mapname

(adding "+devmap obj/mapname" is optional but faster for testing the map.)


It shows how you can create a new shortcut that will start the game and load the map you are working on. It is set up for an objective map, so it would be a different gametype number and folder location for other type maps. And, of course the real name of the map would be inserted.

Posted: Mon Apr 24, 2006 2:05 pm
by Rookie One.pl
Just for the sake of being exact: the devmap command allows you to enable cheats from console in gametypes > 0 (all multiplayer ones).