MvM

Fastjack

Chieftain
Joined
Nov 9, 2008
Messages
56
Location
Louisville, KY
I have started making a mod. I have lots of experience with coding, and although I don't know XML or Python, I have already picked up a lot of it. Also, I can do a good job doing 3d animation with Lightwave. Can lightwave export the right kind of file? Anyone know? If not, is there any way to convert something that Lightwave does export to the right file?

Okay, now the mod.
This is a semi-complete overhaul. Half of the game will stay virtually the same (I may add/change a few things if I think it is neccesary to balance the game and whatnot, but at this point I don't have anything specific in mind). What I hope to do is to create a subterranian level on the maps (think Test of Time) that will house dwarves, elves, goblins et cetera. The underground races will have no contact with the surface and vise versa. The humans on the surface will be playing a game as normal, but the people underneath will have different tech tree(s) that lean towards magic. Finally, at a specified time (maybe with the construction of a wonder similar to the Apollo Program), players on both ends will be allowed to build tunnel entrances which will allow zoning back and forth. So in the late game, we have the sudden appearance of these fantasy creatures with magic that rivals the power of science... You can never enter diplomacy with these races (and they can't with you) and the two sides start at war with one another.

I will try to keep the fantasy tech tree similar to the science in the abilities that it grants. For example, I might have a building for the elves that functions like an airport, but is flavored to be a "Ring of Teleportation." This is to prevent late game unbalanced-ness, although I may get to have some fun in the early and mid games as long as it works out to be even in late game. =P

I think one of the most difficult problems facing me is creating the underground aspect to begin with. If I can't do it test of time style I will have to make all maps twice as tall, add a 10 or so thick layer of peaks halfway down and just have the two areas set apart.

Any suggestions?
 
This idea was worked on sligtly in the Fall from Heaven team. I dont know quite what their results were, but they werent thrilled with the results and it required some pretty hefty coding. As to your animations question: I think it will work as long as it can be exported as a KFM. Im not sure so you should PM Refar. He knows a fair bit about animation.
 
Interesting. I would like to know how that turned out for them. I can be pretty stubborn, and I like to think I am a fairly innovative coder, so maybe I will think of something. I'll figure the lightwave thing out pretty easily - I am at work at the moment and I was just wondering.
 
From what I could tell on what they did, Civ maps use memory exponentialy in larger maps so a large map uses much more memory than a small map on a straight line. It would also be almost requireing running two maps at the same time. A way that the Fall FRom Heaven team was going about it was to make a blocked off area of the map for the underground. That idea was tried, but they couldnt make the blocked off area big enough without using up too much memory. You should PM Kael for more information about this.
 
Yeah, I have been using a lot of his tutorials, he knows his stuff. I will do that. Assuming I could overcome that problem, any suggestions for content? I was thinking that each fantasy race would have their own tech tree that explored different branches of magic. For example, Dwarves have runes, Goblins have cantrips, et cetera.
 
Yeah, I have been using a lot of his tutorials, he knows his stuff. I will do that. Assuming I could overcome that problem, any suggestions for content? I was thinking that each fantasy race would have their own tech tree that explored different branches of magic. For example, Dwarves have runes, Goblins have cantrips, et cetera.

