Backgrounds for Tenets

Oh - well - bad news;

Sadly, neither methods seem be working. I've followed through every details and assembled the Mods correctly while keeping the general structure of DDS accessing.

Still only Black buttons. There has to be a tricky function in the LUA(s) or some choice of conditions that doesn't dispatch the assets **ABOVE** the default frames... or something resets them all right after the images "transit" into the UI.

Help? :(
 
Which mod are you talking about - the Ancient Era popup or the Tenets backgrounds?

Either way, it will be a lot easier for us if you attach the mod ;)
 
Tenets... From you (ZW.. file) and Nuttzy (ZN..).
Attachments below --

At first, i thought that the DDS files needed to be compressed as DXT5 (or less, btw) at the expense of some god_awfully_ugly screwed image pixels... but after verification, i kept them without compression (RGBA8, w/Gimp 2!6 usual fine plugin) and valid.

Your methods seem to differ a little (LUA in particular). Can't say what or why, i'm almost completely in the dark with certain LUA situations. XML - i can handle relatively well though.

PS;
1) In any newly started games, the Social Policies PopUp access is not even accessible. Stuck and Gameplay frozen on the very first Notification Icon for it.
2) Re-Loading some recent saves was almost Okay - that's how i could detect the Choose Ideology buttons "still empty flaws" on the default screen; feels like the LUA/XML combo files aren't actually Imported(1) into Virtual stack or somethin'.
3) You'll also notice that a few key_Labels were (!--Rem)'ed out. As i won't be using them.

Sooooo, it's debug time! Thanks in advance --- ;)

EDIT; Zipped test Mods no longer needed! :lol::scan:
 
You've remarked out labels in the XML without removing them from the Lua? That's likely the problem. In my version, I was already hiding the labels where an Icon is set, so you didn't even need to remark them out.

EDIT: Here's the Lua.log error for whoward69's version:
Code:
[389504.606] SocialPolicyPopup: In UpdateDisplay()
[389504.606] Runtime Error: C:\Users\Nutty\Documents\My Games\Sid Meier's Civilization 5\MODS\ZW-Tenets In Colors (v 1)\UI\InGame\Popups\SocialPolicyPopup.lua:561: attempt to index local 'labelControl' (a nil value)
And, indeed, on that line (561) it's trying to clear the text for a label you're remarked out from the XML.
 
Hold it... just *this* tiny little flaw?

I was about to mention InGameUIAddin and/or borked Imports to the VFS as the likely culprit(s). But who am i fiddling with such complex code gimmicks. ;)

If indeed #561 (of Whoward's LUA file) is the guilty offender, please explain why yours isn't working either?
I'll look into it and try editing what i beleive should be. No guarantee it will work though.

Weird debugging gives me the creeps. Always.
 
No, that's just as far as the Lua got. Like database entries, the rest of the file is ignored when an error is reached.

The reason mine didn't work is the same reason. You removed the labels which it makes reference to, even where it's output is hidden.
 
Well, just tried the "Rem'ed line version" in a two ways gameplay; 1) Freshly started in Modern Era and 2) Old save that has the Ideology selection process on the opening Turn.

1) Could select Ideology but the Notification Culture button is still unresponsive.
2) Could go all the way to the Tenets "Black Buttons" -- No images shown and yet the Labels are still active!

Now - i'm really confused. Must be something else - also.

EDIT
**
Gosh, how many other references are there to alter?? Just verified the LUA.log and #581 & #602 are mentionned also. Onto another Buddy rebuild... but this will have to wait after a good supper meal.
-- Be back!
 
Hmmmmm - nothin' like a good Spaghetti to send the mood & intellectual energy right back up where they belong.

Take a look;



1) I simply removed my (honestly) quite silly REM's off the Label_Lines that i thought were necessary since i didn't realize you had already fixed the "issue".

2) Replaced your "ideology_freedom.dds" texture calls with my "FL18_Freedom.dds".

3) Kept both SocialPolicyPopup.LUA & XML exactly as they were given to me.

