[TOT] My Scenario Development Update

Konig15

Warlord
Joined
Nov 4, 2007
Messages
241
Alright I would like to give and update of what I've been up to for the last seven months. The truth is, nothing directly. I got Age of Empires and Age of Empires 2 on a Steam sale at Christmas hoping to mine their graphical assets and ended up playing 1100 hours over the last few months. However, between that and watching a whole bunch of YouTube videos, I've learned a great deal about game design however spotty, and where I would have gone tragically wrong. I definitely suffer from what is called modder’s megalomania. What's more is that my proposed project, Failing Lights 2, is pretty much antithetical to the basic mechanics of civilization 2. It's not that it would be impossible to make that scenario as intended, but I would need to be a master of Lua scripting to even hope to pull it off. Let me explain, if only to show what I've learned.



The first issue is that Civilization 2 is a game about state assent. If you play this game with any kind of competence, your civilization goes from strength to strength. It gets stronger and stronger over time, the only consideration is if the other civilization or civilizations is getting stronger faster than yours. The only way to stop this is to prevent the creation of settler or decent military units like in the Sealion scenario where you only get limited units by research and that's it. Fading lights 2 and the whole rule of the Paleologi Dynasty is about continuous and disastrous decline. That and corruption: lots and lots of corruption. Making the fight against both of those both winnable and challenging throughout the entire campaign without making it a horrible slog his not something a first time creator should be doing. That's not even a question of scripting. Then you get to where the city itself collects all resources meaning that other than pillaging of infrastructure, resource production is never in danger, infrastructure costs nothing but time to rebuild, so it's a lot easier to protect your villagers than in Age of empires where they must be constantly exposed and protected over time. That makes raiding a constant threat than than an annoyance. This is critical for a scenario like Fading Lights and the Turkish Ghazi threat.



The second issue is AI. The AI is absolutely ancient. A I placement is absolutely essential but then you have the basic problems of the AI in the first place which I don't know can be addressed. First the AI needs to pillage a lot more. In my experience the AI makes a beeline for the cities when they need to make every opportunity to pillage all of the infrastructure around, especially the mines and irrigation to cripple the player in the long term. This is what happened two Byzantine Anatolia over the first 20 years of Andronic II’s reign from 1282 until about 1304. It's how the Turks could essentially sit around Prusa and basically every other city in Bithynia for 10-12 years until the city just ran out of food. By the time they marched in in earnest, wherever they weren't their raiding had completely collapsed the economy.



And that brings me to the second issue with the AI. I need some way to make a raider unit that does not attack any unit with an attack value over 1. That way it would only go after civilian units, settlers and any non-attack units that have special Lua scripting and they wouldn't throw themselves at city walls or fortresses in the mountains. then on top of this if I could manage it I would need a script that would make it so units with an attack value of one or less were always the first units to be attacked in a stack which would force players to build more units around civilian collectors so that defending their resource production units would be difficult rather than trivial. The idea would not be to make micromanagement hard but to encourage offensive operations to keep the front lines far away from a central resource collectors.



I don't know how much of this is possible even in abstract. I would like input on this, but frankly I'm going to shelve Fading Lights too because it's outside of the scope of my actual capacities. I'm not giving up however I'm going to start a new project which I'm going to start another thread on when the time comes.


That one is going to be Outremer by the same author. It definitely needs work and it’s needs more love than Fading Lights, and I loved it, and no one else is going to give it the time of day it needs. And of course if it can be ported instead of recreated, it’s already got map and cities placed more or less correctly. I have the file, I’m not going to be asking for port to TOT yet, if it can be done. Instead, if anyone will care to help me, I’m going to do a very, very basic thing and just create a dummy file and translate the events file for Outremer, one event at a time until I have a basic grasp of the structure of very basic Lua. Hopefully then I can start to expand and play with it with minimal help.

So beyond any comments on the theory of using Lua/anything else in the long term to affect the AI’s behavior, is the Lua translation a good place to start practicing fundamentals?
 
