View Full Version : Final Frontier Mod planning
Mylon Sep 04, 2007, 08:44 PM I'm planning a new mod for Final Frontier that will be pretty radical, but I need some ideas.
So far the game design will include discrete resources. Cities will produce metal, crystal, and at least one other resource. Power may exist, but be discrete. Hammers will still exist, but these represent the manufacturing power available. That is, there may be some labor intensive projects, but still be cheap. Likewise, there may be some projects that are expensive, but quick to build.
The first question that I need to answer for my game design is going to be how buildings and population tie into everything. I'm tempted to make the game a bit like Stars! where there is only one planet per system, mostly for simplicity's sake. But short of that, buildings will be repeatable, with increasing cost based on planetary size (which will be modified with terraforming, building habitation domes and later, planetary rings and even ringworlds even later on).
But what does population do? They could provide the base yields, much like in Civ4 and even Final Frontier, modified based on the planet and buildings. Or perhaps they are the modifier to the buildings, akin to Space Empires 5. Or I could go the MoO3 route and each building would require some population, and if a population goes below the amount required the whole city takes penalties, representing a skeleton staff in factories and such. Certain techs could reduce this requirement or provide more food to help fill the requirement.
And then there's the concept of ships. I'm tempted to add a fleet mechanic. The basic idea is a stack of units would fight another stack of units all at once. Ships would choose their target randomly and fire each "round", with the battle lasting a set number of rounds. The defender will get a chance to flee, as the battle may only end with his units at 80%. Units could very well acquire "promotions" from hits to represent damage. A significantly larger stack would suffer from some ships not firing and even a risk of friendly fire. Thus larger stacks would ideally suffer from diminishing returns, encouraging the use of multiple fleets. Also, these special damages would not be cured unless the ship is drydocked, or maybe a great engineer is put on the ship/fleet. Larger ships would likely be crippled before they are destroyed, offering a chance to capture. This battle could even be controlled manually (using a dialog system) for single player games, but the automatic one will come first.
And I do plan on bringing back great people. This shouldn't be too hard to do if I go with the one planet per system model, or significantly change how the UI works. I could very well treat the entire solar system as a single "planet" and just assume people and buildings span over the different planets.
So what are your thoughts? I need input, as this will all change how the game is designed!
Fanatic Demon Sep 05, 2007, 07:04 AM My suggestion would be to make it more like MOO.
- Spaceships should be limited up to a maximum distance outside your curltural borders depending on certain techs, and certain other units should be able to travel further (like assault ships).
- Red Stars going supernova or creating a new black hole ;)
- Evil aliens with superior technologies
- Space creature like Space worms and exotic Cristal life forms
- Stable and instable temporary shifting worm holes, connecting 2 location in the universe.
- Space anomalies, like rifts in space time continium causing your ships to disapear a reapear into the future :king:
Mylon Sep 05, 2007, 07:58 AM Sorry, the only bit there I plan on adding is wormholes. Though I am interested in another terrain type that obscures vision and placing that liberally. Ambushes, anyone?
Mylon Sep 06, 2007, 12:33 AM I can't believe why it's so hard to understand just how this mod does building. So far I've managed to find out how it allows multiple buildings in the same city and understand how it scales the cost for buildings. However, I have not yet figured out how it restricts/allows buildings based on the currently selected planet.
Jon Shafer Sep 06, 2007, 11:11 AM I can't believe why it's so hard to understand just how this mod does building. So far I've managed to find out how it allows multiple buildings in the same city and understand how it scales the cost for buildings. However, I have not yet figured out how it restricts/allows buildings based on the currently selected planet.
Check out the "cannotConstruct()" function in CvGameUtils.py.
Jon
keldath Sep 06, 2007, 03:08 PM hey,
why not helping the star trek mod? by deanej....he done somenice work tilll now.
Mylon Sep 06, 2007, 03:43 PM Check out the "cannotConstruct()" function in CvGameUtils.py.
Jon
I found it, thanks.
hey,
why not helping the star trek mod? by deanej....he done somenice work tilll now.
Sorry, Star Trek just isn't my thing. Once I get some of the core functions of my mod done, I'd be more than happy to help Deanej incorporate some of the features into his own mod.
I have the building schema updated and I think the SDK changes to support it. Now I have to add in the functions that add and subtract resources. And then do this for units! Then comes the task of updating the UI gut out the planetary code (since I'm going to go with a unified solar system model) and add in this resource information. The UI is probably going to be the hardest part.
My plan for population so far is to have "generic specialists" that represent different labor focuses. Each pop point can focus on areas like agriculture (+3 food, +1 commerce), production (+3 hammers, +1 commerce), and commerce (+4 commerce). Later on in development, Planets can have traits that boost these effects, like a tropical planet that provides +1 food for the first 3 agriculture labor points. Certain buildings will provide specialist slots which allow more specific areas of focus, like engineers will provide +2 hammers, +1 research (a small step down from production, but they also produce GPP), artists provide culture and a small amount of wealth, and so on. The number of slots for these generic specialists will depend on the planets in the system, though this can be increased with buildings. With proper investment, it shouldn't be hard to provide plenty of jobs for your workers.
Marnid Sep 07, 2007, 01:39 PM Looking forward to trying this mod out when your finished the first version,:D
I like the three types of assigned jobs for population, this is like master of magic, makes it easier than having to micromanage which planet pop is on or programming governors.
I have no clues about modifying the city screen interface but I think it would be nice if instead of showing the star in the 'picture part' of the city the city screen the list of planets and the specialists could be shown there. A mouse over or right click could give information about each planet (mainly which buildings and general info about planet type)
regarding production/population system:
One idea I had is that you could restrict the number of 'buildings' capable of being built on each planet based on the size. This would add some strategy as you can't just build everything anymore and have to make choices as to what to build. If you resource assosicated building you have modifiers and/or restrictions based on the type and size of planet
examples:
you can only build basic farming building on green and blue planets (cheaper to build than nutrient facility which can be built on any planet) but blue green planet also the only type capable of holding archology building (+2 max pop) so have to decide between short term and long term growth.
on the gold and grey planet a mining facility will get a +15% hammer bonus but it is also the only type of planet you are able to build the uranium processor building (which allows nukes and gives bonus to power generator buildings) so you have to decide which to build if it is a small planet
.
Mylon Sep 07, 2007, 05:15 PM Here's how it works so far: All workable planets in the system have their size multiplied by their yields and this number is tallied up. It is divided by three and this is how many slots are available for that yield type. Thus, if a planet is large (size 3) and provides 3 food and 1 production, it provides 3 food slots and 1 production slot.
Buildings are set to work on this formula (For both production cost and resource cost): Each planet provides a set number of building slots. Once that number is exceeded, the cost ramps up for each additional building, based on space available. Multiples of the same building count less towards this total (as they're easier to cram together). Potential building choices will include methods that increase this. Habitation domes, terraforming, planetary rings, and even an option later on to make a ringworld (hopefully I can get the graphics working for this, I do have an idea), though this will likely destroy all buildings in a system but provide nearly limitless building space.
Mylon Jan 22, 2008, 06:41 AM I'm finally starting work on my mod.
I'm having trouble justifying using 3 resources. I think one resource, plus cash, will be plenty, but I'm programming in 3 resources anyway with relatively easy means to expand that further. At least, as easy as adding espionage was.
The basic idea is planets have a mineral and a commerce value. Mines produce minerals based on the mineral value, which in turn adds to that system's minerals. A space port allows a portion of that system's minerals to convert to player-wide minerals each turn. In this way, an outlying colony with mines and a space port can fuel inner systems with manufacturing capital. Gold is not restricted similarly.
Producing just about anything costs minerals _and_ gold. To maintain a healthy rate of expansion, 100% of commerce cannot be spent on research. I may add penalties for exceeding 40% commerce in any one area, similar to SMAC. That is, past 45%, 1% per 5% is lost. Past 60 2% per 5% is lost, past 70 it's 3% per 5%, and so on.
Spaceships additionally cost minerals and gold to maintain. Laser based weaponry might be low cost and maintenance since the weapons themselves don't have moving parts, for example, but they could be more expensive to manufacture.
Spaceships themselves will be presented as basic hulls. When the ship is finished, promotions are chosen to outfit the ship. One can pick armor, weapons, engines, or special items (engineering bays, for example, for repairing in space). Combat itself will occur entirely differently. Fleets will engage each other as groups, with each ship picking a random target each round of combat. Damage will knock out components on the targeted ships (with a preference towards armor first).
Later on I may redesign ships to have a real unit designer, but I'll also want to change the UI for city building to be able to collapse groups for easier browsing.
Planets can be improved using a successfully more expensive structure that allows more building (and population) space. Later on they can be replaced with a ringworld, and even later, a sphereworld. These would cost huge amounts, however.
The idea is to give the mod a very Space Empires flavor, if anyone is familiar with that series.
If anyone is interested in joining the project, I would appreciate the help.
Mylon Jan 22, 2008, 07:54 AM Components:
Ship components are scaled to the ship. All ships have the same number of components, but larger ships take less damage and deal more. Large ships have a hard time hitting small ships and especially fighters. Components are destroyed by taking damage. So ships will get progressively weaker as combat goes on. One goal is to design combat such that combats do not end with total annihilation of one fleet.
Missile weapons. Gas power, but can be countered.
Beam weapons. Relatively weak, but long range, might get one free shot per combat.
Projectile weapons. The old standby.
Engines. Used for getting around. If no engines are present, the ship will get a huge maintenance discount and will act as a system defense ship. This can represent a space station or even a weapon platform.
Point Defense, beam. Has a chance to counter one missile, above, but works for the entire fleet.
Point Defense, self. Counters two missiles, above.
Engineering bay. Repairs one component per turn, increases maintenance cost, slightly reduces damage taken in combat, might allow a promotion that allows it to work even when 'destroyed'.
Backup Bridge (All ships have a bridge by default. If this gets destroyed, the ship ends it's ability to participate in combat.)
Fighter Bay (for fighters, which will not have any range/movement but will participate in combat)
Armor (more likely to be destroyed compared to other components as well as reducing damage taken)
Planetary bombs. Normal ship weapons are ineffective at clearing a planet.
Troops. One of these components is required for each point of population the system has to conquer it and claim it as your own. May also incur less diplomatic problems.
(Later)
Boarding parties (chance per round of initiating a boarding action. The target ship, however, will get a free extra attack when this happens. More boarding parties increases the chance of success of commandeering the ship.)
Crew/Life support/power plant (mostly backup facilities, probably not required)
Supply storage (for limited ship range, but this would increase it/provide backup if regular supply storage is knocked out)
Fleet ideas (probably later):
Formations can be used to change fleet tactics. A flanking formation will result in much faster and lethal combat on both sides with a chance of taking out support ships (ships with no weapons but engineering bays and supply storage and beam point defense), but beam point defense will have a lessened effect across the fleet, making missiles hits more likely.
Wall formation. Ships are close together. Increased chance of performing focus fire to destroy enemy ships, but missile hits may cause damage to more than one ship.
Facilities:
Facilities come in different varieties. Each can be built multiple times.
Farms provide food, based on planetary conditions. Hydroponics bays provide a fixed amount of food but cost more. They might also not take up planetary space.
Mineral Mining. These provide minerals based on planetary conditions. Mineral synths provide a fixed amount of minerals, but have a monetary cost to maintain.
Space Port. These transport some local minerals to player-wide minerals. If supplies go in, these will also resupply ships that pass through. These also provide a modest commerce modifier.
Infrastructure. This provides more space for buildings, but the cost increases with each successive building.
Research Facility. These provide a flat +1 research, as well as a research modifier. Thus, the more of these combined the larger the effect. They do require gold and minerals to maintain, however.
Bank. Provides +1 gold and a small % boost to gold production.
Espionage facility. Provides +1 espionage and a small % boost to espionage.
Manufacturing plant. Allows stuff to be built faster. Provides more hammers and a small % boost to hammers. Costs minerals to operate.
Mineral Enhancer. Enhances the mineral content of a planet over time. Expensive to build and costs gold to maintain. Later in the tech tree.
Terraformer. Enhances farm output of the planet over time (up to a maximum). Expensive to build and costs gold to maintain.
Ringworld. Not exactly a facility in itself, but transforms the entire system into a ringworld. As a bonus it comes filled with manufacturing plants. This idealizes farm production, proves tons of facility and population space, but has a low mineral production rate.
Sphereworld. As above, but even bigger. Additionally, makes the system immune to solar destruction, unless it's the owner trying to destroy it (for whatever reason).
Zuul Jan 22, 2008, 09:55 AM As said the the chat. I like the ideas. Thought most if it myself already :). I want to be in the team. Thought of any name yet?
lamppost4 Jan 22, 2008, 09:52 PM I think this mod sounds awesome. One thing I may suggest is to maybe have infantry units that do the actually guarding and capturing of cities. The infantry would only be able to stay on the planet itself or move via transport to another planet to capture it or provide a garrison, the ships of the fleet would act more like the helicopter does in normal civ. I suggest that if this is implemented, that there be some sort of limit to the number of infantry holding one planet. It just seems unreal to me any other way because if an alien race wanted to take over earth, the only way they could really capture it would be to land aliens on it. Otherwise it would be like a permanent siege.
I hate to be someone who suggests but does no work but I really do not have the ability to mod.
Zuul Jan 23, 2008, 04:25 AM So Mylon, what shall we begin doing?
A few names I came up with is:
Omega Point
The Phenomenon of Man
Harvest of Stars
Type III Civilization
Type IV Civilization
Universe as we know it!
Interstella
Intergalactic
Milky Way
Orion
What is the story. Either different races or man has been split into diferent starsystems around the galaxy (and somehow forgetting alot of tech).
Would be cool if in the beginning the you don't have any FTL drive, or some very limited one.
You can only build (or after some early techs):
Probe:
Move 1, Strength 0, Fuel 10, Size 1.
After first movement it will follow that direction until removed (left/right/up/down/diagonal).
Cannot inspect/collect wreckages.
20% chance to be removed in asteroid fields.
Destroyed if path is blocked (civ border or nebolusa).
Leaves a tiny wreck.
Interplanetary Ship:
Move 1, Strength 1, Fuel 6, Size 1.
10% chance to be hit in asteroid fields.
Have different components, like different weapons, or a small bording crew.
Wormholes:
Conecting either static or randomly on wast distances.
------
Fuel:
Drains one fuel each movement. When having noting left it is lost in space (leaves a wreck). Amount of fuel may be dependent on universe size.
Wreck:
Small/big anicent wrecks: Goody huts like in ff but 2 different ones, the big ones giving more.
Small/medium/big/huge wreck. Gives resources.
Commets:
Flys around in the galaxy in a random direction. Can crash into things. Can be harvested.
Asteroid fields:
Sparce and dence. Can have resources. Can hit ships.
-------
Some engine types:
Nuclear pulse propulsion (10% lightspeed)
Bussard ramjet (20% lightspeed)
Antimatter rocket (30% lightspeed)
Pion rocket (40% lightspeed)
Relativistic rockets (50% lightspeed)
Singularity (90% lightspeed)
woodelf Jan 23, 2008, 07:01 AM Good luck on this one. I'll be watching it. :)
snipperrabbit!! Jan 23, 2008, 09:11 AM What about to dissociate population and city level ?
Population will be ranged from 1 million per system to 20 billion per system
City Level will be ranged from 1 to 100, the first being the main population and the 99 remainings being specialists (counting toward pop from 100 000 to 50 million each) ... etc ...
I don't want to go too far yet and develop the idea behind but if you're interested PM me.
Mylon Jan 23, 2008, 10:47 AM The title of the mod is "The Frontier Awaits". Plays some homage to the graphics and expertise it's leaning on from Final Frontier, but has a very forward looking approach (as opposed to a terminal approach).
As for the first order of business, I'm working on adding the extra resource to the SDK. Slow going, as I have to hunt down each and every commerce reference and duplicate the basics (it's making me wonder if adding an additional yield type would be easier). I would suggest you work on the Python, Zuul, as planets need to be changed from being population controlled to being building-controlled.
The first order of business is to change the building requirement function (for now, just disable it) and remove the population assignment functions. Planets are still picked for where to place buildings, as the food value is important for farms and the hammer value will determine how many minerals each mine produces. I suppose changing how buildings work will require a few SDK hooks.
Also, some python/XML work will be required to get promotions to work. If you can add two versions of each component promotion as above, the functional and "damaged" versions of each, plus a pair of "undesigned" and "designed" promotions that enable components and enable traditional promotions, respectively, and get the code to make it behave that would get ship design started. If you're feeling really daring (or get ahead of me) you can try and make a custom interface using a python popup window where designs can be saved and recalled. These components will be called up in the SDK for the custom combat function, so it will be difficult to add new components for anyone wanting to mod the mod, but complex changes require drastic actions. :)
Another task will be to add the new resource to the interface. Put it next to current gold in the main interface and somewhere in the city screen. If someone can modify the widget files of the SDK to support mouse-over display of minerals/mineral production of the city that would save me some time.
I'm a ringworld junkie, so another task would be to add sphere worlds and dyson spheres, at least graphically. I figure by using about 8 or so of the dashed trails that normally follow planets at a 1/8th offset (or 1/n offset if more used) all at the same distance from the sun, that can represent a ring world. Take one of the nicer looking planets and making it bigger (replacing the Sun) would represent a sphere world or dyson sphere.
If anyone wants to work on the SDK, please wrap any changes you make with "// Begin Final Frontier" and "// End Final Frontier" or add "// Final Frontier" for single lines of code. Adding your name for credit is okay, but that makes it easier to find new bits of code.
For suggestions, culture is going to need some purpose. It had a very lackluster effect in Final Frontier, partly due to the distances of solar systems and the small range of culture levels. I'm thinking that culture will provide small boosts to yield/production (same as population, given how buildings do most of the work), have a larger reach so they might influence other systems, and help defend against land invasions.
Population itself is going to remain the same abstracted Civ4. Each population point provides a boost to a planet's productivity, but represents a progressively larger amount of population (5 population is much more than five 1 population units). There might be a custom growth function that allows an unlimited amount of population, but growth takes much longer once the planet is filled up.
Initially, we'll be using the different civilizations from Final Frontier. Later on, if graphic artists pop up (or someone find some already made aliens and space ships) we can add new races. But for now I want to get the mechanics in and working. Additional content will come later.
Mylon Jan 25, 2008, 02:48 AM I just need to put this down on paper. :)
The combat model.
Ships attack each other in fleets. First the different fleets are assembled in memory and checked for initiative-based promotions. Attacking will provide an initiative bonus, unless the defending fleet is in a solar system, in which case the defender gets the initiative bonus.
Initiative is rolled. Each ship is checked in order for beam weapons and they get to fire their beam weapons.
Begin Combat Round
Initiative is rolled again.
Each ship first decides its action (board, attack, ram, flee, do nothing). This is situational. Ships with boarding parties get a chance to board (it's not definite). Ships with no weapons but more engines will attempt to flee. If the entire fleet has more engines than the enemy fleet and smaller numbers, then the fleet may attempt to skirmish (this will come later with fleet orders).
Ships attacking pick an attacker and fire their weapons. Missiles get put into a queue and are resolved later. The target is picked semi-randomly. Ships will favor targets they have a good chance of hitting (frigates->fighters, battleships->cruisers). Promotions may improve the intelligence of target selection (reducing likelihood of targeting weaponless ships, making targeting favored targets more likely, etc).
*OR*
Ship attempts a boarding action.
*OR*
A damaged ship with a self destruct component may attempt to ram and self destruct. If the ship has no weapons left, cannot flee, and its fleet is very outnumbered ( 2 to 1), the ship will likely attempt to ram. A ship will never ram a smaller ship.
*OR*
If the defending fleet has no weapons, the ship will attempt to flee. If it has more engines than the enemy fleet, it will be vulnerable for at least one round, but will be vulnerable to fighters for the full three rounds. Ships with no weapons in a fleet with weapons will attempt to hang back and avoid fire.
*OR*
Do nothing. A ship with no bridge is inoperable in combat. A ship with no engines may find itself out of combat for a round as well.
Next Initiative
Missiles are resolved. The sum of all beam PD weapons is taken and compared against incoming missiles. A function is used to determine how many missiles survive (missiles never miss, but cannot target fighters). Ships fire their individual PD cannons at any surviving missiles targeting them. The functions are weighted so overwhelming PD can still fail and overwhelming missile onslaught is more likely to have the maximum number of missiles shot down. Any remaining missiles hit. Possible PD function for missiles shot down: 1d[max{missiles + 1 : (PD beams + 1 or (PD Cannons * 3 + 1))}] - 1
Repair Phase. Ships with engineering bays may roll to see if a component is restored to operating condition. The component will be considered broken after battle, but can be used in-battle.
Go back to beginning of round. Repeat a limited number of times (3 rounds total?)
Damage phase: A ship takes damage based on the size of the ship firing the weapon and armor. Armor reduces damage taken slightly. Damage over a certain portion knocks one or more components. Dice are rolled to determine which component, with armor more likely to be chosen than others. In the event that a ship is destroyed by damage, a check is made against each ship in the same fleet for damage caused by debris. In theory, after so many ships are blown up in an infinitely sized fleet, the whole fleet would blow up from a chain reaction. This creates a small drawback to larger fleets. Also, ship destruction will credit the killer some EXP points based on the destroyed ship's size.
Boarding phase: When a ship is boarded, it gets to fire all of its weapons at the boarding ship. This means the ship may fire twice if it has already fired this round. If the boarding ship's boarding component is destroyed, this phase is aborted. Otherwise, the ship's crew fights with the boarding party and dice are rolled to determine if the action is successful. If so, the boarded ship is delayed by one turn but given command to the other team. Some components may cut this victory short, like a self destruct device which has a high likelihood of activating in the event of a loss, but may activate even if the crew would otherwise have won. This component also has a likelihood of damaging the boarding ship.
Ramming phase: Like the boarding phase, the defending ship gets to fire all of it's weapons at the ramming ship, including firing twice if it has fired already. If the self-destruct component is destroyed, this phase is _not_ aborted, but damage will be reduced. Note that ramming can only fail if the ship is destroyed in the opportunity attack. Dice are rolled to determine how much damage is done. In the event that the self-destruct device was destroyed, the ramming ship may survive the attack, and damage is rolled (instead of assuming destruction). Any ships destroyed risk hitting other ships of the defender's fleet using the debris check, as above.
If possible, a log of the combat will be generated for detailed analysis.
At the end of the combat, all ships will gain 1 exp point. Hotfixed components return to broken status.
Zuul Jan 25, 2008, 04:00 AM Laser - Low damage, fast. 25% vs planetary.
Projectile - Normal damage, normal speed. 10% vs planetary.
Missiles - Great damage, slow, can be shot down. 33% vs planetary.
Bombs - Huge damage, very slow, easy to shot down or evade. 100% vs planetary.
Ship Parts:
-----------
Weapon - Beam
Weapon - Projectile
Weapon - Missile
Weapon - Bomb
Defence - Fleet
Defence - Self
Bridge - Main
Bridge - Backup
*Bridge - AI
Crew Quarters
Engine
Engineering - Bay
*Engineering - AI
Armor
Self-Destruct Unit
Ramming Equipment
Storage
Ship Bay
* = some civs may use AI instead
All ships have ~10 parts.
All parts can be: working(green)/damaged(red)/destroyed(gray)
A ship can have size: small/medium/big
People:
-------
Crew
Engineers
Boarding Party
Troops
A fleet example:
----------------
Gunner:
Big: Bridge, Missile#2, Projectile#2, Beam, Armor#3, Engine
Carriers:
Normal: Bridge, BrigeBackup, SelfDefence, Ship Bay#3, Armor#2, Engine#2
Defender:
Small: Bridge, Beam, FleetDefence#3, Armor#2, Engine#3
Rammer:
Small: Bridge, Ramming, SelfDefence, Self-Destruct, Armor#3, Engine#3
Planetary:
Normal: Bridge, Bomb#3, CrewQ#3, Armor#2, Engine
Mylon Jan 26, 2008, 11:23 PM An idea components in late-tech:
Space-folding. The ship can fold space to teleport anywhere in the known galaxy, except an already occupied square.
Some limitations (not all need apply)
Removes all of the ship's movement points.
Destroys the component (so it would require visiting a friendly base to repair)
Early version only works inside cultural boundaries.
Cloaking. This component allows a ship to get a free extra round of combat. This does not stack with the distance closing effect that lasers get. The drawback to this device is that target selection will be poorer (typically a non-combat ship, if one exists). The specialized design may also weaken the ship and make it more prone to total destruction (less total health). It will also increase the ships expenses. On the plus side, cloaked ships will be a separate group for the purpose of debris damage. That is, exploding cloaked ships can only damage other cloaked ships from the same fleet.
Couple of caveats:
Boarding and ramming can only occur on the second and third round of combat, as ships are still closing in during the first round.
Missiles fired as opportunity fire action (against boarding and ramming) do not get a chance to be shot down by fleet-wide point defense. Self point defense weapons operate as normal.
Using projectile weapons as a base, they will probably do 20% damage and have a base 60% chance to hit for the same ship class. This means three weapons firing for three rounds (assuming no knocked out weapons and an unarmored target) will do, on average, 1.08% damage. Laser weapons will do 8% damage, and have 90% chance to hit. Over 4 attacks (assuming no knocked out weapons and an unarmored target) this will do 86.4% damage on average, but benefits from the initiative. Missiles will be a special case, since they hit 100% of the time and will require more adjustment. A missile might do 30% damage, so 3 missile launchers over 3 rounds for 9 unblocked missiles would do a total of a whopping 270% damage.
This values should probably be tweaked higher to account for the fact that ships will get crippled as combat wears on.
The built-in Combat Odds Calculator will be replaced with Completely Redone Odds Calculator, or CROC for short.
Mylon Jan 28, 2008, 05:51 PM Progress report:
I almost have the base groundwork done for minerals, mineral upkeep, and gold upkeep. Gold upkeep is already a part of units in the extra gold cost value. For buildings, I'm enabling the ability for buildings to have negative commerce rates and negative yield rates. Negative yields do not get multiplied by modifiers. So a city producing 2 base minerals and using a facility that costs 2 base minerals to operate, but has a +50% modifier, will actually generate 1 mineral per turn.
The value for mineral upkeep for units is in and can be read from XML, but needs the code to actually deduct the value from the player's minerals.
Also, a lot of work will need to be done redesigning units and buildings to work with the new code.
Mylon Jan 30, 2008, 11:39 PM By doing a little dev blog here I'm feeling somewhat productive about things. I'm making meaningful progress, as I'm detailing here.
Anyway I fudged up on the XML schema files and it stumped me for a while, but now the minerals/upkeep and stuff is in the data and gets read. I still need to put the functions in so the game deducts minerals and gold to build stuff, but that should be pretty easy. The tricky part is getting the UI to work, since I know it can be temperamental.
Right now I've decided to distract myself with COMBAT. I'm putting in the call to redirect to the python because as a whole the code should be very straightforward in python.
Of course, I still need to put in the ship designing code, which mainly consists of putting the unit's EXP off to the side, giving it a fixed amount of exp to grant 10 promotions, and then restoring it's exp from the city and disabling component promotions. Oh, and put in the promotions themselves, which themselves won't actually do anything.
As for future stuff, I'm having a bit of design crisis with population. In SE5, population acts as a flat modifier to productivity, which sounds fair enough, but I want to reintroduce specialists. Will buildings require population to operate? Or will the game arbitrarily allow a limited percentage of population to become specialists (like, say, 1 in 4)? Hey, that second idea doesn't sound all too bad.
Zuul Jan 31, 2008, 05:34 AM Im sorry I have not done much yet. So much in the university. Anyway I will make some icons for the ship parts this weekend. I'm thinking on a new look (will make them in 3d then convert to sprite). If this new look is nice I will also remake the promotion icons.
I can also do the xml promotions (placeholders).
Have you come up with any more ship component than those I listed?
Mylon Jan 31, 2008, 10:21 AM A few, but they'll be difficult to code. Make sure the icons are immediately easy to tell apart. These icons are small, so the simple high-contrast icons that Civ4 uses work really well. Trying to fit a sprite of a 3d model into there with 32 bit color might come out confusing!
Zuul Jan 31, 2008, 11:24 AM Yes I know I have made alot of these icons already in my old Promotion mod :p. I will use gray-yellow, red-yellow, blue-yellow very like like the old ones but with better quality and some 3d feel. Also I think it will be faster to make them this way with 3d-splines instead of pixel by pixel.
Will show some tests before I start on the grand scale :p.
Mylon Jan 31, 2008, 11:45 AM Sounds good to me. I'll look forward to it. :)
Mylon Feb 01, 2008, 12:29 AM I keep getting hung up on the little things. First the game was crashing because I had forgotten to initialize one of the variables (And the compiler let me get away with this). I got that problem resolved. Now I'm having some trouble finding out where to place the hook to do the python code. Or if such a hook is even possible (the game might be crashing because the callbacks are hardcoded).
I would prefer to use Python for this as it would be trivial to make all sorts of different lists and manipulate them. This way the combat procedure could keep track of, say, combat and non-combat ships so only combat ships get fired upon as long as there are combat ships to shoot at (and when a ship looses it's bridge, it will move to the non-combat pool so more shots aren't wasted on it). I'm not sure how to easily do this in C++, aside from using fixed arrays or, even worse, linked lists.
Andrew_Jay Feb 04, 2008, 06:56 PM Any ideas what you will do with the "roads" from FF? I always found them a little strange. Would be to see the asteroid resources just treated like fish in the epic game - no network required. Could probably just speed up ships to make up for the loss of the bonus, too.
Mylon Feb 05, 2008, 03:06 AM I think the roads mechanic will stay. It allows an empire to move it's newly built ships from the fringes to the forefront fairly quickly relative to an enemy's advancement.
Resources are something I may need to update in a later version of the mod. Either a quantized resource or something much more important to play than +3 health or +3 happiness. I'll be honest, I haven't thought a whole lot about this problem. For now, I need to work on that combat model! I've written a routine that makes the attacker kill everything in the defender's plot, so at least that's a go. I just need to make it so targets can be picked semi-randomly from this list (and later, components picked semi-randomly from the ship hit), but I'm not sure of any easy way to do that, except maybe roll 1d(number of units) and just start from the head of the list and work down to that number as a way of picking it. The animation is going to make it look like the attacker vs the best defender, but I guess graphics will come later.
Anyway, I actually need to do some work tomorrow, unlike what I did today. :)
Zuul Feb 05, 2008, 06:17 AM Sorry no progress here. Blender only crashes on my new comp (with vista 64) :(. Doesn not look there is a blender64 for vista.
PsiCorps Feb 06, 2008, 04:47 PM How is your mod going? I'm in the unfortunate position of having lots of ideas for my mod but no understanding of XML or Python to enable me to experiment with ideas. Any suggestions?
Zuul Feb 07, 2008, 01:01 AM Do some tutorials (http://forums.civfanatics.com/forumdisplay.php?f=177)
Mylon Feb 07, 2008, 04:02 AM Sorry, no progress to report. I've been updating and fixing a few bugs in my larger city radius mod.
lamppost4 Feb 08, 2008, 08:34 PM Do you have a timeframe in which you plan on getting this done? And are you going to wait until you have everything up and running or will you release an alpha or preliminary version?
Mylon Feb 08, 2008, 09:28 PM I'll release an alpha once the combat model is done. It won't be very different from the base game. Today I just got my old Mylon Mega Mod updated to work with 3.13, so no work on this mod to report, unfortunately.
lamppost4 Feb 14, 2008, 05:18 PM So how are things going along? Not to be pushy or anything but is nice to just get an idea of how far you are.
Mylon Feb 14, 2008, 08:31 PM I've decided that I'm going to release a stack-based combat mod component first. It's going to slow things down a bit because it'll be designed for Vanilla Civ4's combat system, meaning the artillery, the archers, the melee, and so on. But then I'll modify it for the Frontier Awaits mod.
Mylon Feb 15, 2008, 02:57 PM It looks like there's a function in the SDK, attackForDamage() that does most of the work. So first I need to figure out how to determine who is attacking (hopefully I can use the stack selected instead of everything in the attacking tile), then keep calling this function (or something like it) to resolve the battle.
lamppost4 Feb 15, 2008, 09:07 PM Have you ever considered looking into Dales Combat Mod? He has a stack combat thing and his changes might help you decide what you need to change in order to get your ideas going.
Mylon Feb 15, 2008, 10:19 PM Yes, I've looked at his mod. Unfortunately it's merely a "archers attack when units get close" mod, not a true stack attack. He claimed he couldn't get the graphics to work, so didn't want to do a true stack attack.
I doubt I'd be able to get the full 10 swordsguys and 10 archers and 10 cavalry all on the field at once duking it out, but at least I could have them taking turns fighting as units, 1 on 1.
GeoModder Feb 16, 2008, 11:12 AM I think the roads mechanic will stay. It allows an empire to move it's newly built ships from the fringes to the forefront fairly quickly relative to an enemy's advancement.
I think some sort of teleport gate facility in your cities/systems would be the quickest way to transport existing units around. But this sounds of course high-tech. Perhaps a way to 'assign' newly constructed units instantly to a target system of the player could be implemented? Think of it as that parts of the ship to be are transported to the target system and locally assembled into the ship.
The main reason I don't like 'roads' in space is because any passing enemy ship or pirate can disable your connection.
Andrew_Jay Feb 17, 2008, 01:41 PM Perhaps easiest just to code some kind of movement bonus for when inside your own borders.
Of course, I think for connections to remain, the terrain system will need to be overhauled. Right now, space is 'land' - you'd want space to be water so that trade can be conducted, and for resources to act like fish once you but an extractor on them.
Zuul Feb 20, 2008, 12:06 PM http://forums.civfanatics.com/uploads/69847/TestPromotion.png
Finally made a first test pic of the new promotion icon style. Do you like it? Should I change something?
Maybe a bit lighter. Should I continue this style with the rest of the icons?
Edit: Oki added a lighter version:
http://forums.civfanatics.com/uploads/69847/TestPromotion2.png
Mylon Feb 24, 2008, 01:00 PM The lighter icon looks sweet. I'm looking forward to seeing the rest of the set.
Sorry I've been so scant. I just upgraded my computer and I've been slowly migrating everything over.
Mylon Apr 01, 2008, 11:32 AM Well, I finally got off my rear and started doing some programming but I've run into a snag. Previously, I had made a hook to call Python to handle a function to kill all units in the defending tile during combat, but that crashed the game. But damaging the units to 100% resolves everything just peachy. Go figure. Anyway, I tried recreating this function in Python, but nothing seems to happen. No python exception. The combat starts, but no one takes damage and the attacker eventually withdraws. Trying to figure out what I'm doing wrong is frustrating. I could do this using linked lists in C++, but I would rather not.
Thinker19930602 Apr 02, 2008, 07:46 PM I have a thread (link in signature) where some pretty good ideas have been suggested. You should check it out and I'd be honored if you post on it, Mylon. The ideas and suggestions are too numerous to post here.
Mylon Apr 03, 2008, 12:58 AM To be fair, the game is ultimately really shallow. I've already made a few comments in your thread (back in page 2), but one of the first things I intend to address is the simplistic combat system that plagues all Civ games. I don't feel comfortable doing this in c++, however, and want to do this part in Python. But it looks like I will have to hack something together because my attempt to add a new c++ to Python function call did not work.
cephalo Apr 03, 2008, 03:14 PM One thing I'd like to see different is the end game. Getting the battleship tech to build my first battleship is fun, but knowing that I will eventually need battleship 2, 3, 4 etc. is not enough to keep me excited.
The nature and atmosphere of combat should change in some way as the civs progress in tech. Adding a new greek letter and some strength points doesn't really change anything from a story-telling point of view.
One thing that was very cool about MOO was that there were some radical new technologies that really changed the strategic landscape once you first encountered them.
Thinker19930602 Apr 03, 2008, 07:07 PM To be fair, the game is ultimately really shallow. I've already made a few comments in your thread (back in page 2), but one of the first things I intend to address is the simplistic combat system that plagues all Civ games. I don't feel comfortable doing this in c++, however, and want to do this part in Python. But it looks like I will have to hack something together because my attempt to add a new c++ to Python function call did not work.
Thanks for the posts on my thread. your welcome to use any ideas on my thread, as long as you give recognition (some people are a bit sensitive). I agree with you that the combat system is a tad simplistic, but i would like to caution you to not overcomplicate it.
Mylon Apr 03, 2008, 08:07 PM Take a look at the combat system detailed towards the bottom of page 1 of this thread and you tell me. If you don't want to read all of it, the basics are this:
Ships have 3 kinds of weapons, and take turns firing their weapons. When a hit is made, the ship has a chance of loosing a component (engines, a weapon, armor, or the "bridge" which disables the ship except for basic movement). In this way ships are more likely to be crippled than blown up. And they all fire as a fleet. None of this one-on-one stuff.
cephalo Apr 03, 2008, 08:41 PM Take a look at the combat system detailed towards the bottom of page 1 of this thread and you tell me. If you don't want to read all of it, the basics are this:
Ships have 3 kinds of weapons, and take turns firing their weapons. When a hit is made, the ship has a chance of loosing a component (engines, a weapon, armor, or the "bridge" which disables the ship except for basic movement). In this way ships are more likely to be crippled than blown up. And they all fire as a fleet. None of this one-on-one stuff.
If you could pull that stuff off it would be very cool. The most important game for the player is the first game. Each time a new technology is used against a player that first time they play, it should be surprising and almost, but not quite, seem unfair. If they feel like they don't know what the future has in store for them, they'll be having fun.
Thinker19930602 Apr 05, 2008, 10:13 AM Take a look at the combat system detailed towards the bottom of page 1 of this thread and you tell me. If you don't want to read all of it, the basics are this:
Ships have 3 kinds of weapons, and take turns firing their weapons. When a hit is made, the ship has a chance of loosing a component (engines, a weapon, armor, or the "bridge" which disables the ship except for basic movement). In this way ships are more likely to be crippled than blown up. And they all fire as a fleet. None of this one-on-one stuff.
If you can pull it off, it would be awsome. Do you think you can overhaul the squadron (bomber, fighter, etc.) combat mechanics too?
Mylon Apr 05, 2008, 08:08 PM As I have it re-imagined, squadrons have no engine capabilities on their own. They participate in combat, but cannot make strikes and such on their own. Fighters will be squad of 3-5 fighters or bombers and damage will possibly destroy one of the craft, but besides that will not have individual components like ships will. Fighters do well versus small ships and other strike craft, while bombers do well versus large craft.
keldath Apr 06, 2008, 04:47 AM hey mylon,
say,
do you know how to make units?
Mylon Apr 06, 2008, 10:05 AM Make units? If you're referring to the artwork, then no. But it wouldn't be too hard to add a unit in using XML.
JEELEN Apr 07, 2008, 01:14 AM Not too difficult? Woodelf just released 2 space ship models I'd like included in MOO2Civ. Could you explain how that's done (or is there a thread describing this)?:confused:
Mylon Apr 07, 2008, 08:01 PM Check the documentation with the units. See if they provide the paths and such to use for the art info. The easiest way to create a unit is to copy and paste the XML entry for another unit and backtrack some of the tidbits, like the source of the texts (for unit name) or the art (for the model).
JEELEN Apr 08, 2008, 12:29 AM OK, thanks!;)
Mylon Apr 09, 2008, 02:32 AM Hey, actual progress to report!
I've gotten the design stage of ship building done and a skeleton of a combat engine done (just another rehash of "kill everything in defending tile and award all attacking units 1 xp"). The ship design was a bit difficult, but now I'll start adding in the basic promotions (I'll stick to one weapon type for now) and their damaged versions.
The next step is to figure out how to arrange everything in memory. There's going to be a lot of nested lists. Like, I expect it'll be something on the order of AttackerList [ [ Ship, Initiative, [components? (this could be generated dynamically instead of stored)]], [], ...] So that AttackerList[0].[1] will return the initiative value of the first unit of the attacker list. I'm trying to think if python dicts would be helpful in this instance, but I do not think so, given how everything will be fairly static and I can resort to using fixed index calls instead of dynamic ones.
Mylon Apr 17, 2008, 12:59 AM I've made huge progress in the combat engine. Now, when one unit attacks another, all units get a shot at the other stack. Right now combat only lasts for 1 round and doesn't actually use any ship stats, but that will come shortly.
I added in a new attribute to the XML instead of the weird round-about way I was doing things, so now there's an attribute that the game will check for to keep undesigned ships from acquiring exp promotions and designed ships from acquiring components. Next is to redo the XML file to mark the appropriate promotions as being components and make a broken version of each. Also, I'll need to add a way to prevent units from being fired on once they are dead: as I'm not iterating over the actual lists of units during the part where they will be fired upon, there shouldn't be any problem with deleting them from the list.
I also have to figure out how to mark the starting unit (or units) as being under design, so they get the proper treatment in combat.
With any luck I'll be able to release a version of the combat engine for scrutiny. I might even try developing a version for vanilla Civ4, though it won't quite be as deep (following the rock-paper-scissors trend already built in rather than the component model I'm using for Frontier Awaits).
Zuul Apr 17, 2008, 02:28 AM Nice to hear :). And What is shown in the animations?
Myself has not done much in Civ4 in 5 weeks as I have started my own game for mobiles.
Mylon Apr 17, 2008, 11:59 AM The animation is between the attacking unit and the "Best defender" according to the old Civ4 code, but units show damage/die as appropriate, or show "withdrawn from combat" if neither of the units died. The rest of the units in each of the stacks might fare differently. As it is possible to mix and match models inside of a "unit" it might be interesting to generate units dynamically for the purpose of the battle (to show off the fleet).
But as that's cosmetics, it's not a high priority for me. Now, if someone else wants to tackle the code, I encourage them, the relevant code should be in updateCombat() of CvUnit.cpp .
Now, the question comes down to... What promotions should be left as experience-type promotions? I'll have to cook up some ideas so units will have something to earn on the battlefield, as most of the default promotions are more suited to ship design.
Mylon Apr 20, 2008, 12:22 AM Alright, tackled some more code. Cleaned up the designing process so a ship should gain a fixed amount of experience, be "promoted" to design the ship, and then loose that same experience and have its level reset for old fashioned promotions. I still need to find a way to include the starting ship so that it gets a chance to be designed. Combat has been changed to go by the amount of +attack% promotions. I might add more to the promotions XML to properly implement lasers/projectiles/guns (As well as tweak a few other things), but for now this will do.
For armor, the +defense value is what it provides in terms of damage reduction (multiplicative, so armor 1 and armor 2, each providing 10%, would mean the ship takes 81% damage). However, each armor component counts as 4 components when a component gets busted. Therefore, if a ship with no armor looses a component, it will be 1/6 chance of being the bridge. If a ship with armor looses a component, it will be a 1/9 chance of being the bridge. I should either allow more components (which would subsequently require level 4 and 5 promotions, or the means to acquire promotions multiple times rather than using the I, II, III, etc system), or allow a bit more lee way with utility slots so every ship isn't 3 weapons + 1 engine + 1 armor.
For the moment, the means of "destroying" components eludes me. That is, the ability to fetch the name of a component to use string addition and add in the destroyed version. Perhaps it would be a simple matter to make the destroyed versions require the regular version and iterate over the list looking for that cue.
Design wise, I also haven't quite figured out how repair will work... As space is quite crowded, requiring units to be on a "city" to repair components wouldn't be too difficult. One thing I could do is make ships "free" and "instantaneous" to build, but require time and money to repair to working status. Oh, and I still haven't thought about how to "save" designs to save the tedious work of designing every ship. Then the AI will need to learn how to design ships, too.
As for different ship sizes, larger ships will be represented by larger strengths. Damage essentially works on the matter of [damage * attacker / defender] strength. However, chance of hitting will be based on another formula, a bit in reverse. That is, chance of hitting will be something like [defender strength / (attacker strength + defender strength)], though I'll have to work the math out. In essence, I strive to encourage a diverse fleet makeup of fighters, defense/invasion vessels (that rough size), destroyers, cruisers, and battleships.
I have not yet worked out how technology will factor into all of this. I might add in shields after all as a early to mid game tech, replacing armor for damage reduction but not giving the advantage of protecting other valuable components. With more customization of the XML, promotions themselves could be made to upgrade with technology (actually, easiest solution would be to have a pre- and post- techonlogy versions where, upon discovering the tech, python goes through and swaps them out - Or, actually leaves them as is and force players to retrofit).
So many details to work out, but for now I need to focus on getting the combat engine finished, even if it's static.
Mylon Apr 25, 2008, 05:20 PM The combat engine is nearly done! Or, at least the first step of it. Now I have to make it possible to repair components and factor in ship sizes. Oh, and I have to figure out how to make the first ship follow the design process. Getting the AI to design ships will also be nice.
One more step will also be adding descriptions for all of these components. Right now I'm dealing with TXT_KEY_BRIDGE and stuff. :)
Popcornlord Apr 25, 2008, 06:15 PM Cool! I'll be keeping an eye on this mod.
PsiCorps May 13, 2008, 07:28 AM Hey Mylon, how are things progressing with this Mod?
Thinker19930602 May 13, 2008, 01:11 PM I was thinking, the promotions in Civ are gained through expirience, but they reflect upgradable components, could you add an upgrade system in which you purchase upgrades and keep the old promotion system? Upgrades would directly effect the unit's abilities and capabilities, while promotions would have broader and not as direct effects.
Mylon May 14, 2008, 01:25 PM Sorry, I've kinda been distracted with other games. I haven't totally forgotten about this mod!
Thinker19930602 May 14, 2008, 02:29 PM I was thinking, the promotions in Civ are gained through expirience, but they reflect upgradable components, could you add an upgrade system in which you purchase upgrades and keep the old promotion system? Upgrades would directly effect the unit's abilities and capabilities, while promotions would have broader and not as direct effects.
I would also like to add that there should be several choices for each weapon system and that there should be opportunities to purchase new weapon systems and other things that are not weapons but would still affect ships like sensors and armor.
Mylon May 23, 2008, 01:56 PM Sorry about the lack of development. Depression (that has been mitigated by some games I've been using to distract myself with) has really been kicking my ass.
You can download the early version of combat model here: http://forums.civfanatics.com/downloads.php?do=file&id=9527
Stuff that needs to be done: Text and descriptions of the components! Also, tooltips to describe the effect of armor (it is more likely to be damaged when a component is damaged) and shields (mitigate damage slightly). Also, I couldn't get the code to check for a bridge to work properly. That's kinda where I stopped working on it.
Best way to see how the combat model works is to spawn some units, some of yours and some pirates, and manually add the components each ship is to have, then attempt to attack with one of the units: The animations may not play, but all units in both stacks get involved.
PsiCorps May 27, 2008, 05:34 AM I've fought that same battle(with depression) it is a battle that can be won, it just takes time. Good luck.
|
|