Commander Camera

slayer20slayer20 Killed a man once. Join Date: 2007-12-13 Member: 63157Members, Reinforced - Shadow
I can't get this thing to work.

It is supposed to change the view height of the commander right?

The default setting is like 390 or something. I've tried bumping it up all the way to 1500 and it's still not making any difference.

Anyone else having the same problem?

Comments

  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited December 2010
    I think you also need a location entity for it to define the area where the commander look should change... Not sure though... I've got one in <a href="http://www.unknownworlds.com/forums/index.php?showtopic=111839" target="_blank">ns2_sample</a> in the marine start, maybe that'll show you something :P
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    would one expand the location up to put the entity inside the location? As far as i know you can't change the camera name to match the location name.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    The way I got it to work is by simply putting one one the floor ingame, then setting it's view height to 1500 (default is 1000 I think). It seems the origin of the entity is still on the floor in that room, but the visible camera is up much higher.


    But that is what I basically did: place a commander camera inside a location entity and setting the height... It worked for my own map and ns2_sample...
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    interesting, thanks for the tip. Do the angles actually work too?

    Angles would help in some places if you could put multiple cameras in one area taking it from strait down to a 4%-6% angle on the other side of a room smoothly.
  • HajenEHajenE Join Date: 2010-12-22 Member: 75855Members
    Hello! Noob question/problem here, similar to what you guys are talking about (I think), but not the same:

    I have problem with my commander camera (while testing ingame) for my map. It won't stop moving once I move it.
    I have the location-box and the minimap-box stretched out over my map (not readyroom).
    I did set one commander_camera in the same room as marine powerpoint (the cc im using).


    I think it have something to do with this error message that spams my console:

    Error: lua/Commander_Client.lua:133: attempt to index field 'heightmap' (a nil value)


    so? :)
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    Did you create a minimap/overview? Have a look at the wiki of ns2_sample, I've got a batch file in there you can modify for your mapname.

    <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Ns2_sample#Overview" target="_blank">wikilink</a>
  • HajenEHajenE Join Date: 2010-12-22 Member: 75855Members
    edited December 2010
    Ty Kouji! I added a minimap and now It's working like it should.

    I've learned alot from your sample map, it's great :) but how did you hide the readyroom?
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    RR info on how to hide is also on that wiki page, you have to put the faces in a group called CommanderInvisible, props can be set to invisible y using the flag commander_alpha, just set it to 0. Or just add the entire RR in the CommanderInvisible group
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    having trouble with the batch file. keeps telling me that it can't find the Overview.exe path. everything is where it should be (C:\Program Files (x86)\Steam\steamapps\common\natural selection 2)

    any advice?
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    edited February 2011
    Kouji, your inbox is full.

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec--><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->hey kouj,

    having trouble generating my overview maps using your batch file. i drop my level on it and it tells me it can't find the overview.exe file.

    batch and .exe file are in C:\Program Files (x86)\Steam\steamapps\common\natural selection 2\

    any tips?<!--QuoteEnd--></div><!--QuoteEEnd-->Did you place it in your ">youdrivehere<:\Steam\SteamApps\common\natural selection 2" folder? I think it has to be in the same dir as the overview.exe<!--QuoteEnd--></div><!--QuoteEEnd-->

    yeah i did. it's right next to the overview.exe.

    can you try to grab it from your zip file on the wiki and try it with your level again to see if you can reproduce my error?

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->.\Overview.exe

    Windows cannot find '.\Overview.exe'.  Make sure you typed the name correctly, and then try again.<!--c2--></div><!--ec2-->

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->ERROR: The system was unable to find the specified registry key or value.
    Steam directory is:
    Install path is: \steamapps\common\natural selection 2\
    Level: C:\Program Files (x86)\Steam\steamapps\common\natural selection 2\ns2\map
    s\ns2_skyfalls.level
    The system cannot find the file .\Overview.exe.
    Press any key to continue . . .<!--c2--></div><!--ec2-->
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    kouuuuuuuujiiiiiiiiiiiisaaaaaaan clean out your inbox!
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited February 2011
    <!--quoteo(post=1829098:date=Feb 2 2011, 12:55 AM:name=Tig)--><div class='quotetop'>QUOTE (Tig @ Feb 2 2011, 12:55 AM) <a href="index.php?act=findpost&pid=1829098"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->kouuuuuuuujiiiiiiiiiiiisaaaaaaan clean out your inbox!<!--QuoteEnd--></div><!--QuoteEEnd-->
    Haha lol, I didn't know man, I just didn't know...


    Anyways I'll have a look at it, I'm on WinXP btw. Could it be OS related...


    [edit]
    The one in the archive is the same as the one I have locally saved

    And it doesn't seem to be related to the Overview.exe location. You should be able to run it from anywhere you want, by dragging your map file onto the batch file. It gets the steam installation directory from the windows register.


    However, somehow it doesn't seem to be able to retrieve your steam directory

    "Steam directory is:"

    This shouldn't be empty.


    You might want to have a look at the windows register using regedit and going to

    HKEY_LOCAL_MACHINE -> SOFTWARE -> Valve -> Steam

    Then have a look if there is a REG_SZ (String Value) called InstallPath and if it is set to your steam directory. Mine is: D:\Games\Steam
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    another win for you kouji.

    so your batch file by default had the path for reg search set to HKLM\SOFTWARE\Valve\Steam (default win xp im sure)

    in win 7 ultimate, its HKLM\SOFTWARE\Wow6432Node\Valve\Steam

    i put that in the batch and it worked.

    thanks kouji, i'll probably make another tutorial thread for this.
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    my batch file is

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->START "Overview Map Generator" /d "C:\Program Files\Steam\steamapps\common\natural selection 2" Overview.exe %1 ns2
    Pause<!--c2--></div><!--ec2-->

    couldn't you just add the (x86) to that for vista/7 or change the path to point to your overview.exe file if installed in a custom location?
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->START "Overview Map Generator" /d "D:\NS2 Build\" "D:\NS2 Build\Overview.exe" %1 marc
    pause<!--c2--></div><!--ec2-->

    I had to specify the full path twice
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited February 2011
    Is there a way in cmd (I know VBscript can do it) to detect the windows version so it can be added to the batch? I found some file to search for folder names I guess to see which version is running, but that seems rather troublesome :P

    Then there is the Gettype.exe from Microsoft, but I don't want to distribute it with an exe file...
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    edited February 2011
    I don't know if it's gonna be useful for you, but I had to detect 32 or 64 bit systems for a little script, and I used %PROGRAMFILES(X86)% for this. If it's blank, you're on a 32 bit system, if it returns something, it's a 64 bit one. You could also analyze %APPDATA%, if it starts with C:\Users or C:\Documents and Settings...

    Edit: I found something better: %PROGRAMDATA% only exists in Windows Vista/7, so you could use this.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    I've never actually bothered with making a minimap today but after reading this I thought I best try.

    It looks like we may need to get someone to make a UI based application and with some clever tinkering to get it to detect the registry for each person, mine was also as Tigs was. No idea why Windows 7 is different for different people, although mine is 7 Home and it was the same path as Tigs.
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    <!--quoteo(post=1829175:date=Feb 2 2011, 08:45 AM:name=Thaldarin)--><div class='quotetop'>QUOTE (Thaldarin @ Feb 2 2011, 08:45 AM) <a href="index.php?act=findpost&pid=1829175"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've never actually bothered with making a minimap today but after reading this I thought I best try.

    It looks like we may need to get someone to make a UI based application and with some clever tinkering to get it to detect the registry for each person, mine was also as Tigs was. No idea why Windows 7 is different for different people, although mine is 7 Home and it was the same path as Tigs.<!--QuoteEnd--></div><!--QuoteEEnd-->

    think its more win 7 vs. xp. i was just frustrated cuz i wanted to see things from commander view on my map and it won't work without the minimap. turns out a camera height of 1000 is much much too high up.
  • slayer20slayer20 Killed a man once. Join Date: 2007-12-13 Member: 63157Members, Reinforced - Shadow
    All I did was open up the CMD prompt, typed: cd C:\Program Files (x86)\Steam\steamapps\common\natural selection 2

    Then I had to type: Overview.exe "C:\Program Files (x86)\Steam\steamapps\common\natural selection 2\ns2\maps\ns2_<mapname>.level" ns2

    It's a pain to type out...
  • TigTig Join Date: 2010-05-08 Member: 71674Members, Reinforced - Shadow, WC 2013 - Silver
    koujisan's batch file is pretty easy. you just drag your level file onto the batch file and it runs.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited February 2011
    We could just do away with it all and have 4 files in there, but that ain't neat at all :P

    W2K/XP
    XP-64bits
    Vista/Win7 32bits
    Vista/Win7 64bits

    I'm not even sure if they all are different either
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    edited February 2011
    I have an "external tool" set up in Spark that generates the minimap and then launches the map in NS2 if anyone's interested in that. It's a really simple batch file.

    It copies the map to the NS2 map folder, then runs overview.exe and then launches NS2 with your map.

    But I think you can make the "current" batch work on XP/Vista/7 in one file with no problems, let me give that a try.
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    <!--quoteo(post=1829217:date=Feb 2 2011, 11:51 AM:name=Mendasp)--><div class='quotetop'>QUOTE (Mendasp @ Feb 2 2011, 11:51 AM) <a href="index.php?act=findpost&pid=1829217"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It copies the map to the NS2 map folder, then runs overview.exe and then launches NS2 with your map.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Now that sounds handy. Maybe better suited for this if the launch option was removed.
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    edited February 2011
    Well, it couldn't be simpler, then.

    Put this in a .bat file (the location doesn't matter).
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->copy %1% ns2\maps /Y
    Overview.exe %1% ns2
    REM NS2.exe map %2%<!--QuoteEnd--></div><!--QuoteEEnd-->

    Now, go to Spark Editor and go to Tools -> External Tools.

    Give it a name (I have it set as "Test Map", since it launches the map too).
    Click the "..." button and search for your bat file.
    Now, in the Arguments field, put this:
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->$(ItemPath) $(ItemFileName)<!--QuoteEnd--></div><!--QuoteEEnd-->

    If you ever want to launch your map too, remove the "REM" part of the last line of the bat.

    Edit: You can set keyboard shortcuts for any external tools, too, so you can set it to Ctrl+T or something like that every time you want to "compile" your overview/test your map.

    Edit 2: I also fixed (I think) Kouji's bat, let me know if this works for both XP and Vista/7.

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->@echo off
    SET regkey="HKLM\SOFTWARE\Valve\Steam"
    IF NOT "%programdata%" == "" (
    cd "%systemroot%\system32\"
    IF NOT "%programfiles(x86)" == "" (SET regkey="HKLM\SOFTWARE\Wow6432Node\Valve\Steam")
    )
    SETLOCAL EnableExtensions
    FOR /F "tokens=2,*" %%i IN ('reg query %regkey% /v "InstallPath" ^| Find /i "InstallPath"') DO set

    SteamDirectory=%%j
    @echo Steam directory is: %SteamDirectory%
    set InstallPath=%SteamDirectory%\steamapps\common\natural selection 2\
    set Level=%~1
    @echo Install path is: %InstallPath%
    @echo Level: %Level%
    start "overviewbatch" /d"%InstallPath%" /b .\Overview.exe "%Level%" ns2
    pause<!--QuoteEnd--></div><!--QuoteEEnd-->
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    edited March 2011
    Anyone having issues with any of these methods?

    I tried the external tools method and the batch method and they don't seem to be working after my last update.

    Edit: Doh, forgot i upgraded to win 7 64 bit....working now...lol
Sign In or Register to comment.