I feel soooooo bad for ruining an otherwise solid work with some Remming flaws. I should learn not to mess with superior minds (as in - Coders' skills) and their results.
Now onto... trying to fix ZW version too. !!

A bazillion heartfelt Thanks to you Nuttzy. ;)

LATER ON this evening...

I had my lesson with bad edits applied to sturdy codes made by others, so i'll just ask -- politely;

-- How do i remove the 124x59 right-side images on the selection PopUps?
-- If i could use some kind of Opacity tricks (similar to what WHoward did via SQL) to almost hide them with very dark masking... would that be less coding troubles?
-- Probably done via LUA... don't want it to be too complex though, it may just be a matter of simple Hidden_Truth(!) or False_Hopes(!) at the proper typing location(s) - somehow! :)
-- Please?!

PS; Btw, the old saves would never have worked anyhow.
 
Ah - how Expected. :D

WHoward's stuff is as sharp and flawless as anyone could wish for.

But i'm still in a tricky dilemna;

Ideally i would combine some features from both methods in the finalized (ZNW) version;

-- The TXT labels would have to be removed from ZW test phase... and won't be integrated into ZNW. I will follow Nuttzy code for that feature.
-- The Opacity trick might be useful too... as mentioned in the previous post.
-- ZN version lacks an addressable DDS with multiple images for Tenets. Ultimately i don't mind much how ZNW will grab its art resources. Lotsa work went into assembling the big three files. So i really can't decide if or how a compromize can be reached.

-- Still can't figure out how or where to use the F18 & F19 (refer to ZW's Atlas principles)... this should need further encoding before release. If absolutely necessary. Would be somehow cool to see them in action too though.

As long as i don't screw up things **again**, let's hope an hybrid version will be worth all of our efforts.

PS; I would recommend "deleting" your try-outs ZIPS from the earlier posts, just in case some freaky accident occurs until the official MOD is released.
 
-- The TXT labels would have to be removed from ZW test phase... and won't be integrated into ZNW. I will follow Nuttzy code for that feature.
Let me know if you have trouble with this. It should be easy enough to follow.
-- The Opacity trick might be useful too... as mentioned in the previous post.
I thought you were going to base ZNW on ZW (in which case this seems unnecessary), but to remove the selection popup icons, you can just delete the section that starts at line 832 of my version of SocialPolicyPopup.lua, as you did in the original version; you can leave the XML alone as the element is hidden by default. Or if you'd like to turn the opacity way down, you can add a line something like (for 25% opacity):
Code:
entry.TenetIcon:SetAlpha(0.25);
-- ZN version lacks an addressable DDS with multiple images for Tenets.
Just base ZNW on ZW. There's no need to maintain ZN. Any features that you'd like are easily integrated.
-- Still can't figure out how or where to use the F18 & F19 (refer to ZW's Atlas principles)...
I've tried to figure out what F18 and F19 are referring to, without success...
 
1)
Code:
entry.TenetIcon:SetAlpha(0.25);

2) Just base ZNW on ZW. There's no need to maintain ZN. Any features that you'd like are easily integrated.

3) I've tried to figure out what F18 and F19 are referring to, without success...

1) I'll give this opacity control a try within the #832 If_End condition block while i might have to simply delete (or just Rem-Out) if it proves unsatisfactory even at much lower values.
((EDIT #1; Works really well with a cool (0.10) darkened image hint - almost mysterious!! ))

2) Okay, i will... and yet - i still have no idea how to prevent his text Labels (IIRC, i screwed up BIG time on my first try for naaaa'thin'!) from overlaying each of my new Symbolic-Buttons. LUA, XML, Copy-Paste some of your code? Not a clue as to where and what exactly.

3)
-- The F18's are the probable defaults for each Branch when unselected buttons (unchoosen Tenets *_Most often to the right and lower levels as you know_* waiting for more culture points to be activated) previously remained totally black. I thought you had hinted about such a feature earlier, didn't you?

