Page 1 of 1

Replacing Icons

Posted: Sat Apr 27, 2013 6:35 pm
by Glitch25
I'm attempting to replace buff icons. Offense and Defense based off Health. I've provided one example of what has been done so far. If someone could help that would be fantastic. :)

Hex edited the ".msh" file to use the renamed textures, maintaining name length.
Hidden/Spoiler:
Image
Image
Added new texture and models to the corresponding unit .req files.
Hidden/Spoiler:
[code]ucft
{
REQN
{
"class"
"cis_inf_commander"
}

REQN
{
"model"
"cis_1st_ndroid"

}
REQN
{
"model"
"hud_health_offen"
}
REQN
{
"texture"
"item_powerup_heared"
}

}[/code]
Added HUDTag to "cis_weap_inf_buff_damage.odf"
Hidden/Spoiler:
[code][WeaponClass]

ClassParent = "cis_weap_inf_buff_info"

[Properties]
HUDTag = "hud_health_offen"
OrdnanceName = "cis_weap_inf_buff_damage_ord"
ReloadTime = "0"
ReticuleInAimingOnly = 0
EnergyDrain = 150.0
[/code]
Lastly I added the "hud_health_*****" buffs to ingame.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"script"
"points"
"ifs_sideselect"
"ifs_charselect"
"ifs_mapselect"
"ifs_readyselect"
"ifs_fakeconsole"
"game_interface"
}

REQN
{
"script"
"platform=xbox"
}

REQN
{
"script"
"platform=pc"
"ifs_pc_spawnselect"
"ifs_pc_spectator"
}

REQN
{
"texture"
"leaf"
"lightglow"
"lightsabreglow"
"statsscreens_bg"
"ambush_icon"
"blank_icon"
"bluelaser_l"
"blurmask"
"com_icon_ctfflag_all_imp"
"com_icon_ctfflag_rep_cis"
"com_sfx_laser_blue"
"com_sfx_laser_green"
"com_sfx_laser_orange"
"com_sfx_laser_purple"
"com_sfx_laser_red"
"com_sfx_laser_yellow"
"combatspeeder_icon"
"flag_team_carried"
"flag_carried"
"flag_dropped"
"flag_icon"
"fluffy"
"fx_godray"
"fx_snow"
"fx_splash"
"fxrippl1"
"greenlaser_l"
"hud_active_repair_icon"
"hud_blockaderunner_icon"
"hud_clipbar_segment"
"hud_dest_icon"
"hud_detpack_plunger"
"hud_flag_icon"
"hud_flag_timer"
"hud_herobar_saberhilt"
"hud_jetpack_and_energybar_blankfill"
"hud_jetpack_and_energybar_fill"
"hud_map_northpointer"
"hud_map_raster"
"hud_ministardestroyer_icon"
"hud_notallowed"
"hud_objective_icon"
"hud_objective_icon_circle"
"hud_objective_icon_hidden"
"hud_objective_icon_offscreen"
"hud_target_hidden"
"hud_target_hint_hidden"
"hud_target_hint_onscreen"
"hud_target_flag_onscreen"
"hud_target_onscreen"
"hud_target_pointer"
"hud_target_pointer_solid"
"hud_herobar_saberglow"
"hud_reinforcement_icon"
"hud_secondary_refire_segment"
"hud_threshold_tickmark"
"hud_infinite_ammo_icon"
"hud_player_captured_flag"
"hud_poison"
"hud_player_captured_flag"
"hud_proton_bomb"
"hud_black"
"hud_white"
"hud_vehicle_beam_cannon"
"hud_rep_weap_defense_buff_icon"
"map_mask"
"noise"
"player_icon"
"player_shadow"
"qos_veryverybad"
"redlaser_1"
"spacedust1"
"spray"
"tauntaun_kaadu_icon"
"Tooltips_BorderBox"
"troop_icon"
"turret_icon"
"walker_icon"
"weapon_scope"
"weapon_scope2"
"weapon_scope3"
"weapon_scope4"
"whitecircle"
}