Although never formally released (yet - there's always hope), EziRhino's Sea Kings scenario seemed geared at struggling to maintain an engineered declining, and then collapsing, empire.
 
Although never formally released (yet - there's always hope), EziRhino's Sea Kings scenario seemed geared at struggling to maintain an engineered declining, and then collapsing, empire.
Is there a thread where I can compare ideas on how to do the declining and collapsing?
Also, as far as fundamentals go , do you think the lua translation is a fair place to start or do you think some place else would be better? I'ts just that in this day and age needing to understand how to create one's own redementary lua events seems to be the most fundamental thing outside of knwing the very basic scenario editor functions for TOT.
 
What's more is that my proposed project, Failing Lights 2, is pretty much antithetical to the basic mechanics of civilization 2. It's not that it would be impossible to make that scenario as intended, but I would need to be a master of Lua scripting to even hope to pull it off.
...
If you play this game with any kind of competence, your civilization goes from strength to strength. It gets stronger and stronger over time, the only consideration is if the other civilization or civilizations is getting stronger faster than yours. The only way to stop this is to prevent the creation of settler or decent military units like in the Sealion scenario where you only get limited units by research and that's it. Fading lights 2 and the whole rule of the Paleologi Dynasty is about continuous and disastrous decline. That and corruption: lots and lots of corruption. Making the fight against both of those both winnable and challenging throughout the entire campaign without making it a horrible slog his not something a first time creator should be doing...
I completely agree with you that modeling an era of decline, in a game that natively models a continuous period of growth, is a major challenge. Due to the difficulty and complexity involved, I agree with your conclusion that it's not the ideal project for a first-time scenario developer or new programmer to tackle.

First the AI needs to pillage a lot more. In my experience the AI makes a beeline for the cities when they need to make every opportunity to pillage all of the infrastructure around, especially the mines and irrigation to cripple the player in the long term.
It's certainly possible, with Lua, to create event-based "forced pillaging". For example, if an AI unit is on an improved tile that is within the radius of one of your cities, an event could remove the tile improvement(s) and end the AI unit's turn -- just as if it had actually chosen to pillage instead of moving.

I need some way to make a raider unit that does not attack any unit with an attack value over 1. That way it would only go after civilian units, settlers and any non-attack units that have special Lua scripting and they wouldn't throw themselves at city walls or fortresses in the mountains.
This is possible too, but the event would block/prevent the attack at the moment it (tried to) take place. If you want the AI to aim for civilian units, i.e. move towards them rather than towards the units or cities that the AI has natively chosen as its target, that would be more challenging. You are heading down the road of rewriting the entire AI from scratch -- choices such as which units to build, which techs to research, what tax rate to use, etc. are all done in support of the AI's larger goal(s). You essentially want to change its big-picture goal, and that might mean that every single thing the AI does ought to be rewritten with that in mind. This would be a major undertaking even for an advanced programmer.

then on top of this if I could manage it I would need a script that would make it so units with an attack value of one or less were always the first units to be attacked in a stack which would force players to build more units around civilian collectors so that defending their resource production units would be difficult rather than trivial. The idea would not be to make micromanagement hard but to encourage offensive operations to keep the front lines far away from a central resource collectors.
The onChooseDefender() trigger would allow you to select which unit in a stack defends against an attack, and it wouldn't be too difficult to create the behavior you want.

I don't know how much of this is possible even in abstract. I would like input on this, but frankly I'm going to shelve Fading Lights too because it's outside of the scope of my actual capacities. I'm not giving up however I'm going to start a new project which I'm going to start another thread on when the time comes.
Now you know more of what's possible, but I agree with the decision to start with a less ambitious project, and come back to this when your programming skills are more advanced.

Is there a thread where I can compare ideas on how to do the declining and collapsing?
I'm not aware of one. FWIW, some of these concepts are present in my Medieval Millennium scenario (terrain depletion after many turns of use; terrain downgrades due to climate change; the Black Death and major problems with population decline and pollution). I'm not sure if the Lua code I used could be easily understood or ported into a different scenario; but if you play a couple games of MM, you'd at least get a feel for the type of effects that are possible.

Instead, if anyone will care to help me, I’m going to do a very, very basic thing and just create a dummy file and translate the events file for Outremer, one event at a time until I have a basic grasp of the structure of very basic Lua. Hopefully then I can start to expand and play with it with minimal help.
...
is the Lua translation a good place to start practicing fundamentals?
Also, as far as fundamentals go , do you think the lua translation is a fair place to start or do you think some place else would be better? I'ts just that in this day and age needing to understand how to create one's own redementary lua events seems to be the most fundamental thing outside of knwing the very basic scenario editor functions for TOT.
Are you aware that TheNamelessOne took exactly this approach as he was adapting Lua for use within TOT, and this is included with the TOTPP download? The Scifi folder of the .zip file contains events.lua which is his direct port into Lua of the events.txt in the built-in TOT Scifi scenario. You might find it very enlightening to look at those two files side-by-side. Personally, I had never used Lua before TOTPP (though I was familiar with many other programming languages) and initially I relied heavily on TNO's Scifi events.lua to gain an understanding of how this was all supposed to work.

You've posted at length, in other threads, about your preferred learning styles and what types of instruction work (or don't work) for you. If you think this idea would be a good way for you to learn, absolutely you should go ahead and try it! Just realize that you're at the beginning of the road, so it may be difficult at some points; and that even if you complete this project successfully, you may level-up to "advanced beginner" but still have much more you can learn. :) Right now, any approach that keeps you interested and gets you actively working in code is great -- you need to gain hands-on experience, and having a concrete project or goal to work towards sounds like a good thing.
 
Top Bottom