Modder's Guide to A New Dawn

I understand that the food/fuel system can require a lot of micro management and that there are simpler ways of simulating something similar. But, in my opinion, if the system was any simpler, it would not be realistic enough for my tastes.
Yes, but how satisfied would you be if no one else would play your mod?

However, I understand that it's probably more fun in my head, than in actual Civ.
Yeah, the illness of every modder and modder-wannabe. We all have more ideas than the ones that really work&fun :lol:

I've heard people propose a food/fuel system where the food/oil is stockpiled globally, similar to how gold is. And then the units automatically consume from that stockpile. That would save on a lot of micromanagement. It would be realistic in the sense that your army size is limited by food and fuel needs. One oil resource shouldn't be enough for an infinite amount of tanks. However, this simplified system doesn't account for logistics. How are units supplied? Not to sound patronizing, but do they magically siphon food from a stockpile stored in another dimension? The only solution to this that I can think of is if you have units treated kinda like moving cities where the computer would check if the unit is connected to the capital each turn. If the unit is not connected then it can't connect to the global stockpile. It sounds like it would slow down turn times a lot tho.
I think it could be solved by this way: If an army is outside of its culture, the game checks for connectedness the same way as it does for cities. If it is not connected (surrounded by enemies and impassable terrain) than it start to starve/runs out of fuel.
Still, you would have to teach the AI to surround enemy units.

And as for the AI thing. Yea, it would probably be nearly impossible to teach the AI the food/fuel system. But I plan, don't know if this is even possible, to have a lot of these features affect the human player only. The AI will play Civ normally, while the human player will be playing a much more complicated game. I understand that that sounds really unfair.
:run:
Not only unfair but immersion breaking too. These type of solutions (different rules for the AI and human players) in general greatly decrease replayability of any game. It maybe fun in the first few games, but gets annoying and upsetting quickly.

But my greatest concern is if we will ever see that as a mod? I mean that it's quite common to see someone posting "I will do this and I want to do that..." and than disappears without anything complete.
So I advise to stop just posting about your ideas and start modding, publish it and than let's see how it works :)
 
I think it could be solved by this way: If an army is outside of its culture, the game checks for connectedness the same way as it does for cities. If it is not connected (surrounded by enemies and impassable terrain) than it start to starve/runs out of fuel.
Well. This remind me that Surround and Destroy is still unsupported by the AI. I should take a deeper look at the AI pathfinding, because it is a key for a good AI.
 
Well. This remind me that Surround and Destroy is still unsupported by the AI. I should take a deeper look at the AI pathfinding, because it is a key for a good AI.

Hay man! Aren't you busy enough? :p
 
Yes sir, I keep that for later!
 
Is there a way to force civic and civic options order?
I'm working on a module that adds more civics and civic categories, but have some trouble with their order.
Civ4ScreenShot0248.JPG
As you see on the screenshot I have added a new category called Labor and moved some civics here from other categories.
The problem is that no matter the order I set in the modular xml files, those civics that are already in the mod will always precede the ones added in the module. The same is true about civic_options.xml for the categories.
It doesn't break anything just looks bad a bit.
I tried bForceOverwrite too, but no luck.
If there is a trick, please let me know.
THX
 
A typical python code for this kind of screen will tell it to loop through all civics and place them accordingly. This civic loop is sorted via the ID, where modular ones are always after the default ones.

Solution is either to modify the default file directly or modify the python codes.
 
An overhaul of the civic screen is also planned, but for sure, you'll have to wait some weeks ;)
 
@Afforess
Just to iterate about using C2C as a base: Am I to assume that C2C is exactly like AND, minus a few features? You guys seem to have tweaked a lot of things and fixed a lot of bugs. If the features you already have work better and are more stable for both the player and the AI, than in C2C. Then I'd rather use AND.

@Sogroon
"Yes, but how satisfied would you be if no one else would play your mod?"

Only when I'm done implementing the system and test it out, will I see how playable/unplayable it is. I'll probably have to make some compromises anyways. But as that cliche saying goes, it's better to reach for the stars and land on the moon than to not aim past the Earth's atmosphere. Or something like that.