REQN
{
"texture"
"platform=xbox"
"fx_ringbump"
}

REQN
{
"texture"
"platform=pc"
"fx_ringbump"
}

REQN
{
"config"
"SoldierAnimation"
"com_sfx_weap_sc_exp_sm"
"com_sfx_weap_sc_exp_md"
"com_sfx_weap_sc_exp_lg"
"com_sfx_weap_sc_exp_xl"
"com_sfx_weap_detpack_exp"
"com_sfx_weap_beam_exp"
"com_sfx_weap_beam_exp_sm"
"com_sfx_weap_beam_exp_md"
"com_sfx_weap_beam_exp_lg"
"com_sfx_weap_beam_exp_xl"
"com_sfx_weap_flamethrower_ord"
"com_sfx_weap_remotedroid_exp"
"com_sfx_weap_remotedroidcharge2"
"com_sfx_chargeup"
"com_sfx_chunksmolder"
"com_sfx_chunktrail"
"com_sfx_chunktrail_sm"
"com_sfx_chunktrail_xs"
"com_sfx_contrail"
"com_sfx_dirtspray_lg"
"com_sfx_dirtspray_sm"
"com_sfx_dustwake"
"com_sfx_exhaust_cloudcar"
"com_sfx_exhaust_jedistarfighter"
"com_sfx_exhaust_jedistarfighter_blue"
"com_sfx_exhaust_kwing"
"com_sfx_exhaust_xwing"
"com_sfx_explosion_lg"
"com_sfx_explosion_sm"
"com_sfx_explosion_xl"
"com_sfx_explosion_xs"
"com_sfx_fireflies"
"com_sfx_landmine"
"com_sfx_ord_exp"
"com_sfx_powerup_blue"
"com_sfx_powerup_red"
"com_sfx_powerup_green"
"com_sfx_buffed_poison"
"com_sfx_buffed_offense"
"com_sfx_buffed_defense"
"com_sfx_buffed_regen"
"com_sfx_buff_offense"
"com_sfx_buff_defense"
"com_sfx_buff_regen"
"com_sfx_buff_poison"
"com_sfx_hackedvehicle"
"com_sfx_inf_damage_disintergrate"
"com_sfx_inf_damage_electricity"
"com_sfx_inf_disintergrate"
"com_sfx_inf_damage_fire"
"com_sfx_inf_damage_smoke"
"com_sfx_forcechoked"
"com_sfx_forcepushed"
"com_sfx_forcepulled"
"com_sfx_mineblink_red"
"com_sfx_mineblink_gold"
"com_sfx_mineblink_green"
"com_sfx_mineblink_blue"
"com_sfx_mineblink_purple"
"com_sfx_ord_flame"
"com_sfx_protontorpedo"
"com_sfx_rainsplash"
"com_sfx_repair"
"com_sfx_sabredeflect"
"com_sfx_sabrehit"
"com_sfx_shieldimpact_sm"
"com_sfx_shieldimpact_xl"
"com_sfx_smokeplume"
"com_sfx_timebomb"
"com_sfx_vehicleflame"
"com_sfx_vehicleflame_sc"
"com_sfx_vehicleflame_speeder"
"com_sfx_vehiclesmoke"
"com_sfx_vehiclesmoke_sc"
"com_sfx_vehiclesmoke_speeder"
"com_sfx_vehiclespark"
"com_sfx_vehiclespark_sc"
"com_sfx_vehiclespark_speeder"
"com_sfx_vehicle_exp"
"com_sfx_walkerstomp"
"com_sfx_waterbulletspray"
"com_sfx_watersplash_lg"
"com_sfx_watersplash_md"
"com_sfx_watersplash_ord"
"com_sfx_watersplash_ord_lg"
"com_sfx_watersplash_ord_md"
"com_sfx_watersplash_sm"
"com_sfx_watersplash_wade"
"com_sfx_watersplash_walker"
"com_sfx_watersplash_xs"
"com_sfx_waterwake_lg"
"com_sfx_waterwake_sm"
"com_sfx_weap_arccaster"
"com_sfx_weap_bluebolt_exp_lg"
"com_sfx_weap_bluebolt_exp_md"
"com_sfx_weap_bluebolt_exp_sm"
"com_sfx_weap_bluebolt_exp_xl"
"com_sfx_weap_bolt_exp_lg"
"com_sfx_weap_bolt_exp_md"
"com_sfx_weap_bolt_exp_sm"
"com_sfx_weap_bolt_exp_xl"
"com_sfx_weap_con_exp_lg"
"com_sfx_weap_con_exp_md"
"com_sfx_weap_con_exp_sm"
"com_sfx_weap_con_exp_xl"
"com_sfx_weap_empmortar_ord"
"com_sfx_weap_emp_exp_lg"
"com_sfx_weap_emp_exp_md"
"com_sfx_weap_emp_exp_sm"
"com_sfx_weap_emp_exp_xl"
"com_sfx_weap_flame_exp_lg"
"com_sfx_weap_flame_exp_md"
"com_sfx_weap_flame_exp_sm"
"com_sfx_weap_flame_exp_xl"
"com_sfx_weap_greenbolt_exp_lg"
"com_sfx_weap_greenbolt_exp_md"
"com_sfx_weap_greenbolt_exp_sm"
"com_sfx_weap_greenbolt_exp_xl"
"com_sfx_weap_grenade_blue"
"com_sfx_weap_grenade_emp_exp"
"com_sfx_weap_grenade_gold"
"com_sfx_weap_grenade_green"
"com_sfx_weap_grenade_radiation_exp"
"com_sfx_weap_grenade_red"
"com_sfx_weap_grenade_schrap_exp"
"com_sfx_weap_grenade_thermal"
"com_sfx_weap_grenade_thermal_exp"
"com_sfx_weap_incinerate_ord"
"com_sfx_weap_incinerate_ord_exp"
"com_sfx_lightning"
"com_sfx_weap_mortartrail_blue"
"com_sfx_weap_mortartrail_red"
"com_sfx_weap_mortartrail_yellow"
"com_sfx_weap_orangebolt_exp_lg"
"com_sfx_weap_orangebolt_exp_md"
"com_sfx_weap_orangebolt_exp_sm"
"com_sfx_weap_orangebolt_exp_xl"
"com_sfx_weap_purplebolt_exp_lg"
"com_sfx_weap_purplebolt_exp_md"
"com_sfx_weap_purplebolt_exp_sm"
"com_sfx_weap_purplebolt_exp_xl"
"com_sfx_weap_rad_exp_lg"
"com_sfx_weap_rad_exp_md"
"com_sfx_weap_rad_exp_sm"
"com_sfx_weap_rad_exp_xl"
"com_sfx_weap_redbolt_exp_lg"
"com_sfx_weap_redbolt_exp_md"
"com_sfx_weap_redbolt_exp_sm"
"com_sfx_weap_redbolt_exp_xl"
"com_sfx_weap_rockettrail"
"com_sfx_weap_rockettrail_blue"
"com_sfx_weap_rockettrail_gold"
"com_sfx_weap_rockettrail_green"
"com_sfx_weap_rockettrail_purple"
"com_sfx_weap_seismiccharge"
"com_sfx_weap_shiplaser_exp_lg"
"com_sfx_weap_shiplaser_exp_md"
"com_sfx_weap_shiplaser_exp_sm"
"com_sfx_weap_spyrifle_ord"
"com_sfx_weap_timebomb"
"com_sfx_weap_yellowbolt_exp_lg"
"com_weap_overheat"
"com_sfx_muzzleflash_lg"
}

