Current and Future Developments

I added a bunch of tickets: https://sourceforge.net/p/colonizationmodcollection/tickets/

My idea is to keep all tasks on SF because that will make it easier to remember. It also has the ability to assign tasks to people and to set a version it is supposed to be done in.

Feel free to add more tasks. I briefly looked over the forum for tasks, but I likely overlooked some. I intentionally skipped the first post in this thread. I figure Kailric will remember that list and handle all of it himself unless I hear otherwise.
 
Yeah, I'll do that. I am currently working on adding a Delayed Response Diplomatic Option, like Nightinggale suggested. It was such a cool and unique idea that I had to start in it:) With this option you'll be able to tell your Diplomatic guests that you need time to think about their request. Which will create a "Diplomats waiting Icon" which you click to bring up Reponses that are on hold. All requests must be answered before you can go to next turn.

Looks like I probably want reach my next "alpha" release deadline of the 25th this month. On top of all the cool additions coming I'll be leaving for vacation next Sat for 10 days!
 
Looks like I probably want reach my next "alpha" release deadline of the 25th this month.
We need to work on improving communication. If you plan to release anything, even alpha, then please tell me. Also I'm a bit surprised because I don't see develop as a milestone in any way. Also your change to advance start makes my game assert on newgame. I figure that should be looked at before even releasing an alpha.
 
We need to work on improving communication. If you plan to release anything, even alpha, then please tell me. Also I'm a bit surprised because I don't see develop as a milestone in any way. Also your change to advance start makes my game assert on newgame. I figure that should be looked at before even releasing an alpha.

I told everyone here http://forums.civfanatics.com/showpost.php?p=13251207&postcount=11, which you responded too :D

By alpha release I am just saying that it is in a state for testing, and I want to get it out to the testers.

You don't see a develop milestone? I've added a whole new Victory Condition. The Pope is now on the Map, Natives are now Minor Civs, each Trade Screen has it's own price list, new Diplomacy Options, new tweaks, new, new, new = Milestone :p

I have no asserts on New Game, what assert is it? Howbeit, I noticed that a player failed to find a starting location once, this is known.
 
I updated the GameFont branch. It should solve some issues and it adds proper icons to buildings (the domestic advisor used random icons). I also cleaned up GameFont.tga. There is now one row for each type of icons and the order match the order in XML. I attached the file to give an impression of what it is like to mod. It's converted to png and without an alpha channel to make it more browser friendly.

The first 3 rows are not in use. They have to be there to handle hardcoded offsets in the exe.
 

Attachments

  • GameFont.png
    GameFont.png
    175.2 KB · Views: 140
did you use the WHM font file for that or did you extend one yourself?
I extended it myself as it makes future additions easier. There are 75 blocks in each row.

Sadly I have run into a weird offset error. It would appear that the icon ID used in the city screen and domestic advisor is not the same as the one used to place icons on city names on main map. Kailric said something about an offset error, but it seems like it have gone completely crazy now and it way more than just one off :confused:
 
Although those are the 3 rows you have just filled up, so there is gonna be a lot of work getting WHM compatible :D
Not if they can be ignored. The idea was that the 4th row is the first row, which will actually be displayed ingame.