"I think it could be solved by this way: If an army is outside of its culture, the game checks for connectedness the same way as it does for cities. If it is not connected (surrounded by enemies and impassable terrain) than it start to starve/runs out of fuel."

I actually got that idea from a WWII Civ 5 mod, where they stockpiled not just fuel, but material and personnel/manpower. I guess it works better in Civ 5, because there's a lot less units in play and thus a lot less checks that need to be made. But who knows, maybe I can make some automation code and automate the supply units.

"Still, you would have to teach the AI to surround enemy units."

You got a point. The biggest problem is the AI. Because these features are doable. I mentioned before that a lot of them have already been done before by other modders as mod components. But a lot of them, I'll have to check again to make sure, probably don't have AI support and as a solution just make the AI unaffected by the feature or cheat.

And I don't have the skills to teach the AI something like that really. So admittedly, if half the features only apply to the Human Player than you get only half the strategy I was talking about. Because you wouldn't be able to cut off the AI's supplies, but there still would be some strategy because you'd still have to worry about your own logistics. I still think it would be a fun challenge.

There are also some minor features that I want to add that probably only the human player will really use. For example, placing mines. I'm starting to see why that would be immersion breaking if only you could do something that the AI can't. But I think the pros out weigh the cons. The added challenge and immersion that comes with more realism, will outweigh the damage to immersion you predicted. The mod will probably work best for multiplayer (if that works) or hot-seat games tho. That way there's no problems because all the players would be Human. Imagine playing with a friend with that amount of added strategy. Much strategy. All the strategies. Yes. Indeed. Is what I'm starting to sound like... But I'll see how it goes when I do it.

"But my greatest concern is if we will ever see that as a mod? I mean that it's quite common to see someone posting 'I will do this and I want to do that...' and than disappears without anything complete.
So I advise to stop just posting about your ideas and start modding, publish it and than let's see how it works"

Don't worry, I'm not a 12 year old boy. I'll finish the mod in one form or another. The thing is I'm really busy with Uni and I won't have time to really finish it until next summer. I was doing some modding last summer, mainly just XML sub-mods. But I didn't really become this ambitious until it was too late. Bad timing I know. But I did at least have time to come up with some ideas and do some research. I wanted to fully flesh out my ideas before I actually start modding. Even tho the modding process will probably force me to change some ideas. I guess it's better to get creative first and not have technical limitations hurt your creativity. Again the reaching for the stars thing. I talked all I wanted to about my ideas. There's some details I left out. But they're not necessary here. Thanks again for the feedback. When I do publish the mod tho, I'd like your feedback again.
 
C2C and AND forked a long time ago. C2C's watchword is quantity (but does have several cool ideas), whereas AND's is definitely not.
 
A typical python code for this kind of screen will tell it to loop through all civics and place them accordingly. This civic loop is sorted via the ID, where modular ones are always after the default ones.

Solution is either to modify the default file directly or modify the python codes.
THX for the answer. The first solution I don't want to do, the second I cannot, so it will stay messy.
An overhaul of the civic screen is also planned, but for sure, you'll have to wait some weeks ;)
Oh, I don't expect anyone to solve my problem instead of me. But if you already had that in plan...
:)
And don't worry, I'm working on it for a some weeks or a few months already. I had a lot of research and learning. I hope it will be soon ready to publish for testing and balancing. Polishing comes later.
And it is only the first module of my planned module-compilation, though one of the bigger ones.
 
@Sogroon: Don't forget to add the modinfo.xml file for the launcher :)
 
An overhaul of the screen won't solve your problems. Changing the interface of the screen is just changing how the screen looks. It will still display civic options according to ID, and respective civics again sorted via ID. Unless you sort them using other methods such as alphabetic order, upkeep or a hard coded list. Else you will still find modular ones always below default XML ones.
 
I was wondering if someone here can enlighten me about the difference between

getCitySorenRandNum

and

getSorenRandNum

I've read the code and I can see that there are some cases where CitySorenRandNum simply becomes SorenRandNum, otherwise it returns GetSyncRand. Any idea?