REQN
{
"animbank"
"human"
"humanfp"
"humanlz"
}

REQN
{
"model"
"all_weap_inf_thermaldetonator"
"cis_weap_inf_thermaldetonator"
"imp_weap_inf_thermaldetonator"
"rep_weap_inf_thermaldetonator"
"com_weap_inf_thermaldetonator"
"com_item_powerup_dual"
"com_weap_inf_grenadethermal"
"com_weap_inf_grenadethermal_ord"
"com_1st_weap_inf_grenadethermal"
"com_weap_inf_torpedo"
"com_1st_weap_inf_torpedo"
"com_weap_inf_medkit"
"com_weap_inf_repairkit"
"com_weap_missile"
"com_bldg_controlzone"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase"
"com_bldg_inf_defenseturret"
"com_icon_alliance"
"com_icon_imperial"
"com_icon_republic"
"com_icon_CIS"
"com_icon_swap"
"com_weap_probedroid"
"com_smallchunk1"
"com_mediumchunk1"
"com_weap_inf_landmine"
"com_weap_inf_seismic_mine"
"com_weap_inf_detpack"
"coll_drive"
"com_sfx_muzzleflash"
"com_prop_buildzone"
"shell_cube"
"com_weap_inf_binoculars"
"hud_arrow"
"hud_map_fov"
"hud_large_map_fov"
"hud_main_reticule"
"hud_main_reticule_bullseye"
"hud_main_reticule_hit"
"hud_main_reticule_outline"
"hud_main_reticule_criticalhit"
"hud_main_reticule_rocketlockon_active"
"hud_energybar_frame_front"
"hud_energybar_frame_back"
"hud_jetpackbar_frame_front"
"hud_jetpackbar_frame_back"
"hud_vehicle_seatingchart_ai_icon"
"hud_vehicle_seatingchart_empty_icon"
"hud_vehicle_seatingchart_player1_icon"
"hud_weapon_backdrop"
"hud_weapon2_backdrop"
"hud_thermaldetonator"
"hud_detpack_plunger"
"hud_vehicle_lasers"
"hud_vehicle_bombs"
"hud_vehicle_chaingun"
"hud_vehicle_guided_rocket"
"hud_vehicle_flak"
"hud_vehicle_missile"
"hud_vehicle_mortar"
"hud_vehicle_stingers"
"hud_vehicle_recoiless"
"hud_vehicle_torpedo"
"hud_vehicle_beam_cannon"
"hud_hint_backdrop"
"hud_healthbar_frame"
"hud_tooltips_frame"
"hud_infinite_ammo_icon"
"hud_lightsaber"
"hud_force_choke"
"hud_force_saberthrow"
"hud_force_pull"
"hud_force_push"
"hud_force_lightning"
"hud_poison"
"hud_rage"
"hud_rep_weap_defense_buff_icon"
"hud_health_regen"
"hud_health_offen"
"hud_health_defen"
}