I think I have identified the problem, well sort of. There are two problems.
1: there is an offset error (which isn't even constant)
2: billboards can't display anything with a higher ID than row 5 slot 27 (heavy armor)

1 can easily be dealt with. We can just make a new function called getCharBillboard(), which will compensate for the offset error.

2 is a problem. Some yields and all missions are unreachable with the current layout and it looks like the only solution is to reorder.... again.

The only thing I can think of is to use the first 3 rows anyway, which will be a bit messy. It is important that all slots in those lines are in use or the symbol row (4) will go out of sync with the hardcoded values in the exe.

If we want to keep the ordered file, at least somewhat, then we need to decide that some icons can't be used on the billboards. The question is, what should be reachable?
  • yields
  • missions
  • symbols
Anything else?

We might also have an issue with Russian city names, but I will ignore that for now. We need a well working solution for English before we can be concerned with something like that.
 
Well, Yields are prolly the least important as they don't really reveal a while lot of info. You could have 100 Weapons or 1. I'd say Missions and the Trading post Icon are the most important to keep. Perhaps we get those working and then hold off on development on anymore Icons until we have a more finished version and then we can mod the game fonts to fit.
 
Well, Yields are prolly the least important as they don't really reveal a while lot of info. You could have 100 Weapons or 1.
I think it is a great feature, but it needs work. Like we could set font size depending to number of yields stored like:
  1. 1-19
  2. 20-49
  3. 50-99
  4. 100+
We should then see the icon increase in size as the storage grow.

I'd say Missions and the Trading post Icon are the most important to keep. Perhaps we get those working and then hold off on development on anymore Icons until we have a more finished version and then we can mod the game fonts to fit.
We It would appear that we have 225 unused slots reachable by billboards in addition to the 27 yield icons available. Also all the symbols are available. It's not like we are low on slots for this.

We currently have 110 icons + one mission for each civ, which is well below the 277 limit and we even have duplicates within that range. If we add individual IDs to XML, then we could remove duplicates as well, bringing the number down even further. We have 64 Russian characters on top of that. Vanilla characters don't count towards this limit as they are placed elsewhere in memory.

The problem is that I would like the one row, one purpose design and have vacant slots in each row as that makes adding more yields, civs etc easier. I would also have liked to have everything with hardcoded indexes before our own to prevent issues with indexes moving away from what the exe assumes.
 
If building a Mission can add a corresponding Building in the settlement, then maybe you can entirely do away with Mission icons (these can get quickly unmanageable anyway once more than a few civs are added to any mod, I don't think anyone really knows who all the different potential colored crosses pertain to):crazyeye:
 
If building a Mission can add a corresponding Building in the settlement, then maybe you can entirely do away with Mission icons (these can get quickly unmanageable anyway once more than a few civs are added to any mod, I don't think anyone really knows who all the different potential colored crosses pertain to):crazyeye:
The idea with the mission char is that it is the icon for the owner, which is displayed. If you look closely, you will see that the 4 crosses are vanilla player colours.

This leads to another problem. Somebody should start to paint crosses in player colours for M:C. Also only Christian civs should have crosses. Muslim should moon and so on. If a civilization can't make missions, then the icon will not be used. I just decided to add for all players as I didn't code a "can make mission" code. From a clean generic DLL perspective, the easiest solution is to add to all civs, even if they will not be triggered ingame. No future mods will fail on that approach.

I might rethink giving a mission icon to all civs now that we have limited billboard chars. You have to remember that I looked at domestic advisor, city screen and pedia while making this and those places have virtually unlimited icons. I haven't found an upper limit which mean the limit could be address space. In that case the limit is around 24k or 56k. With limits like that it's perfectly fine to waste 50 slots if it makes the code cleaner and GameFont easier to edit.
 
I figured out the cause of the billboard offset bug.

My debug code made a billboard where it loops row 5 (the first we can edit). When I ask for slot 5, it prints slot 5+6. When I ask for slot 6, it prints 7 and so on. It would appear that there are two such places as row 8 has an offset of 2. The python pages (like pedia and domestic advisor) appears to be unaffected by this.

The only solution I can think of is to mark the broken slots with a big redX. The DLL will then skip those slots when setting up which char belongs to which yield/mission etc.

Like YIELD_SHEEP is in slot 4. The next yield is YIELD_WOOL, which is currently in slot 5. The DLL will skip slot 5 and 6 and assume YIELD_WOOL to be in 7. This is a one time event as the char is a cache, which is set up in info classes at startup.

The billboard code will then have to be changed in the way that each char ID is run through a function, which takes int as an argument and returns an int. This function will then modify the input to compensate for the offset error. I have already written this function. It just needs to learn which values it should trigger on.

For the record: I looked at GameFont.tga. It looks just fine and it works with the non-billboard display. It would appear to be yet another billboard bug in the exe.
 
I'll do the mission icons once you say go. I don't know if you addressed if but the vanilla icon for Rebel Sentiment is the square American flag looking icon. I replaced it with the Crown symbol for Fealty for M:C. I noticed the flag was back in one of your updates but pulling the last a Gamefont branch I didn't notice it. Since we have Russian now I am inspire to add a Russian Playable Civ. I watched a documentary today about the Chernobyl accident and hearing the towns people talk about the sadness of leaving their town it inspired me more.
 
I solved the billboard issues. I identified both places, which caused an offset issue. I was able to fix the latter with copy paste of working slots, but the first one is really broken. I replaced it with known good slots and inspected it closely and it looks like the file is fine. I marked this slot with a red X and we should just avoid using it. The next slot is unreachable on billboards and I used it to write "YIELD" because I placed the yields on this row.

I added billboard versions of getChar() called getCharBillboard() and using those the billboard no longer suffers from offset issues.

I extended the symbol row to match the number of slots the billboards can handle. The icons on the first 4 rows can now all be used, but nothing below those 4 rows.

I'll do the mission icons once you say go.
That could take a while. I want to finish the GameFont changes now that I work on them. I still have plenty of stuff I want to implement, like unit icons. Also I noticed that it is a major task to shift a row one place to the right. I want to make it possible to add new icons to a row and place them elsewhere and then the class, which uses that icon will know from XML where the char is. This mean we don't need major reconstruction each time we add a single icon.

The "hardcoded ID" feature also allows having multiple classes using the same icon. For instance YIELD_ALE and the building producing it use the same icon, but they look in two different places. This mean we have the same icon twice. However it isn't like we are short on slots.

I don't know if you addressed if but the vanilla icon for Rebel Sentiment is the square American flag looking icon. I replaced it with the Crown symbol for Fealty for M:C. I noticed the flag was back in one of your updates but pulling the last a Gamefont branch I didn't notice it.
I didn't change the crown/flag. However the billboards ended up with an offset of 2. This mean when trying to display the crown, it would display the icon two slots to the right, which happens to be the flag. Getting the offset issue under control should have fixed this.

I noticed that there was quite a lot of code in CvGameTextMgr::buildCityBillboardIconString() to compensate for offset issues. One dominant solution was to use wrong enum values for symbols. I *think* I managed to restore all the icons to what they were intended to be.
 
I noticed that Russian failed to appear in city billboards (the name sign on the map). It turned out that like the icons, the text needs to be within the first 4 rows.

I deleted the first row and moved Russian up there and now Russian city names are displayed correctly. The offset bug was in the first row and now that I deleted the entire row, the bug was deleted too. I still have no idea what caused it, but it's gone and will hopefully not come back.

The first 4 rows are now
  1. Russian characters
  2. Yields
  3. Missions
  4. Symbols
They are unlabeled as I don't want to waste slots to add labels. After all there is a limited amount of slots within the range accepted by the billboard.

I tried to make the ID configurable in XML. However that caused a new offset bug, one, which turned out to be much worse :crazyeye:
I have given up on that idea. It's not like it is a critical feature. It's way more important to keep the offset bug away.
 
Nice work Night:goodjob: You've mentioned so many things with the Gamefonts of late if you could restate exactly what you changed and what it means for us modders that would be great. Like where and how should new icons be added and what not to do. I can post it on the BlackBoard and Wiki.

I checked out the Gamefonts branch, besides that one little hiccup I posted I did notice that the Fonts I had added for things like Trading Posts and Vassals was missing but I can add those back, when I add Religion colors and Icons for all the Civs.
 
Nice work Night:goodjob: You've mentioned so many things with the Gamefonts of late if you could restate exactly what you changed and what it means for us modders that would be great. Like where and how should new icons be added and what not to do. I can post it on the BlackBoard and Wiki.
It's work in progress and it has changed a few times due to unexpected problems (like billboards).

The current state (which is likely more or less the end result) is as follows.

First of all use GameFontEditor to view and mod GameFont. It can't add/remove slots (yet?), but it appears to be the best tool to change content of slots. I added a bunch of vacant slots to help GameFontEditor as much as possible.

GameFont consists of a number of rows. They are as follows:
  1. Russian
  2. Yields
  3. Missions
  4. Symbols
Those 4 lines are the only ones reachable when writing on billboards. They have 276 slots in total.

The rest of the rows have virtually unlimited slots and I have added labels inside slots to tell intended purpose of each row.

Sometimes when you edit, the IDs gets out of sync. The starting ID is placed in XML\GameInfo\CIV4GameFontInfos.xml. Here you can set the ID of the first icon of each type. Symbols are omitted as that number is hardcoded in the exe. Maybe Yields and Russian should be removed too. Their forced fixed location turned out to be needed after I wrote that file.

To get the debug output for icons (and hence IDs), edit CvDomesticAdvisor.py
Line 155 says
Code:
#self.DEBUG_GAMEFONT_STATE    = self.addButton(...
Uncomment this line and the far right button in the domestic advisor will display content of GameFont (both of them) and the IDs of each. You look here and write the ID of the first icon into the XML. Restart the game and the icons should work again.

I checked out the Gamefonts branch, besides that one little hiccup I posted I did notice that the Fonts I had added for things like Trading Posts and Vassals was missing but I can add those back, when I add Religion colors and Icons for all the Civs.
The GameFont branch is forked from the Russian branch, which is forked from release-2.5. Any changes made after 2.5 was released will not be in it. Also it is possible that I screwed up. My goal is to make a working engine to handle GameFont easily, not as much to make the perfect GameFont file. Once all the programming is done, we can add missing icons to GameFont without issues or replace them if we feel like it.
 
Back
Top Bottom