-- F19 (per *active* Ideology also) were meant to be used as a temporary (shown) placeholder in-between actual Tenet choices and two specific PopUp situations;
a) When we first select Tenets, sometimes we get Bonus (indicated by magenta cue lines on top) choices. The boxes_buttons would be filled with the symbol to warn that these are still pending. Actually the F18 & F19 images could somehow be interchangeable in principle to reflect what they are intended for (DoubleArrows or Torch+Hammer+Sword glowing with colors). Or....

b) Similar situations can occur if the Option "Policy Saving" is in use.

c) Thus... if it's too much trouble to code them in - no big loss. Maybe later.

(( EDIT #3; d) Better yet... look at the snapshot above. F18's go inside the boxes with tiny magenta Locks. F19 underneath the "Click to add Tenet" instance(s). ))

It's Nutzzz, right? :D

PS; Dunno if i should "Block and/or Reference" a few other Mods such as PolicyPlus, Reform&Rule, etc? Since these seem to extensively alter Ideologies context. Whadda'ya'think?
 
Re #2:
In the blocks starting at line 573, 614, and 658 of ZW, add the line in red:
Code:
			if (tenet.TenetTexture) then
				[COLOR="RED"][B]labelControl:SetHide(true);[/B][/COLOR]
				imageControl:SetHide(false);
				imageControl:SetTexture(tenet.TenetTexture);
				imageControl:SetTextureOffsetVal(tenet.TenetTextureX, tenet.TenetTextureY);
				imageControl:SetAlpha(tenet.TenetTextureOpacity/100);
			end

Re #3:
I think I understand what you're getting at. We'd want to add new columns to the PolicyBranchTypes like we did for Policies. I'll work something up for you. Do you have art ready? [Never mind, I see you've added it to the atlas already--wait, which gets the ideology symbol and which gets the double arrows, F18 or F19?]


Yes, I'm Nutty here and Nutzzz on Steam.

Sure, if another mod changes the SocialPolicyPopup, you can make it easier for users by using a Block, or you can try to make it compatible, then use a Reference (or--easier to mod, but harder to maintain--you could release a separate compatible version with a Dependency).
 
Re #2:
In the blocks starting at line 573, 614, and 658 of ZW, add the line in red:

Re #3:
I think I understand what you're getting at. We'd want to add new columns to the PolicyBranchTypes like we did for Policies. I'll work something up for you. Do you have art ready? [Never mind, I see you've added it to the atlas already--wait, which gets the ideology symbol and which gets the double arrows, F18 or F19?]

Sure, if another mod changes the SocialPolicyPopup, you can make it easier for users by using a Block, or you can try to make it compatible, then use a Reference (or--easier to mod, but harder to maintain--you could release a separate compatible version with a Dependency).

#2) I'll certainly put that to good use.. thanks.

#3) F18s are the Ideology symbols while F19s stand as some temporary underlays as explained above. F18_in Boxes w/Locks & F19_underneath Click_TXT(s) of pending choices to be made.

#4) Just want to prevent downloaders from repeating the same critical comments all over the place. And, don't want to cold-test these external Mods just to verify if they are compatible. Maybe i'll simply insert a note somewhere (description space is sooooo tight --boooo-- Firaxis & Steam for such weird enough restrictions!) that people MIGHT have some troubles when using mine along with these two.
 
Try this one on for size:

EDIT: I think it includes all of the changes we discussed above.

[Note it looks like I overdid the transparency a bit on the double arrows--since Firaxis is applying another transparent texture on top. See the updates to PolicyBranchTypes at the end of the TenetsInColors.xml file.]
 

Attachments

  • ZNW.png
    ZNW.png
    284.3 KB · Views: 75
  • ZNW-Tenets In Colors (v 1).zip
    1.5 MB · Views: 43
Absolutely fantastic results...

Nope you haven't made a wrong transparency choice for the F19_Arrows. It's the overlay Clickable Button that has some priority at that particular moment. And since i'm using a different DDS texture for these with Z-UI... the Green blend effect magically disappears on all my PopUps. It might be possible to switch the image higher in the stack and right underneath the Label though. I'll try.

I think i'm getting very near to finally posting the concept thread and tying everything for the official mod;
ZNW - Symbolic Ideology Tenets.