REQN
{
"class"
"com_item_vehicle_spawn"
"com_item_powerup_ammo"
"com_item_powerup_health100"
"com_item_powerup_health25"
"com_item_powerup_dual"
"com_item_powerup_offense"
"com_item_powerup_defense"
"com_item_powerup_energy"
"com_item_weaponrecharge"
"com_item_weaponrecharge_unbuilt"
"com_item_hero_healthrecharge"
"com_item_healthrecharge"
"com_item_healthrecharge_unbuilt"
"com_item_flag"
"com_item_flag_all_carried"
"com_item_flag_cis_carried"
"com_item_flag_imp_carried"
"com_item_flag_rep_carried"
"com_item_null"
"com_item_holocron"
"com_item_flag_all"
"com_item_flag_cis"
"com_item_flag_imp"
"com_item_flag_rep"
"com_prop_barrier_01"
"com_weap_ord_exp"
"com_snd_amb_streaming"
"com_snd_amb_static"
"com_bldg_controlzone"
"com_bldg_controlzone_ctf"
"com_bldg_untakeable_controlzone"
"com_bldg_ctfbase_greenteam"
"com_bldg_ctfbase_redteam"
"com_bldg_ctfbase"
"com_bldg_invisible_controlzone"
"com_bldg_major_controlzone"
"com_bldg_inf_defenseturret"
"com_weap_inf_seismic_mine"
"com_prop_buildzone"
"com_weap_inf_landmine_placed"
"com_weap_inf_landmine"
"com_weap_inf_empmine"
"com_prop_barrier_02"
"com_prop_cratemd_01"
"com_prop_barrel"
"com_prop_cratelg_01"
"com_holo_trap"
"com_inv_col_8"
"com_inv_col_16"
"com_inv_col_32"
"com_inv_col_64"
"com_inf_default"
"com_weap_inf_force_lightning"
"com_weap_inf_force_pull"
"com_weap_inf_force_push"
}

