WILL SOON UPDATE WITH NEW METHOD!!

To enable the Der Eisendrache HUD (castle) you’ll need to load the Lua file. You basically load a new HUD on top of the existing hud.

This you can do in your main function of your mapname, or any other function that is run before any waits…

CSC


callback::on_localclient_connect( &on_local_client_connect ); //Will run a function when a player connects..
LuiLoad( "ui.uieditor.menus.hud.t7hud_zm_castle" ); //This loads the HUD 

The function that will run when a player is connected.

function on_local_client_connect( localClientNum )
{
	hud = CreateLUIMenu( localClientNum, "T7Hud_zm_castle" );
	OpenLUIMenu( localClientNum, hud );
}

This HUD requires a few images that are not loaded by default so you have to add that manually, i added a list of all the images you need.

//Scoreboard
image,uie_t7_base_dlc

//Rocket Shield
image,uie_t7_base_quest_shield_dlc
image,uie_t7_icon_inventory_dlc_shield_a
image,uie_t7_icon_inventory_dlc_shield_a_new
image,uie_t7_icon_inventory_dlc_shield_b
image,uie_t7_icon_inventory_dlc_shield_b_new

//Tram Fuse
image,uie_t7_base_quest_fuse_dlc
image,uie_t7_icon_inventory_dlc_fuse
image,uie_t7_icon_inventory_fuse_new
image,uie_t7_icon_inventory_fuse_disabled

//Ragnarok DG-4
image,uie_t7_base_quest_spikes_dlc
image,uie_t7_icon_inventory_dlc_talon_spikes_body
image,uie_t7_icon_inventory_dlc_talon_spikes_body_new
image,uie_t7_icon_inventory_dlc_talon_spikes_guards
image,uie_t7_icon_inventory_dlc_talon_spikes_guards_new
image,uie_t7_icon_inventory_dlc_talon_spikes_handle
image,uie_t7_icon_inventory_dlc_talon_spikes_handle_new

//Bows
image,uie_t7_base_quest_bg_dlc
image,uie_t7_icon_inventory_dlc_quest_basebar
image,uie_t7_icon_inventory_dlc_quest_basebar_fill
image,uie_t7_icon_inventory_dlc_quest_basebar_ready

//Storm
image,uie_t7_icon_inventory_dlc_quest_sigil_storm
image,uie_t7_icon_inventory_dlc_quest_arrow_broken_storm
image,uie_t7_icon_inventory_dlc_quest_arrow_fixed_storm

//Rune
image,uie_t7_icon_inventory_dlc_quest_sigil_rune
image,uie_t7_icon_inventory_dlc_quest_arrow_broken_rune
image,uie_t7_icon_inventory_dlc_quest_arrow_fixed_rune

//Demon
image,uie_t7_icon_inventory_dlc_quest_sigil_demon
image,uie_t7_icon_inventory_dlc_quest_arrow_broken_demon
image,uie_t7_icon_inventory_dlc_quest_arrow_fixed_demon

//Wolf
image,uie_t7_icon_inventory_dlc_quest_arrow_broken_wolf-22
image,uie_t7_icon_inventory_dlc_quest_arrow_broken_wolf
image,uie_t7_icon_inventory_dlc_quest_arrow_fixed_wolf

You have to make a few stock images transparent, or it will conflict with the newly loaded HUD.

//Factory Shield HUD
image,uie_t7_base_quest_shield
image,uie_t7_icon_inventory_shield_a
image,uie_t7_icon_inventory_shield_a_new
image,uie_t7_icon_inventory_shield_c
image,uie_t7_icon_inventory_shield_c_new

Tram Fuse