I have a screenshot of the next FfH version (http://www.civfanatics.com/ffh) that shows a dual map where half is normal overland and the other half is a underground/dungeon environment.

In this case we are doing it with split map (left side is the over map, right side is the under map). The problem I have with switching maps is that the entities on the other map dont exist when your on the opposite. The graphics engine is also a bit pooky when redrawing the entire map if your bouncing back and forth between them frequently.

But either way you are welcome to anything in FfH that helps you out. The next version (that contains the portals/dungeon environments/etc) will be released on December 16th.
 
Heh. *Deletes half completed private message to Kael* Thanks for the quick response. My work's web security blocks that image, so I will check it out when I get home.

I know that it would take something away from the playability, but what if I restricted the maps to being 2xstandard size at most? In the end, I would still have very large maps when you consider both worlds, but for the majority of the game it would appear and feel like a mid sized map. That would help with performance.

Edit 1:
What if you had a file that kept track of explored area, and it covers the non active layer with black as if it were still unexplored? It would help with mid-turn performance I would think, although the switching back and forth would still be problematic. It may help that a bit if you applied the "fog" before revealing the other section.

Edit 2:
Also, if you did it in "phases" where if you have a presence in the overworld you control everything on that level first, and then it switches so you can do everything on the bottom layer... making each unit wait a turn to switch layers would compliment that system nicely. It wouldn't reduce the overall time it takes to load the second layer, but it would make it only happen once per turn.

Edit 3:
The reason I would think I would do it one on top of the other is to preserve to round world deal where you can circumnavigate the world. Since normal maps have polar caps that are uncrossable to begin with, it seems like it would take the least away from the normal feel of the game. What file controls the parameters used when loading maps, anyway?
 
Heh. *Deletes half completed private message to Kael* Thanks for the quick response. My work's web security blocks that image, so I will check it out when I get home.

I know that it would take something away from the playability, but what if I restricted the maps to being 2xstandard size at most? In the end, I would still have very large maps when you consider both worlds, but for the majority of the game it would appear and feel like a mid sized map. That would help with performance.

Thats doable. As in everything in game design there are pros and cons. You will get your real, played out 2nd world. It will double (at least) your wait between turns.

Edit 1:
What if you had a file that kept track of explored area, and it covers the non active layer with black as if it were still unexplored? It would help with mid-turn performance I would think, although the switching back and forth would still be problematic. It may help that a bit if you applied the "fog" before revealing the other section.

I dont think it would help much, maybe a little. Besdies if you are exploring both sides your going to want to see actions taken in the other world and enemy units move around and such.

Edit 2:
Also, if you did it in "phases" where if you have a presence in the overworld you control everything on that level first, and then it switches so you can do everything on the bottom layer... making each unit wait a turn to switch layers would compliment that system nicely. It wouldn't reduce the overall time it takes to load the second layer, but it would make it only happen once per turn.

Would players be able to toggle back and forth between the worlds to check things out or change their plans? If so your in the same bucket of the performance limitations. If not then you have a significant challenge for the player to be forced to remember the specifics of the other world.

Edit 3:
The reason I would think I would do it one on top of the other is to preserve to round world deal where you can circumnavigate the world. Since normal maps have polar caps that are uncrossable to begin with, it seems like it would take the least away from the normal feel of the game. What file controls the parameters used when loading maps, anyway?

Its in the SDK somewhere. Im sure you could change it to use the new overworld borders. But I suspect that losing the circumference bonus is the least of your concerns.
 
I dont think it would help much, maybe a little. Besdies if you are exploring both sides your going to want to see actions taken in the other world and enemy units move around and such.

Thats a fair point. It seems like it would increase performance drastically, as the map being more revealed definately slows down your game. I often turn off a lot of the graphic effects as I get into late game as I like large maps, and it generally helps quite a bit when it comes to load times between turns.
Maybe if there was a way to force the AI to move units in phases as well? Then you could switch back and forth once or twice a turn and it wouldn't be too taxing.

Would players be able to toggle back and forth between the worlds to check things out or change their plans? If so your in the same bucket of the performance limitations. If not then you have a significant challenge for the player to be forced to remember the specifics of the other world.

Yes, they would be able to toggle back and forth; this would just be a way to do all of your actions for the underworld first before the overworld or whatever. It would minimize the number of switches during most turns.

Its in the SDK somewhere. Im sure you could change it to use the new overworld borders. But I suspect that losing the circumference bonus is the least of your concerns.

Most likely. Is it possible to make a terrain tile completely invisible? If so, you could have both maps in the same space, just have a button you can hit to hide everything on one and show everything on the other. Then when you select a unit you could do a check to find out what layer it is on and then insert that into python or something. It would be difficult, but if you got it down it may improve performance. I haven't gotten too deep in the code, so I don't know if that is possible. Just brainstorming.
 
Most likely. Is it possible to make a terrain tile completely invisible? If so, you could have both maps in the same space, just have a button you can hit to hide everything on one and show everything on the other. Then when you select a unit you could do a check to find out what layer it is on and then insert that into python or something. It would be difficult, but if you got it down it may improve performance. I haven't gotten too deep in the code, so I don't know if that is possible. Just brainstorming.

Its possible. I use an SDK function to store the terrain type for temporary terrain transforms (if for example a cold spell changes a terrain to ice for a few turns). You could do the same thing to store all of the values of a plot off and then toggle between the two.

But its nothing simple. It would be a massive programming project to switch back and forth between hiding one phase or the other. The AI would have no idea that either phase existed when the other was around, you would need to take special measures to keep players form being killed off if they were entirely in one phase when that phase wasnt being displayed. Unit creation/deletion totals are tracked and they will go throught he roof with a system like this since technically they will be being killed and recreated with every phase switch.

All of these issues are solveable. there isnt a technical limitation here, only a practical one. You will be rewriting significant amounts of the SDK to get this to work, where just breaking the map to the left and right side can be done right now. But which way you decide to go is up to you.
 
Its possible. I use an SDK function to store the terrain type for temporary terrain transforms (if for example a cold spell changes a terrain to ice for a few turns). You could do the same thing to store all of the values of a plot off and then toggle between the two.

But its nothing simple. It would be a massive programming project to switch back and forth between hiding one phase or the other. The AI would have no idea that either phase existed when the other was around, you would need to take special measures to keep players form being killed off if they were entirely in one phase when that phase wasnt being displayed. Unit creation/deletion totals are tracked and they will go throught he roof with a system like this since technically they will be being killed and recreated with every phase switch.

All of these issues are solveable. there isnt a technical limitation here, only a practical one. You will be rewriting significant amounts of the SDK to get this to work, where just breaking the map to the left and right side can be done right now. But which way you decide to go is up to you.

It seems like it would be easy to fix the AI problem at least to a point, all you would need to do would be run the AI algorithm again after you switch layers. Run it once, then switch and run again. It would still be a problem to get the AI to coordinate it's movement of troops on both layers, though. Would it be possible to "trick" the AI into thinking that the second layer is side by side with the first when in reality it occupies the same space?

Is there a way to add a Z axis to the position of things on the map? That would make this so much easier.

Making the AI work properly would be very difficult. What language is the AI in and is it easy to manipulate? Which file does it use? EDIT: Ignore the requests for information about AI, I figured it out.

Also, there has to be a way to get around the game thinking those units are dead (not from an AI standpoint I mean). Even if you have to change all of those unit's models to a file with nothing in it, I am sure it can be done. The question is, how much memory would it take to be executed?
 
Would this work to fix the AI problem?

You can let underworld be simulated by the AI in a remote location you have no knowledge of and then have the real items mimic the AI's movements. I think that would take the stress off of the graphics engine and make it possible to have multiple "layers" for player convenience without messy AI problems.
 
They are all possible, but involve significant amounts of code. Prototype some ideas and see how they work out.
 
Could you pm me the SDK function you were talking about that can hide terrain? So I have something to work from.

All of the FfH code is available here (http://forums.civfanatics.com/showthread.php?t=238077) but the code just stores the real terrain type in a variable:

Code:
void CvPlot::setTempTerrainType(TerrainTypes eNewValue, int iTimer)
{
    if (getTerrainType() != eNewValue)
    {
        if (getRealTerrainType() == NO_TERRAIN) //Dont overwrite the real terrain if we double temp
        {
            setRealTerrainType(getTerrainType());
        }
        changeTempTerrainTimer(iTimer);
        setTerrainType(eNewValue, true, true);
    }
}
 
Back
Top Bottom