I have to use a random generator in CvCityAI.cpp, it's meant to return X probability that the city will attempt to build a project; but I don't know which one is better to use. I suspect that getCitySorenRandNum was causing a crash when I've used it (possibly when a city was razed or conquered?), but I'm still investigating.
 
Well, I didn't even known GetCitySorenRandNum existed. Previously, I used the standard one and it worked.

EDIT: The case you mentionned is a work order from the city, but I don't understand why the rand should be different. Maybe it's related to MP to avoid OOS.
 
45°38'N-13°47'E;14015072 said:
I was wondering if someone here can enlighten me about the difference between

getCitySorenRandNum

and

getSorenRandNum

I've read the code and I can see that there are some cases where CitySorenRandNum simply becomes SorenRandNum, otherwise it returns GetSyncRand. Any idea?

I have to use a random generator in CvCityAI.cpp, it's meant to return X probability that the city will attempt to build a project; but I don't know which one is better to use. I suspect that getCitySorenRandNum was causing a crash when I've used it (possibly when a city was razed or conquered?), but I'm still investigating.

The getCitySorenRandNum was something the C2C developers introduced at some point. It is the same RNG as the main getSorenRandNum uses, it just prefixes the RNG msg for logging with the city name and some other trivial details. I would suspect getCitySorentRandNum requires there to be a msg to log, whereas the original getSorenRandNum allows NULL messages. This may be the source of crashes.

Which you use does not affect determinism nor MP. It exists for improved debug logging.
 
C2C and AND forked a long time ago. C2C's watchword is quantity (but does have several cool ideas), whereas AND's is definitely not.

I agree, they did fork a long time ago, but the engine is very similar between the two still. The DLL probably still shares 95+% similarity, whereas the XML content differs greatly.

The best sort of comparison would be two different games based on the same game engine.
 
An overhaul of the screen won't solve your problems. Changing the interface of the screen is just changing how the screen looks. It will still display civic options according to ID, and respective civics again sorted via ID. Unless you sort them using other methods such as alphabetic order, upkeep or a hard coded list. Else you will still find modular ones always below default XML ones.

What I would be most happy is to have an XML tag for both CivicInfos.xml and CivicOptionInfos.xml files like <iGridX> and <iGridY> for techs, so I could set the place of civic categories and civics inside the category. (EDIT) With the option of completely hiding a civic/category by setting the value to -1.

@Sogroon: Don't forget to add the modinfo.xml file for the launcher :)

Don't worry, I won't. I'm planning to design my modmod in a way that each module would be a "separate option" players can switch on/off with the launcher. Each module would contain different content (Civics changed, Religions changed, Stone-age stuff, Hunting stuff, etc). There will be only one download archive with a single fpk, but separate module folders.
Your launcher is a great tool for module modders like me :)
 
An other question:

I want to make an Iron Curtain NW with a similar affect of The Great Wall but not with stone walls but barbwire.
All I discover yet is that it is controlled by this:
PHP:
		<ArtRef Name="building:LSYSTEM_GREAT_WALL">
			<Attribute Class="Scalar">szSpecialLayout:CityCenter</Attribute>
			<Attribute Class="Scalar">szBuilder:GreatWallBuilder</Attribute>
			<Attribute Class="Scalar">bLayoutAfterGenerics:1</Attribute>
			<Attribute Class="Scalar">bNoContour:1</Attribute>
			<Rotate>45</Rotate>
			<!-- this needs to be the negative of the CITY_TWIST value in detail manager; note that this uses degrees but DetailManager uses radians. Sorry. -->
		</ArtRef>
So from this I think (and remember reading somewhere) that the great wall is controlled by some dll stuff. Right?
This shows me that I have zero affect on it and should give up...
 
45°38'N-13°47'E;14018795 said:
Unfortunately you're right. Great wall is controlled from dll in many aspects. For example because using viewports it can't be controlled via XML.

Okay, thanx :)

BTW viewports: I know that viewports were developed from parallel maps. How much of parallel maps is merged into the mod? Can RAND support multiple maps?
 
Top Bottom