View Full Version : Pedia Upgrade
Valkrionn Sep 17, 2009, 03:45 PM EDIT: This project has been dropped, in favor of Xienwolf's searchable pedia. If any modders would like to see how it was done (Much easier to adapt than Xienwolf's, I would think), feel free to use this file... Goes in assets/python/screens.
229436
Alright. As some of you may know, I'm merging in Grey Fox's 'Better Pedia' mod. It's rather old, so I've been doing a bit of updating... Going to use this thread to describe what I've already done and allow you all to post feedback and requests. :goodjob:
A few notes first off... When I say divided, I mean each section will have a header naming it, and a space or two between it and the previous section. Very easy to read. I'd post screenies, but I'm on a phone while driving four hours to a memorial, not the best time. ;)
Units:
Divided based on unitcombat. There is also a section for nullcombats(Units that don't fit elsewhere), golems, and summons. ATM, Fort Commanders are grouped with siege... Once I'm done with their UU's I'll give them their own section.
Heroes:
Sections for Civ Heroes, Lesser Heroes (Secondary Heroes, and odd units like the Scion Councilors), Religious Heroes, one each for Orcish, Animal, and Demonic heroes, and finally general Heroes.
Buildings:
Divided based on Flavor(Military, Commerce, etc). Thinking of adding a Summon section.
Wonders:
Divided the same way, with the addition of Shrine, Tower, and Palace sections.
Resources:
Divided into Strategic, Luxury, Food, and Mana.
Spells:
Divided into World, different Spheres (Each has a different section, easy to browse spells now), Divine (Includes Mechanos spells due to the way I implemented them), Jotnar Kindred (So many they deserve one), and Other. Will be adding an Ability section once I start exposing tags to Python.
Civics:
Divided into the different Civic types.
Now, the issues with the implementation. Several sections require use of a tag not currently exposed... Need to add them. Until then, those sections are handled by lists... This includes the various Heroes aside from Religious (will probably always include Lesser Heroes, barring addition of effect promo), Worldspells, Civics. Not sure of any others off the top of my head, other than a few necessary ones in Units (GP's, Death Sphere summons). I doubt I'll releace it in this condition, as exposing tags is simple... Just wanted to get the setup how I want it.
Second, due to the spacing and headers the game isn't able to calculate correct sizes for the different pedia screens. Essentially, some items are left off the screen. This is extremely easy to fix, just have to add a large enough number to the list amount. I only mention it for modders. Add too many new units/buildings/whatever, and you may have to adjust the numbers. When I post the screenies, I'll include a code sample telling you where to look. It would likely have to be adjusted if importing it to other mods as well.
Lastly, there is some semi-hardcoding. For example, the spellsphere sections look for any spell with an appropriate prereq... Meaning I have six lines of code for each, checking promoreq1 and 2 for the three tiers. For units, I have to list each unitcombat, as I know of no way ATM to incrementally generate variables to store info in. Once I learn (sure it's possible), I'll fix that.
One last note: Not all sections are done. Haven't had time to do promotions yet, for example.
xienwolf Sep 17, 2009, 04:06 PM Unless this is pretty easy for you to pull off... I'd request that you collaborate with me on a new pedia instead. I have the framework all mapped out, but lack the time to code it. The actual code portion shouldn't be too difficult to accomplish though.
And hang out on #erebus more often so I can share my ideas which you might like to work with me on without having to hijack threads ;) :p
Valkrionn Sep 17, 2009, 04:23 PM Well, what I've done so far is just python and pretty easy, but I'd be more than willing to try and work on it more in depth with you. :lol:
And I would be on #erebus more, if not for one small problem: My modding comp does not have internet. :lol:
xienwolf Sep 17, 2009, 05:25 PM Well, go find us an iPhone app which does IRC next time you are online (I'm too busy trying all the free games and playing with N2 to look for myself... ;))
Valkrionn Sep 21, 2009, 12:55 PM As promised, here are some screenshots. None of Promotions atm, as I'm not sure how I want to divide it... Currently divided into general (requires a unitcombat), Arcane (Requires Channeling, etc... Basically spell spheres and a few others), and misc, everything that doesn't fit elsewhere.
Just so you know, there ARE a few items in these screenshots from the next version... See if you can find them all. :goodjob:
Edit: Forgot to mention, this can be turned off easily as well. Added a define in GlobalDefinesAlt, which is used to control it. :goodjob:
Units:Only the one here. Follows unitcombats, with extra sections for GPs, Summons, and Golems.
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0024.jpg
Heroes:http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0025.jpg
Buildings:One section for each building flavor.
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0026.jpg
Wonders:http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0027.jpg
Resources:http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0028.jpg
Improvements:http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0029.jpg
Spells:Got a total of 4 here... Showing the various sections.
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0030.jpg
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0032.jpg
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0033.jpg
http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0034.jpg
Civics:http://i217.photobucket.com/albums/cc310/Valkrionn/Pedia%20Fix/Civ4ScreenShot0036.jpg
Opera Sep 21, 2009, 12:59 PM Nice Nice Nice Nice Nice Nice Nice Nice Nice Nice!
But you may want to change 'Generic Heroes' to 'Other Heroes'. 'Generic' doesn't feel like it fits.
You're so going to be robbed.
Valkrionn Sep 21, 2009, 01:03 PM Hmm. Other Heroes might work... It's just the catch-all grouping.
Haha you can rob it if you want. Actually, the files that came from are in the team forum, so you could install that over FFPlus and see it firsthand, and check the python... It's all in pediamain, in screens interface.
You won't like it much atm, though... Too many lists, not enough python checks. Hence the upcoming DLL work. :lol:
Edit: Also, if you notice there's a new Barb hero in there. :lol: Already been mentioned, but Zarcaz is definitely in.
Opera Sep 21, 2009, 01:08 PM Hmm. Other Heroes might work... It's just the catch-all grouping.Yep, so "other" striked me as more fitting than "generic". Being heroes, they aren't generic! ;)
Haha you can rob it if you want. Actually, the files that came from are in the team forum, so you could install that over FFPlus and see it firsthand, and check the python... It's all in pediamain, in screens interface.
You won't like it much atm, though... Too many lists, not enough python checks. Hence the upcoming DLL work. :lol:I will wait until you finish it. I don't want the python to hurt my sensitive eyes :(
Edit: Also, if you notice there's a new Barb hero in there. :lol: Already been mentioned, but Zarcaz is definitely in.Nice! But you need a new button for him! This one sucks! I mean, it's the basic archer one! :p
Valkrionn Sep 21, 2009, 01:35 PM Yep, so "other" striked me as more fitting than "generic". Being heroes, they aren't generic! ;)
I will wait until you finish it. I don't want the python to hurt my sensitive eyes :(
Nice! But you need a new button for him! This one sucks! I mean, it's the basic archer one! :p
:lol: The python isn't bad. It's quite easy to understand, there are just a few lists atm. Like most of the hero sections. :lol:
And yes, yes I do. Don't do art myself though, so I'll make do for now... At least you get a trophy for killing him. :p
Valkrionn Sep 21, 2009, 01:51 PM Woops, one thing I forgot that may require modification for Orbis....
The leader file is based on the Broader Alignments value. I don't know if Orbis has that... If not, you'll have to do what Greyfox did and expose the standard alignment values to python in order to sort them.
Valkrionn Sep 21, 2009, 02:41 PM Anyone else have an opinion on the new pedia upgrades? ;)
[to_xp]Gekko Sep 21, 2009, 03:14 PM cool stuff, it's always great to see that some great changes that would otherwise go down the drain get updated and offered to the community :D
Jabie Sep 21, 2009, 03:58 PM Anyone else have an opinion on the new pedia upgrades? ;)
Well you can find my combined text pedia of modmod entries in the Lore forums. You may find some pedia entries in there that you don't currently have :) I'm currently working v0.2 which should include source mod and author as best I can determine them.
Breez Sep 21, 2009, 05:21 PM Can I suggest breaking Animals and Beasts into 2 different groups?
Valkrionn Sep 21, 2009, 09:02 PM Can I suggest breaking Animals and Beasts into 2 different groups?
Already does, the screenshot just doesn't show it. All unitcombats have their own section, even Commanders with their four units. :lol:
One thing I WILL do is break Siege into Siege and Fort Commanders.
adecoy95 Sep 21, 2009, 09:21 PM crusade? i have never seen that civic option before
lost lands?
Valkrionn Sep 22, 2009, 08:00 AM Crusade is the Bannor-only civic. I moved it to Membership a while back. Lost Lands is the Mazatl civic.
Valkrionn Sep 25, 2009, 10:24 AM Thanks to GreyFox for pointing out my error (Forgot to include the define... Freaking XML, rather than DLL. :blush:), this now includes Popup Dividers.
For an idea of what I'm talking about, check the screenie. Let's just say, it's awesome. :p
razzach Sep 26, 2009, 08:40 PM Wow! When is the release of this? :drool:
The_J Sep 26, 2009, 08:56 PM I've seen this thread from above in main C&C, wondered, what that could be, clicked on it....and wow, nice thing :goodjob:.
Can this be ported to normal civ, or are there any FfH2 specific things involved?
Because i guess, that this makes any mod easier to overview for the newbies (...and also for the modder...).
cyther Sep 27, 2009, 07:06 AM For what I saw when I first merged it, it would be easy to merge into normal civ. The pedia would be the hard part but that is because it contains mostly FfH stuff. If anyone was willing to take out the parts from FfH it would be easy.
Valkrionn Sep 27, 2009, 12:06 PM Should be relatively simple... The screenshots I posted are just python work, actually. Since then I've cleaned it up by exposing some tags in the DLL so I can sort better in python, but you don't REALLY need that.
The_J Sep 27, 2009, 03:55 PM Thanks for the answer.
I'll have to take a look at it, when it's released, and to see, what i can do :).
Valkrionn Sep 29, 2009, 08:21 AM Well... This is no longer really needed, after seeing Xienwolf's own work on a new and improved pedia. For those of you who want to look at it, to adapt for other mods, I'll upload the file to the first post of the thread.
Edit: Actually, the production popup will still be useful, and will be used, so it wasn't entirely a waste. :lol: Even if that is the part I spent the least time on... Just merged Grey Fox's work there.
xienwolf Sep 29, 2009, 02:23 PM You could still use the pedia seperation, but you would want to link it to the sort method so that what you seperate by matches with what you sorted by. So when you sort by unitcombat, there are marks denoting where each new unitcombat starts. Sort by cost and there is a mark every 100 or so.
Valkrionn Sep 29, 2009, 02:27 PM I was planning on looking into it, actually... Glad to know it IS possible. :lol:
Hmm... Would I change that in CvPediaMain, like the original, or in each section's file, like CvPediaUnit?
xienwolf Sep 29, 2009, 04:34 PM You could do it from either one. I would probably say add a list of "sort sections" to the SORTS list somewhere and return a special item in the sorted list when you want to add a breakpoint which states the name which should be used. Then when placing the buttons in pedia main you check for a special attribute which marks a breakpoint/seperator instead of an actual item and treats it specially. So the PediaMain would place the breaks, but the specific pedia screen file would actually control where they went and what they said.
Valkrionn Sep 30, 2009, 02:22 PM Small update: Haven't started working on dividers yet, but I HAVE made a few new sort methods.
Leaders -
Filters:
Major Leaders
Minor Leaders
Sorts:
'Sort by Minor Status'
Basically, you can either view JUST Major (Standard) leaders, JUST Minor leaders, or you can view some other criterion and sort by whether the leader is Major/Minor. For example, Female Leaders... When sorted, it will first list Major Female leaders by alphabetical order, than Minor Females by alphabetical order.
Techs -
Filters:
Unique Technologies
Any tech that has a cost of -1, as all civilization specific techs, aside from Steam Power (special case), do.
Units -
Added Civilization Specific sub-filters for the FFPlus civs, to match those of other civs.
Improvements -
Filters:
Culture-Expanding Improvements
Checks for CultureCenterBonus > 0, so does not include those with a range of -1... Which they only received so they'd be named.
Conversion Improvements
Any improvements that convert resources they are built on. This is all mana nodes, most UFs, and a few others.
Resources -
Filters:
Luxuries
Happiness resources.
Health Resources
...
Mana Types
Not really added, but rewritten to a check rather than list.
Spells -
Filters:
Divine Spells
Any promotion with a PromotionPrereq1 of Divine. All divine spells have had their prereqs swapped around, where necessary.
That should be about it... Any important divisions missing from my own pedia work are now represented, as well as the Minor/Major leader filters. Had to expose a new tag for that one. ;)
Swinkscalibur Sep 30, 2009, 02:35 PM Are you still planning on creating a further leader designation of "Emerging"? And if so will the pedia filter be affected by that change as well?
Valkrionn Sep 30, 2009, 02:39 PM Already in, actually, although most of the Minor Leaders need additional traits. Will be a prolonged project, but at the least they will all have two.
As far as the pedia is concerned, Emergent and Minor are both Minor. They're just different sides of the same coin.
(Minor no longer exists as a trait, by the way. Was going to leave it as an identifier for the game, until I merged in the bMinorLeader tag from Orbis. Using that instead.)
Valkrionn Sep 30, 2009, 07:32 PM Are you still planning on creating a further leader designation of "Emerging"? And if so will the pedia filter be affected by that change as well?
I take it back. I've made the Minor tag an int, rather than bool, so I can now assign different values to leaders... A value of 0 is Major, 1 is Emergent, and 2 is Minor. Will sort correctly, and I can completely drop the Minor/Emergent traits... Emergent trait gain will be done via python check of the tag. :goodjob:
xienwolf Oct 01, 2009, 12:54 AM You should make a BasicInfos file which states the different leader types and you can then access it as MINOR_LEADER, EMERGENT_LEADER, and FULL_LEADER. This is more modder friendly than trying to remember which is 1 and which is 2. And adding a BasicInfo file isn't too hard, they practically handle themselves.
Valkrionn Oct 01, 2009, 07:45 AM :lol: I'll attempt to do that.... Think you could give me a tip on where to start?
Although, I was already thinking that I could change it to Major = 0, Minor = 1, Emergent = > 1, so I can have an array of leadertypes for emergent leaders.... Letting me set which traits they can gain, and how.
Opera Oct 01, 2009, 07:55 AM I think you would have a modify CvXMLInterfaceLoad/Init/Set.cpp (not sure about the exact name) to set a new basic infos file. I suggest you check how the AlignmentInfos or DamageTypeInfos files are handled in those cpp files :)
Valkrionn Oct 01, 2009, 08:11 AM Well, only XMLLoadUtility had anything useful, but it led me to CvGlobals... And now I again don't know where else to look. :p
xienwolf Oct 01, 2009, 01:45 PM Basically what Opera said. Search for DamageTypeInfos and do what Kael did is about the quickest way to do it. Then you can ask more pointed questions when that fails somewhere along the lines.
Valkrionn Oct 01, 2009, 04:24 PM It's coming along... May have some questions soon, but I'm cloning AlignmentInfos, minus the files that grant it an effect. :lol:
Have had a few road bumps so far, but the compile errors have (So far!) told me what I need to know.
Valkrionn Oct 02, 2009, 08:53 AM Got the BasicInfos file working. ;)
Had a pretty big sticking point for a while... Wasn't getting a line with the error, or anything that would help me find the issue. Found it in the end, missed a file. All I've got left is to have it actually displayed in game... Left that for the end, after I got the rest working. :goodjob:
The tag I used is 'LeaderStatus', and is located below 'Alignment' and above 'AlignmentModifier'.
Valkrionn Oct 02, 2009, 10:35 AM Thanks to some last minute help from Opera (Thought I had a DLL error... Was actually a freaking txt_key. :blush:), it is all working correctly now. :goodjob:
Leader Status will be displayed for all leaders. ;)
Here's a screenshot... The Emergent trait will be gone shortly.
Valkrionn Oct 02, 2009, 11:13 AM And yet another screenie... LeaderStatus is displayed in game, in the score board. This allows you to check not just your own status, but that of your enemies. ;)
Minors will become Major after settling their fourth city.
Emergent will become Major after gaining a trait.
The colors used to display the text are debatable... I like the Green and Blue for Emergent/Minor respectively though.
I'm also leaning towards not displaying Major Status, atm. It doesn't really affect the game in any way yet. In the future, Major leaders will get an attitude penalty towards Minor/Emergent leaders, and vice versa.
UNIT 666 Oct 02, 2009, 12:00 PM For the Minor text colour, could you make it a brighter shade of blue, or a different (brighter) colour? That shade of blue is sorta hard to see. I fiddled with my display settings, but I can't get it to look much more visible. Maybe it's my eyes. D:
Valkrionn Oct 02, 2009, 12:01 PM Yeah, the blue isn't easily visible. I'm fiddling with them right now. :goodjob:
Valkrionn Oct 02, 2009, 12:23 PM Settled on Green for Emergent, White for Minor, and Grey for Major.
UNIT 666 Oct 02, 2009, 01:23 PM Sounds good! :eekdance:
|
|