CSC
//Tram Fuse
clientfield::register( "clientuimodel", "zmInventory.widget_sprayer", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT ); 
clientfield::register( "clientuimodel", "zmInventory.player_using_sprayer", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
GSC
//Tram Fuse
clientfield::register( "clientuimodel", "zmInventory.widget_sprayer", VERSION_SHIP, 1, "int" ); 
clientfield::register( "clientuimodel", "zmInventory.player_using_sprayer", VERSION_SHIP, 1, "int" );
Usage
player thread clientfield::set_player_uimodel( "zmInventory.widget_sprayer", 1 ); //This will show the widget background
player thread clientfield::set_player_uimodel( "zmInventory.player_using_sprayer", 1 ); //This will show the fuse
wait 3.5;
player thread clientfield::set_player_uimodel( "zmInventory.widget_sprayer", 0 ); //This will hide the widget background, but the fuse stays on the scoreboard.
//player thread clientfield::set_player_uimodel( "zmInventory.player_using_sprayer", 0 ); //This will hide the fuse when you have used it for example..
Localization

By default it will show “ZM_CASTLE_TRAM_TOKEN_POWERUP“, you can fix this by creating a localization file called “zm_castle.str


REFERENCE	 	 TRAM_TOKEN_POWERUP
LANG_ENGLISH	 "Tram Fuse"


Rocket Shield

NOTE: The Rocket Shield is already for the most part registered, so you only have to add a few lines.
There is another “issue” with it as well, since the old HUD also has this widget loaded. It will display the Rocket Tanks twice.

CSC
//Rocket Shield
clientfield::register( "clientuimodel", "zmInventory.widget_shield_parts", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.player_crafted_shield", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT ); 
GSC
//Rocket Shield
clientfield::register( "clientuimodel", "zmInventory.widget_shield_parts", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.player_crafted_shield", VERSION_SHIP, 1, "int" );
Usage

NOTE: I made use of the default craftable script: “scripts/zm/craftables/_zm_craftables.gsc
I recommend make use of the default scripts, since it’s already setup. Below is just for if you want to quickly test everything.

//When you pick up the Eagle Part
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_shield", "zmInventory.widget_shield_parts", false ); // show widgetfor parts
level clientfield::set( "piece_riotshield_dolly", 1 ); //Eagle

//When you pickup the Tanks
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_shield", "zmInventory.widget_shield_parts", false ); // show ui for parts
level clientfield::set( "piece_riotshield_door", 1 ); //Tanks

//When you pick up the Window
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_shield", "zmInventory.widget_shield_parts", false ); // show ui for parts
level clientfield::set( "piece_riotshield_clamp", 1 ); //Window

//When the shield has been build
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_shield", "zmInventory.widget_shield_parts", true );
Localization

This is already loaded by default, but incase you want to change it you have to create a localization file called “zmweapon.str


REFERENCE	 	 ROCKETSHIELD
LANG_ENGLISH	 "Rocket Shield"


Ragnarok DG-4

CSC
//Gravity Spikes
clientfield::register( "clientuimodel", "zmInventory.widget_gravityspike_parts", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.player_crafted_gravityspikes", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_body", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_guards", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_handle", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );

RegisterClientField( "world", "gravityspike_part_body", VERSION_SHIP, 1, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "gravityspike_part_guards", VERSION_SHIP, 1, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "gravityspike_part_handle", VERSION_SHIP, 1, "int", &zm_utility::setSharedInventoryUIModels, false );
GSC
//Gravity Spikes
clientfield::register( "clientuimodel", "zmInventory.widget_gravityspike_parts", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.player_crafted_gravityspikes", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_body", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_guards", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.gravityspike_part_handle", VERSION_SHIP, 1, "int" );

RegisterClientField( "world", "gravityspike_part_body", VERSION_SHIP, 1, "int", undefined, false );
RegisterClientField( "world", "gravityspike_part_guards", VERSION_SHIP, 1, "int", undefined, false );
RegisterClientField( "world", "gravityspike_part_handle", VERSION_SHIP, 1, "int", undefined, false );
Usage
//When you pick up the Guards part
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_gravityspikes", "zmInventory.widget_gravityspike_parts", false ); // show widgetfor parts
level clientfield::set( "gravityspike_part_guards", 1 ); //Guards

//When you pickup the Handle part
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_gravityspikes", "zmInventory.widget_gravityspike_parts", false ); // show ui for parts
level clientfield::set( "gravityspike_part_handle", 1 ); //Handle

//When you pick up the Body
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_gravityspikes", "zmInventory.widget_gravityspike_parts", false ); // show ui for parts
level clientfield::set( "gravityspike_part_body", 1 ); //Eagle

//When the gravity spikes have been build
player thread zm_craftables::player_show_craftable_parts_ui( "zmInventory.player_crafted_gravityspikes", "zmInventory.widget_gravityspike_parts", true );
Localization

This is already loaded by default, but incase you want to change it you have to create a localization file called “weapon_zm.str


REFERENCE	 	 GRAVITY_SPIKES
LANG_ENGLISH	 "Ragnarok DG-4"


Elemental Bows

CSC
//Rune
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_rune", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_state_rune", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_rune", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
RegisterClientField( "world", "quest_state_rune", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "quest_owner_rune", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );

//Wolf
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_wolf", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_state_wolf", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_wolf", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
RegisterClientField( "world", "quest_state_wolf", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "quest_owner_wolf", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );

//Demon
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_demon", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_state_demon", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_demon", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
RegisterClientField( "world", "quest_state_demon", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "quest_owner_demon", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );

//Storm
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_storm", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_state_storm", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_storm", VERSION_SHIP, 1, "int", undefined, !CF_HOST_ONLY, CF_CALLBACK_ZERO_ON_NEW_ENT );
RegisterClientField( "world", "quest_state_storm", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );
RegisterClientField( "world", "quest_owner_storm", VERSION_SHIP, 3, "int", &zm_utility::setSharedInventoryUIModels, false );
GSC
//Rune
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_rune", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_state_rune", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_rune", VERSION_SHIP, 1, "int" );
RegisterClientField( "world", "quest_state_rune", VERSION_SHIP, 3, "int", undefined, false );
RegisterClientField( "world", "quest_owner_rune", VERSION_SHIP, 3, "int", undefined, false );

//Wolf
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_wolf", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_state_wolf", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_wolf", VERSION_SHIP, 1, "int" );
RegisterClientField( "world", "quest_state_wolf", VERSION_SHIP, 3, "int", undefined, false );
RegisterClientField( "world", "quest_owner_wolf", VERSION_SHIP, 3, "int", undefined, false );

//Demon
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_demon", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_state_demon", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_demon", VERSION_SHIP, 1, "int" );
RegisterClientField( "world", "quest_state_demon", VERSION_SHIP, 3, "int", undefined, false );
RegisterClientField( "world", "quest_owner_demon", VERSION_SHIP, 3, "int", undefined, false );

//Storm
clientfield::register( "clientuimodel", "zmInventory.widget_weap_quest_storm", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_state_storm", VERSION_SHIP, 1, "int" );
clientfield::register( "clientuimodel", "zmInventory.quest_owner_storm", VERSION_SHIP, 1, "int" );
RegisterClientField( "world", "quest_state_storm", VERSION_SHIP, 3, "int", undefined, false );
RegisterClientField( "world", "quest_owner_storm", VERSION_SHIP, 3, "int", undefined, false );

Usage

NOTE: This is a bit different than the others, i made 2 simple custom functions for it. Can also be used for the Tram Fuse for displaying the HUD and hiding it after.

function get_player_lui_index()
{
	return self.characterIndex + 1;
}

function display_ui_widget( uimodel, duration )
{
	self endon( "disconnect" );

	self clientfield::set_player_uimodel( uimodel, 1 );
	wait duration;
	self clientfield::set_player_uimodel( uimodel, 0 );
}

Quest State Explanation
  • 1: Displays the broken arrow
  • 2: Quarter of the circle
  • 3: Half the circle
  • 4: Three-quarter of the circle
  • 5: Full Circle with a fixed arrow
Quest Owner Explanation
  • 0: Won’t display a character
  • 1: Demspey
  • 2: Nicolai
  • 3: Richtofen
  • 4: Takeo

NOTE: If you have custom characters you have to replace these images.

image,uie_t7_zm_hud_score_char1 //Nikolai
image,uie_t7_zm_hud_score_char2 //Takeo
image,uie_t7_zm_hud_score_char3 //Dempsey
image,uie_t7_zm_hud_score_char4 //Richtofen

Rune
player thread display_ui_widget("zmInventory.widget_weap_quest_rune", 3.5); //Display the UI widget
level clientfield::set( "quest_state_rune", 1 ); //The current state (1-5), see explanation above
level clientfield::set( "quest_owner_rune", player get_player_lui_index()); //Only have to set this once on the player who is building this. See explanation above
Wolf
player thread display_ui_widget("zmInventory.widget_weap_quest_wolf", 3.5); //Display the UI widget
level clientfield::set( "quest_state_wolf", 1 ); //The current state (1-5), see explanation above
level clientfield::set( "quest_owner_wolf", player get_player_lui_index()); //Only have to set this once on the player who is building this. See explanation above
Demon
player thread display_ui_widget("zmInventory.widget_weap_quest_demon", 3.5); //Display the UI widget
level clientfield::set( "quest_state_demon", 1 ); //The current state (1-5), see explanation above
level clientfield::set( "quest_owner_demon", player get_player_lui_index()); //Only have to set this once on the player who is building this. See explanation above
Storm
player thread display_ui_widget("zmInventory.widget_weap_quest_storm", 3.5); //Display the UI widget
level clientfield::set( "quest_state_storm", 1 ); //The current state (1-5), see explanation above
level clientfield::set( "quest_owner_storm", player get_player_lui_index()); //Only have to set this once on the player who is building this. See explanation above
Localization

By default it will show “ZM_CASTLE_BOW_BASE“, you can fix this by creating a localization file called “zm_castle.str


REFERENCE	 	 BOW_BASE
LANG_ENGLISH	 "Wrath of the Ancients"

Extra

For the localization u have to add these lines in your zone:


localize,zm_castle //Tram Fuse, Bows
localize,weapon_zm //Gravity Spikes
localize,zmweapon //Rocket Shield

Add this to modify the score glow: (This is also added in the source files, the image opacity is already at 50%)


image,uie_t7_core_hud_mapwidget_panelglow

Source Files