Jump to content
Lion.Kanzen

Some technical questions about GUI and mechanics

Recommended Posts

I want some mechanic for mods or forvthe game itself.

@s0600204

its possible adding a selector screen  like AoE to the GUI?

aid245238-v4-728px-Kill-at-Age-of-Mythol

im pettry sure can be useful in mod in later stage of the game.

the instructions are simple.

chosse between several portraits 1 of 2-3

if you when you make the selection

appaers new icons for units and new technologies, even the buildings can change(example Egyptian styles like New Kingdom vs Hellenistic)

this save much room of space in icon of buildings and icons of units.

 

second request. This for simulation

Turn on and turn off features like territory system?

And adding extra features for mods but not necessary for the game.

im sure @wowgetoffyourcellphone Will agree with this.

 

this you can create other type of game like CBA or free placing of buildings.

Share this post


Link to post
Share on other sites
8 minutes ago, Lion.Kanzen said:

its possible adding a selector screen  like AoE to the GUI?

I think it's possible, because it's just a window which could modify simulation states. Look at the diplomacy window, what's the different? They're near enough.

The JS simulation part is flexible already. So you could do many things in mods, but yes, you need to write a code.

Edited by vladislavbelov
  • Like 1

Share this post


Link to post
Share on other sites

I'm not programmer but how i can pop up the "screen selection" pushing  upgrade phase button?

I'm only good with CSS and XML files.

Edited by Lion.Kanzen

Share this post


Link to post
Share on other sites
14 minutes ago, Lion.Kanzen said:

I'm not programmer but how i can pop up the "screen selection" pushing  upgrade phase button?

I'm only good with CSS and XML files.

I could describe how it could be in common words:

  1. You started a new phase, like usual (no changes)
  2. Phase ended, you added a listener/handler on the phase end, it's just call an open function (the same like a diplomacy button call)
  3. User takes a choice, press button apply, you added another listener/handler on the button click, which applies changes to the simulation

So you need a XML-code for the selection window, JS-code for the phase handler and the button handler.

Share this post


Link to post
Share on other sites
35 minutes ago, Lion.Kanzen said:

its possible adding a selector screen  like AoE to the GUI?

It's possible, yes. It's just more gui.

 

21 minutes ago, Lion.Kanzen said:

I'm not programmer but how i can pop up the "screen selection" pushing  upgrade phase button?

One possibility: changing the session gui to add a button that only appears when the Civic Centre is selected.

Another possibility: What @vladislovbelov suggested. (There is no example. He was describing a possibility.)

 

35 minutes ago, Lion.Kanzen said:

if you when you make the selection

appaers new icons for units and new technologies,

Requires changing the session gui to support hiding icons instead of greying them out in certain circumstances.

 

Quote

even the buildings can change(example Egyptian styles like New Kingdom vs Hellenistic)

Quite literally https://trac.wildfiregames.com/ticket/2243

 

Quote

Turn on and turn off features like territory system?

https://wildfiregames.com/forum/index.php?/topic/20156-issue-with-territory-management/&do=findComment&comment=310314

 

Quote

And adding extra features for mods but not necessary for the game.

So, mod support then?

Share this post


Link to post
Share on other sites
Just now, Lion.Kanzen said:

Where can find the example? 

The game session GUI code is in "binaries/data/mods/public/gui/session/". There's a "diplomacy_window.xml", it describes how it looks like. The code hides this window is in "menu.js". How phase handling works you could see in the tutorial script "binaries/data/mods/public/maps/tutorials/starting_economy_walkthrough.xml".

Share this post


Link to post
Share on other sites
Spoiler