Thanks to you (and WHoward) - i couldn't have done this much without your incredible help and work.
This sums up the project.

Era-Ancient? No comments yet?
Please make your replies (if any..) in this thread; http://forums.civfanatics.com/showthread.php?t=397759&page=2!
:D
 
Been puzzled by two tiny things since your ZNW is working just fine as it is.

1) Shouldn't this kind of graphical (almost only) addon stuff be defined as "0" for the Affects_Save_Games condition?

2) Is it just me or the parser by levels relocates some of the choosen Tenets boxes automatically when we go through these one-by-one from left to right? Simple detail and somehow weird. If there's no quick and easy code solution... i'm perfectly willing to let it all as is. Funny side-effect nevertheless.
 
1. You are correct. I just forgot to change it from the default.
2. It always did that; you just never noticed before. The screen is built anew each time the popup is displayed; and it goes left-to-right in the same order it is presented to you in the selection popup (it's either alphabetical order or the order in the database, I'm not sure offhand).

EDIT: As for the Ancient Era popup, it's probably easier to fake it than use the built-in system... I'll take a look.
EDIT #2: No, it's easier to use UI.AddPopup()...
 
1. This is one of the "silly" ModBuddy features that most people simply miss accidentally. The option is all the way at the bottom of the Properties screen. Easy to forget.
2. Thought so. Just wanted to be sure.
3. Please do...(Faking it would indeed be my preference as the Z-Eras+Center mod intended to provide such an additional popup but not within the actual default structure that triggers on each other Eras starts), and respond in the dedicated thread while having a quick look at the Center concept. At the time it looked fairly easy to handle, but it proved to probably be a bit too ambitious for my limited LUA skills.

Thanks again.

PS;
Not sure if this flaw is caused by our LUA code but...
** Critical bug; When the very first Notification to choose a Social Policy appears, the PopUP can't be accessed.

The newest beta for bc1's EUI might also be responsible, btw. No way to tell at the moment but somehow easy to verify with this ZNW mod code.

PS2; I've joined the current essential set of files (except for the ART) in a zip below to make it easier for you to check what might be wrong or NOT. The transparency values have been corrected for all three branches update sections.

PS3; I may be onto something here;

LUA log excerpt...
[10924.843] Runtime Error: C:\Users\Zyxpsilon\Documents\My Games\Sid Meier's Civilization 5\MODS\ZNW-Symbolic Ideology Tenets (v 1)\UI\InGame\Popups\SocialPolicyPopup.lua:565: attempt to index local 'ideology' (a nil value)

LINE #565++ for reference...

Code:
[B][COLOR="DarkRed"]if (ideology.IdeologyLockTexture) then[/COLOR][/B]
			imageControl:SetTexture(ideology.IdeologyLockTexture);
			imageControl:SetTextureOffsetVal(ideology.IdeologyLockTextureX, ideology.IdeologyLockTextureY);
			imageControl:SetAlpha(ideology.IdeologyLockTextureOpacity/100);
		end

All good but -- what should be done to fix this?
__________________
 
Sorry about that; I only tested an Advanced Start in the Modern Era, and ideology was always defined when I activated the popup.

Replace the block at line 565 with:
Code:
		[B][COLOR="RED"]if (iIdeology >= 0) then[/COLOR][/B]
			if (ideology.IdeologyLockTexture) then
				imageControl:SetTexture(ideology.IdeologyLockTexture);
				imageControl:SetTextureOffsetVal(ideology.IdeologyLockTextureX, ideology.IdeologyLockTextureY);
				imageControl:SetAlpha(ideology.IdeologyLockTextureOpacity/100);
			end
		[B][COLOR="RED"]end[/COLOR][/B]
and similar for current lines 585, 594, 621, 641, 650, 680, 700, 709 [and 879 if I had finished that one].

EDIT: Actually, the ones with strikeouts shouldn't be necessary; it'd never get there without an ideology being selected.

EDIT #2: So, just lines 565, 621, and 680
 
Top Bottom