Author Topic: OP2 Game Flow Redesign (PhaseShift v0.5.0 released!)  (Read 1783 times)

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
OP2 Game Flow Redesign (PhaseShift v0.5.0 released!)
« on: April 07, 2019, 12:12:09 AM »
[EDIT] Watch the GitHub for current releases of PhaseShift: https://github.com/iICrowIi/OP2PhaseShift/


After playing the Plymouth, then Eden campaigns so much in the past year, I had some thoughts about what could be done within the game's engine to push out some more dynamic gameplay.  In my ideal scenario, the game will go through more different phases in the strategy, in terms of both military and base construction.  So, I spent some time yesterday and today trying to get those ideas as fleshed out as possible.

Most of the changes - including all of the military ones - can be done exclusively via changes to the tech tree file.  To that end, I have attached to this post my first attempt at making this work.  There are probably some balance issues that would have to be dealt with.  I also was limited from doing a couple small things I'd have liked to do (such as increasing the pre-upgraded Panther HP and changing the blast radius of some weapons via upgrades) due to technical limitations of the tech tree parser.  If anyone knows how to squeeze more out of it, let me know.

Below is a summary of the changes, and a description of what I think the net result of these changes would be for a scenario (whether single or multi player) where Eden and Plymouth square off against each other.  The first two changes are major game rules changes that, as far as I know, can't be implemented via the tech tree alone.

-------

Game rules changes that can't be done via tech tree alone:
Spent mines fall down to nearly zero output, requiring expansion to new, presumably harder to defend mining beacons as the game progresses.
Morale has a maximum permitted level based on how many morale relevant structures have been researched:
   - Base maximum: 45
   - Nursery: +5
   - University: +5
   - GORF: +5
   - Consumer Goods / Forum: +5
   - Medical Centers: +10
   - DIRT: +10
   - Recreational Facilities: +15

Both Colonies:
Tokamak cost up to 1500 (was 1100), MHD cost down to 800/400 (was 1000/500).
DIRT Procedural Review now changes Worker/Scientist requirement from 2/1 to 1/1 (was from 2/1 to 3/1 as a net downgrade).
Robo-Miners no longer become more expensive as new mining tech is researched.
   I believe the only reason they even did this was that SOME property of a unit must change for the upgrade text to show up on it.  The "change" will now be "The cost now = what it was before already."
