How to take generation of cities out of event codes

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Post Reply
GaryChildress
Posts: 6746
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

How to take generation of cities out of event codes

Post by GaryChildress »

Does anyone happen to know where the lines are in the event code for the Newdawn games which place cities on the map? I had this idea of creating a random game where only the capital city is placed on the map for each regime. Then I would make cities buildable and introduce a new resource called "manpower". Building a new city would require maybe 1000 manpower or something and as the game progresses and manpower is built up, each regime would be able to build cities based on the accumulation of manpower. Of course manpower would also be required to create sub formations and cities would generate manpower.

Trying to make an ATG random game sort of like Civilization.

Thanks.
danlongman
Posts: 584
Joined: Tue Mar 27, 2012 8:36 pm
Location: Over the hills and far away

RE: How to take generation of cities out of event codes

Post by danlongman »

I would love to see that Gary. Would it be like building a factory? I am trying to figure out how to put
NATO symbols and the Enhanced mods together with the Bombur 1930 for a random game. I lack talent.
Should never have quit drinking, I guess.
"Patriotism: Your conviction that this country is superior to all other countries because you were born in it." - George Bernard Shaw
danlongman
Posts: 584
Joined: Tue Mar 27, 2012 8:36 pm
Location: Over the hills and far away

RE: How to take generation of cities out of event codes

Post by danlongman »

Plus I'd love to see a Napoleonics or ACW or 30 Years War type mod in a random game.
And military training and a bunch of stuff.
"Patriotism: Your conviction that this country is superior to all other countries because you were born in it." - George Bernard Shaw
User avatar
Ormand
Posts: 752
Joined: Tue Feb 17, 2009 1:31 am

RE: How to take generation of cities out of event codes

Post by Ormand »

I don't think so. I think much of the map generation is hard coded and not done with events. I have looked a little because, frankly, I often don't like the nations that get set up that are split all over creation.

That said, it would not be hard at all to write an event that removes the cities, urban hexes and farm lands. This would be an event that runs first thing on round 1. This would have to be human only, since the AI wouldn't know how and where to put cities. You would have to code events for the AI to place cities.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
GaryChildress
Posts: 6746
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: How to take generation of cities out of event codes

Post by GaryChildress »

ORIGINAL: danlongman

I would love to see that Gary. Would it be like building a factory? I am trying to figure out how to put
NATO symbols and the Enhanced mods together with the Bombur 1930 for a random game. I lack talent.
Should never have quit drinking, I guess.

Hi dan,

Yes. I was thinking about having cities buildable in the same way as a factory is buildable. Of course one of my worries is with the AI and how it would react to the new requirement.
GaryChildress
Posts: 6746
Joined: Sun Jul 17, 2005 3:41 pm
Location: The Divided Nations of Earth

RE: How to take generation of cities out of event codes

Post by GaryChildress »

ORIGINAL: Ormand

I don't think so. I think much of the map generation is hard coded and not done with events. I have looked a little because, frankly, I often don't like the nations that get set up that are split all over creation.

That said, it would not be hard at all to write an event that removes the cities, urban hexes and farm lands. This would be an event that runs first thing on round 1. This would have to be human only, since the AI wouldn't know how and where to put cities. You would have to code events for the AI to place cities.

Hi Ormand,

If cities are constructed in the same way as factories, do you think the AI would still have trouble creating cities?
User avatar
Ormand
Posts: 752
Joined: Tue Feb 17, 2009 1:31 am

RE: How to take generation of cities out of event codes

Post by Ormand »

You could try, but I think it could go badly. I am not sure exactly how the factories are constructed for the AI. I suspect the type is randomly chosen. Also, there is the placement. If you are going to go "Civilization" there is the question of improvements as well. The AI couldn't handle it because it just isn't in the engine. But, you could make a new loctype for the cities, and make them buildable, and then put them in the AI auto build category. Look at the pre- and post-events that are used for factories, and see how to modify them. I think I would start with removing the factories, and see what the AI does with cities. Since features on the map are immune to FOW you should be able to see what the AI did fairly quickly.
One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork -- Edward Abbey
Post Reply

Return to “Mods and Scenarios”