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

Age of Mythology

Discussion in 'Crazy Spatz's Alpha Centauri Mod' started by Spatzimaus, Sep 19, 2011.

  1. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    Also, ive noticed you havent added images for the second half of the gods yet. Are there any gods you dont have pictures for yet? If so which ones and I'll continue my search for aproprite pictures.

    Also I could look for images to represent heroes/myth units othere than the swordsman default image (even though the units will still use the swordsman placeholder for some time)
     
  2. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    The Sumerians. I've got the Shinto pretty much covered and the Aztecs are long since done. I've only got about half of the Sumerians, though.
    You see, those three pantheons will share an icon file when it's ready, but until I have enough pictures it's not worth the headaches of half-implementing the atlas.

    What I'm going to do in the near future is shift the placeholders a bit, so that they're not all just Swordsmen; I did the same thing back in the AC mod, using similar units as placeholders (like using the Artillery model for the Plasma Artillery). It's more stable that way, since using models with the same types of animations causes fewer crash problems, and it's a bit easier for players in general. You'll notice that the Major Heroes all have unique 1-unit models already, for this sort of thing, but I'll do this for all of the units in the next release.
     
  3. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322

    Which Sumarian gods are you missing? Also if you could give me some alternate names for the gods (Akkadian, Hittie, etc. versions of them) It would make my search much easier.
     
  4. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    AZTEC is done.

    SUMERIAN: I'm missing Anu (same name in Akkadian), Enlil (same name in Akkadian, although sometimes it was Ellil), Ki (a.k.a. Antu, and I might replace her with Kishar), Nanna (Sin), Ningal (same name), and Ninlil (Sud, Mullitu). Additionally, I'd like to replace the images I have for Ninurta (Ningirsu, Ninib, Ninip), Ereshkigal (Irkalla) and Ninhursag (Ninkharsag, Ninmah, Nintu, Mamma, Mami, Aruru, Belet-lli) if it's possible to find ones done in a more consistent style.

    SHINTO: I'm missing Omoikane, Kotoamatsukami, and Tsukuyomi.
     
  5. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    Heres a few pictures I could scrounge up, I seem to be having much more luck finding them now
     

    Attached Files:

  6. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    heres some more sumarians
     

    Attached Files:

  7. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    Best I could do for the missing shinto
     

    Attached Files:

  8. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    I'm still not understanding this. Is it legacy code that is forcing you to do it this way? My mod saves a lot of stuff. But I've never seen a need to access DB in the middle of a turn. And I can't imagine any reason to do so. Any value I need is held in a Lua table and that is where all reads/alterations occur. Altering DB, especially, is extraordinarily slow when done piecemeal (due to the transaction cost). Reading DB values is much faster, but is still very slow compared to accessing an internal Lua value.

    The goal of my TableSaverLoader system is to allow the modder to just simply forget about DB. Set it up and then your Lua tables become "immortal", i.e., they don't die with game exit/reload (or more accurately, they are resurrected whole on game load). Then all game logic is via Lua tables and the DB is completely ignored (I don't reference it once in my 3000 lines of Lua code, other than TableSaverLoader itself). Even game "init values" can be held in Lua this way, meaning that even turn 0 saving/loading is not a problem.

    Of course, I understand the difficulty of rewriting code to take advantage of a new system. Something that is written and working is not likely to be rewritten.
     
  9. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    I can, because I DO have quite a few mechanisms requiring DB access in the middle of a turn. Three simple scenarios.

    Scenario 1: You, the active player, take your turn. During that turn, you have a battle, which generates Favor (PlayerFavor and CityFavor, for BOTH players involved). You then save your game at the end of your turn, because really, who wants to redo an entire turn's actions if the game crashes or something during the AI's movement?

    With the table save only happening at the start of each turn, that Favor you generated in battle would be lost, even though the game would still record the combat as occurring. I'd need to do the full table save after each combat to ensure this didn't happen, including any combats during the AIs' turns.

    Scenario 2: During your turn, you notice that you have enough Favor to add a new minor god. So, you do so, selecting a new minor deity for your pantheon. (This modifies the Minors and NumMinors tables, and then modifies the Levels and CityFavor tables when the free Shrine is added to one city.)

    Again, if the game was only saving at the start of each turn, then this choice would be lost. Granted, adding an extra save command on this sort of event wouldn't be hard, but then you get into the secondary effects; maybe that free Shrine unlocked a new Myth unit, and you set the city to build that unit. If the game can't remember you had that shrine, what happens to the under-construction unit when you reload your game?

    Or what happens if, now that you've unlocked a focus, you then rush-buy the corresponding Myth unit in that city, but then reload and pick a different minor god? Obviously, this sort of abuse is pointless since you can always just use FireTuner to give whatever units you want, but it CAN happen accidentally, and it's possible that an event during that turn could have altered your alignment enough to make your previous choice unavailable.

    Scenario 3: An Event happens. Besides the obvious instantaneous effects on units, yields, etc. (including a couple events that add Favor, requiring updates for the PlayerFavor and CityFavor tables at the very least), you have an alignment shift, which'd require updating the LawChaos and MatEphem tables.

    -----------
    The fact is, if table storage requires an explicit save command, then I either need to use that command every time I alter the contents of the table (which is often, in the case of the seven tables mentioned above), OR force the players to only save his game at the exact time I'm using the save function (i.e., at the start of their turns), and even that wouldn't work for the Events (since they happen after any start-of-turn serial events, but before you'd have a chance to save your game). If the game had an explicit OnSave Lua event trigger, then it'd obviously be trivial to deal with this, and your table saver would work perfectly since the data would always be saved to the savefile at the same time as the rest of the data.

    But without that, I'm running into these situations where it's just not quite filling the role I need, while the older SaveUtils functions would. The issue is just that your Favor, unlike normal Civ5 yields, can be generated during your turn AND during your opponents' turns due to the battle favor mechanism. Normal yields don't increment until the end of your turn, and never increase during an opponent's turn, so it's normally not an issue of when you decide to save.

    And no, there's no "legacy code" problem here. The entire logic is compartmentalized through a series of utility save/load functions (in MythUtils.lua) for exactly this reason; changing between two different save mechanisms is trivial because of how I designed the process. The only issue is whether these mechanisms fill all of roles I need; yours comes close, but the SaveUtils come closer.
     
  10. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    Edit (I changed post entirely after rereading yours):
    I missed this part of your post. Perhaps this is where we are talking across each other.

    We do. Or as good as this, anyway. The little script at the bottom of my TableSaverLoader OP (called "ExampleMain") shows how to do this. It intercepts all 4 gamesave situations: cntl-S, Save from menu, F11 quicksave, and endturn (for autosave; I'd like to make this even better by detecting autosave frequency and only running on applicable turns, but that is a refinement for later). This code was borrowed and modified from Gedemon.
     
  11. Sneaks

    Sneaks Brooklyn Bum

    Joined:
    Oct 15, 2010
    Messages:
    1,877
    Location:
    NYC
    Spatz, think youll be integrating this with the new religion system announced? I know its 3 months out, but figured I would ask.
     
  12. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    I honestly don't know. Their new espionage system might make most of my Empires design obsolete, and their new religion system just looks an awful lot like mine; using a new yield to add a series of custom bonuses is obviously not the most complex idea, of course, and they don't seem to have anything analogous to the city favor and upgrading buildings. Their religion system really just seems to be empire-wide benefits tied to whether a city follows a given religion, basically like Civ4, whereas mine is almost purely city-based. The question is really going to be, are there enough differences to make it worthwhile for both systems to coexist, or is mine going to be completely overshadowed?

    One thing I could do is simply replace my Favor resourcewith their Faith system, and alter the math involved. It'd definitely make the bookkeeping a lot simpler, since I wouldn't have to worry about whether the functions were accessing the values correctly.
    Another possibility would be to have my mod exist as normal, and basically have the Enlightenment be the transition from my system to theirs. Not sure how that'd work, because we still don't have a handle on their mechanics, but it's a possibility at least.
     
  13. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    Okay, when I'd looked at this the first time it looked like your functions could only "push" data and not pull it. That is, you could put your data structure into the savefile at the right times, but it looked like I wouldn't be able to make sure an up-to-date version of MY structure was copied into yours before those save commands were executed. That's what I was getting hung up on, with the discussion of mid-turn changes; I had no problem executing TableSave at the start or end of a turn, but it would have been prohibitive to do that for every mid-turn update just in case a save was coming.

    But with just a little hacking, I've got it working now. I'll still work on optimizing the speed of it at some other point (since right now it seems to be spending some effort to verify some values that can't change during a game), and there are still two warning messages that I need to resolve, but this mod now lets you save/load without any loss of mythological data.

    I've just posted the latest version in the Files thread. I'd have posted this last night but I needed to resolve a conflict with the Mandala popup command. Now, what's been uploaded does NOT have a lot of the balance bits or Event overhaul I've been working on; it's all bug fixes, new icons, and this save/load bit. This is a three-day weekend, and I'll put in a lot of new things during that time, but it's now fully playable.
     
  14. Pazyryk

    Pazyryk Deity

    Joined:
    Jun 13, 2008
    Messages:
    3,584
    If you do all of your game logic on Lua tables (never accessing DB directly) then you only need to transfer those values to DB at the instant of game-save, and only need to retrieve them once on game-load.

    I really ought to re-document TableSaverLoader to cover how to use it rather than just techically what it does. I can tell looking inside advanced mods like yours and Gedemon's that some effort is put into individual save/load functions. I actually started my mod this way. Then I said to myself, what if Lua table values were "immortal" and didn't die on game exit? Then I could keep and manipulate all mod info in Lua tables and to hell with the DB. So I spent a month back in September coding TableSaverLoader to make this happen.

    So now 3000 lines of code with ~500 things changing at any time, and not a single reference to DB outside of TableSaverLoader itself. I have spent exactly 0 minutes troubleshooting or thinking about game exit/load issues since I finished TableSaverLoader and "attached" it to my mod.
     
  15. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    That's pretty much the realization I reached, myself. Except in my case, because I'm passing data back and forth between four linked mods, it got a little bit confused, hence my continued use of access functions to ensure there was always a default value to fall back on. But internally, nearly everything that matters is being stored in the MapModData structure, which is fully accessible by all loaded mods without any inclusion or load order issues; this allowed me to have UI elements in the Base mod (CityView, TopPanel) that displayed values from the Mythology mod, and vice versa. The ONLY thing it lacked was an easy way to store that structure in the savefile.

    Since it looks like your component will do that just fine, I don't have many more issues on that side of the design and I can strip out at least one layer of redundancy; right now everything has at least 2 layers (MapModData and the SaveUtils), most things have three (global variables), and a few things have four ("physical" indicators), so I can drop a bit of that to make things run a bit faster.
    I've still got a couple kinks to work out with your code, though; for instance, it seems to think one variable is of type "userdata" for no apparent reason, but these errors don't seem to be preventing it from saving or retrieving the things I need. Also, I'll probably end up splitting the current structure into a few smaller ones based on how often the variables are altered (once per game, once per turn, or whenever needed), to see if I can reduce the time overhead; no need to check to see if a certain variable has been changed if I KNOW it can't possibly be altered (like your choice of Pantheon or central god).

    ------------

    Anyhoo, the mod is now able to be fully tested, which is nice. There are a couple outstanding bugs that are keeping me from considering it a stable beta, like the Priest slotting when buildings upgrade (or the AI's inability to use Priests at all), and I'm not going to pretend that those aren't significant, but it should at least now be possible to get real balance feedback at this point.

    Now that the mod is fully playable, I'd like to repeat the question I've alluded to before:
    Are the seven Pantheons' "special ability" bonuses balanced?
    I KNOW the answer is No, I just don't know exactly which pantheons need the most help.

    I've got quite a few things I've changed on the internal version that will get passed along to the rest of you in next week's version; for instance, the four Sumerian major heroes all have working penalties, like Gilgamesh subtracting 1 Happiness from your empire. They're strong heroes, but since you won't be having as many High Events to gain them, it leaves the Sumerians just a little weaker than the others. To compensate, the Sumerians' minor heroes will all be stronger than everyone else's, basically by gaining the "Bioenhancement" promotion from the Ascension mod (+10% to all combat).
    But what I'm trying to establish is whether any of the other Pantheons need a little something extra; as you've probably noticed, the High Events haven't been finalized yet (although again, internal version is more complete), so if it turns out that, say, the Egyptians still feel weak, then I can easily give them a couple extra High Events to compensate, or make their Major Heroes (yet to be named) just a bit stronger than their Greek counterparts. There's plenty of room for adjustment, as long as I do it fairly soon.
     
  16. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    So... how is AoM going to be effected by the expansion? I personally like the idea of expanding on the new system. Adding some sort of early religion system or adding some pantheons as new religions (since shinto and hinduism are in the new expansion anyway) Would be interesting to see what you come up with, expanding on the religions would be awesome, like christianity having crusaders as hero units etc.
     
  17. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    Sneaks asked this a few posts up, but yeah, I just don't know. A LOT will depend on exactly how they handle religion.

    From what I can tell, there'll be no "local" effects, just Policy-like global modifiers. No myth units, no Heroes, no Battle Favor, no upgrading buildings. It looks like they've got a set of selectable tiered effects, similar to adding a minor god in this mod, so in theory I could just merge the two that way.

    Now, what I'm HOPING is that by adding a new Faith yield, they FINALLY open the door to creating custom yields of our own. While I've got Favor as a yield, most of the yield-related Lua functions can't use it because it's not also placed into the YieldTypes table, which means all of the places where I keep track of Favor have to use pure Lua storage constructs. This is obviously very problematic, so it would be nice if they found a way to .

    There's also the question of exactly how Faith is generated, and at what points in the tech tree the religious period is supposed to start and end. If it's supposed to be something that doesn't really kick in until at least the Medieval, then it might be possible to use their system as a transition, comparable to the Enlightenment. That is, instead of the current single stage (build the Enlightenment and the myth stuff all goes away), it'd now be a two-stage process (build X and the myth stuff transitions to the weaker-but-less-penalizing Religion stuff, which in turn goes away later on). That actually fits well with the Empires concepts; while it's all still "religion", your religion becomes less of a direct gain (Mythology mod) and becomes more of a political/social/economic tool during the Dark Ages, before being effectively replaced by national governments and their bureaucracies.

    If that works, and I can effectively combine the two approaches, then it's probable that I'll just replace Favor with Faith directly. But we'll have to see; the low raw amounts for Faith (in one screenshot, the player only had 11 while adding a new ability) doesn't really bode well for meshing with my own system.
     
  18. dinobot386

    dinobot386 Prince

    Joined:
    Mar 10, 2011
    Messages:
    322
    If you do merge them id ask that you have a way to keep your pantheon as your religion. Really want to be able to play as egypt but have them still worship the egyption gods in the later eras.

    Ether way though, now would be a good time to focus on the unit models since the expansion is likely to make you have to rework everything else once its released.

    On the plus side, an expansion is likely the herald of the DLL being released
     
  19. CivOasis

    CivOasis Ahuizotl

    Joined:
    Jun 22, 2011
    Messages:
    3,005
    Location:
    Sawaiki
    About to start up a game with this, my first time playing since December.
    Going to assume in advance that you still cannot save and return?
     
  20. Spatzimaus

    Spatzimaus Mad Scientist

    Joined:
    Sep 21, 2005
    Messages:
    3,063
    Location:
    Los Angeles, CA
    You know what they say about when you assume. The save/load functionality was fixed in last week's version; it should work just fine now, thanks to Pazyryk's table saver. I've confirmed it works for Quicksaves and normal saves, but autosaves might still have some issues. And yes, that makes it much, much easier to test things.

    I'm trying to get a new version out tomorrow night with an overhaul to the high events (replacing most the placeholders), but Real Life's kind of a mess this week (some medical stuff, some work-related stuff, some family stuff) so it might get bumped to the weekend out of necessity.
     

Share This Page