Garage cost down to 900 (was 1500), construction time down to 1000 "points" (was 1500).
Guard post HP up to 750 (was 500) and explosion damage down to 200/200 (was 750/750).
Reinforced Panther Construction raises HP more 500->850 (was 500->750; Tiger is 800).  Research cost and scientist count increased to match new higher value.
Tiger chassis cost up to 1000+400 (was 750+250).
Advanced Robot Manipulator Arm tech's bonuses for Earthworker and Robo Dozer improved to 128->64 (was 128->96).
Hypnopaedia effect improved, for Eden 5000->3500, for Plymouth 5000->4000 (was 5000->3750 for eden, 5000->4500 for Plymouth).
Advanced Construction Materials research added: increases Wall HP 300->600.  Prereq = Enhanced Defensive Fortifications and Advanced Robot Manipulator Arm.  (I'm actually not sure what happens if two players with different wall HP amounts build walls that connect into each other...)

Plymouth:
Legged Robots tech has no prereqs.
Scorpions are a prereq for microwaves, rather than the other way around, and can be researched from the Standard Lab.
New upgrade: Scorpion Mobility.  Increases Scorpion movement speed from Fast to Very Fast.  Prereq = Arachnid Weaponry.  Researched at the Advanced Lab.
Scorpion Power Systems also increases range 2->4.  Requires Scorpions and Advanced Vehicle Power Plant.  Available from the Advanced Lab.
Arachnid Durability now upgrades Spider HP 100->150, and Scorpion HP 125->200 (was 100->125 and 125->150).  Now available at the Standard Lab.
Various research time costs have changed to support the new ordering: Legged Robots 1800->1600, Arachnid Weaponry 1800->1200, Scorpion Power Systems 1800->1600, Arachnid Durability 1800->1600.
ESG turning speed slower to 2 (was 11).
Electromagnetic Reverberations research added: EMP Penetration "damage" 255->320, for a better chance to land the disable.
Scout Class Drive Train research is now Plymouth only.  Eden gets a Lynx HP upgrade instead.
Extended Range Projectile Launcher upgrade is now Plymouth exclusive, while Grenade Loading Mechanism is Eden exclusive.

Eden:
Heat Dissipation Systems renamed to Thor Heat Dissipators.  Only affects Thors, and the effect is improved to 120->90 (was 120-100).
   This is to make room for newer, cooler upgrades for the other weapons.
Railguns no longer require Advanced Combat Chassis. (Still requires Independent Turret Power Systems, though.)
Increased Capacitance Circuitry now increases damage 80/40->120/60 (was 80/40->100/50).  Also, it gains Advanced Combat Chassis prereq to return that upgrade to its normal timing.  Also, it reduces the weapon's turning speed to 3 (was 11).
   The turning speed nerf is something I'd rather put into the weapon's base form, but I can't do that via tech tree changes alone due to the "only two techs can change a given unit or weapon" limitation.
Railgun Rifling research added: Range 6->8.  Prereq = Increased Capacitance Circuitry.
Light Tank Part Redundancy research added: Lynx HP up to 400 (from 300).  Prereq = Mobile Weapons + Reinforced Vehicle Construction.
Diode Lasers research added: Common cost 450->275.  Prereq = Efficiency Engineering + Heat Dissipation Systems.
Meteor Defense construction time down to 1100 (was 1800).
Precision Trajectory Projection Software's upgrade is now automatic with Meteor Defense's base research, but the base research takes longer.
Improved Launch Vehicle research cost 6000->4500

Tech tree cleanups:
Hot Cracking Column Efficiency removed.
Vulcanology awarded for free when Seismology researched.
Robotic Image Processing is removed, and its effects built in to the Scout and Light Post.
Consumerism research correctly identifies itself as having unlocked the Consumer Goods Factory structure kit instead of the University structure kit in the post-completion description.


Summary of new combat flow:

In low intial resource games, Plymouth can potentially get the first strike in if it sacrifices vehicle factory tech to rush scorpions.  However, unupgraded scorpions are so weak that the defender can probably survive until combat units are out with a combination of running away and scuttling units.  (Even a scout can kill a scorpion with proper micromanagement.)
Either way, Plymouth has to decide whether to commit to the new scorpion technologies or to skip that in favor of more traditional weapons.
Eden gets the next technological edge with the early completion of Railguns.  Though overcosted for their DPS, these weapons are longer range than anything else in the game until after a lot more research has been completed.
Next up should be the usual oppressive Plymouth midgame.  Stickyfoam has remained untouched, and in a long range battle, the ESG's turn rate nerf should have minimal impact.
As the game progresses, Eden will gain more cost efficiency in slow moving battles in the form of the railgun range upgrade, higher HP totals (whether from the lynx upgrade or from low-cost Laser Panthers), and the slight improvement to the Thor.  Plymouth will have more mobility, superior crowd control options, and more single-target dps once combat reaches short range.
EMP Missiles are still extremely opressive once Plymouth gains them, and with Eden's loss of the Lynx speed upgrade, dodging them is harder than ever.  Eden will have to use its power to secure positions for new Meteor Defense structures.
The Railgun and the ESG should do far worse if the enemy manages to get right on top of them, but both are extremely powerful in a stalemated situation.
It is my intention for more combat-relevant construction to occur.  Guard posts are better in both durability and liability (they'll do far less damage to your own units when destroyed, for example), walls can be upgraded, and garages and meteor defenses are easier to set up.
I expect Plymouth to be using garages to be more cost efficient with its hit and run missions, with ESG turrets behind walls when it needs to deny an area.  Eden will more likely put Railgun turrets in front, with meteor defense behind that.
Another major point: the total size of end game armies will likely be smaller due to the smaller amount of resources available in the first place.
Speaking of resources, I expect Plymouth will in general have an easier time moving its combat lines around to a secure a new mining location, but Eden might be better at actually assaulting an existing location.
« Last Edit: May 01, 2019, 02:18:34 PM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3205
Re: OP2 Game Flow Redesign
« Reply #1 on: April 07, 2019, 11:29:32 AM »
Have you checked out the files in sheets.vol that control mining and morale?  Not sure you'll be able to accomplish everything you want, but it would be a start.  You can also edit some of the other things you wanted to do (base Panther HP, for instance).  You just need Excel or an equivalent program capable of opening a comma/tab (I forget which one) separated spreadsheet file.
I do have some concerns about your proposed changes, though.  First of all, they really seem to favor Plymouth, which is already the "better" colony.  You've nerfed the Tokamak and buffed the MHD Generator, which makes sense for Plymouth, but the Tokamak is Eden's only reliable power structure as fumaroles aren't available on every map and, even if they are, they're often in the front of the base, where they're vulnerable to attack.  The only other option is the Solar Power Array, and let's look at the cost of that:
  • You have to research Space Program and Solar Power for a total of 6400 research points.
  • You have to build a Spaceport (3000 common, 500 rare).
  • You have to build a SULV (1000 common, 500 rare).
  • You have to build the Solar Power Satellite (1000 common, 200 rare).  Note: You need to have 4 workers and 2 scientists tied up while building both of those.
  • You have to build the Solar Power Array (500 common, 500 rare).
Total: 6400 research points, 5500 common, 1700 rare.

Compare to Plymouth's MHD requirements:
  • Research Magnetohydrodynamics (2200 research points).
  • Build an MHD Generator (800 common, 400 rare [proposed]).
Total: 2200 research points, 800 common, 400 rare.
I'm also not exactly thrilled that you want to give Plymouth yet another early game rush option (bringing the total up to 3 options for weapons, while Eden is still stuck at 1).  I like the idea of Plymouth getting Scorpions early on, but I think it should be instead of getting the Lynx, rather than in addition to.  Instead, you're creating a scenario where Plymouth can research Scorpions immediately (since most maps have the player start with a Standard Lab), rush out an Arachnid Factory (which is cheaper and builds faster than a Vehicle Factory), and hit an Eden player before they've even got their Advanced Lab finished (which they need to research their own mobile weapons).  Sure, an Eden player can try to get a ton of Guard Posts very quickly, but any player worth their salt is going to run past those and head straight for the Command Center.  Futhermore, your balance changes do nothing to the most imbalanced thing in the game, Plymouth's EMP Missiles.

I'm not sure how I feel about mines "drying out" over time...  A lot of the existing maps aren't really set up to support that.  I wonder if it would be better to reduce the population requirements of smelters and factories to encourage players to build more Vehicle Factories, thereby requiring more Smelters?
I think some of the ideas here are good, but, and I mean no disrespect, while reading through them it was obvious to me you don't have a ton of multiplayer experience.  It might be a good idea for you to get in a few games with some of the veterans around here to get a better idea of where some of the pain points are for each colony.


As a final note, your wall HP change will desync a multiplayer game.  Walls aren't owned by anyone, and they don't really have HP so much as a chance to get degraded/destroyed with each hit.  If you change the HP value, you change that degrade chance, but only for the local player.  Long story short, if you upgrade your walls and I don't, on my game I'll shoot a wall 5 times and break through; on your game the wall will still be intact.
« Last Edit: April 07, 2019, 11:31:52 AM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline lordpalandus

  • Hero Member
  • *****
  • Posts: 758
Re: OP2 Game Flow Redesign
« Reply #2 on: April 07, 2019, 06:09:51 PM »
Plymouth tends to be the better colony overall, so nerfing Eden moreso than it already was makes it even less likely players will play Eden.

The microwave weapon is far superior to the laser, even if the laser has independent power systems and microwave is still the default. Concussion damage is far more effective against lightly armored targets and lynxes are lightly armored in the early game. So, it generally takes 1.5 laser vs 1 microwave. Also, if you check the Morale.txt file, Plymouth has a higher upper limit on it's maximum morale than Eden does (believe eden max on easy is 100 and Plymouth 110).

In order to justify some of Eden's nerfs, I'd have to see some extra benefits for them as well. ie:

Eden's Tokamaks have stable and more reliable fusion. Their reactors do not degrade over time and produce +50 more power per reactor (or +100 with high temperature superconductivity). Then, that would make tokamaks are better early power generation and will help tide them over until they reach geothermal or solar.

Or another: Eden can build solar power plants without requiring a Spaceport. However, they only function during the day and auto-deactivate when it is nightfall. Launching a solar satellite will ensure it remains operational at all times.
Currently working on Cataclysm of Chaos, Remade.
Link to OPU page = http://forum.outpost2.net/index.php/topic,6073.0.html

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #3 on: April 07, 2019, 08:07:44 PM »
Regarding other files in scripts.vol, my understanding is that the player has to externally swap out any changes to those files before the mission starts, except for the tech tree file, which the map itself points to.  If I'm wrong on that, or if there's a practical workaround, let me know; that would let me implement the mining beacon change and have more control over weapons and vehicles.

I kind of assumed that fumaroles would be available in most or all maps; if this is not correct, then I'd probably back off of the Tokamak cost increase.  It is true that I haven't played much multiplayer, so I'm not sure what the maps people use are like.  Solar power is so bad I forgot it even existed.  I'll give it a cost reduction for sure.

Something I guess I should highlight more clearly than the change list did: Plymouth's normal military gets delayed considerably because Microwave tech is blocked until Scorpion tech is done.  Scorpion attacks can probably come out sooner than Microwaves could have, but unupgraded scorpions can be killed by any self destructing unit (Scouts are the obvious choice) and noncombat vehicles can avoid like 80% of the incoming damge by simply moving away.  I think the rush can be held until lasers or microwaves come out without too much damage being taken.  I could be wrong.

I was actually under the impression that I was giving Eden's military significant improvements - early access to a passable weapon in the form of the Railgun, a later game role for Lasers (Laser Panthers in particular will be insane HP per metal spent), a later game role for Railguns (having the longest range weapon in the game is usually a huge deal in RTSes), a buff to the already good Thor weapon, and changes to make it more practical to set up Meteor Defenses to mitigate EMP missiles.  I could well be overestimating the usefulness of any or all of these things with their present numbers, but suffice it to say that I am aware that Eden is much worse than Plymouth, and addressing that was one of my design goals here.

Regarding morale, I noticed that Plymouth generally had higher morale, but never really knew why.  As a general rule, Plymouth's research topics take ~10% longer than Eden's do, possibly intended as a way to offset the morale difference.

Thanks for the information regarding wall upgrades.  I hadn't tested how walls interacted with multiple players yet.
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 865
Re: OP2 Game Flow Redesign
« Reply #4 on: April 07, 2019, 08:45:46 PM »
Crow,

You are correct that each mission can specify a different tech tree. Some missions reference the same tech tree though. So if you are editing an existing tech tree it may affect multiple missions. Creating a one off tech tree for a new mission is easy and safe though.

To handle updating the game-wide sheets files, you can use the module manager built into op2ext (which is bundled with the official Outpost Universe release). Basically, the module manager allows adding modules by adding a command line argument specifying which mod is in use or through adding the mod's information to the Outpost2.ini file. Check out the op2ext readme on the repository for details: https://github.com/OutpostUniverse/op2ext

Basically, you can override the default location where Outpost 2 looks for game resources such as the sheets file. If you want the effects to be semi-permanent, you should embed it in the .ini file. If you want it to be quickly exchangeable, you should add it is a console module. I would recommend a console mod for what you are looking to do.

Check out sirbomber's multitek2 for an example of a console mod. While multitek2 is pretty cool, I'm not aware of any missions designed to use it that were fully implemented. There is a save bug in angelus' mission that uses it, not related to multitek2 at all and I always had trouble with the sandbox missions working for some reason, I think maybe they target an earlier version or I don't know what I'm doing, both possible.

You could even overwrite how tech trees work when the mod is loaded. So you could change the campaign tech tree or something. When the mod isn't loaded, Outpost 2 would default to the original tech tree(s) and sheets.

Hope that helps.

-Brett

Offline lordpalandus

  • Hero Member
  • *****
  • Posts: 758
Re: OP2 Game Flow Redesign
« Reply #5 on: April 07, 2019, 09:16:52 PM »
Something I forgot about Scorpions, that would make the Plymouth player nastier in the early game with them, is their EMP immunity. So, if the scorpions rushed your tokamaks, they could blow them up safely without getting emped. Whereas lynxes would get emped if too close, which is usually the case with laser/microwave. That would allow the player to obliterate all your power generation and effectively kill you.

The command center produces 50 power. Enough to power either the structure factory or the common smelter, or a structure factory and a common storage. If you had no common storage, you would be doomed as the moment you shut off the smelter, you'd lose all your stored common metals. If the Plymouth player noticed this, they might split off some of their scorpions to destroy your storages, while the rest focused on your tokamaks.

I believe in terms of costs, 300 common makes a Scorpion. 750 common makes a Laser Lynx. You could produce twice as many scorpions as lynxes, for the same price. Then have them split into two groups, with one as fodder for the lynxes to keep them busy and the other group to go after power and storage.

EDIT:

I do like many of the ideas you propose Crow!, but the issue is that Eden in Multiplayer rarely survives to mid-game, when they might be able to field Panthers. Plymouth generally will stickyfoam their lynxes, then circle wide around them and go straight for the Command Center. Any vehicle that approaches to try to kamikaze, would get stickied. Yes, Eden can be very powerful in the campaign and in colony missions, but that is because the Plymouth AI doesn't attack the player when they only have Laser Lynxes to defend theirselves with. They wait until you have Railguns, EMP, Panthers, and independent power systems. If they attacked when you lacked any of that, you'd get slaughtered.

A good case in point is Mission 3 in the Campaign for both factions. Both factions have unupgraded lynxes with base weapons. You encounter the same number of enemy lynxes. The Plymouth player can breeze through that mission, as their lynxes easily overpower the laser lynxes. But the Eden player has severe difficulty with their lasers, as they are on equal ground. The microwave weapon is superior to the laser, until the Laser gets heat dissipation, then lasers have higher rate of fire and thus have more damage per second than microwave, even if their microwave also has heat dissipation.

The only real way that Eden could survive to mid-game is to make Stickyfoam a mid-game weapon. Stickyfoam gives Plymouth a massive early advantage that has no counter, and once the enemy lynxes are stickied, just drive around them to get to your intended target. Base sticky lasts for at least 15 seconds, possibly longer... certainly long enough for 15 microwave lynxes to flatten your command center.

« Last Edit: April 08, 2019, 02:45:41 AM by lordpalandus »
Currently working on Cataclysm of Chaos, Remade.
Link to OPU page = http://forum.outpost2.net/index.php/topic,6073.0.html

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #6 on: April 08, 2019, 11:10:23 AM »
All the downloads for multitek2 point to some Japanese website that says the domain was expired or suspended.  Does it exist somewhere else so I can poke around in it?
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3205
Re: OP2 Game Flow Redesign
« Reply #7 on: April 08, 2019, 12:02:02 PM »
We used to have 3 different URLs: outpostuniverse.net, outpost-universe.net, and outpost2.net.  It's a long story.  We only have outpost2.net now.  Just replace whichever variant the MT2 URL points to with outpost2.net; it should work.

Edit: I got the most recent MT2 files off an old laptop.  Check them out here.
« Last Edit: April 08, 2019, 03:57:01 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #8 on: April 08, 2019, 01:11:50 PM »
« Last Edit: April 08, 2019, 01:30:05 PM by leeor_net »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2186
    • LairWorks Entertainment
Re: OP2 Game Flow Redesign
« Reply #9 on: April 08, 2019, 01:29:52 PM »
And link rot strikes again. Let me see if I can get a URL for you.

https://forum.outpost2.net/index.php?action=dlattach;topic=4409.0;attach=246

Hoping this is the version you want -- shows as last modified by Sirbomber in December, 2008.

While I'm at it, there's also this image that appears to go with it:


Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4751
Re: OP2 Game Flow Redesign
« Reply #10 on: April 10, 2019, 11:06:12 AM »
This is getting to be a rather interesting discussion.

As a side note, it might be interesting to develop a way for levels to load customs sheets other than the tech tree. Something that is mission specific, and doesn't require restarting the game with new modules.


Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #11 on: April 10, 2019, 02:13:52 PM »
What if OP2ext added a button to the main menu called "Load Mod", which brought up a drop-down list of available mods, and when you select one it called Outpost2.exe /loadmod [modname] then closed the current process?

Anyway, I was kind of confused for a while as to how OP2ext was used, but apparently it's way simpler than I thought.  This should give me control over everything I want except for capping morale.


Another question: I've been following the stock multitek.txt's example and have been including dummy versions of the tech topics I've removed.  Is there a reason this is done, or can I completely delete the unused techs?

« Last Edit: April 10, 2019, 03:04:51 PM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3205
Re: OP2 Game Flow Redesign
« Reply #12 on: April 10, 2019, 03:15:38 PM »
You should be all set removing them completely so long as nothing else in the techtree file or sheets.vol references that tech ID.
I've done my fair share of techtree work and can hop on IRC for the next hour or two if you want to chat about things.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 865
Re: OP2 Game Flow Redesign
« Reply #13 on: April 10, 2019, 08:41:24 PM »
Crow!,

I think a dropdown menu would be generally well received. One could specify in the .ini file which console modules were available. Were you interested in implementing?

Adding a way to overload standard sheets data per mission seems reasonable to me as well but not sure of the technical challenges involved in implementing.

If you have any issues with op2ext, I'll try to help. I've become fairly familiar with it over time. Attached is a tech tree syntax highlighter designed for use with notepad++. I like using it because it helps prevent errors with the syntax. It lives in the SVN repo (when it is online).

-Brett

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #14 on: April 10, 2019, 11:16:19 PM »
Thanks for the help so far, guys.  I am intrigued by the idea of implementing a more user friendly mod selector, but I have no idea where to start with hooking stuff into the OP2 main menu.  Obviously some work has been done there already - NetFix certainly wasn't in the original game release! - but I'm not sure where to start looking there.

I've picked a name for this mod - it is now called Phase Shift.

I have implemented the changes to mining beacons, and I did a test playthough in the Plymouth Population colony game map.  I got up to about 300 population, exhausting 7 mines along the way with 3 more recently established before I quit.  It played out more or less how I wanted it to, though it did teach me that Cargo Trucks should have their price reduced to match the longer distance mining that this encourages and requires.

Below is an update to the intended change log, along with a ZIP of the mod's current state.  The only thing in the below list that I haven't found a way to implement yet is morale.  Things that are different from the previous list are in bold.
[EDIT: I forgot to actually attach the file mentioned above.  Now it is here.]


----------------

Spent mines fall down to nearly zero output, requiring expansion to new, presumably harder to defend mining beacons as the game progresses.
   All below numbers are for non-upgraded common mines.
   1-bar mines give out about 16,000 ore before falling to 20 per load.
   2-bar mines give out about 24,000 ore before falling to 30 per load.
   3-bar mines give out about 32,000 ore before falling to 40 per load.
   All mines now reach their peak at 2/3 of the way through their normal output period.  This way, the player can check if a mine is losing output, and if so, know that it is close to the end of its rope.
   Mine variants within a bar may give about 10% more or less ore total.  The ones that give more ore at the start will eventually award less ore total.
   
Morale has a maximum permitted level based on how many morale relevant structures have been researched:
   - Base maximum: 45
   - Nursery: +5
   - University: +5
   - GORF: +5
   - Consumer Goods / Forum: +5
   - Medical Centers: +10
   - DIRT: +10
   - Recreational Facilities: +15

Both Colonies:
Cargo Truck common/rare cost down to 600/0 pre-reinforced vehicle tech and 375/75 after (was 800/0 before, 500/100 after).
   This change goes hand-in-hand with the mining beacon change.  This is to support the idea that you do not always have to make a new set of smelters every time you switch to a new mine.

Tokamak cost increased slightly, to 1250 (was 1100).
Solar Panel power output increased to 600 (was 400), building common/rare cost reduced to 200/200 (was 500/500), satellite common/rare cost reduced to 500/100 (was 1000/200).
DIRT Procedural Review now changes Worker/Scientist requirement from 2/1 to 1/1 (was from 2/1 to 3/1 as a net downgrade).
Robo-Miners no longer become more expensive as new mining tech is researched.
   I believe the only reason they even did this was that SOME property of a unit must change for the upgrade text to show up on it.  My "change" will now be "The cost now = what it was before already."
Earthquake concussive / penetration damage swapped to 25/50 (was 60/25), so it works better vs buildings (which tend to have high armor) and less well against vehicles than at present.
   The game would benefit from a "bonus vs buildings" damage type, but that would require a pretty extensive coding change.

Garage cost down to 900 (was 1500), construction time down to 1000 (was 1500).
Guard post explosion damage down to 200 (was 750), HP up to 750 (was 500).
Panthers have more HP both pre and post upgrade, to 600->850 (was 500->750; Tiger is 800).  Research cost and scientist count increased to match new higher value.
Tiger chassis cost up to 1000+400 (was 750+250).
Extended Range Projectile Launcher upgrade is now Plymouth exclusive, while Grenade Loading Mechanism is Eden exclusive.
EMP's base reload time slowed to 155 (was 140).
   Eden still gets the original post-upgrade reload time of 120.
Scout Class Drive Train research is now Plymouth only.  Eden gets a Lynx HP upgrade instead.
Advanced Robot Manipulator Arm tech's bonuses for Earthworker and Robo Dozer improved to 128->64 (was 128->96).
Hypnopaedia effect improved, for Eden 5000->3500, for Plymouth 5000->4000 (was 5000->3750 for Eden, 5000->4500 for Plymouth).

Plymouth:
MHD cost down to 800/400 (was 1000/500).
Legged Robots tech has no prereqs.
Arachnid Weaponry can be researched from the Standard Lab and only requires Legged Robots tech.
New upgrade: Scorpion Mobility.  Increases Scorpion movement speed from Fast to Very Fast.  Prereq = Arachnid Weaponry.  Researched at the Advanced Lab.
Scorpion Power Systems also increases range by 2.  Requires Independent Turret Power Systems and Advanced Vehicle Power Plant.
Arachnid Durability now upgrades Spider HP 100->150, and Scorpion HP 125->200 (was 100->125 and 125->150).  Now available at the Standard Lab.
Focused Microwave Projection now requires Arachnid Weaponry, thereby delaying the Plymouth research tree by two topics.
Various research time costs have changed to support the new ordering: Legged Robots 1800->1600, Arachnid Weaponry 1800->1200, Scorpion Power Systems 1800->1600, Arachnid Durability 1800->1600.
ESG turning speed slower to 2 (was 11).
Electromagnetic Reverberations research added: increases EMP Penetration "damage" to 320 (from 255), for (as I understand it) a better chance to land the disable.

Eden:
Improved Launch Vehicle research cost 6000->4500.
Geothermal Power Plant output 500->650 baseline; Heat Mining research topic removed.
Laser damage up slightly both pre- and post- upgrade, now 40->50 (was 35->45).
Heat Dissipation Systems renamed to Thor Heat Dissipators.  Only affects Thors, and the effect is improved to 120->90 (was 120->100).
   This is to make room for newer, cooler upgrades for the other weapons.
Shrapnel Shaping research added: increases Starflare concussion/penetration damage to 500/1500 (from 500/1000).
Railguns no longer require Advanced Combat Chassis. (Still requires Independent Turret Power Systems, though.)
Railgun turning rate slowed to 3 (was 11).
Increased Capacitance Circuitry now increases Railgun damage 80/40->120/60 (was 80/40->100/50).  Also, it gains Advanced Combat Chassis prereq to return that upgrade to its normal timing.
Railgun Rifling research added: Range +2.  Prereq = Increased Capacitance Circuitry.
Acid Cloud turning speed up to 9 (was 6) and AoE increased to 64 (was 48) to better match graphics and handle high speed targets better.
Corrosive Catalysts research added: increase Acid Cloud concussion/penetration damage from 15/10 to 25/10.
Light Tank Part Redundancy research added: Lynx HP up to 400 (from 300).  Prereq = Mobile Weapons + Reinforced Vehicle Construction.
Diode Lasers research added: Cost 450->275.  Prereq = Efficiency Engineering + Lasers.
Meteor Defense construction time down to 1100 (was 1800).
Precision Trajectory Projection Software's upgrade is now automatic with Meteor Defense's base research, but the base research takes longer.

Tech tree cleanups:
Hot Cracking Column Efficiency removed.
Vulcanology awarded for free when Seismology researched.
Robotic Image Processing is removed, and its effects built in to the Scout and Light Post.
Consumerism research correctly identifies itself as having unlocked the Consumer Goods Factory structure kit instead of the University structure kit in the post-completion teaser.
« Last Edit: April 10, 2019, 11:29:29 PM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #15 on: April 11, 2019, 10:34:28 PM »
Tried to make a multiplayer scenario to implement as close to the revised morale system as I could figure out how to.  The results are summarized in the comments.  I probably did something really dumb; I'll try again later.

Code: [Select]
void AIProc() 
{
if (TethysGame::UsesMorale())
{
//only calculate the below stuff every so often, to avoid excessive load on the system.
//This is causing the below code to NEVER fire, so apparently there's something I don't understand here.
//if ((TethysGame::Tick() & 0x1F) == 0)
//{
//The below code is causing the host's game to instantly exit, and causing the other player to report "CHEATED GAME!".
for (int i = 0; i < 2; i++)
{
int moralePoints = 0;
if (Player[i].HasTechnology(3301)) //DIRT
moralePoints += 2;
if (Player[i].HasTechnology(3303)) //Med Centers
moralePoints += 2;
if (Player[i].HasTechnology(3304)) //Nursery
moralePoints += 1;
if (Player[i].HasTechnology(3305)) //University
moralePoints += 1;
if (Player[i].HasTechnology(3306)) //Rec Facility
moralePoints += 4;
if (Player[i].HasTechnology(5108)) //Forum
moralePoints += 1;
if (Player[i].HasTechnology(5101)) //Consumer Goods
moralePoints += 1;
if (Player[i].HasTechnology(03302)) //GORF
moralePoints += 1;

//out of 12 possible points, you need 11 or more for Excellent, 7 or more for Good, and 3 or more for Fair morale.
//If your morale exceeds what you're allowed to get, you get brought down to the previous level, forcibly.
if (moralePoints < 3)
{
if (Player[i].MoraleLevel() == moraleOK || Player[i].MoraleLevel() == moraleGood || Player[i].MoraleLevel() == moraleGreat)
{
TethysGame::ForceMoralePoor(i);
TethysGame::FreeMoraleLevel(i);
}
}
else if (moralePoints < 7)
{
if (Player[i].MoraleLevel() == moraleGood || Player[i].MoraleLevel() == moraleGreat)
{
TethysGame::ForceMoraleOK(i);
TethysGame::FreeMoraleLevel(i);
}
}
else if (moralePoints < 11)
{
if (Player[i].MoraleLevel() == moraleGreat)
{
TethysGame::ForceMoraleGood(i);
TethysGame::FreeMoraleLevel(i);
}
}
}
//}
}
}
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3205
Re: OP2 Game Flow Redesign
« Reply #16 on: April 11, 2019, 11:18:10 PM »
The ForceMoraleXYZ() functions won't do what you want it to do... they lock the player's morale at that level, as in, it won't go up or down.  Calling any morale functions past mark 0 (with the exception of FreeMoraleLevel, and only if it's called for all players) will cause the CHEATED GAME! behavior you're seeing.


I'd suggest breaking your morale hack into its own function (for example, Export void MoraleHack()), which you then call on a repeating time trigger initialized in InitProc, rather than... whatever you're trying to do with counting ticks.


Something like this:
Code: [Select]
Export int InitProc(){   ...   CreateTimeTrigger(1, 0, 5000, "MoraleHack");   ...}
Export void MoraleHack{   ...}
Edit: Ugh, that looked better before the forum removed all my return characters and whitespace.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4751
Re: OP2 Game Flow Redesign
« Reply #17 on: April 11, 2019, 11:23:44 PM »
Triggers and AIProc aren't called every tick. The condition to check is:
Code: [Select]
00403249  CMP AL,3  ;  Check if ((tick MOD 4) != 3)
0040324B  JNZ Outpost2.00403506  ;  -> Return

Try changing your code to:
Code: [Select]
if ((TethysGame::Tick() & 0x1F) == 3)

Edit: Or use Sirbomber's suggestion. That might be more natural for Outpost 2 level code.



If Morale is set after game start (after the tick has incremented past 0), you'll get "CHEATED GAME!". The only thing you can do with morale after game start is to call FreeMoraleLevel. This is part of more general code to set GameOpt. Only a handful are allowed after tick 0 without causing the "CHEATED GAME!" message to appear. Details: Forced Exports (renamed OP2Internal)

You can try setting the memory locations directly if you want to bypass the "CHEATED GAME!" message. That project should contain details for the memory addresses.

« Last Edit: April 11, 2019, 11:26:02 PM by Hooman »

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #18 on: April 12, 2019, 01:26:00 AM »
I'll figure out triggers sometime tomorrow.  Scheduling a check every 32 ticks or so should do what I was attempting with the AI proc thing.

According to DataStructure Player.txt, the offset of the morale number within the player is 0x040, while the morale level is 0x034, so does this work?

Code: [Select]
//after doing stuff to determine maxMorale
int* morale = (&Player[i]) + 0x40;
int* moraleLevel = (&Player[i]) + 0x34;
if (*morale  > maxMorale)
{
    *morale = maxMorale;
    if(*morale >= 90)
        *moraleLevel = 0;
    else if(*morale >= 70)
        *moraleLevel = 1;
    else if(*morale >= 45)
        *moraleLevel = 2;
    else if(*morale >= 25)
        *moraleLevel = 3;
    else *moraleLevel = 4;
}

Having done stuff with more safe/modern computing environments for a long time now, I feel uncomfortable just pointing at some memory and saying "I'm pretty sure this is data type X.  Now go execute some code that could to terrible, horrible things if I'm wrong."


-------

Edit: The above didn't work for a couple reasons.  First, I had to explicitly cast the pointer as being a (int*).  Second, it appears that Player[] does not point to the structures documented in DataStructure Player.txt, so I had to move the pointer.  After dealing with that, though, it seems to be working.  Also, getting the repeating trigger to work wasn't too hard, though referring to a function name by a string whose contents happen to match the name of the function kind of freaks me out.  What is this, DOS batch file programming?
« Last Edit: April 12, 2019, 09:46:44 AM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4751
Re: OP2 Game Flow Redesign
« Reply #19 on: April 12, 2019, 12:52:11 PM »
Quote
Having done stuff with more safe/modern computing environments for a long time now, I feel uncomfortable just pointing at some memory and saying "I'm pretty sure this is data type X.  Now go execute some code that could to terrible, horrible things if I'm wrong."

Ahh, welcome to the joys of casting.  :D

Who needs type systems and safety checks anyways. The data is what I say it is. Trust me. ;)



