1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

New Civics Screen

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Aug 1, 2013.

  1. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yep, In M:C however, I have added the ability to join teams with one Vassal player. They will be set to be on your team with all the benefits as you described. I am planning on improvements to the Vassal player.

    Yeah, I like the idea of the Barbarians slowly advancing on their own as well. Right now its still like vanilla in that they only advance as you give them weapons and armor in trade. Maybe they have a few techs they can research, and then you can sell them techs.. or your enemies can sell them techs to increase their power.:eek: They could start demanding Techs as well.

    Making it so that some techs can't be researched the normal way is something I thought of too. We could have a few random techs that have secret means of acquiring, such as Greek Fire, or the famed Ulfberht swords. Such items could be built in your cities to become "Promotional Units" that simply have a special ability in that they can be consumed by your other Units to gain special promotions. There could even be a limit to the number you can produce. "Your blacksmith's have stumbled upon a unique mixture of iron alloy and can produce exceptional weapons for a time"

    Well, they could be required to instantly return to the nearest city. That maybe the way I done it when professions are disallowed, I can't remember.
     
  2. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
    I like these new ideas, revealing bonuses, advancing barbs (also the ability to help boost your vassal towns), the unique techs, it all sounds great!

    Unique techs would be great for WH as you could then have 'continent techs' that allow you to unlock the unique continent yields, and you would have to acquire them from the specific area natives.

    On the civics professions and such, archids slavery mod for Civ is very good, basically if a unit or building requires a civic to be buildable and you change off of that civic all of those active buildings and units are 'frozen' till you reactivate the needed civic.
    So the buildings no longer give benefits and the units can't move and will only defend themselves when attacked.
    They become active again if you reactivate the civic.

    Slavery Mod

    It even gives you a message alert saying the buildings have shut down and the units have gone on strike.

    It is a very simple gameplay idea, but it is very effective I think.
     
  3. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I merged JIT save rewrite branch into the civic screen branch. The work isn't completely done yet, but I think it would be best to write in one branch for now as next on the list is civic related data in savegames.

    This mean every push is likely to break old savegames from now on. If you play and want to keep your game, then don't pull.

    I did encounter one issue. When starting the game, it says it can't find CIV4GlobalCivicEffectInfos.xml. Did somebody forget to add it to git? :)
     
  4. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Hmm, yeah, that would be me :)

    I attached it here so you can add it with your next push if I haven't done so.

    I haven't actually put this new xml to work yet, but was testing if I could create a new xml, it seems to work so far.
     
  5. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I have now modified the functions for processing civics and traits into being two functions each. One with saved data and once with data, which isn't saved. The non-saved data is then recalculated on load. The outcome from this is that the data I had a hard time converting on load is no longer included in the savegames. Instead the game will recalculate and the whole conversion to new indexes issue is avoided.

    As a result the DLL should now be able to handle heavy modifications in XML and still load savegames. While I would like to recalculate more based on XML on load rather than saving the data (to update to XML file values), my original goal of making the savegame being loadable seems to have been reached. Now it takes some destructive XML modding to ruin a savegame, like deleting a unit, which is used in the game. Even then the game is likely to load, but I have no idea how it will actually handle that case. It is best to avoid actually deleting indexes in the XML files if you want to keep savegames.

    Testing this will be interesting. This is one of those things, which can't really be tested well before it is completely done meaning we still don't know for sure if it works as well as intended, but I really think it will.
     
  6. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    First we should sort the functions in process civic/trait to remove as much as possible from savegames to gain full benefit from the new design and we should try to modify XML to test if it actually works as intended.

    Maybe we should "un-save" the effects of other processXXX functions as well for completeness (I think of profession as a worthy candidate).

    We can likely merge back into master once we are done with that.
     
  8. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    Ok, I un-saved as much data as possible from traits and civics. I will do a bit of testing and proofreading and then it would be fine by me to merge back into master.

    I noticed that m_iDiplomacyAttitude was neither saved or reset. This mean when loading a game, you would keep the setting from your old game. As a result you can save, gain a civic, which gives a bonus, load and gain the civic again for additional bonus. This can be repeated endlessly (if you have extreme patience :sleep::lol:)
    Naturally I fixed that issue.

    EDIT: I just moved cities and units to be saved after player (owner) rather than inside it. This way when loading a city or unit, we know that all data for the owner has finished loading and all cache has been calculated.
    I don't use this for anything right now and I have no specific plans for it, but since it will break savegames to make the move, I figured I might as well move it now. That way we might not have to break savegames if somebody decides to calculate something on load.
     
  9. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I finally managed to merge with Kailric's last commit (gave me weird merging errors :confused:) and I pushed 9 revisions.

    Remaining issues before I'm ready to merge with master:
    1: there is a crash when going from a game to main menu. I know I introduced it with JIT, but not specifically which revision or precisely where in the code it goes wrong. I need to do some research on this issue.
    2: map indexes are stored as ints everywhere because INVALID_COORDINATE is MIN_INT. Changing it to MIN_SHORT should be fine. It will reduce the number of lines and rows on the map from 4.3 billion to 32536. I think we will encounter countless other issues before we max out either of those limits.
     
  10. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I have an update on the main menu crash. It appears only to happen on 32 bit systems, hence the reason why I didn't detect it earlier. I'm going to have fun pinpointing that one :crazyeye:
     
  11. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    That's good! I had a few more changes that I pushed to Civics branch and Pushed the merge. Let me know before you are ready to merge Civics Branch to Master and I will push my latest changes.
     
  12. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    Go ahead and push now.

    I figured out that it only crashes when VC++ is running. Looks like a low system memory issue and has nothing to do with our code.

    Also the issue regarding INVALID_PLOT_COORD being 32 bit when 16 is enough is also unfixable. It is set in CvDefines.h, which mean this value is compiled into the exe. We can't change it.

    So far this has been a totally unproductive day as all I did was pushing code I didn't even write today.
     
  13. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I've pushed all the changes I have so Civic branch is up to date. You planning to merge soon?
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    I merged civic screen branch into master. I fixed two bugs in the process and the game once again appear to work just fine. For some reason failed to figure out that MEDIEVAL_TECH_FEUDALISM and MEDIEVAL_TECH_FUEDALISM is actually the same :lol:

    Now I will look into moving the git server.
     
  15. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yep, I saw that I had misspelled it and just couldn't live with it like that any longer so I corrected it. IDE needs built in spell correctors :) or is there an plugin for that:confused:

    I switched to master branch and downloaded. For some reason I sometimes get CTD at checking xml when changing mod versions or if major changes were made, anyway, I tried again and the mod loaded. I let the AI play a bit, there were a couple of Failed asserts that I'll look into but no CTD, so good work:goodjob: Back to modding ;):scan:

    Remember if you update to Master branch you will need the extra graphic files here: http://forums.civfanatics.com/showthread.php?t=524455
     
  16. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    I am planning one more Civics update before our next release. Currently M:C has no Civic Upkeep cost per turn but if we or someone was to mod something in there is no consequence currently for not keeping up with the upkeep:)

    So, I plan to add consequences in that each turn you fail to keep up with Civic Upkeep there is an increased chance per turn that that CivicOption will revert back to its basic Civic and you will be forced to enter Anarchy.

    I'm thinking a 10% chance accumulated each turn, so that at 10 turns it will be 100%. I will store this info in the Handicap.xmls so that it can be modded per difficulty. A 0 would mean it would never go into Anarchy.
     
  17. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,675
    Location:
    UK
  18. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    One issue with Default Growth Units and Civics: I changed to Serfdom civic so that my Cities would produce Serfs and to gain the benefit of Serfs costing one less food. Serfs also gain a +1 bonus to field work, meaning they gain +1 yield to what ever they do as long as its outside work. They do have a penalty of -1 to building labor. Anyway, This means Serfs are more beneficial in some instances compared to Free Peasants.

    However, the code chooses the default growth unit based on the order they are in the XML and since my serf Unit was first in order it was not selected as the new Growth Unit as I intended. Should this be so instead of overwriting the previous default unit? I understand the predicament of more than one new Growth Unit being offered by Civics/Techs at a time and having to choose one, so maybe Default Units can be set up in an Array and when you have city growth with more than one default unit you are given a choice like when your Units graduate from a school.

    Anyway, for the time being and so I can get Serfs I have moved UNIT_COLONIST to the first position.
     
  19. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    4,116
    It works as intended and as I announced before writing the code. Back when it was written, we only used civics for inventions and then the idea was to have like outlaw, serf, peasant in that order. Which one you got depends on your tech level. This will also work with civics, but you introduced a new concept, where it isn't clear which unit is the best, hence making it more complicated.

    I'm not really sure if I want to change the current system at all. The code is fairly simple and picking growth units by something other than ID would be way more complicated.

    If we should start to make a new system, it shouldn't be a fix. Instead it should be replaced with a whole new system, which can then provide additional features, like default growth unit for each city type or something. If we do that, then we should figure out how to set it up in XML before touching anything. The system shouldn't die in too complex XML setup.
     
  20. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Right, I know it's working as intended. It's just not readily known for any would be modders that growth unit is based on XML order. Anyway, I changed the default unit to Unit_Colonist as I couldn't figure out how to implement the Serfdom civic, which introduces "serfdom" to your kingdom, if the default units were already serfs. And I didn't want the Player to have to start with Serfdom to justify having serfs as default growth units so I made serfs beneficial instead of handicap as before. Not all Civs used the serf labor system nor started out using it so I felt it was more realistic as well.
     

Share This Page