<object name="diplomacyHeader" size="32 32 100%-32 64">
		<object name="diplomacyHeaderName" size="0 0 140 100%" type="text" style="DiplomacyText" ghost="true" text_align="center">
			<translatableAttribute id="caption">Name</translatableAttribute>
		</object>
		<object name="diplomacyHeaderCiv" size="150 0 250 100%" type="text" style="DiplomacyText" ghost="true">
			<translatableAttribute id="caption">Civilization</translatableAttribute>
		</object>
		<object name="diplomacyHeaderTeam" size="250 0 300 100%" type="text" style="DiplomacyText" ghost="true">
			<translatableAttribute id="caption">Team</translatableAttribute>
		</object>
		<object name="diplomacyHeaderTheirs" size="300 0 360 100%" type="text" style="DiplomacyText" ghost="true">
			<translatableAttribute id="caption">Theirs</translatableAttribute>
		</object>
		<object name="diplomacyHeaderAlly" size="360 0 380 100%" type="text" style="DiplomacyText" tooltip_style="sessionToolTipBold">
			<translatableAttribute id="caption">A</translatableAttribute>
			<translatableAttribute id="tooltip">Ally</translatableAttribute>
		</object>
		<object name="diplomacyHeaderNeutral" size="380 0 400 100%" type="text" style="DiplomacyText" tooltip_style="sessionToolTipBold">
			<translatableAttribute id="caption">N</translatableAttribute>
			<translatableAttribute id="tooltip">Neutral</translatableAttribute>
		</object>
		<object name="diplomacyHeaderEnemy" size="400 0 420 100%" type="text" style="DiplomacyText" tooltip_style="sessionToolTipBold">
			<translatableAttribute id="caption">E</translatableAttribute>
			<translatableAttribute id="tooltip">Enemy</translatableAttribute>
		</object>
		<object name="diplomacyHeaderTribute" size="430 0 100%-70 100%" type="text" style="DiplomacyText" text_align="center">
			<translatableAttribute id="caption">Tribute</translatableAttribute>
		</object>
	</object>

	<object size="32 64 100%-32 384">
		<repeat count="8" var="n">
			<object name="diplomacyPlayer[n]" size="0 0 100% 20" type="image" hidden="true">
				<object name="diplomacyPlayerOutcome[n]" size="0 0 25 100%" type="image" tooltip_style="sessionToolTipBold"/>
				<object name="diplomacyPlayerName[n]" size="25 0 150 100%" type="text" style="DiplomacyText"/>
				<object name="diplomacyPlayerCiv[n]" size="150 0 250 100%" type="text" style="DiplomacyText"/>
				<object name="diplomacyPlayerTeam[n]" size="250 0 300 100%" type="text" style="DiplomacyText"/>
				<object name="diplomacyPlayerTheirs[n]" size="300 0 360 100%" type="text" style="DiplomacyText"/>

				<!-- Diplomatic stance - selection -->
				<object name="diplomacyPlayerAlly[n]" size="360 0 380 100%" type="button" style="StoneButton" hidden="true"/>
				<object name="diplomacyPlayerNeutral[n]" size="380 0 400 100%" type="button" style="StoneButton" hidden="true"/>
				<object name="diplomacyPlayerEnemy[n]" size="400 0 420 100%" type="button" style="StoneButton" hidden="true"/>

				<!-- Tribute -->
				<object size="430 0 100%-80 100%">
					<repeat count="8" var="r">
						<object name="diplomacyPlayer[n]_tribute[r]" size="0 0 20 100%" type="button" style="iconButton" tooltip_style="sessionToolTipBold" hidden="true">
							<object name="diplomacyPlayer[n]_tribute[r]_image" type="image" size="0 0 100% 100%" ghost="true"/>
						</object>
					</repeat>
				</object>

				<object name="diplomacyAttackRequest[n]" size="100%-58 0 100%-38 100%" type="button" style="iconButton" tooltip_style="sessionToolTipBold" hidden="true">
					<object name="diplomacyAttackRequestImage[n]" type="image" size="0 0 100% 100%" sprite="stretched:session/icons/attack-request.png" ghost="true"/>
				</object>

				<object name="diplomacySpyRequest[n]" size="100%-30 0 100%-10 100%" type="button" style="iconButton" tooltip_style="sessionToolTipBold" hidden="true">
					<object name="diplomacySpyRequestImage[n]" type="image" size="2 2 100%-2 100%-2" ghost="true"/>
				</object>
			</object>
		</repeat>
	</object>

	<object name="diplomacyCeasefireCounter" size="32 100%-90 100%-32 100%-62" type="text" style="DiplomacyText" ghost="true"/>

	<object size="50%-64 100%-50 50%+64 100%-22" type="button" style="StoneButton">

 

 

i think this dont be needed(?)

Share this post


Link to post
Share on other sites
On 08/08/2017 at 6:28 PM, Lion.Kanzen said:

size="50%-280 50%-200 50%+280 50%+150"

this the size . how i can Interprete this? Specially I want a bigger windows size.

It's "left top right bottom"

Using percentage in the coordinates allows to keep the dialog centered despite the resolution, but the dialog size itself is fixed (560 width, 350 height), it doesn't scale with the resolution change.

diplomacy_dialog_size_labeled.png

 

Edited by fcxSanya
Clarified the percentage purpose
  • Thanks 1

Share this post


Link to post
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

×