Pointer addition in C/C++ is kind of message up. When you add a const to a pointer, it actually calculates an offset that is const * sizeof(pointerBaseType). Hence if you declare or cast a pointer as int* and add 1 to it, you'll actually add sizeof(int) to the address. It relates to how C/C++ does array indexing, though I don't think there is any good reason for the behaviour.

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #20 on: April 13, 2019, 12:10:44 PM »
OK, here's a release with a test multiplayer mission.  I'll be around on chat this weekend looking for games, both of the original to get a better feel for that, and if anyone's up for it, tests of how this works out.

The mission is a 2 player Space Race scenario based on the map for the Plymouth Colony Builder II Starship game, with a player starting in the NE and SW bases.  There is a 2-bar and a 1-bar common in each of the two "tiers" of the initial base, and a 2-bar Rare mine is in the second tier.  3-bar mines lie shortly outside the easily defended area, and there's a "pocket expansion" available to each side with a 2 bar common and rare mine, which should be easy to defend but is a long distance from the base. I didn't notice until I had already worked on the map for a while that the NE base has a second entrance; I plugged the hole with some concrete walls, but the map is still pretty asymmetric as a result.

A couple new changes in the mod itself:
Command Centers cost 1800 common and build in 2200 "points" (was 2800 for both), to better facilitate remote bases.
Concrete Walls have 450 HP (was 300).
Recreational facility technology is worth +20 extra maximum morale (previous post said +15)