REQN
{
"config"
"hudtransforms"
"1playerhud"
"2playerhud"
"3playerhud"
"4playerhud"
}
}[/code]
Other information: The unit I've added the buff to uses it without fault. The original offense (damage)icon has been replaced with...nothing. I know I must be missing something and I'm assuming it must be trivial, something I have not come across in previous mods.
Hidden/Spoiler:
Image

Re: Replacing Icons

Posted: Sat Apr 27, 2013 6:53 pm
by Nedarb7
Did you rename the model itself?

Another thing, if you want to re-texture a hudtag just copy the texture
(no re-naming) and put it in your sides msh folder then add the (texture) lines to a used classes req file

One more thing, if your using a custom ingame.lvl you need the lines:
ReadDataFile("dc:ingame.lvl") (not sure if that's how its written) in your LUA

Re: Replacing Icons

Posted: Sat Apr 27, 2013 7:08 pm
by Glitch25
Yep. I guess that means I have to add dc: to this line ReadDataFile("ingame.lvl") in every mission.lua file...haha tedious process. I'll try it on Coruscant first to be sure. I'll edit this when the munge is complete and I've confirmed the change (or not) in game.
Glitch25 wrote:Added new texture and models to the corresponding unit .req files.
Hidden/Spoiler:
[code]ucft
{
REQN
{
"class"
"cis_inf_commander"
}

REQN
{
"model"
"cis_1st_ndroid"

}
REQN
{
"model"
"hud_health_offen"
}
REQN
{
"texture"
"item_powerup_heared"
}

}[/code]
Edit: Nope, crashed Coruscant: Jedi Temple - Conquest instantaneously. :(

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open dc:ingame.lvl

Re: Replacing Icons

Posted: Sat Apr 27, 2013 11:08 pm
by AQT
If you are including new HUD icons with new names, then you're going to have to set up new coordinates for them in a .hud file.

Re: Replacing Icons

Posted: Sun Apr 28, 2013 10:19 am
by Glitch25
AQT wrote:If you are including new HUD icons with new names, then you're going to have to set up new coordinates for them in a .hud file.
So files such as 1playerhud, 2playerhud, 3playerhud, and 4playerhud? There's also hudtransforms. I did a search, those were all that came up. Simply modify the coordinates to match the location on the players HUD, correct? What about screen resolution, I've seen some mods that if the screen is too wide or tall the icon is placed incorrectly.

Re: Replacing Icons

Posted: Sun Apr 28, 2013 3:14 pm
by Loopy53
The only file you need to edit is the 1playerhud file found in C:\bf2_modtools\common\hud\pc then follow the floating icon fix tutorial and make sure you have the correct munge .bats.

Re: Replacing Icons

Posted: Sun Apr 28, 2013 3:17 pm
by AQT
Glitch25 wrote:So files such as 1playerhud, 2playerhud, 3playerhud, and 4playerhud? There's also hudtransforms. I did a search, those were all that came up. Simply modify the coordinates to match the location on the players HUD, correct? What about screen resolution, I've seen some mods that if the screen is too wide or tall the icon is placed incorrectly.
Yes, and yes. However, you should consider using FragMe!'s extraweapons.hud method instead to implement these icons rather than create a custom ingame.lvl. Also, you're getting the crash above because you need to 1) load your custom ingame.lvl (with the dc:) along side the stock one (without the dc:), and 2) manually copy the over your custom ingame.lvl file to your addon map's _LVL_PC folder. One last thing about custom ingame.lvl's: You should only include things that you actually modified and need in the ingame.req. Otherwise, having the other stuff there just takes up unnecessary space. And finally, there isn't anything that can be done if the HUD icon doesn't look right on someone else's screen.