Jump to content

Modding Overhaul mod, but not sure how to replicate some icon usage!


Recommended Posts

<TL;DR>

Hello, I'm working on making a vanilla mod compatible with an overhaul mod, for use with me and a couple friends. I have most of what I intended done!

However. The original overhaul mod has Icon collections for a conditional and specific place on the UI, and I don't know how to edit the overhaul mod's code to point to custom UI icons that I myself am creating as new items are introduced.

I will have some code below highlighting their code and asking what I should do to adapt. Please, I've been working on it constantly!

</TL;DR>

 

 

So, I have been working to integrate new weapons into Undead Legacy. After watching some videos on vanilla gun mods, I became somewhat obsessed with including them in what I find to be the ultimate experience of one of my absolutely favorite games of all time, 7 Days To Die. However, I have no experience with XML, and my experience with coding at all is to say the least flawed, disheveled, messy.

 

I went to work, however, determined to make this work. I started by just reading both 7 days XML files and then Subquake's files and comparing and contrasting what each did and how the original files were modified. It was a drawn out process and exhausting, but I was pleased with the results. The guns work! I can control their stats! I can't seem to make certain unusual stats show up in the gun descriptions, but the items themselves show up in appropriate places in loot and in trader inventories! Hoorah! Except...

 

This is not just my own. I want to share this with my close friends. We would play this into the morning hours, awake and freezing in a basement, connecting to each other via a small population of xbox 360s and a janky internet setup. UL has brought us back to those times again. And so, the conundrum: I want to make weapon additions seamless. I don't want my friends to know what is and what isn't UL, what gun comes from where. I want them to pick up a cool gun and say, "This feels clean! Is this part of UL or the other stuff?" I don't want to break immersion in the slightest.

 

Everything is working except one thing, or two things that propose the same issue: in the bottom right corner of the screen UL offers special Icons that are both minimalist and convey information well, while offering a personal touch. They offer special weapon and ammo silhouettes. I'm adding unique ammunitions and new guns. Both of these things need special icons to be paired and shown in the bottom right to make the integration complete, and I believe I've found the coding area to do so.

 

 

That brings me to the question: how do I do what UL does and make the game accept and use my custom UI active item icons, like Subquake did?? 

 

Thanks for the time and attention. I appreciate it.

 

I am certain this is the window holding the information and the variables used. This code is a lot different from the other code used, with {} and calling directly to Atlas folders, I don't know how to interpret this as well as the other XML:

<window name="windowHudRight" depth="-20" pos="-395,109" cursor_area="true" controller="ULM_HUD_ActiveItem,UndeadLegacy">
	<rect depth="1" visible="{hudShowWeaponInfo}">
		<rect visible="{hudShowAmmoGun}">
			<texture style="ulmHudAmmo"/>
			<rect name="weapon" size="116,58" pos="230,0">
				<!--<sprite depth="0" color="0,0,0,128"/>-->
				<sprite depth="1" atlas="UIActiveItems" sprite="{hudActiveItemIcon}" type="sliced" on_hover="true" tooltip="{hudActiveItemName}" foregroundlayer="true"/>
			</rect>
			<rect name="ammo" size="60,30" pos="150,-15">
				<!--<sprite depth="0" color="0,0,0,128"/>-->
				<sprite depth="1" atlas="UIActiveItems" sprite="{hudAmmoIcon}" foregroundlayer="true"/>
			</rect>
			<rect name="count" size="70,60" pos="60,10">
				<!--<sprite depth="0" color="0,0,0,128"/>-->
				<label depth="1" size="60,46" pos="-50,-15" font_size="50" justify="right" text="{hudAmmoCount}" style="outline"/>
			</rect>
			<rect name="total" size="60,30" pos="70,-7">
				<!--<sprite depth="0" color="0,0,0,128"/>-->
				<label depth="1" pos="2,-1" font_size="28" justify="center" text="{hudAmmoTotal}" style="outline"/>
			</rect>
		</rect>
		<rect visible="{hudShowAmmoPaint}">
			<texture style="ulmHudAmmo"/>
			<rect depth="1" name="paint" size="120,40" pos="220,129">
				<texture depth="1" style="ulmHudPaint"/>
				<texture depth="2" name="paintTexture" size="125,125" material="Materials/Transparent Colored" globalopacity="true"/>
			</rect>
			<sprite depth="1" size="120,60" pos="230,-2" atlas="UIActiveItems" sprite="{hudActiveItemIcon}" type="sliced" on_hover="true" tooltip="{hudActiveItemName}" foregroundlayer="true"/>
			<sprite depth="1" size="60,30" pos="150,-15" atlas="UIActiveItems" sprite="{hudAmmoIcon}" foregroundlayer="true"/>
			<label depth="1" size="120,40" pos="15,-10" font_size="40" justify="center" text="{hudAmmoCount}" style="outline"/>
		</rect>
		<rect visible="{hudShowMelee}">
			<rect visible="{hudShowMeleeWithIcon}">
				<texture style="ulmHudMelee"/>
				<sprite depth="5" size="120,60" pos="230,-2" atlas="UIActiveItems" sprite="{hudActiveItemIcon}" type="sliced" on_hover="true" tooltip="{hudActiveItemName}" foregroundlayer="true"/>
			</rect>
		</rect>
		<rect pos="36,-60" size="260,35" visible="{hudHasDurability}">
			<texture depth="1" style="ulmHudBar1b"/>
			<sprite depth="2" style="ulmHudBar1" rotation="15" sprite="hud_bar_1c" color="255,255,255,220" fill="{hudDurabilityFill}"/>
			<sprite depth="4" style="ulmHudBar" sprite="symbol_bar_mechanic"/>
		</rect>
	</rect>
	<!-- Pick up items -->
	<rect depth="0" name="hud" pos="300,75" pivot="BottomLeft" controller="ULM_CollectedItemList,UndeadLegacy">
		<panel size="60,62" name="item" visible="false" pivot="BottomLeft" disableautobackground="true">
			<sprite depth="0" name="Background" style="ulmStackPickup">
                <texture style="ulmStackPickup"/>
            </sprite>
			<sprite depth="2" name="Negative" style="ulmStackPickup">
                <texture style="ulmStackPickupMissing"/>
            </sprite>
			<sprite depth="3" name="Icon" pos="30,-30" size="56,56" atlas="ItemIconAtlas" pivot="center" foregroundlayer="true"/>
			<label depth="5" name="ItemCount" pos="0,-38" size="56,22" font_size="28" justify="right" style="outline"/>
			<label depth="6" name="ItemName" pos="-308,-18" text="" size="300,28" justify="right" style="outline"/>
		</panel>
	</rect>
</window>

And, this is the aforementioned texture within that code, found in styles.xml:

<style name="ulmHudAmmo" type="texture">
	<style_entry name="depth" value="0"/>
	<style_entry name="size" value="366,59"/>
	<style_entry name="foregroundlayer" value="false"/>
	<style_entry name="texture" value="#@modfolder:Resources/Subquake_UserInterface.ulm?Subquake_hud_ammo_2"/></style>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...