---------

EDIT: updated to v0.3.1, fixing a crashing bug that somehow slipped into the mission.
« Last Edit: April 13, 2019, 08:00:52 PM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 865
Re: OP2 Game Flow Redesign
« Reply #21 on: April 13, 2019, 10:05:43 PM »
Crow!,

I can be online around 8PM Eastern time on Sunday. I'll stop in the forums and see if you are around.

Be ready for some gymnastics trying to get the games to talk over the internet, including possibly downloading and using Hamachi. I would probably ask you to use the current development build of op2ext, NetFix, and NetHelper, which I would have to prep and send you somehow.

Fractured Alliance by Sirbomber is a pretty good coop scenario to cut your teeth with. It is bundled with the current download. I'm not much of a challenge  in deathmatches (nor do I particularly enjoy them).

-Brett

Offline Highlander

  • Hero Member
  • *****
  • Posts: 778
  • Outpost 2 Elder
Re: OP2 Game Flow Redesign
« Reply #22 on: April 14, 2019, 05:17:32 AM »
Very interesting concept with mines that runs "dry"


I don't like many of the changes to weapons though :P
There can be Only one. Wipe Them out. All of Them.

Old player still playing. Visit Spark for a game of Outpost 2

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 865
Re: OP2 Game Flow Redesign
« Reply #23 on: April 14, 2019, 07:00:37 PM »
Crow!,

Just jumped onto IRC if you are available.

-Brett

Offline Crow!

  • Jr. Member
  • **
  • Posts: 69
Re: OP2 Game Flow Redesign
« Reply #24 on: April 18, 2019, 05:03:41 PM »
In Phase Shift maps, I want to have the map alert the player when a mining beacon is running low on resources.  I see the ollydbg notes list the memory location of how many loads a beacon has put out so far, relative to the start of that beacon's unit data.  How can I identify the start address of each beacon's unit data?

I'm also looking to have the multiplayer Phase Shift map(s) self identify whether the Phase Shift mod is active, so it can turn on the Phase Shift specific triggers only when Phase Shift is on.  Does anyone know a way to achieve this?

In other news, I've cut back the scorpion's strength slightly by downgrading its armor class from light to none - this should be especially noticeable with Acid Cloud and ESG attacks, but less so for, say, the Thor.
« Last Edit: April 18, 2019, 05:10:37 PM by Crow! »
Speedruns, my FFIV game randomizer, and more can be found at my twitch page:
https://twitch.tv/iicrowii