ARMARValveSourceModificationSummery
From DigitalBlacksmith
This page details the major modifications required to change a a starting HalfLife 2 (Single Player) Mod into the ARMAR code.
Contents |
[edit] ADDED FILES
[edit] Client Side: (client)
- cl_dll/ar/ar_movement_ctl.cpp //Intersense integration
- cl_dll/ar/ar_movement_ctl.h //Intersense integration
- cl_dll/ar/MyHudPanel.cpp //HUD
- cl_dll/ar/MyHudPanel.h //HUD
- cl_dll/iSense/isense.cpp //Intersense integration
- cl_dll/iSense/isense.h //Intersense integration
- cl_dll/iSense/types.h //Intersense integration
- cl_dll/c_artag_sprite.cpp //ARTag Sprite
- cl_dll/c_artag_sprite.h //ARTag Sprite
[edit] Server Side: (hl)
- dlls/AR/ar_pos_server.cpp //Intersense integration
- dlls/AR/hand_modelentity.cpp //Intersense integration
- dlls/AR/artag_model.cpp //ARTag slaved model
- dlls/AR/player_slaved_model.cpp //A Player slaved model
[edit] Both (game_shared/AR)
- artag_sprite.cpp //ARTag Sprite class - MUST ADD TO Client and Server Projects
- artag_sprite.h //ARTag Sprite class - MUST ADD TO Client and Server Projects
[edit] Content (steam/stemapps/SourceMods/MyMod)
- armar.fgd //This is the fgd file needed to define all the custom classes
@include "halflife2.fgd" //at C:\Steam\steamapps\steamuser\sourcesdk\bin\ep1\bin
@PointClass base(Targetname) studioprop() = artag_model : "ARTag Model."
[
model(studio): "model" : "models/alyx.mdl" : "3D Model"
coord_frame_id(string) : "coord_frame_id" : "toolbar1" : "Coord Frame ID"
offset_p(integer) : "offset_p" : 1 : "Offset p value"
offset_r(integer) : "offset_r" : 1 : "Offset r value"
offset_yaw(integer) : "offset_yaw" : 1 : "Offset yaw value"
offset_x(integer) : "offset_x" : 1 : "Offset x value"
offset_y(integer) : "offset_y" : 1 : "Offset y value"
offset_z(integer) : "offset_z" : 1 : "Offset z value"
refresh_delay(integer) : "refresh_delay" : 1 : "Refresh delay"
]
@PointClass base(Targetname) studio("models/puzzle/puzzlebase.mdl")= artag_puzzle : "ARTag Puzzle."
[
model(string) : "model" : "alyx.mdl" : "3D Model"
coord_frame_id(string) : "coord_frame_id" : "toolbar1" : "Coord Frame ID"
offset_p(integer) : "offset_p" : 1 : "Offset p value"
offset_r(integer) : "offset_r" : 1 : "Offset r value"
offset_yaw(integer) : "offset_yaw" : 1 : "Offset yaw value"
offset_x(integer) : "offset_x" : 1 : "Offset x value"
offset_y(integer) : "offset_y" : 1 : "Offset y value"
offset_z(integer) : "offset_z" : 1 : "Offset z value"
refresh_delay(integer) : "refresh_delay" : 1 : "Refresh delay"
]
@PointClass base(Targetname) studio("models/puzzle/e5.mdl")= artag_puzzle_pc : "ARTag Puzzle Piece"
[
piece_id(string) : "piece_id" : "e5" : "Piece ID"
parent_coord_frame_id(string) : "parent_coord_frame_id" : "toolbar1" : "Parent ID"
model(string) : "model" : "models/puzzle/e5.mdl" : "3D Model"
offset_p(integer) : "offset_p" : 1 : "Offset p value"
offset_r(integer) : "offset_r" : 1 : "Offset r value"
offset_yaw(integer) : "offset_yaw" : 1 : "Offset yaw value"
offset_x(integer) : "offset_x" : 1 : "Offset x value"
offset_y(integer) : "offset_y" : 1 : "Offset y value"
offset_z(integer) : "offset_z" : 1 : "Offset z value"
]
@PointClass base(Targetname) studio("models/alyx.mdl")= player_slaved_model : "Player Slaved Model."
[
model(string) : "model" : "alyx.mdl" : "3D Model"
offset_p(integer) : "offset_p" : 1 : "Offset p value"
offset_r(integer) : "offset_r" : 1 : "Offset r value"
offset_yaw(integer) : "offset_yaw" : 1 : "Offset yaw value"
offset_x(integer) : "offset_x" : 1 : "Offset x value"
offset_y(integer) : "offset_y" : 1 : "Offset y value"
offset_z(integer) : "offset_z" : 1 : "Offset z value"
]
@PointClass base(Targetname, Parentname, RenderFields,DXLevelChoice) size(-2 -2 -2, 2 2 2) sprite() color(20 140 20) = artag_sprite :
"An entity that controls the drawing of a sprite that is linked to an ARTag fiducial in the world."
[
framerate(string) : "Framerate" : "10.0" : "Rate at which the sprite should animate, if at all."
model(sprite) : "Sprite Name" : "sprites/glow01.spr" : "Material of the sprite to be drawn."
scale(string) : "Scale" : "" : "Scale multiplier of the sprite."
spawnflags(flags) =
[
1: "Start on" : 0
2: "Play Once" : 0
]
GlowProxySize(float) : "Size of Glow Proxy Geometry." : "2.0" : "Size of the glow to be rendered for visibility testing. Must be larger than the distance from the sprite center to empty space. So if this glow is inside geometry (like a light bulb), set this value to be bigger than the bulb's radius. Any time a sphere of this radius would be visible (poking through any nearby geometry), the glow will be rendered."
HDRColorScale(float) : "HDR color scale." : "1.0" : "float value to multiply sprite color by when running in HDR mode."
// Inputs
input ColorRedValue(float) : "Sets the red color channel's value (0 - 255)."
input ColorGreenValue(float) : "Sets the green color channel's value (0 - 255)."
input ColorBlueValue(float) : "Sets the blue color channel's value (0 - 255)."
input SetScale(float) : "Set the sprite's scale (0 - 8.0)."
input HideSprite(void) : "Hide the sprite. Won't be drawn until the 'ShowSprite' input is received."
input ShowSprite(void) : "Show the sprite."
input ToggleSprite(void) : "Toggle the sprite between hidden and shown."
]
[edit] MODIFIED FILES
[edit] Client Side: (client)
[edit] CODE TO ENABLE FOR INTERSENSE TRACKER
- cl_dll/in_main.cpp //Used for integrating the Intersense DLL
[edit] CODE TO ENABLE VIDEO TEXTURE BACKGROUND
Based on this Excellent Motion Blur tutorial
- cl_dll/view_scene.cpp //Lots of mods here for video background and other files in this grouping
- cl_dll/view_scene.h
- cl_dll/rendertexture.h
- cl_dll/viewrender.h
[edit] CODE TO ENABLE CHENG-CHIH'S VGUI HUD Modifications
Client Side:
- cl_dll/in_main.cpp
- cl_dll/in_buttons.h
- cl_dll/vgui_int.cpp
Server Side: (hl)
None
[edit] Config File
As of
unbindall bind "ESCAPE" "cancelselect" bind "SPACE" "+jump" bind "1" "slot1" bind "2" "slot2" bind "3" "slot3" bind "4" "slot4" bind "5" "slot5" bind "6" "slot6" bind "7" "slot7" bind "`" "toggleconsole" bind "a" "+moveleft" bind "c" "impulse 50" bind "d" "+moveright" bind "e" "+use" bind "f" "impulse 100" bind "g" "phys_swap" bind "q" "lastinv" bind "r" "+reload" bind "s" "+back" bind "w" "+forward" bind "z" "+zoom" bind "k" "+scrolldowntasks" bind "l" "+scrolluptasks" bind "m" "+overview" bind "n" "+togglefade" bind "ALT" "+walk" bind "CTRL" "+duck" bind "SHIFT" "+speed" bind "F3" "askconnect_accept" bind "F5" "jpeg" bind "F6" "save quick" bind "F9" "load quick" bind "MWHEELDOWN" "invnext" bind "MWHEELUP" "invprev" bind "MOUSE1" "+attack" bind "MOUSE2" "+attack2" bind "PAUSE" "pause" cl_rumblescale "1.0" cl_debugrumble "0" cl_team "default" cl_class "default" cc_linger_time "1.0" cc_predisplay_time "0.25" cc_subtitles "0" cc_lang "" crosshair "0" cl_observercrosshair "1" cam_snapto "0" cam_idealyaw "90" cam_idealpitch "0" cam_idealdist "64" c_maxpitch "90" c_minpitch "0" c_maxyaw "135" c_minyaw "-135" c_maxdistance "200" c_mindistance "30" c_orthowidth "100" c_orthoheight "100" joy_name "joystick" joy_forwardthreshold "0.15" joy_sidethreshold "0.15" joy_pitchthreshold "0.15" joy_yawthreshold "0.15" joy_forwardsensitivity "-1" joy_sidesensitivity "-1" joy_pitchsensitivity "1" joy_yawsensitivity "-1" joy_response_move "1" joy_response_look "0" joy_lowend "1" joy_lowmap "1" joy_accelscale "0.6" joy_autoaimdampenrange "0" joy_autoaimdampen "0" joy_diagonalpov "0" joy_display_input "0" joy_wingmanwarrior_turnhack "0" cl_upspeed "320" cl_forwardspeed "400" cl_backspeed "400" lookspring "0" lookstrafe "0" joystick "0" m_pitch "0.022" m_filter "0" sensitivity "3" m_side "0.8" m_yaw "0.022" m_forward "1" m_customaccel "0" m_customaccel_scale "0.04" m_customaccel_max "0" m_customaccel_exponent "1" m_mouseaccel1 "0" m_mouseaccel2 "0" m_mousespeed "1" cl_mouselook "1" cl_idealpitchscale "0.8" net_graph "0" net_scale "5" net_graphpos "1" net_graphsolid "1" voice_modenable "1" hud_fastswitch "0" cl_npc_speedmod_intime "0.25" cl_npc_speedmod_outtime "1.5" g_antlion_maxgibs "16" hud_quickinfo "0" hud_showemptyweaponslots "1" muzzleflash_light "1" overview_health "1" overview_names "1" overview_tracks "1" overview_locked "1" overview_alpha "1.0" spec_scoreboard "0" cl_spec_mode "1" commentary_firstrun "0" scene_showfaceto "0" ai_report_task_timings_on_limit "0" ai_think_limit_label "0" npc_height_adjust "1" sv_pvsskipanimation "1" scene_showlook "0" scene_showmoveto "0" commentary "0" xbox_throttlebias "100" xbox_throttlespoof "200" xbox_autothrottle "1" func_break_max_pieces "15" suitvolume "0.25" xc_uncrouch_on_jump "1" sv_noclipaccelerate "5" sv_noclipspeed "5" sv_specaccelerate "5" sv_specspeed "3" sv_specnoclip "1" sv_skyname "sky_day01_01" sv_backspeed "0.6" xc_crouch_range "0.85" xc_use_crouch_limiter "0" g_test_new_antlion_jump "1" joy_wingmanwarrior_centerhack "0" joy_axisbutton_threshold "0.3" voice_forcemicrecord "1" voice_enable "1" voice_scale "1" snd_duckerthreshold "0.15" snd_duckerreleasetime "2.5" snd_duckerattacktime "0.5" snd_ducktovolume "0.55" adsp_debug "0" dsp_dist_max "1440.0" dsp_dist_min "0.0" snd_mixahead "0.1" snd_musicvolume "1.0" volume "1.0" snd_pitchquality "1" snd_digital_surround "0" vprof_warningmsec "10" vprof_unaccounted_limit "0.3" vprof_verbose "1" vprof_graphheight "256" vprof_graphwidth "512" texture_budget_background_alpha "128" texture_budget_panel_bottom_of_history_fraction ".25" texture_budget_panel_height "284" texture_budget_panel_width "512" texture_budget_panel_y "450" texture_budget_panel_x "0" budget_panel_height "384" budget_panel_width "512" budget_panel_y "50" budget_panel_x "0" budget_background_alpha "128" budget_bargraph_range_ms "16.6666666667" budget_panel_bottom_of_history_fraction ".25" budget_history_range_ms "66.666666667" budget_history_numsamplesvisible "100" budget_show_history "1" budget_show_averages "0" budget_show_peaks "1" budget_averages_window "30" budget_peaks_window "30" budget_bargraph_background_alpha "128" r_gamma "0.5" sv_forcepreload "0" sv_voiceenable "1" sv_logbans "0" sv_log_onefile "0" sv_logecho "1" sv_logflush "0" sv_logfile "1" sv_logsdir "logs" dsp_enhance_stereo "0" dsp_volume "1.0" dsp_slow_cpu "0" cl_allowupload "1" mp_decals "200" r_drawmodelstatsoverlaymax "1.5" r_drawmodelstatsoverlaymin "0.1" r_ambientfactor "5" r_ambientfraction "0.1" r_ambientmin "0.3" r_ambientboost "1" r_eyesize "0" r_eyeshift_z "0" r_eyeshift_y "0" r_eyeshift_x "0" r_eyemove "1" r_eyegloss "1" skill "1" closecaption "0" con_enable "1" cl_downloadfilter "all" cl_allowdownload "1" cl_forcepreload "0" cl_soundfile "sound/player/jingle.wav" cl_logofile "materials/decals/spraylogo.vtf" cl_timeout "30" cl_showpluginmessages "1" tv_nochat "0" sv_unlockedchapters "1" cl_updaterate "20" cl_cmdrate "30" bgmvolume "1" password "" name "unnamed" developer "1" sv_gravity "0" sv_cheat "1"
[edit] Test Files
[edit] Client Side:
Added:
cl_dll/testpanel.cpp
cl_dll/testpanel.h
Modified for testing:
cl_dll/vgui_int.cpp
cl_dll/vgui_helpers.h
[edit] Server Side: (hl)
Added:
dlls/test_brushmodel.cpp
[edit] ISSUES
in_main.cpp doesn't seem to be working now. Perhaps a new source push?
[edit] Converting ARMAR Mod for OrangeBox
I did an analysis of porting the MOD to OrangeBox, and the architecture prevented cutting and pasting my existing mod code, so its a bridge to far now..
